Timeout waiting for response or response events to QueueStatus

Oct 21, 2014 at 3:03 PM
Edited Oct 21, 2014 at 3: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("", 5038, "user", "password");
            ResponseEvents re;
                manager.QueueParams += new QueueParamsEventHandler(pbxConn_QueueParams);
                manager.QueueMember += new QueueMemberEventHandler(pbxConn_QueueMember);
                manager.QueueStatusComplete += new QueueStatusCompleteEventHandler(pbxConn_QueueStatusComplete);
                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!
Oct 21, 2014 at 3: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 3:29 PM
Hi skrusty! Thanks for your quick response! I use AsterNET v.
I downloaded it like a half a year ago. Does it a new version reliased? Can you give me a link please?
Oct 21, 2014 at 3: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 (that's older than our 1.0.0 :)
Oct 21, 2014 at 3:38 PM
Edited Oct 21, 2014 at 3:46 PM
Yea, I see, thank you. I'll try :)
Wow, that really works! Thank you!
Feb 2, 2015 at 5: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?