Remove default extensions from public context

I had not realised but the extensions 1000-1019 are reachable publicly. For my setup I don’t want this to happen. In the end these extensions will actually go.

However, to at least not make them visible externally the following snippet must be commented out in the default configuration’s dialplan/public.xml:

diff --git a/dialplan/public.xml b/dialplan/public.xml
index b54aff9..6ea692b 100644
--- a/dialplan/public.xml
+++ b/dialplan/public.xml
@@ -37,11 +37,12 @@
 </condition>
 </extension>

-    <extension name="public_extensions">
-      <condition field="destination_number" expression="^(10[01][0-9])$">
-       <action application="transfer" data="$1 XML default"/>
-      </condition>
-    </extension>
+    <!-- I don't want public extensions for my SOHO config, only 1 or more incoming numbers -->
+    <!-- <extension name="public_extensions">  -->
+    <!--   <condition field="destination_number" expression="^(10[01][0-9])$">  -->
+    <!--       <action application="transfer" data="$1 XML default"/>  -->
+    <!--      </condition>  -->
+    <!--    </extension>  -->

 <!--
 You can place files in the public directory to get included.

Leave a Reply