Im currently working on a CRM features called Incoming call popup display using Asterisk Manager Interface AMI which contains the callers information in case the number exists to our database but my problem is I don’t know the Events of Incoming Call.
I need to find out the name for the following events:
Incoming call
When someone pickup/answer the call
When user or agent end the call
Or are there any documentations showing the incoming call process which indicate the events name?
I tried to log the events and it gives me a tons of information so Im just hoping someone may help me.
Most people wanting to do this simply look at the event they actually receive to work out what they need to look for. Most of the information an probably be obtained from newchannel and newstate events, with the values for the latter being as listed at: https://github.com/asterisk/asterisk/blob/master/main/channel.c#L643
However, you may have to take account of dialplan execution, specific to your dialplan, as well.
Remember that Asterisk is a toolkit, so the high level events you list don’t exist in Asterisk, and you need to look at lower level events and their context.
First of all, I would like to say thank you for all of your response.
I analyzed the incoming call events and this is what I got so far and made the Call popup feature work.
//Newchannel and State is ringing if($event->getName() == “Newchannel” && ChannelState == 4){
//Connected to Trunkline }
//Caller has been registered if($event->getName() == “NewCallerid” && ChannelState == 4){
//Send data to CRM to show popup call window }
//User pickup the call if($event->getName() == “UserEvent” && ChannelState == 6){
//Send data to CRM to hide popup call window but not the user who answered the call }