<div dir="ltr">Hi,<br><br>Outbound call went thru socket with the PHP program. The program as follows,<br><br>&lt;?php<br>$Caller = htmlspecialchars($_POST[&#39;Caller&#39;]);<br>$Callee = htmlspecialchars($_POST[&#39;Callee&#39;]);<br>
echo &quot;Php now!&lt;br&gt;&quot;;<br>echo &quot;Caller is: $Caller&lt;br&gt;&quot;;<br>echo &quot;Callee is: $Callee&lt;br&gt;&quot;;<br><br>$handle = fsockopen(&#39;<a href="http://127.0.0.1">127.0.0.1</a>&#39;, &#39;8021&#39;, $erno, $errstr, 30);<br>
if (!$handle) {<br>&nbsp;//if connection fails exit and tell us what went wrong.<br>&nbsp;die(&quot;Connect failed with erno $erno and errstr $errstr\n&quot;);<br>}<br>else {<br>&nbsp;//read the first line the smtp server gives us (usually the version string)<br>
&nbsp;//$responses = fgets($handle, 1024);<br>&nbsp;$response= fread($handle, 1024);<br>&nbsp;echo &quot;connection opened, got response:&lt;br&gt; $response&lt;br&gt;&lt;br&gt;&quot;;<br><br>&nbsp;$authMessage = &quot;auth ClueCon\r\n\r\n&quot;;<br>
&nbsp;fwrite($handle, &quot;$authMessage&quot;);<br><br><br>&nbsp;$response = fread($handle, 1024);<br>&nbsp;echo &quot;authMessage sent, got response:&lt;br&gt; $response&lt;br&gt;&quot;;<br><br><br>&nbsp;$command = &quot;api originate sofia/default/$Callee@&lt;freeswitch IP address&gt; $Caller \r\n\r\n&quot;;<br>
<br>&nbsp;echo &quot;command is $command&quot;;<br>&nbsp;fwrite($handle, $command);<br><br>&nbsp;$response = fread($handle, 1024);<br>&nbsp;echo &quot;command sent, got response:&lt;br&gt; $response&lt;br&gt;&quot;;<br>&nbsp;$response = fread($handle, 1024);<br>
&nbsp;echo &quot;command sent, got response:&lt;br&gt; $response&lt;br&gt;&quot;;<br><br><br>&nbsp;//fclose($handle);<br>&nbsp;} <br>}<br>?&gt;<br><br>Thanks<br clear="all"><br>-- <br>Thank you with regards,<br>Gopal,<br><br>
</div>