Asterisk Manager Interface missing events

Hi all,
I’m using asterisk since 2004 and used AMI to create calls and transfer them to the right extension once a call is answered. Everything works, but I decide to upgrade the version from 1.8 to 13.21. I did all the necessary changes to manage the new events. But sometimes some events are not triggered. What I do is:

  • make a call
  • when the called party answer, transfer the call to the right extension (the first operator free)

Because sometimes the operators put the wrong extension or it is NOT in auto answer, I want to check if the transfer is ok. First thing I used was Event: DialEnd, but often is not triggered.
Than I used to check the Newstate event, but even this is not always triggered, sometimes only the Ringing state, sometimes only the Up state. :roll_eyes:
Someone has an idea? And if yes, how to solve it?

Thanks in advance
Alessandro

Try to set the certain hangup handler in your dialplan for your call:
Set(CHANNEL(hangup_handler_push)=hendler,s,1)

and generate UserEvent for your AMI script unde [handler] context.

Hi voiplinux,
thanks for your time and answer.
I’m not sure if I well explained my problem, because your answer seems to deal with the hangup phase, while I’m trying to get the event when the internal extension pick up the phone.

  • i make an external call
  • someone answer
  • I redirect the call to the first free extension
  • I need to know when the free extension pick up the phone, (it should be in auto answer)

If the final extension is in auto answer (and it correctly answer) or it is not, often the last message i got remain that it is ringing (while I should receive an Up).

Another strange thing (at least for me), when i redirect the call, i receive a DialBegin but not a DialEnd (with DialStatus: ANSWER). I just receive it when i hang up (with DialStatus: CANCEL)

Anyway I tried your solution, but as supposed, it does not help me.

Thanks
Alessandro