[Freeswitch-svn] [commit] r9908 - freeswitch/trunk/conf/dialplan

Freeswitch SVN brian at freeswitch.org
Wed Oct 8 22:19:51 EDT 2008


Author: brian
Date: Wed Oct  8 22:19:51 2008
New Revision: 9908

Modified:
   freeswitch/trunk/conf/dialplan/public.xml

Log:
allow the public context to challenge if they make it to the end before any matches so you can mix auth and non-auth in public.

Modified: freeswitch/trunk/conf/dialplan/public.xml
==============================================================================
--- freeswitch/trunk/conf/dialplan/public.xml	(original)
+++ freeswitch/trunk/conf/dialplan/public.xml	Wed Oct  8 22:19:51 2008
@@ -58,6 +58,23 @@
 	You can place files in the public directory to get included.
     -->
     <X-PRE-PROCESS cmd="include" data="public/*.xml"/>
+    
+    <!--
+	If you have made it this far lets challenge the caller and if they authenticate
+	lets try what they dialed in the default context.
+    -->
+    <extension name="check_auth" continue="true">
+      <condition field="${sip_authorized}" expression="^true$" break="never">
+	<anti-action application="respond" data="407"/>
+      </condition>
+    </extension>
+    
+    <!-- You can only make it here if you auth via the previous extension. --> 
+    <extension name="transfer_to_default">
+      <condition>
+	<action application="transfer" data="${destination_number} XML default"/>
+      </condition>
+    </extension>
 
   </context>
 </include>



More information about the Freeswitch-svn mailing list