Capturing incoming caller id no

Dec 9, 2013 at 10:41 AM
I am creating a web app in asp.Net by C#. I made the connection succussfully with the asterisk server.And able to originate call also but i like to get incoming call caller id and information automatically .so guys plz help me
Dec 11, 2013 at 10:31 AM
Can you clarify what you want to do please.

Are you wanting to get a list of the calls in progress on your asterisk box when a page is requested via ASP.NET


Are you wanting to get real-time information about calls hitting your asterisk box?

The first is quite simple, you need to call "StatusAction()".
AsteriskAMI.Current.SendAction(new StatusAction());
and listening for the event "Status".
private void Current_Status(object sender, Asterisk.NET.Manager.Event.StatusEvent e) { ... }
Or, if you want to do it async, then see the post: and modify the code there for StatusAction and not agents.

However, the main issue with ASP.NET is that the process only runs during the time of the request. So monitoring for events is hard because your connection to Asterisk is closed as soon as the page is served up. You may want to write an application that saves data to a db, that your webpage can output?