<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:asterisk-users@lists.digium.com"><br>Hi all!<br><br>Can anyone shed some light on a problem with a php to .call file. I am trying to input the number I would like to call, as well as the current phone number where im located. I am able to generate a call to each number, but I am unable to hear or say anything on either phone.....any ideas would be great!
<br><br>PHP File:<br><br>&lt;?php<br><br>error_reporting( E_ALL );<br><br>$caller = $_GET[ &quot;caller&quot; ];<br>if( $caller == &quot;&quot; )<br>{ $caller = $_POST[ &quot;caller&quot; ]; }<br>if( $caller == &quot;&quot; )
<br>{ $caller = &quot;18005550000&quot;; }<br><br>$CID = $_GET[ &quot;CID&quot; ];<br>if( $CID == &quot;&quot; )<br>{ $CID = $_POST[ &quot;CID&quot; ]; }<br>if( $CID == &quot;&quot; )<br>{ $CID = &quot;18005551212&quot;; }
<br><br><br>$station_to_call = &quot;SIP/TelaSIP-gw4/15198821111&quot;;<br>$spool_dir = &quot;/var/spool/asterisk/outgoing&quot;;<br>$temp_dir = $spool_dir . &quot;/tmp&quot; . $caller;<br>$call_file = $temp_dir . &quot;/$caller.call&quot;;
<br><br>mkdir( $temp_dir );<br><br>$file = fopen( $call_file, &quot;w&quot; );<br>fputs( $file, &quot;Channel: $station_to_call\n&quot; );<br>fputs( $file, &quot;Callerid: $CID\n&quot; );<br>fputs( $file, &quot;MaxRetries: 5\n&quot; );
<br>fputs( $file, &quot;RetryTime: 300\n&quot; );<br>fputs( $file, &quot;WaitTime: 45\n&quot; );<br>fputs( $file, &quot;Context: outbound-allroutes\n&quot; );<br>fputs( $file, &quot;Extension: $caller\n&quot; );<br>fputs( $file, &quot;Priority: 1\n&quot; );
<br>fclose( $file );<br><br>rename( $call_file, $spool_dir.&quot;/$caller.call&quot; );<br>rmdir( $temp_dir );<br><br>Header( &quot;302 Moved&quot; );<br>Header( &quot;Location: index1.html&quot; );<br><br>?&gt;<br><br>---Html file---
<br><br>&lt;body&gt;<br>&nbsp;&lt;form name=&quot;calling&quot; method=&quot;post&quot; action=&quot;place-call.php&quot;&gt;<br>&nbsp;&nbsp; &lt;table&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;Phone:&lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;input name=&quot;caller&quot; type=&quot;text&quot; id=&quot;un&quot;&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;CID:&lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;input name=&quot;CID&quot; type=&quot;text&quot; id=&quot;un1&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp; &lt;/tr&gt;<br><br><br>&lt;tr&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Call Me Now&quot;&gt;&lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/tr&gt;
<br>&nbsp;&nbsp; &lt;/table&gt;<br>&nbsp;&lt;/form&gt;<br><br>&lt;/body&gt;<br>&lt;/html&gt;<br><br></a>