Page tree
Skip to end of metadata
Go to start of metadata

About

Exports a channel variable from the A leg to the B leg. Variables and their values will be replicated in any new channels created in the one in which export was called.

 Click here to expand Table of Contents

Usage

 

Note: if you want to override these exported channel variables in your dial-string, you have to also set the global variable local_var_clobber to true, for example:

Only now foo gets the value 'two' on your b-leg, if local_var_clobber is not set then it will keep the value 'one'.

This application may be run inline from the XML dialplan.

Examples

This typically also sets the A leg.

To only export to the B leg, prefix the variable name with 'nolocal:', like below:

It is also possible to prefix your to-be-exported channel variable with '_nolocal_', like below:

Both prefixes work the same as far as FreeSWITCH is concerned.

Reason of this alternate prefix is that the 'nolocal:' variables will end up in the xml cdr of the a-leg and some xml parsers will choke on this because the nolocal: part will be regarded as namespace, which is not defined. Also, it is not possible to use ${nolocal:foo} anywhere in your dialplan because the colon (:) is used to get everything from the nth character in ${foo:n}. ${_nolocal_foo} works fine.

See Also

  • No labels