[Freeswitch-users] get a freeswitch var from PHP

Michael Collins msc at freeswitch.org
Tue May 25 11:23:26 PDT 2010


On Tue, May 25, 2010 at 10:42 AM, Brian West <brian at freeswitch.org> wrote:

> fs_cli -x
>
>
So if you know the uuid of the call this do this:

fs_cli -x "uuid_getvar <uuid> <varname>"

Here's an example. From fs_cli I did this:
originate {my_test_var=abc123xyz}loopback/9999 9999

That creates two channels, one of which has 'my_test_var' set to
'abc123xyz'.
show channels gives me the uuid: dc773eec-4dfe-4e8d-841d-ccfb4848658a

At the Linux command line:

root at freeswitch1 [Tue May 25 11:21 AM]  /usr/local/freeswitch
<25>:fs_cli -x "uuid_getvar dc773eec-4dfe-4e8d-841d-ccfb4848658a
my_test_var"
abc123xyz

>From ESL you have the $con object where you can do a uuid_getvar as well:
$var_contents = $con->api('uuid_getvar', "$uuid $var_name");  # Perl example

Have fun.
-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100525/f5473302/attachment.html 


More information about the FreeSWITCH-users mailing list