Rizwan Hisham
2008-Aug-21 15:19 UTC
[asterisk-users] callfiles/manager api originate call fails
Hi all, asterisk is giving me tough time. its been 3 days I am trying to originate outgoing call using manager api/callfiles. both seem to work fine when i originate a call for a local peer, but if i try originating a call outside using a trunk thats when everything goes wrong. It does originate the call but the call does not go through to the desired endpoint. The trunk configuration is correct as all the other calls from users are fine. Am here for any suggestion. How can i make it work. If anyone knows anyother technique to originate auto calls from asterisk i'll be happy to try them out. I am using the following manager command, fputs($socket, "Action: Originate\r\n"); //fputs($socket, "Channel: SIP/abc\r\n"); fputs($socket, "Channel: SIP/".$txt_your_number."@TRUNK-OUT\r\n"); fputs($socket, "Context: webcall\r\n"); fputs($socket, "Exten: 932\r\n"); fputs($socket, "Priority: 1\r\n"); fputs($socket, "CallerID: WebCall<932>\r\n"); fputs($socket, "Timeout: 30000\r\n"); fputs($socket, "Variable: ID=" . $id . "|accountcode=7:0:webcall|sec=" . $min . "|dialnum=" . $txt_to_number . "|source_num=" . $txt_your_number . "|calldate=" . date("Y-m-d H:i:s") . "\r\n\r\n"); and my callfile contents are: Channel: SIP/TRUNK-OUT/$DIALNUM CallerID: Webcall<932> MaxRetries: 2 RetryTime: 10 WaitTime: 35 Account: 7:0:webcall Context: webcall Extension: 932 Priority: 1 Set: ID=".$id." Set: accountcode=7:0:webcall Set: sec=".$allowed_secs." Set: dialnum=".$dialnum."\ et: source_num=".$srcnum." Set: calldate=".$calldate." ".$calltime."\n"; -- Best Regards Rizwan Hisham -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080821/4d76d178/attachment.htm
Anthony Francis
2008-Aug-21 15:47 UTC
[asterisk-users] callfiles/manager api originate call fails
Rizwan Hisham wrote:> Hi all, > asterisk is giving me tough time. its been 3 days I am trying to > originate outgoing call using manager api/callfiles. >I would say remove the "@TRUNK-OUT" part and make sure that the context you send the call to knows about sending calls to the outside world. -- Thank you and have any kind of day you want, Anthony Francis
Rizwan Hisham
2008-Aug-22 09:35 UTC
[asterisk-users] callfiles/manager api originate call fails
Actually both calls have to be originated to the outside world. Thats why im using @TRUNK-OUT, when the first call is answered only then the call goes to a context. Thats where the problem is, the first call does not originate so i cant throw it to any context. On Thu, Aug 21, 2008 at 8:47 PM, Anthony Francis <anthonyf at rockynet.com>wrote:> > > Rizwan Hisham wrote: > > Hi all, > > asterisk is giving me tough time. its been 3 days I am trying to > > originate outgoing call using manager api/callfiles. > > > I would say remove the "@TRUNK-OUT" part and make sure that the context > you send the call to knows about sending calls to the outside world. > > -- > Thank you and have any kind of day you want, > > Anthony Francis > > > > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > AstriCon 2008 - September 22 - 25 Phoenix, Arizona > Register Now: http://www.astricon.net > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Best Regards Rizwan Hisham -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080822/21015a87/attachment.htm