Misc. Dialplan Tools transfer
From FreeSWITCH Wiki
Immediately transfer the calling channel to a new context. If there happens to be an xml extension named <destination_number> then control is "warped" directly to that extension. Otherwise it goes through the entire context checking for a match.
Example: say caller dials 3015551212, causing conf/dialplan/public/3015551212.xml to "answer". If 3015551212.xml does an <action application="transfer" data="1047 XML cntxt_a"/>, that causes the conf/dialplan/cntxt_a/1047.xml to be parsed (assuming that file does a match on "^1047$".
If dialplan or context are not defined, they default to XML and default.
Note: The transfer app does not "transfer a call" as you might expect. It transfers execution of the call control logic to another extension in the specified dialplan context. If you wish to a "transfer a call" to another user see bridge, which generates an outgoing call to the user and "bridges" (joins) the two calls together.
transfer <destination_number> [<dialplan> [<context>]]
<action application="transfer" data="500"/>
This example is found in public.xml. It transfers the call to the given extension in the default context, which is located in default.xml. Please note the use of XML as a dialplan as it is defined in freeswitch.xml
<extension name="public_extensions"> <condition field="destination_number" expression="^(10[0-9])$"> <action application="transfer" data="$1 XML default"/> </condition> </extension>
If the call is currently in a bridge it will transfer the other side of the call instead of itself:
<action application="transfer" data="-bleg 2103"/>
This would transfer both legs of the call to the same ext. i.e a conference extension:
<action application="transfer" data="-both 2103"/>
When a call is transferred back through the dialplan, the RDNIS value is populated with the previous destination_number value.
Note: You can also specify an inline dialplan
Note: Transfer will begin parsing extensions from the beginning of the dialplan. Be careful to avoid loops.
Note: The transfer application also works with mod_xml_curl, it just does another request to mod_xml_curl and starts over again, just like in the static dialplan.