.NET C# Integration

I’m looking to integrate Asterisk 1.2 with a .NET C# environment. Does anyone have information on a tool or past experience in a similar done task?

It would be verify helpful as we like the Asterisk system, but we would like to make more usage out of existing systems.

Thanks in advance.
Juergen

gotdotnet.com/codegallery/co … 800f4f84c3

Thank you for the link. Did you had personally worked with that library before ?

JR

I downloaded it a few days ago but haven’t had the chance to fire it up in VS yet.

I just developed a small test application.
It works fine and is quite simple …

Hello,

I have tried to run the sample (both VB and C#) but I am getting the following sockets error:

“no connection could be made because the target machine actively refused it”

I am able to connect to Asterisk with X-Lite using the same host, port and credentials, but not with Asterisk .NET

Any ideas? Maybe I miss something properties files or anything else. Please help.

Thanks.

Make sure that you have your /etc/asterisk/manager.conf file configured properly and that you are connecting to the port indicated in that file (usually 5038).

I finally got a chance to take a look at this and the sample but I’m wondering if anyone can tell me what I need to do to get the sample to print out the number of people waiting in each queue. I need that a lot more than I need who is in each queue waiting to take a call.

I’d also like to get how long the longest has been waiting in each queue (which would be the first guy).

I think I figured out the first part. I created an event handler for “QueueParams” and then pulled out “e.Queue” and “e.Calls”. Unfortunately, this only pulls them on launch and not anytime there’s a change or at a setable interval. Can anyone help with that?

Alright, I got the queue name, number of people waiting, and the time the longest has been waiting by using the handlers below and then writing the code to pull the correct elements into some arrays.

dam.QueueParams += new QueueParamsEventHandler(dam_QueueParms); dam.QueueEntry += new QueueEntryEventHandler(dam_QueueEntry);

The only glitch I still have is that the only way I can update the info is to close the connection and then reinitialize. That seems really inefficient as it takes about 5 seconds to connect and gives me more-than-an-insignificant-blip in CPU usage (~4-7% on my dual-core P4 for about 2 seconds right before reporting the data). Does anyone know how I can get it to just fetch the info on demand or do I not get a choice?