[Freeswitch-users] get a freeswitch var from PHP

Madovsky infos at madovsky.org
Tue May 25 12:29:08 PDT 2010


well explained...

thanks Mike !
  ----- Original Message ----- 
  From: Michael Collins 
  To: freeswitch-users at lists.freeswitch.org 
  Sent: Tuesday, May 25, 2010 2:23 PM
  Subject: Re: [Freeswitch-users] get a freeswitch var from PHP





  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





------------------------------------------------------------------------------


  _______________________________________________
  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/20100525/aa37f7c9/attachment.html 


More information about the FreeSWITCH-users mailing list