[Freeswitch-svn] [commit] r6937 - freeswitch/trunk/scripts/contrib/trixter/dialplan

Freeswitch SVN trixter at freeswitch.org
Fri Dec 21 00:47:07 EST 2007


Author: trixter
Date: Fri Dec 21 00:47:07 2007
New Revision: 6937

Modified:
   freeswitch/trunk/scripts/contrib/trixter/dialplan/localized.dialplan.xml

Log:
added hack to work around limitation in the dialplan where you cant have a variable set in the dialplan that is 
used by a condition



Modified: freeswitch/trunk/scripts/contrib/trixter/dialplan/localized.dialplan.xml
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/dialplan/localized.dialplan.xml	(original)
+++ freeswitch/trunk/scripts/contrib/trixter/dialplan/localized.dialplan.xml	Fri Dec 21 00:47:07 2007
@@ -4,6 +4,7 @@
 	Emergency service - verify your provider really supports this
       -->
     <condition field="${destination_number}" expression="${default_emergency_number}" continue="true" break="never">
+      <action application="set" data="hangup_after_bridge=true"/>
       <action application="export" data="nolocal:jitterbuffer_msec=180"/>
       <action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
     </condition>
@@ -26,11 +27,19 @@
       <action application="set" data="e164number=${default_country_code}${default_local_prefix}$1"/>
     </condition>
 
+
+    <!-- 
+	 this is a kluge to get around a limitation in the dialplan logic
+	 variables are expanded in the condition tags *before* any applications are processed
+	 as a result we cant set a variable in the dialplan that is used as a condition
+	 so we cheat here
+      -->
+    <condition field="${destination_number}" expression="${default_international_regexp}|${default_domestic_regexp}|${default_local_regexp}" continue="true" break="false"/>
+
     <!--
 	Dial the call
       -->
-    <condition field="${e164number}" expression="^\d+$" continue="true">
-      <action application="info"/>
+    <condition>
       <action application="export" data="nolocal:jitterbuffer_msec=180"/>
       <action application="set" data="continue_on_fail=true"/>
       <action application="set" data="hangup_after_bridge=true"/>



More information about the Freeswitch-svn mailing list