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