[asterisk-users] callfiles/manager api originate call fails

Rizwan Hisham rizwanhasham at gmail.com
Thu Aug 21 10:19:51 CDT 2008


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 


More information about the asterisk-users mailing list