0
class VoipEventStart implements IEventListener
{
    public function handle(EventMessage $event)
    {
        $a = $event->getKeys();

        if( ($a['event'] == "Hangup" || $a['event'] == "HangupRequest") && strpos($a['channel'], 'SIP/') !== FALSE)
        {
            return true;
        }

        return false;
    }
}

With above code ,I get peer status events, dont get the call events. Can any one help me what will be the reason?

Anu
  • 15
  • 2

1 Answers1

1

Check your asterisk manager.conf. Each AMI account has a list of read/write permissions. Ensure that your account has at least read access for "call" events.

See https://github.com/asterisk/asterisk/blob/master/configs/samples/manager.conf.sample for the official example file with a lot of explanations.

towe75
  • 1,470
  • 10
  • 9
  • Thank you verymuch. Edited manager config with Read = system,call,log,verbose,command,agent,user,originate Write = system,call,log,verbose,command,agent,user,originate and it worked – Anu Mar 21 '17 at 08:41
  • Great! So please mark my post as "accepted answer". See https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – towe75 Mar 21 '17 at 10:00