Hi,
  I am trying to get thru a PHP file but i get the output as ,

authMessage sent, got response:
Content-Type: command/reply Reply-Text: +OK accepted
command is api originate sofia/default/[EMAIL PROTECTED] 1001
command sent, got response:
Content-Type: api/response Content-Length: 41
command sent, got response:
+OK c5df1f4c-02ae-4353-b709-ad791ca332a1
command is bgapi originate sofia/default/[EMAIL PROTECTED] 1001 &park
command sent, got response:
Content-Type: command/reply Reply-Text: +OK Job-UUID:
d5270c3d-872e-46b6-b556-74bc373b1fe4 Job-UUID:
d5270c3d-872e-46b6-b556-74bc373b1fe4
command is event channel_answer command sent, got response:
Content-Type: command/reply Reply-Text: +OK event listener enabled plain

So I need to run the event channel_answer as a separate program with
autorefreshing?

On Fri, Oct 3, 2008 at 10:49 PM, Brian West <[EMAIL PROTECTED]> wrote:

> Yes if you parse the event using something like perl, ruby, php and get
> it...
> /b
>
> On Oct 3, 2008, at 12:10 PM, Gopal krishnan wrote:
>
> File attached
>
> On Fri, Oct 3, 2008 at 10:36 PM, Gopal krishnan <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>   By giving event channel_answer in telnet console I get lots of
>> variables, I am attaching it as a text file with this email. And my query is
>> for example If I want to pickup only Answer state from that output,  is that
>> possible?
>>
>>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>


-- 
Thank you  with regards,
Gopal,
Caller is <?php echo htmlspecialchars($_POST['Caller']); ?>.<br>
Callee is <?php echo htmlspecialchars($_POST['Callee']); ?>.<br>
<br>

<?php
$Caller = htmlspecialchars($_POST['Caller']);
$Callee = htmlspecialchars($_POST['Callee']);
echo "Php now!<br>";
echo "Caller is: $Caller<br>";
echo "Callee is: $Callee<br>";
 
$handle = fsockopen('127.0.0.1', '8021', $erno, $errstr, 30);
if (!$handle) {

 die("Connect failed with erno $erno and errstr $errstr\n");
}
else {
 
 $response= fread($handle, 1024);
 echo "connection opened, got response:<br> $response<br><br>";

 $authMessage = "auth ClueCon\r\n\r\n";
 fwrite($handle, "$authMessage");
 $response = fread($handle, 1024);
 echo "authMessage sent, got response:<br> $response<br>";
 $status1 = "event channel_answer \r\n\r\n";  
 $command = "api originate sofia/default/[EMAIL PROTECTED] $Caller \r\n\r\n";
  
 echo "command is $command";
 fwrite($handle, $command);
 
 $response = fread($handle, 1024);
 echo "command sent, got response:<br> $response<br>";
 $response = fread($handle, 1024);
 echo "command sent, got response:<br> $response<br>";
 
 echo "command is $status";
 fwrite($handle, $status);
 $response = fread($handle, 1024);
 echo "command sent, got response:<br> $response<br>";
 
 echo "command is $status1";
 fwrite($handle, $status1);
 $response = fread($handle, 1024);
 echo "command sent, got response:<br> $response<br>";

 fclose($handle);
}
?>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to