Skinny: prepare config for skinny-patterns dialplan

This commit is contained in:
Mathieu Parent 2010-04-20 22:39:20 +02:00
parent a3629654a2
commit 9fd1b82813
6 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
NOTICE:
This context is used for skinny to match dialed number
The special applications:
- skinny-route tells skinny to route the call
- skinny-drop tells skinny to drop the call
- skinny-wait tells skinny to wait 'data' seconds for more numbers before drop
-->
<!-- http://wiki.freeswitch.org/wiki/Mod_skinny -->
<include>
<context name="skinny-patterns">
<!--
Wait 10 seconds for another digit by default
-->
<extension name="Default">
<condition>
<action application="skinny-wait" data="10"/>
</condition>
</extension>
<!--
You can place files in the skinny-patterns directory to get included.
-->
<X-PRE-PROCESS cmd="include" data="skinny-patterns/*.xml"/>
</context>
</include>

View File

@ -0,0 +1,8 @@
<include>
<extension name="Demo">
<condition field="destination_number" expression="^(9[0-9]{3})$">
<action application="skinny-route"/>
</condition>
</extension>
</include>

View File

@ -0,0 +1,8 @@
<include>
<extension name="Local_Extension">
<condition field="destination_number" expression="^(10[01][0-9])$">
<action application="skinny-route"/>
</condition>
</extension>
</include>

View File

@ -0,0 +1,8 @@
<include>
<extension name="External">
<condition field="destination_number" expression="^(0[0-9]{10,})$">
<action application="skinny-route"/>
</condition>
</extension>
</include>

View File

@ -0,0 +1,9 @@
<include>
<!-- drop long dialed number -->
<extension name="Default_Drop">
<condition field="destination_number" expression="^(.{14,})$">
<action application="skinny-drop"/>
</condition>
</extension>
</include>

View File

@ -3,6 +3,8 @@
<param name="domain" value="$${domain}"/>
<param name="ip" value="$${local_ip_v4}"/>
<param name="port" value="2000"/>
<param name="patterns-dialplan" value="XML"/>
<param name="patterns-context" value="skinny-patterns"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="keep-alive" value="60"/>