<div dir="ltr">Hi all,<br>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.<br>
<br> I am using the following manager command, <br><br><span style="color: rgb(0, 153, 0);">fputs($socket, "Action: Originate\r\n");</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);"> //fputs($socket, "Channel: SIP/abc\r\n");</span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);"> fputs($socket, "Channel: SIP/".$txt_your_number."@TRUNK-OUT\r\n");</span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);"> fputs($socket, "Context: webcall\r\n");</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);"> fputs($socket, "Exten: 932\r\n"); fputs($socket, "Priority: 1\r\n");</span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);"> fputs($socket, "CallerID: WebCall<932>\r\n"); fputs($socket, "Timeout: 30000\r\n");</span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);"> 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");</span><br>
<br><br>and my callfile contents are:<br><br><span style="color: rgb(0, 153, 0);">Channel: SIP/TRUNK-OUT/$DIALNUM</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">CallerID: Webcall<932></span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);">MaxRetries: 2</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">RetryTime: 10</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">WaitTime: 35</span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);">Account: 7:0:webcall</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">Context: webcall</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">Extension: 932</span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);">Priority: 1</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">Set: ID=".$id."</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">Set: accountcode=7:0:webcall</span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);">Set: sec=".$allowed_secs."</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">Set: dialnum=".$dialnum."\</span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);">et: source_num=".$srcnum."</span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);">Set: calldate=".$calldate." ".$calltime."\n";</span><br clear="all">
<br>-- <br>Best Regards<br>Rizwan Hisham<br><br>
</div>