Calling order

May 28, 2014 at 9:18 AM
To whom it may concern

o.Context = "default";
o.Exten = "301";
o.Channel = "SIP/trunk-xxxxx/" + "calling number";
o.CallerId = "callerid";
o.Priority = 1;
o.Timeout = 30000;

when i call from my computer first rings to the destination number and then to my extension.
How can we reverse this processing?

ex: first ring to my extension and then to destination number.

May 28, 2014 at 10:18 AM
Use the channel to call your device, and then the dialplan (Extension/context) to call the number.

I've never understood why they did it that way, but there ya go! Hope that helps.
May 29, 2014 at 2:19 PM
Thank you Skrusty for your reply. I will try it and i let you know if i have issues.
May 30, 2014 at 10:08 AM
Dear Skrusty,

i try many thinks but i was not able to make it work
below you will find my test

o.Channel = "SIP/trunk-xxxxx";
        o.Context = "default";
        o.Exten = "calling number";
        o.CallerId = "301";
        o.Priority = 1;
        o.Timeout = 30000;
when i do this the extension 301 rings but it calls the office number and not the "calling number" i have put in the Exten.
Do you see what i am doing wrong?

i also found the following sample in asttray
                Channel = ConfigurationManager.AppSettings["astPeerType"] + "/" + ConfigurationManager.AppSettings["astPeerID"],
                Exten = numberToCall,
                Context = ConfigurationManager.AppSettings["astExtenContext"],
                Priority = 1,
                CallerId = ConfigurationManager.AppSettings["astExten"],
                Timeout = 30000
is it correct to put the following values for my example?
"astPeerType" = SIP
astPeerId = trunk-xxxxx
numbertoCall = the number i want to call "calling number"
astExtenContext = ???????
astExten = 301

Thanks again for your precious help.