Timeout waiting for response or response events to QueueStatus

Oct 21, 2014 at 2:03 PM
Edited Oct 21, 2014 at 2:08 PM
Hi everyone! I've got a problem trying to get QueueStatusAction().
What i do:
string queueStatus = "";

            QueueStatusAction myQueue = new QueueStatusAction();
            //myQueue.Queue = "400";
            ManagerConnection manager = new ManagerConnection("37.151.106.58", 5038, "user", "password");
            ResponseEvents re;
            try
            {
                manager.QueueParams += new QueueParamsEventHandler(pbxConn_QueueParams);
                manager.QueueMember += new QueueMemberEventHandler(pbxConn_QueueMember);
                manager.QueueStatusComplete += new QueueStatusCompleteEventHandler(pbxConn_QueueStatusComplete);
                manager.Login();
                re = manager.SendEventGeneratingAction(myQueue,3000);
            }
            catch (EventTimeoutException e)
            {
                // this happens with Asterisk 1.0.x as it doesn't send a QueueStatusCompleteEvent
                re = e.PartialResult;
            }
What i get at the catch block:
{Asterisk.NET.Manager.EventTimeoutException: Timeout waiting for response or response events to QueueStatus
   in Asterisk.NET.Manager.ManagerConnection.SendEventGeneratingAction(ManagerActionEvent action, Int32 timeout) in %some_long_path_wich_doesn't_matter%}
I tried to set more time (30000) but still the same exception.

I debugged library's methods and find out that the problem is here:
SendToAsterisk(action, internalActionId);

bool result = autoEvent.WaitOne(timeout <= 0 ? -1 : timeout, true);
what I have in action variable: {QueueStatusAction {Action:QueueStatus}}
what I have in internalActionId variable: "32977404_4"

And that's I receive from result: false
And from handler.ResponseEvents.Response : {ManagerResponse {DateReceived:16:59:47; Message:Queue status will follow; Response:Success}}
This string
bool result = autoEvent.WaitOne(timeout <= 0 ? -1 : timeout, true);
is always returns false.

I checked Asterisk's AMI console and hadn't found either 1 event with QueueStatusAction.

Can anybody tell me why? Thank you very much!
Coordinator
Oct 21, 2014 at 2:22 PM
What version of AsterNET are you running? I notice you're referencing the namespace Asterisk.NET.

The issue you're reporting was (as far as i know) resolved in AsterNET over a year ago. It looks like you might be running an old framework version.
Marked as answer by dolgovec23 on 10/21/2014 at 7:46 AM
Oct 21, 2014 at 2:29 PM
Hi skrusty! Thanks for your quick response! I use AsterNET v.1.6.3.1
I downloaded it like a half a year ago. Does it a new version reliased? Can you give me a link please?
Coordinator
Oct 21, 2014 at 2:32 PM
Please see the project homepage (at the top of the screen click "home" and the most current release is on the right hand side.)

We're currently on AsterNET 1.0.0 - Asterisk.NET was 1.6.3.1. (that's older than our 1.0.0 :)
Oct 21, 2014 at 2:38 PM
Edited Oct 21, 2014 at 2:46 PM
Yea, I see, thank you. I'll try :)
Wow, that really works! Thank you!
Feb 2, 2015 at 4:26 PM
Hey guys I've been having the same QueueStatus issue when there is a lot of call volume. When calling SendEventGeneratingAction with a QueueStatusAction object it times out 99% of the time (only during high volume though). However, when i pass a StatusAction object it never times out during high volume or just a normal day.

Any suggestions?