]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
allow the public context to challenge if they make it to the end before any matches...
authorBrian West <brian@freeswitch.org>
Thu, 9 Oct 2008 02:19:51 +0000 (02:19 +0000)
committerBrian West <brian@freeswitch.org>
Thu, 9 Oct 2008 02:19:51 +0000 (02:19 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9908 d0543943-73ff-0310-b7d9-9358b9ac24b2

conf/dialplan/public.xml

index e459b4bc807d13245c70768de83d442f0fe2626b..98af33b9f3a59f95d3a8a5dbeb28e61fadae4ae3 100644 (file)
        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>