<div dir="ltr">Maybe system will work for you, perhaps with the API:<div><a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system">http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system</a><br></div><div style>

Perhaps: </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">&lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;sbc_hostname=${system foo.sh}&quot;/&gt;</blockquote>

<div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi<br></span></div></div>
<br><br><div class="gmail_quote">On Mon, Mar 10, 2014 at 11:07 PM, Victor Chukalovskiy <span dir="ltr">&lt;<a href="mailto:victor.chukalovskiy@gmail.com" target="_blank">victor.chukalovskiy@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I run the same config on multiple boxes. Need to tell apart which
    box CDR is coming from without setting it manually per-box.<br>
    <br>
    Is there a way to set a global variable to the output of linux
    &#39;hostname -s&#39; command?<br>
    <br>
    E.g. instead of:<br>
    <strike>&lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;sbc_hostname=sbc1&quot;/&gt;</strike><strike><br>
    </strike><strike>&lt;X-PRE-PROCESS cmd=&quot;set&quot;
      data=&quot;sbc_hostname=sbc2&quot;/&gt;</strike><strike><br>
    </strike><strike>.....</strike><strike><br>
    </strike><strike>&lt;X-PRE-PROCESS cmd=&quot;set&quot;
      data=&quot;sbc_hostname=sbcN&quot;/&gt;</strike><strike><br>
    </strike><br>
    I need something like:<br>
    &lt;X-PRE-PROCESS cmd=&quot;set&quot; data=&quot;&#39;hostname -s&#39;&quot;/&gt;\<br>
    <br>
    Thank you,<br>
    -Victor<br>
  </div>

<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div>