This probably isn't the most efficient way of using the event socket. In fact, I'm not sure if this is anything more than a proof of concept. You are MUCH better off using the ESL lib with PHP and taking advantage of the abstraction you get.<div>
<br></div><div>-MC<br><br><div class="gmail_quote">On Sun, Aug 21, 2011 at 4:56 PM, Sam <span dir="ltr"><<a href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div>Does anyone know how to retrieve channel variables (ie. uuid, etc.) using the php example that was shown in the wiki below?<br>
</div><div><br></div><pre>#!/usr/bin/php -q
<?php
// set a couple of things so we dont kill the system
ob_implicit_flush(true);
set_time_limit(30);
// Open stdin so we can read the data in
$in = fopen("php://stdin", "r");
// Connect
echo "connect\n\n";
// Answer
echo "sendmsg\n";
echo "call-command: execute\n";
echo "execute-app-name: answer\n\n";
// Play a prompt
echo "sendmsg\n";
echo "call-command: execute\n";
echo "execute-app-name: playback\n";
echo "execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n";
// Wait
sleep(5);
// Hangup
echo "sendmsg\n";
echo "call-command: hangup\n\n";
fclose($in);
?></pre></div></div><br><br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>