Timeout waiting for response to originate

Oct 16, 2014 at 5:38 PM
Edited Oct 16, 2014 at 5:40 PM
Hello, sorry for my english.

I'am use aster.net lib in my c# project. At one time, I generate a couple of originate actions to asterisk, after that, aster.net lib throw exception - "An unhandled exception of type 'AsterNET.Manager.TimeoutException' occurred in AsterNET.dll. Additional information: Timeout waiting for response to Originate".

I examine network logs, an I see, that asterisk send successfully response, but aster.net (I think so) throw exception. When I make less count of originate actions at same time, the program work properly, and aster.net not throw exception.

Please, help me)
Oct 16, 2014 at 8:23 PM
Can you provide your code(the originate action) so we can see any specifics?
Oct 16, 2014 at 9:19 PM
This is my send originate method (if I understand you correctly)
public static void OriginateCall(PhoneNumber number, Campaign campaign, List list)
            var a = new OriginateAction();
            a.ActionId = string.Format("{0}|{1}|{2}", number.DialListId, campaign.Id, list.Id);
            a.Channel = string.Format(campaign.PeerName, number.CallBackPhone);
            a.Context = campaign.Context;
            a.Exten = campaign.Exten;
            a.Priority = campaign.Priority.ToString();
            a.CallerId = campaign.CallerId;
            a.Async = true;
            a.Timeout = campaign.Timeout;
            a.Variable = string.Format("campaignId={0},listId={1},callListId={2},soundFile={3}", campaign.Id, list.Id, number.DialListId, number.SoundFile);

            lock (callsInProc)
                callsInProc.Add(number.DialListId, number);

Oct 17, 2014 at 9:54 AM
The timeout in your Originate, is that in milliseconds? Also, use the same timeout for your Originate message as in SendAction.
managerConnection.SendAction(a, campaign.Timeout);
If your timeout is in seconds, you need to multiply it by 1000.
Oct 17, 2014 at 10:45 AM
Thank for your replay.
The originate timeout is 3000000 (5 minute). I set this value, because saw one post in the internet. If i leave this field with default value, I have an exception. Thats why I set 3000000.
And now I call SendAction with timeout param = 3000000 (same interval as you say), and program (console app) stoped.
After waiting more than 15 minutes, program still hang...
Oct 17, 2014 at 11:53 AM
could it be a problem with the variable set?

try to use setvariable instead...

Oct 17, 2014 at 12:04 PM
Remove old add variable code, and change to:
a.SetVariable("campaignId", campaign.Id.ToString());
            a.SetVariable("listId", list.Id.ToString());
            a.SetVariable("callListId", number.DialListId.ToString());
            a.SetVariable("soundFile", number.SoundFile);
but the same effect - program hangs...((
Oct 17, 2014 at 12:28 PM
What version are you running out of interest?

Also, any chance you can send us a copy (pastebin) of the agi debug output from the asterisk console?

Oct 17, 2014 at 12:29 PM
Ah, i think it might be your action id! "|". Could you try replacing that with "-" for example?
Oct 17, 2014 at 12:51 PM
Change actionId - not help.
How can I see agi debug output?
Oct 17, 2014 at 12:58 PM
at the asterisk main console, type "agi debug on"
Oct 17, 2014 at 1:48 PM
the only thing i can think of is that one of your classes is passing a nothing value.
try hardcoding all the properties manually to see if it works.
Oct 21, 2014 at 3:23 PM
What version of AsterNET are you running, and have you been able to get a trace from the agi debug yet?
Oct 21, 2014 at 4:07 PM
Thank you all for responses!
I'am sorry, by now I have not time to provide all info that you need.

ps. I became use my own classes for communication with aster.