[Freeswitch-users] Need some help with dial string matching?
vfclists at gmail.com
Fri Apr 13 14:18:10 MSD 2012
On 13 April 2012 11:01, Frank Church <vfclists at gmail.com> wrote:
> 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.
>> <!-- $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"/>
> 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://wiki.freeswitch.org/wiki/Regular_Expression has the info I need.
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users