[Freeswitch-users] How to set FS variable to the value returned by linux command

Victor Chukalovskiy victor.chukalovskiy at gmail.com
Tue Mar 11 00:07:40 MSK 2014


Hello,

I run the same config on multiple boxes. Need to tell apart which box 
CDR is coming from without setting it manually per-box.

Is there a way to set a global variable to the output of linux 'hostname 
-s' command?

E.g. instead of:
<X-PRE-PROCESS cmd="set" data="sbc_hostname=sbc1"/>
<X-PRE-PROCESS cmd="set" data="sbc_hostname=sbc2"/>
.....
<X-PRE-PROCESS cmd="set" data="sbc_hostname=sbcN"/>

I need something like:
<X-PRE-PROCESS cmd="set" data="'hostname -s'"/>\

Thank you,
-Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140310/df7bd27b/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list