Not getting events with PAMI

早过忘川 提交于 2019-12-12 02:35:31

问题


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?


回答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.



来源:https://stackoverflow.com/questions/42919402/not-getting-events-with-pami

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!