Global Variable local ip v4

From FreeSWITCH Wiki
Jump to: navigation, search

local_ip_v4

This global variable is automatically set by FreeSWITCH. You may override this global variable in vars.xml

Usage:

<!-- Set local_ip_v4 to hard-coded IP -->
<X-PRE-PROCESS cmd="set" data="local_ip_v4=192.168.0.68"/>

<!-- Set local_ip_v4 to eth1 address -->
<X-PRE-PROCESS cmd="exec-set" data="local_ip_v4=ip addr show eth1 | awk '/inet /{print $2}' | head -n 1 | cut -d '/' -f 1"/>


See also: