Hi,
My suggestion is to use the new plugin architecture to write such a modification. The .pl part of the plugin should contain something similar to this (that might vary depending on your Asterisk version, this sample is for Asterisk 11). You have to use a UserEvent to return a command to the client side (browser/extension), the command you want to send is the notifyconnect (or notifyringing). The event to intercept is "LINK" as fop2 will translate events to make it backwards compatible...
$AMI_Event_Handler{'bridgepopup'}{'LINK'} = sub {
my $event = shift;
my @allreturn;
my $state = ${$event}{'Bridgestate'};
$canal = FOP2::utils::get_channel(${$event}{Channel1});
$canal2 = FOP2::utils::get_channel(${$event}{Channel2});
if($state eq "Link") {
$return = "Action: UserEvent\r\n";
$return .= "UserEvent: CustomPopup\r\n";
$return .= "Channel: $canal\r\n";
$return .= "Family: notifyconnect\r\n";
$return .= "Value: $canal2\r\n";
$return .= "\r\n";
push @allreturn, $return;
}
return @allreturn;
};
Look at the sampleplugin source to get an idea of how to use it. You install plugins using the FOP2 Manager.
http://download.fop2.com/plugins/sampleplugin-1.0.0.tgz
Best regards,