[asterisk-users] dialplan number matching

Danny Nicholas danny at debsinc.com
Fri Jul 17 14:55:40 CDT 2009


One more thought; you could run the number through an AGI and return the
values of the ones ending in 3 in a variable using regular expressions.  I
do this to take the "*" out of digit strings.

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Vieri
Sent: Friday, July 17, 2009 2:43 PM
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] dialplan number matching



--- On Fri, 7/17/09, Danny Nicholas <danny at debsinc.com> wrote:

> Assuming you are using 4 digit
> extensions, this syntax would be:
> - exten => _ZXX3,n,...
> For 3 digits
> - exten => _ZX3,n,...
> The . is a wildcard that says "take rest of number, so
> anything after that
> is irrelevant.

Thanks but the extensions have a variable length (cannot determine in
advance) so I can't use that logic.
It's for matching international calls (variable length and I can't keep a
database with all possible patterns worldwide) in case of
"early-dial"/"address incomplete" SIP clients (I recently exposed this issue
on this mailing list).

Anyway, thanks for the feedback.

Vieri

> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com]
> On Behalf Of Vieri
> Sent: Friday, July 17, 2009 4:11 AM
> To: asterisk-users at lists.digium.com
> Subject: [asterisk-users] dialplan number matching
> 
> 
> Hi,
> 
> How can I match an extension "ending with 3" (just an
> example but applicable
> to any other digit, including * or #)?
> 
> exten => _ZX.3,n,...
> 
> exten => _ZX.#,n,...
> 
> (the above does not work)
> 
> Can regular expressions be used in the standard dialplan
> (end with: "$")?
> 
> Thanks,
> 
> Vieri
> 


      

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list