Accessing channel variables
Within the Dialplan, variables are accessed with a special notation: ${variable_name}
. Consider the following example:
<action application="log" data="INFO The value in sip_authorized is '${sip_authorized}'"/>
This action would print a log message to the FreeSWITCH command line as follows:
2009-12-09 14:32:48.904383 [INFO] mod_dptools.c:897 The value in sip_authorized is 'true'
Accessing the read-only values is much the same. Each of these values has a corresponding channel variable name. For example:
<action application="log" data="INFO The value of Unique-ID is '${uuid}'"/>
This will print a log line on the FreeSWITCH command line as follows:
2009-12-09 14:46:31.695458 [INFO] mod_dptools.c:897 The value of Unique-ID is '169ae42e-29f5-4e1c-9505-8ee6ef643081'
Tip
A complete list of info
application variables and their corresponding channel variable names can be found at the following address: http://wiki.freeswitch.org/wiki/Channel_Variables#Info_Application_Variable_Names_...