Capturing incoming caller id no

Dec 9, 2013 at 9: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
Coordinator
Dec 11, 2013 at 9: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

Or

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: https://asternet.codeplex.com/discussions/471495 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 asp.net webpage can output?