Misc. Dialplan Tools set

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Description

Set a channel variable for the channel calling the application.

Usage

set <channel_variable>=<value>

This application may be run inline from the XML dialplan.

Examples

<action application="set" data="effective_caller_id_name=FreeSwitch"/>
<action application="set" data="effective_caller_id_number=12345678"/>
<action application="set" data="sip_uri_to_dial=${sip_to_user}@${sip_to_host}"/>
<action application="log" data="DIALING Extension DialURI [${sip_uri_to_dial}]\n"/>
<action application="bridge" data="sofia/sip/${sip_uri_to_dial}"/>

Warning

The variables will not be set until execution. If you need it right away in a condition, run it inline.

Alternatively, the variable will be available after a transfer or execute_extension.

Setting multiple variables

To set multiple variables you can either call the set application multiple times or you can use the multiset application to set them all from a single line.

See Also