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.
[code]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();[/code]
Our dial plan has following line
[code] exten => s,n,UserEvent(NewCallerId, ${CALLERID(num)})
exten => s,n,UserEvent(NewState, ${CALLERID(num)})
exten => s,n,UserEvent(Hangup, ${UNIQUEID})
[/code]
The manager user we are using has all rights for read and write.
Would appreciate any help.