简体   繁体   English

未检测到星号用户事件

[英]asterisk user events not detected

We have our application that we are trying to connect to our asterisk using below code and look for AMI events such as Caller ID, Unique Id, Hangup, Answered, etc. We get successful login but there is no event that is transferred. 我们的应用程序尝试使用以下代码连接到星号,并查找AMI事件,例如呼叫者ID,唯一ID,挂断,已应答等。我们获得成功的登录,但没有转移的事件。

        callsList = new Dictionary<string, string>();
        activeAgents = new Dictionary<string, string>();
        manager = new ManagerConnection(credentials.Address, credentials.Port, credentials.UserName, credentials.Password);
        manager.NewCallerId += new NewCallerIdEventHandler(manager_NewCallerId);
        manager.Link += new LinkEventHandler(manager_Link);
        manager.Unlink += new UnlinkEventHandler(manager_Unlink);
        manager.NewState += new NewStateEventHandler(manager_NewState);
        manager.Hangup += new HangupEventHandler(manager_Hangup);
        manager.Login();

Our dial plan has following line 我们的拨号计划有以下行

       exten => s,n,UserEvent(NewCallerId, ${CALLERID(num)})
       exten => s,n,UserEvent(NewState, ${CALLERID(num)})
       exten => s,n,UserEvent(Hangup, ${UNIQUEID})

The manager user we are using has all rights for read and write. 我们正在使用的管理员用户拥有所有读写权限。 Would appreciate any help. 将不胜感激。

:) :)

Use tcpdump or other similar utility to check what exactly send to your AMI interface. 使用tcpdump或其他类似的实用程序来检查发送到AMI接口的内容。

for tcpdump line have be like this 对于tcpdump行有这样的

tcpdump -i eth0 -v -s0 -nn port 5038

Note, you have enabled events in case if you need it. 请注意,您已启用事件以防万一。

http://www.voip-info.org/wiki/view/Asterisk+manager+API http://www.voip-info.org/wiki/view/Asterisk+manager+API

http://www.voip-info.org/wiki/view/asterisk+manager+events http://www.voip-info.org/wiki/view/asterisk+manager+events

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM