On Monday 10 March 2014 17:07:40 Victor Chukalovskiy wrote:
Hello, Hi
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? I'm not sure but I think you can use https://wiki.freeswitch.org/wiki/Mod_commands#system[1]
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'"/>\ Maybe try <X-PRE-PROCESS cmd="system" data="sbc_hostname=${hostname -s}"/>. Not sure if it will be executed in the X-PRE-PROCESS but worth a try IMO.
Thank you, -Victor Cheers,-- Iskren Hadzhinedev System Administrator
The Idea Factory | 20 Mearns Street | Aberdeen | AB11 5AT | UK T: 01224 607500 VAT Reg No: 982 4936 74. Company registered in Scotland, SC237116 -------- [1] https://wiki.freeswitch.org/wiki/Mod_commands#system