Using the php script below. I am able to enter my number and the number to call, however I get the following error:<br><br>&nbsp;&nbsp;<span style="font-style: italic;"> -- AGI Script cid-spoof.agi completed, returning 0</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp; == Parsing &#39;/etc/asterisk/manager.conf&#39;: Found</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; == Parsing &#39;/etc/asterisk/manager_custom.conf&#39;: Found
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; == Manager &#39;admin&#39; logged on from <a href="http://127.0.0.1">127.0.0.1</a></span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp; -- Executing Wait(&quot;OutgoingSpoolFailed&quot;, &quot;4&quot;) in new stack</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; -- Executing BackGround(&quot;OutgoingSpoolFailed&quot;, &quot;beep&quot;) in new stack
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; == Spawn extension (custom-web-dial-both-called, failed, 2) exited non-zero on &#39;OutgoingSpoolFailed&#39;</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; -- Executing Hangup(&quot;OutgoingSpoolFailed&quot;, &quot;&quot;) in new stack</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; == Spawn extension (custom-web-dial-both-called, h, 1) exited non-zero on &#39;OutgoingSpoolFailed&#39;
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp; == Manager &#39;admin&#39; logged off from <a href="http://127.0.0.1">127.0.0.1</a></span><br style="font-style: italic;"><br><br><br><br><span style="font-weight: bold;">
Here is the PHP:</span><br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;Call From Web!&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;?<br><br><br><br>#------------------------------------------------------------------------------------------
<br>#edit the below variable values to reflect your system/information<br>#------------------------------------------------------------------------------------------<br><br>#specify the name/ip address of your asterisk box
<br>#if your are hosting this page on your asterisk box, then you can use<br>#127.0.0.1 as the host IP.&nbsp; Otherwise, you will need to edit the following<br>#line in manager.conf, under the Admin user section:<br>#permit=<a href="http://127.0.0.1/255.255.255.0">
127.0.0.1/255.255.255.0</a><br>#change to:<br>#permit=<a href="http://127.0.0.1/255.255.255.0,xxx.xxx.xxx.xxx">127.0.0.1/255.255.255.0,xxx.xxx.xxx.xxx</a> ;(the ip address of the server this page is running on)<br>$strHost = &quot;
<a href="http://127.0.0.1">127.0.0.1</a>&quot;;<br><br>#specify the username you want to login with (these users are defined in /etc/asterisk/manager.conf)<br>#this user is the default AAH AMP user; you shouldn&#39;t need to change, if you&#39;re using AAH.
<br>$strUser = &quot;admin&quot;;<br><br>#specify the password for the above user<br>$strSecret = &quot;amp111&quot;;<br><br><br>####-----This block is not used in this script----###<br>#specify the channel (extension) you want to receive the call requests with
<br>#e.g. SIP/XXX, IAX2/XXXX, ZAP/XXXX, etc<br>#$strChannel = &quot;IAX2/XXXXXX&quot;;<br><br>#specify the context to make the outgoing call from.&nbsp; By default, AAH uses from-internal<br>#Using from-internal will make you outgoing dialing rules apply
<br>#$strContext = &quot;from-internal&quot;;<br>####---End of block---###<br><br>#specify the amount of time you want to try calling the specified channel before hangin up<br>$strWaitTime = &quot;30&quot;;<br><br>#specify the priority you wish to place on making this call
<br>$strPriority = &quot;1&quot;;<br><br>#specify the maximum amount of retries<br>$strMaxRetry = &quot;2&quot;;<br><br>#--------------------------------------------------------------------------------------------<br>#Should edit some things below this point to make this script work
<br>#--------------------------------------------------------------------------------------------<br>#get the caller&#39;s number from the form<br>$strCallerNumber = $_POST[&#39;txtcallernumber&#39;];<br>$strChannel = $strCallerNumber;
<br><br>$strCallerId = $strCallerNumber;<br><br>#get the phone number from the posted form<br>$strExten = $_POST[&#39;txtphonenumber&#39;];<br><br><br>$callNumber = $strExten;<br>#specify the caller id for the call<br>$strCallerId = &quot;Web will call &lt;$callNumber&gt;&quot;;
<br><br>$length = strlen($strExten);<br><br>if ($length == 10 &amp;&amp; is_numeric($strExten))<br>{<br>$oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die(&quot;Connection to host failed&quot;);<br>fputs($oSocket, &quot;Action: login\r\n&quot;);
<br>fputs($oSocket, &quot;Events: off\r\n&quot;);<br>fputs($oSocket, &quot;Username: $strUser\r\n&quot;);<br>fputs($oSocket, &quot;Secret: $strSecret\r\n\r\n&quot;);<br>fputs($oSocket, &quot;Action: originate\r\n&quot;);<br>
fputs($oSocket, &quot;Channel: SIP/Telasip-gw4/$strChannel@custom-web-dial-both\r\n&quot;); <br><br>fputs($oSocket, &quot;WaitTime: $strWaitTime\r\n&quot;);<br>fputs($oSocket, &quot;CallerId: $strCallerId\r\n&quot;);<br>fputs($oSocket, &quot;Exten: $callNumber\r\n&quot;);
<br>fputs($oSocket, &quot;Context: custom-web-dial-both-called\r\n&quot;); <br><br>fputs($oSocket, &quot;Priority: 1\r\n\r\n&quot;);<br>fputs($oSocket, &quot;Action: Logoff\r\n\r\n&quot;);<br>fclose($oSocket);<br>?&gt;<br>
&lt;p&gt;<br>&lt;table width=&quot;300&quot; border=&quot;1&quot; bordercolor=&quot;#0f0f0f&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;td&gt;<br>&nbsp;&nbsp;&nbsp; &lt;font size=&quot;2&quot; face=&quot;verdana,georgia&quot; 
<br>color=&quot;#000000&quot;&gt;Processing call. Please wait.<br>&lt;/font&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/td&gt;&lt;/tr&gt;<br>&lt;/table&gt;<br><br><br>&lt;?<br>}<br>else<br>{<br>?&gt;<br>&lt;p&gt;<br>&lt;table width=&quot;300&quot; border=&quot;1&quot; bordercolor=&quot;#0f0f0f&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot;&gt;
<br>&nbsp;&nbsp;&nbsp; &lt;tr&gt;&lt;td&gt;<br>&nbsp;&nbsp;&nbsp; &lt;form action=&quot;&lt;? echo $_SERVER[&#39;PHP_SELF&#39;] ?&gt;&quot; method=&quot;post&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;font size=&quot;2&quot; face=&quot;verdana,arial,georgia&quot; color=&quot;#000000&quot;&gt;
<br>&nbsp;&nbsp;&nbsp; Enter the number you are calling from:&lt;/font&gt;<br>&nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; size=&quot;20&quot; maxlength=&quot;10&quot; name=&quot;txtcallernumber&quot;&gt;&lt;br&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;font size=&quot;2&quot; face=&quot;verdana,arial,georgia&quot; color=&quot;#000000&quot;&gt;
<br>&nbsp;&nbsp;&nbsp; Enter the number where you want to call:&lt;/font&gt;<br>&nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; size=&quot;20&quot; maxlength=&quot;10&quot; name=&quot;txtphonenumber&quot;&gt;&lt;br&gt; <br>&nbsp;&nbsp;&nbsp; &lt;input type=&quot;submit&quot; value=&quot;Make Call&quot;&gt;
<br>&nbsp;&nbsp;&nbsp; &lt;/form&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/td&gt;&lt;/tr&gt;<br>&lt;/table&gt;<br>&lt;/p&gt;<br>&lt;?<br>}<br>?&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br><br><br><span style="font-weight: bold;">Here is the whats in my .confs</span>
<br><br>[custom-web-dial-both]<br>include =&gt; outbound-allroutes<br><br>[custom-web-dial-both-called]<br>exten =&gt; _.,1,Wait(4)<br>exten =&gt; _.,2,Background(beep)<br>include =&gt; outbound-allroutes<br>exten =&gt; h,1,Hangup
<br><br><br>