I set up a basic installation of freeswitch, but because I want to learn more I haven't removed the existing extensions, but I created a context to send all numbers beginnng with 0 through an external provider.
<include>
<!-- $CONFIGDIR/dialplan/provider.xml
-->
<context name="provider">
<extension name="outbound">
<condition field="destination_number" expression="^0?(\d+)$">
<action application="bridge" data="sofia/gateway/provider/0$1"/>
</condition>
</extension>
</context>
</include>
I noticed that numbers without a leading zero are matched and dialled. Anyway I think I realize that the expression should start wih '^0+' instead of ^0?'. How then do I dial the whole string instead of using 0$1? Because that is what is adding the leading 0 to the numbers without it.
I also want to ensure that a minimal number of digits are dialled before the call is allowed. Do I need to add them literally like ^0+dddddd or is there a shortcut for specifying a minimal number of digits?
--
Frank Church
=======================
http://devblog.brahmancreations.com