[Freeswitch-users] freeswitch php

Michael Collins msc at freeswitch.org
Tue Aug 23 04:27:33 MSD 2011


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.

-MC

On Sun, Aug 21, 2011 at 4:56 PM, Sam <lakersman2006 at yahoo.com> wrote:

> Does anyone know how to retrieve channel variables (ie. uuid, etc.) using
> the php example that was shown in the wiki below?
>
> #!/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);
>
> ?>
>
>
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110822/70083bb6/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list