]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make it better.. make it faster... figure this out
authorBrian West <brian@freeswitch.org>
Mon, 29 Sep 2008 20:58:13 +0000 (20:58 +0000)
committerBrian West <brian@freeswitch.org>
Mon, 29 Sep 2008 20:58:13 +0000 (20:58 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9748 d0543943-73ff-0310-b7d9-9358b9ac24b2

23 files changed:
conf/dialplan/default/01_provider.com.xml [new file with mode: 0644]
conf/directory/default.xml
conf/directory/default/1000.xml
conf/directory/default/1001.xml
conf/directory/default/1002.xml
conf/directory/default/1003.xml
conf/directory/default/1004.xml
conf/directory/default/1005.xml
conf/directory/default/1006.xml
conf/directory/default/1007.xml
conf/directory/default/1008.xml
conf/directory/default/1009.xml
conf/directory/default/1010.xml
conf/directory/default/1011.xml
conf/directory/default/1012.xml
conf/directory/default/1013.xml
conf/directory/default/1014.xml
conf/directory/default/1015.xml
conf/directory/default/1016.xml
conf/directory/default/1017.xml
conf/directory/default/1018.xml
conf/directory/default/1019.xml
conf/directory/default/default.xml

diff --git a/conf/dialplan/default/01_provider.com.xml b/conf/dialplan/default/01_provider.com.xml
new file mode 100644 (file)
index 0000000..1531ba9
--- /dev/null
@@ -0,0 +1,30 @@
+<include>
+
+  <extension name="local.provider.com">
+    <condition field="${toll_allow}" expression="local"/>
+    <condition field="destination_number" expression="^(\d{7})$">
+      <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
+      <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
+      <action application="bridge" data="sofia/gateway/${default_gateway}/1${default_areacode}$1"/>
+    </condition>
+  </extension>
+
+  <extension name="domestic.provider.com">
+    <condition field="${toll_allow}" expression="domestic"/>
+    <condition field="destination_number" expression="^(\d{11})$">
+      <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
+      <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
+      <action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
+    </condition>
+  </extension>
+
+  <extension name="international.provider.com">
+    <condition field="${toll_allow}" expression="international"/>
+    <condition field="destination_number" expression="^(011\d{10+})$">
+      <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
+      <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
+      <action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
+    </condition>
+  </extension>
+
+</include>
index 675f3ba6e52a31938eab07bfe73bc1a2ccd4b9c6..2f386a2523806bb164f1da3975af281b16aefe63 100644 (file)
@@ -26,6 +26,8 @@
 
     <variables>
       <variable name="record_stereo" value="true"/>
+      <variable name="default_gateway" value="asterlink.com"/>
+      <variable name="default_areacode" value="918"/>
     </variables>
 
     <X-PRE-PROCESS cmd="include" data="default/*.xml"/>
index d230325c4cce52fc956e2f77b7b1ed50d8128b4e..732b993290685bade2f9cabfe863a1f0ea63088c 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1000"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1000"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1000"/>
       <variable name="effective_caller_id_number" value="1000"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 387f430e97a9ebb2b46d0f360dcadeae957f63bd..dd88ea4024392c4f8365a200d5e8285fc57e6db3 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1001"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1001"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1001"/>
       <variable name="effective_caller_id_number" value="1001"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 9f1c7a218bb54fe979a5c840b04735fa498b098c..a1ac8db0a7e11e64b09a3c84bfcf7fa4155e8ce3 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1002"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1002"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1002"/>
       <variable name="effective_caller_id_number" value="1002"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 4f190d3bf9752a8c89602e87b868b984d328f0f3..022932615af75427b4127bbe532a392a2a6385ad 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1003"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1003"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1003"/>
       <variable name="effective_caller_id_number" value="1003"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index be0f8753adf9471b5139f4bca476bb7f8766bcc0..b652b495eb145a7b9c3f3954d0d1070fe7248ad7 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1004"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1004"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1004"/>
       <variable name="effective_caller_id_number" value="1004"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 2137021aa7a690a372c4c22746533c49be140f43..2cd7ca83736044d2b4cb4990f5c969ee8a090c56 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1005"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1005"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1005"/>
       <variable name="effective_caller_id_number" value="1005"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 117f6f70605d2bc0a0966b92859fa146988ff14b..1972a990cac790f6e9a86aa2e9e37bcede71a1b2 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1006"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1006"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1006"/>
       <variable name="effective_caller_id_number" value="1006"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index f190e5f16e667dd077642d27e10e714e475a0e1a..752d41126c0b58f0fb78b79fbd800749f1d38b16 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1007"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1007"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1007"/>
       <variable name="effective_caller_id_number" value="1007"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index a95d328550cc1ba99d283e7e4482857978c26cf7..7c7910ccb1fef7a97c532f4785c122799462c36f 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1008"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1008"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1008"/>
       <variable name="effective_caller_id_number" value="1008"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 3385ba7137c01fcc09c17bec7e4ed9dbb6e0ef80..515554928630a709138667685b115834734b421b 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1009"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1009"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1009"/>
       <variable name="effective_caller_id_number" value="1009"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index da04a3b7f6fe2194a4cd002dd554b18387a80404..c3fc596824745464ebe8738b77305660094998cb 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1010"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1010"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1010"/>
       <variable name="effective_caller_id_number" value="1010"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index d847ecc55bb949e97d5974ef45a7993fce84112b..b1a38312c3aa1c91d3f2ab42d3aa1c7f90b364e9 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1011"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1011"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1011"/>
       <variable name="effective_caller_id_number" value="1011"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 0b5f27d9f72a9ba9fa2e40fac7d32a1854ceb06e..d7c5e3e41302fafcbf034c2e8c9949983c0a2462 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1012"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1012"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1012"/>
       <variable name="effective_caller_id_number" value="1012"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 8516fd76c91509d0c4a3f505e777e43f1dd85c88..520b89ea94db7857e2298fd4826ce1dff7ba9a9e 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1013"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1013"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1013"/>
       <variable name="effective_caller_id_number" value="1013"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index baae3bcd907a9fcbf10319418b4b332d05bc9905..c079bedcaa641d880dc54c764f4f7a311e171b55 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1014"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1014"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1014"/>
       <variable name="effective_caller_id_number" value="1014"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 99df131ce59559fc3204141783879a78aec2a44e..1b10e45a52e5497272f96c7c2fb3263892e728f4 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1015"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1015"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1015"/>
       <variable name="effective_caller_id_number" value="1015"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index bdfcbc827c33a464ab7ed122accb67df81d9478c..902fe7a4238bea808178da2d400d32c9faadc388 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1016"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1016"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1016"/>
       <variable name="effective_caller_id_number" value="1016"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 86dc0a14bc8607acc543727fd758b55402364806..4869cd81a266726d6ede0b5c448a04d070effa7e 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1017"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1017"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1017"/>
       <variable name="effective_caller_id_number" value="1017"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 3d0d3e194bbd71d5a8868d7ae9cbc8c63b36f56c..50f6b45a18abce159e015f77aeee5b18d86a185b 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1018"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1018"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1018"/>
       <variable name="effective_caller_id_number" value="1018"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index e7bc07fb62b46e85ca92ce2b25a4a4336e4e298a..fd27c35b754ec722fa47f91ba020f424752fb8fa 100644 (file)
@@ -5,10 +5,13 @@
       <param name="vm-password" value="1019"/>
     </params>
     <variables>
+      <variable name="toll_allow" value="domestic,international,local"/>
       <variable name="accountcode" value="1019"/>
       <variable name="user_context" value="default"/>
       <variable name="effective_caller_id_name" value="Extension 1019"/>
       <variable name="effective_caller_id_number" value="1019"/>
+      <variable name="external_caller_id_name" value="Acme Corporation"/>
+      <variable name="external_caller_id_number" value="5552566639"/>
     </variables>
   </user>
 </include>
index 0aa293ff4c06cf961d2b0f42e56576fa535ec701..57b155a5c544b62070035642b4bdc66b43e2df4e 100644 (file)
@@ -5,7 +5,7 @@
       <!-- set these to take advantage of a dialplan localized to this user -->
       <variable name="numbering_plan" value="US"/>
       <variable name="default_gateway" value="asterlink.com"/>
-      <variable name="default_area_code" value="918"/>
+      <variable name="default_areacode" value="918"/>
     </variables>
   </user>
 </include>