[Asterisk-Users] Pattern Match - 0 or 1 digit

Sum Ding Wong sumdingwong at gmail.com
Fri Feb 3 08:14:12 MST 2006


Does anyone know of a special character used in pattern matching that
would match 0 or 1 digit?

I would just like to cut down on the number of extensions I have.

Current example:
exten => 2125551234,1,Dial(SIP/2125551234,15,rt)
exten => 12125551234,1,Dial(SIP/2125551234,15,rt)

I would like to do something like this (where + matches 0 or 1 digit):
exten => _+2125551234,1,Dial(SIP/2125551234,15,rt)

|--------------------------------------------------------------------------------

Or in an area that has 7 digit dialing...
exten => 5551234,1,Dial(SIP/2125551234,15,rt)
exten => 2125551234,1,Dial(SIP/2125551234,15,rt)
exten => 12125551234,1,Dial(SIP/2125551234,15,rt)

exten => _++++5551234,1,Dial(SIP/2125551234,15,rt)



More information about the asterisk-users mailing list