Hi,
I’m looking for some guidance from Asterisk old-timers regarding polling an Asterisk server on a regular basis (every second) for channel information.
Here is the requirement for this particular project. We have about a 100 users on our system and our line-of-business application is a very slow ASP.NET WebForms application with a myriad performance issues, so the point of this exercise is to try and get away from relying on the LOB application to do all the heavy lifting such as speaking to Asterisk directly. So, basically we’ve come down to the following idea and that is to build a Windows Service hosting a little socket server to which the LOB application can speak to get information for a specific channel. Inside the Windows Service a collection of ‘Call’ objects are maintained which is basically just digested results of “core show channels” or “Status” action wrapped nicely in a strongly-typed class for easy handling by the Windows Service itself and the LOB application calling data from it.
In terms of technology and libraries… The Windows Service is built with C# and I’m using the AsterNET library to handle the interchange between the Windows Service and Asterisk.
I guess that should be more than enough background to answer my question. So here goes, basically what I’m trying to establish is the best-practice around getting channel information from Asterisk. I’ve fiddled around with “core show channels” but I’m leaning towards the “Status” action implemented by AsterNET which already exposes the “Status” command nicely. I thought it would be nice to stick to something where I don’t need to reinvent the wheel e.g. consuming the raw data from Asterisk. Though, I’m not too scared to digest the raw data if “core show channels” is the better or more accepted way of doing this. Please give me some guidance around what the tenured/experienced community regard as the “best-practice” for this particular scenario?
Thank you in advance and thank you to the Asterisk/Digium team for all their awesome efforts with Asterisk.
Regards,
Johan.