[Freeswitch-svn] [commit] r9745 - freeswitch/trunk/conf/dialplan
Freeswitch SVN
brian at freeswitch.org
Mon Sep 29 15:02:43 EDT 2008
Author: brian
Date: Mon Sep 29 15:02:42 2008
New Revision: 9745
Modified:
freeswitch/trunk/conf/dialplan/default.xml
freeswitch/trunk/conf/dialplan/public.xml
Log:
use domain_name since its free no need for an extra var.
Modified: freeswitch/trunk/conf/dialplan/default.xml
==============================================================================
--- freeswitch/trunk/conf/dialplan/default.xml (original)
+++ freeswitch/trunk/conf/dialplan/default.xml Mon Sep 29 15:02:42 2008
@@ -27,11 +27,11 @@
-->
<extension name="set_domain" continue="true">
- <condition field="${target_domain}" expression="^$" break="never"/>
+ <condition field="${domain_name}" expression="^$" break="never"/>
<condition field="source" expression="mod_sofia" break="never"/>
<condition field="${sip_auth_realm}" expression="^$" break="never">
- <action application="set" data="target_domain=$${domain}"/>
- <anti-action application="set" data="target_domain=${sip_auth_realm}"/>
+ <action application="set" data="domain_name=$${domain}"/>
+ <anti-action application="set" data="domain_name=${sip_auth_realm}"/>
</condition>
</extension>
@@ -45,7 +45,7 @@
<extension name="intercept">
<condition field="destination_number" expression="^886$">
<action application="answer"/>
- <action application="intercept" data="${db(select/${target_domain}-last_dial/global)}"/>
+ <action application="intercept" data="${db(select/${domain_name}-last_dial/global)}"/>
<action application="sleep" data="2000"/>
</condition>
</extension>
@@ -53,14 +53,14 @@
<extension name="intercept-ext">
<condition field="destination_number" expression="^\*\*(\d+)$">
<action application="answer"/>
- <action application="intercept" data="${db(select/${target_domain}-last_dial_ext/$1)}"/>
+ <action application="intercept" data="${db(select/${domain_name}-last_dial_ext/$1)}"/>
<action application="sleep" data="2000"/>
</condition>
</extension>
<extension name="redial">
<condition field="destination_number" expression="^870$">
- <action application="transfer" data="${db(select/${target_domain}-last_dial/${caller_id_number})}"/>
+ <action application="transfer" data="${db(select/${domain_name}-last_dial/${caller_id_number})}"/>
</condition>
</extension>
@@ -73,7 +73,7 @@
numbering_plan is required for the demo to function properly.
-->
<condition field="${numbering_plan}" expression="^$" break="never">
- <action application="set_user" data="default@${target_domain}"/>
+ <action application="set_user" data="default@${domain_name}"/>
</condition>
<condition field="${call_debug}" expression="^true$" break="never">
<action application="info"/>
@@ -84,9 +84,9 @@
<!-- <action application="export" data="sip_secure_media=true"/> -->
</condition>
<condition>
- <action application="db" data="insert/${target_domain}-spymap/${caller_id_number}/${uuid}"/>
- <action application="db" data="insert/${target_domain}-last_dial/${caller_id_number}/${destination_number}"/>
- <action application="db" data="insert/${target_domain}-last_dial/global/${uuid}"/>
+ <action application="db" data="insert/${domain_name}-spymap/${caller_id_number}/${uuid}"/>
+ <action application="db" data="insert/${domain_name}-last_dial/${caller_id_number}/${destination_number}"/>
+ <action application="db" data="insert/${domain_name}-last_dial/global/${uuid}"/>
</condition>
</extension>
@@ -120,7 +120,7 @@
<extension name="eavesdrop">
<condition field="destination_number" expression="^88(.*)$|^\*0(.*)$">
<action application="answer"/>
- <action application="eavesdrop" data="${db(select/${target_domain}-spymap/$1)}"/>
+ <action application="eavesdrop" data="${db(select/${domain_name}-spymap/$1)}"/>
</condition>
</extension>
@@ -136,14 +136,14 @@
<extension name="call_return">
<condition field="destination_number" expression="^\*69$|^869$">
- <action application="transfer" data="${db(select/${target_domain}-call_return/${caller_id_number})}"/>
+ <action application="transfer" data="${db(select/${domain_name}-call_return/${caller_id_number})}"/>
</condition>
</extension>
<extension name="del-group">
<condition field="destination_number" expression="^80(\d{2})$">
<action application="answer"/>
- <action application="group" data="delete:$1@${target_domain}:${sofia_contact(${sip_from_user}@${target_domain})}"/>
+ <action application="group" data="delete:$1@${domain_name}:${sofia_contact(${sip_from_user}@${domain_name})}"/>
<action application="gentones" data="%(1000, 0, 320)"/>
</condition>
</extension>
@@ -151,21 +151,21 @@
<extension name="add-group">
<condition field="destination_number" expression="^81(\d{2})$">
<action application="answer"/>
- <action application="group" data="insert:$1@${target_domain}:${sofia_contact(${sip_from_user}@${target_domain})}"/>
+ <action application="group" data="insert:$1@${domain_name}:${sofia_contact(${sip_from_user}@${domain_name})}"/>
<action application="gentones" data="%(1000, 0, 640)"/>
</condition>
</extension>
<extension name="call-group-simo">
<condition field="destination_number" expression="^82(\d{2})$">
- <action application="bridge" data="{ignore_early_media=true}${group(call:$1@${target_domain})}"/>
+ <action application="bridge" data="{ignore_early_media=true}${group(call:$1@${domain_name})}"/>
</condition>
</extension>
<extension name="call-group-order">
<condition field="destination_number" expression="^83(\d{2})$">
<action application="set" data="call_timeout=10"/>
- <action application="bridge" data="{ignore_early_media=true}${group(call:$1@${target_domain}:order)}"/>
+ <action application="bridge" data="{ignore_early_media=true}${group(call:$1@${domain_name}:order)}"/>
</condition>
</extension>
@@ -174,11 +174,11 @@
<condition field="destination_number" expression="^8(10[01][0-9])$">
<action application="set" data="dialed_extension=$1"/>
<!-- This Alert-Info seems to be a case for Intercom for Polycom which sip_auto_answer=true covers already. -->
- <!--<action application="export"><![CDATA[alert_info=<sip:${target_domain}>;Ring;Answer]]></action>-->
- <action application="export"><![CDATA[sip_h_Call-Info=<sip:${target_domain}>;answer-after=0]]></action>
+ <!--<action application="export"><![CDATA[alert_info=<sip:${domain_name}>;Ring;Answer]]></action>-->
+ <action application="export"><![CDATA[sip_h_Call-Info=<sip:${domain_name}>;answer-after=0]]></action>
<action application="export" data="sip_invite_params=intercom=true"/>
<action application="export" data="sip_auto_answer=true"/>
- <action application="bridge" data="user/${dialed_extension}@${target_domain}"/>
+ <action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
</condition>
</extension>
@@ -198,7 +198,7 @@
<action application="set" data="voicemail_authorized=${sip_authorized}"/>
<action application="answer"/>
<action application="sleep" data="1000"/>
- <action application="voicemail" data="check default ${target_domain} ${dialed_extension}"/>
+ <action application="voicemail" data="check default ${domain_name} ${dialed_extension}"/>
<!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
<anti-action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
<anti-action application="bind_meta_app" data="2 b s record_session::$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
@@ -209,13 +209,13 @@
<anti-action application="set" data="hangup_after_bridge=true"/>
<!--<anti-action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> -->
<anti-action application="set" data="continue_on_fail=true"/>
- <anti-action application="db" data="insert/${target_domain}-call_return/${dialed_extension}/${caller_id_number}"/>
- <anti-action application="db" data="insert/${target_domain}-last_dial_ext/${dialed_extension}/${uuid}"/>
- <anti-action application="bridge" data="user/${dialed_extension}@${target_domain}"/>
+ <anti-action application="db" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>
+ <anti-action application="db" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
+ <anti-action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
<anti-action application="answer"/>
<!--<anti-action application="send_display" data="Voicemail for ${dialed_extension}"/>-->
<anti-action application="sleep" data="1000"/>
- <anti-action application="voicemail" data="default ${target_domain} ${dialed_extension}"/>
+ <anti-action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>
</condition>
</extension>
@@ -230,7 +230,7 @@
<!-- voicemail main extension -->
<extension name="vmain">
<condition field="destination_number" expression="^vmain|4000$">
- <action application="voicemail" data="check default ${target_domain}"/>
+ <action application="voicemail" data="check default ${domain_name}"/>
</condition>
</extension>
@@ -248,7 +248,7 @@
<condition field="destination_number" expression="^(30\d{2})$">
<action application="answer"/>
<!--<action application="send_display" data="8k Conference $1"/>-->
- <action application="conference" data="$1-${target_domain}@default"/>
+ <action application="conference" data="$1-${domain_name}@default"/>
</condition>
</extension>
@@ -256,7 +256,7 @@
<condition field="destination_number" expression="^(31\d{2})$">
<action application="answer"/>
<!--<action application="send_display" data="16k Conference $1"/>-->
- <action application="conference" data="$1-${target_domain}@wideband"/>
+ <action application="conference" data="$1-${domain_name}@wideband"/>
</condition>
</extension>
@@ -264,7 +264,7 @@
<condition field="destination_number" expression="^(32\d{2})$">
<action application="answer"/>
<!--<action application="send_display" data="32k Conference $1"/>-->
- <action application="conference" data="$1-${target_domain}@ultrawideband"/>
+ <action application="conference" data="$1-${domain_name}@ultrawideband"/>
</condition>
</extension>
@@ -324,7 +324,7 @@
<extension name="park">
<condition field="destination_number" expression="^5900$">
<action application="set" data="fifo_music=$${hold_music}"/>
- <action application="fifo" data="5900@${target_domain} in"/>
+ <action application="fifo" data="5900@${domain_name} in"/>
</condition>
</extension>
@@ -334,7 +334,7 @@
<extension name="unpark">
<condition field="destination_number" expression="^5901$">
<action application="answer"/>
- <action application="fifo" data="5900@${target_domain} out nowait"/>
+ <action application="fifo" data="5900@${domain_name} out nowait"/>
</condition>
</extension>
@@ -348,7 +348,7 @@
<extension name="park">
<condition field="source" expression="mod_sofia"/>
<condition field="destination_number" expression="park\+(\d+)">
- <action application="fifo" data="$1@${target_domain} in undef $${hold_music}"/>
+ <action application="fifo" data="$1@${domain_name} in undef $${hold_music}"/>
</condition>
</extension>
<!--
@@ -360,7 +360,7 @@
<condition field="destination_number" expression="^parking$"/>
<condition field="${sip_to_params}" expression="fifo\=(\d+)">
<action application="answer"/>
- <action application="fifo" data="$1@${target_domain} out nowait"/>
+ <action application="fifo" data="$1@${domain_name} out nowait"/>
</condition>
</extension>
@@ -376,8 +376,8 @@
<condition field="source" expression="mod_sofia"/>
<condition field="destination_number" expression="callpark"/>
<condition field="${sip_refer_to}">
- <expression><![CDATA[<sip:callpark@${target_domain};orbit=(\d+)>]]></expression>
- <action application="fifo" data="$1@${target_domain} in undef $${hold_music}"/>
+ <expression><![CDATA[<sip:callpark@${domain_name};orbit=(\d+)>]]></expression>
+ <action application="fifo" data="$1@${domain_name} in undef $${hold_music}"/>
</condition>
</extension>
@@ -393,7 +393,7 @@
<condition field="destination_number" expression="pickup"/>
<condition field="${sip_to_params}" expression="orbit\=(\d+)">
<action application="answer"/>
- <action application="fifo" data="$1@${target_domain} out nowait"/>
+ <action application="fifo" data="$1@${domain_name} out nowait"/>
</condition>
</extension>
@@ -488,7 +488,7 @@
<!--
<extension name="refer">
<condition field="${sip_refer_to}">
- <expression><![CDATA[<sip:${destination_number}@${target_domain}>]]></expression>
+ <expression><![CDATA[<sip:${destination_number}@${domain_name}>]]></expression>
</condition>
<condition field="${sip_refer_to}">
<expression><![CDATA[<sip:(.*)@(.*)>]]></expression>
@@ -509,7 +509,7 @@
<condition field="destination_number" expression="^7004$">
<action application="set" data="ruri_profile=default"/>
<action application="set" data="ruri_user=2000"/>
- <action application="set" data="ruri_contact=1001@${target_domain}"/>
+ <action application="set" data="ruri_contact=1001@${domain_name}"/>
<action application="execute_extension" data="ruri"/>
</condition>
</extension>
Modified: freeswitch/trunk/conf/dialplan/public.xml
==============================================================================
--- freeswitch/trunk/conf/dialplan/public.xml (original)
+++ freeswitch/trunk/conf/dialplan/public.xml Mon Sep 29 15:02:42 2008
@@ -31,14 +31,14 @@
</condition>
</extension>
- <!-- Try to get target_domain from the sip_req_params variable -->
+ <!-- Try to get domain_name from the sip_req_params variable -->
<extension name="set_domain" continue="true">
- <condition field="${target_domain}" expression="^$" break="never"/>
+ <condition field="${domain_name}" expression="^$" break="never"/>
<condition field="source" expression="mod_sofia" break="never"/>
- <condition field="${sip_req_params}" expression="target_domain=([A-Z-a-z0-9.]+)" break="never">
+ <condition field="${sip_req_params}" expression="domain_name=([A-Z-a-z0-9.]+)" break="never">
<!-- We need to export this so the B-Leg will have it after transfer too. -->
- <action application="export" data="target_domain=$1"/>
- <anti-action application="export" data="target_domain=$${domain}"/>
+ <action application="export" data="domain_name=$1"/>
+ <anti-action application="export" data="domain_name=$${domain}"/>
</condition>
</extension>
More information about the Freeswitch-svn
mailing list