I want to thank Nicolas for the great support,
he gave me the right callhistory.pl file so, now, the callhistory panel will refresh everytime a new received or sent call terminates.
This is the content of callhistory.pl file that you find into DOCUMENTROOT/admin/plugins/callhistory :
$AMI_Event_Handler{'callhistory'}{'HANGUP'} = sub {
my $event = shift;
my @allreturn;
my $canal = FOP2::utils::get_channel(${$event}{Channel});
# We return an array containing valid manager Actions
$return = "Action: UserEvent\r\n";
$return .= "UserEvent: refreshcallhistory\r\n";
$return .= "Channel: $canal\r\n";
$return .= "Family: refreshcallhistory\r\n";
$return .= "Value: 1\r\n";
$return .= "\r\n";
push @allreturn, $return;
return @allreturn;
};
