Question

I'm trying to figure out a way to reliably detect if a channel is held via AMI. I have two issues:

  1. On Asterisk 1.8 I get the MusicOnHold event when a channel is held. Is this a reliable event? Can Asterisk be configured in a way that this event won't be sent?

  2. Earlier versions of Asterisk (1.6.0) don't send an event for MusicOnHold. In fact, all I get is an ExtensionStatus event when I put a call on hold. Is there another event I could enable or command I could send to figure out if a channel is on hold?

I know these are older versions of Asterisk but we have customers that are still using them.

Was it helpful?

Solution 2

I was missing "callevents=yes" in my sip.conf. I get hold events properly now even on older versions of Asterisk.

OTHER TIPS

Yes event is realible if you AMI application is realible.

No idea about ealy versions.Except you can detect moh by dialplan using NewExten event. Sure that will nto detect moh from endpoint.

Note, some phones not do MOH but instead just plaiing moh sound. For such phones you can't detect MOh state.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top