问题
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