Anthony Messina
2007-Sep-14 16:39 UTC
[asterisk-users] Can Asterisk match a literal "*" in extensions.conf
I am working on getting freenum.org ISN/ITAD numbers integrated into my exiting dialplan however I am having trouble getting the extension matches to work "as expected." I would like to be able to do something like: exten => _X.*.,1,Macro(isn-outbound...) Where I would expect that any extension that starts with at least one number, but includes a literal "*" followed by 1 or more numbers would match. This is not the case, and it matches any extension that starts with a number. Thank you in advance for your assistance. -- Anthony - http://messinet.com - http://messinet.com/~amessina/gallery 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20070914/efa55cfe/attachment.pgp
Anthony Francis
2007-Sep-14 16:51 UTC
[asterisk-users] Can Asterisk match a literal "*" in extensions.conf
. matches any number of the preceding character, change it to _X.*X. Anthony Messina wrote:> I am working on getting freenum.org ISN/ITAD numbers integrated into my > exiting dialplan however I am having trouble getting the extension matches to > work "as expected." > > I would like to be able to do something like: > exten => _X.*.,1,Macro(isn-outbound...) > > Where I would expect that any extension that starts with at least one number, > but includes a literal "*" followed by 1 or more numbers would match. > > This is not the case, and it matches any extension that starts with a number. > > Thank you in advance for your assistance. > > > ------------------------------------------------------------------------ > > _______________________________________________ > > Sign up now for AstriCon 2007! September 25-28th. http://www.astricon.net/ > > --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-- Thank you and have a wonderful day, Anthony Francis Rockynet VOIP (303) 444-7052 opt 2 voip at rockynet.com
Adrian Marsh
2007-Sep-14 16:55 UTC
[asterisk-users] Can Asterisk match a literal "*" in extensions.conf
I don't think * means anything special to A*k, But wouldn't it be: _X.*X. To match as you ask ? (number)(wildcard)*(number)(wildcard) -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Anthony Messina Sent: 14 September 2007 17:40 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Can Asterisk match a literal "*" in extensions.conf I am working on getting freenum.org ISN/ITAD numbers integrated into my exiting dialplan however I am having trouble getting the extension matches to work "as expected." I would like to be able to do something like: exten => _X.*.,1,Macro(isn-outbound...) Where I would expect that any extension that starts with at least one number, but includes a literal "*" followed by 1 or more numbers would match. This is not the case, and it matches any extension that starts with a number. Thank you in advance for your assistance. -- Anthony - http://messinet.com - http://messinet.com/~amessina/gallery 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
Tilghman Lesher
2007-Sep-14 17:37 UTC
[asterisk-users] Can Asterisk match a literal "*" in extensions.conf
On Friday 14 September 2007 11:39:40 Anthony Messina wrote:> I am working on getting freenum.org ISN/ITAD numbers integrated into my > exiting dialplan however I am having trouble getting the extension matches > to work "as expected." > > I would like to be able to do something like: > exten => _X.*.,1,Macro(isn-outbound...)The problem you're seeing is that the period is a short-circuit operator. It says "if you match everything so far and at least one more character, then you have a match, no need to go any further." You CANNOT match past a '.'. -- Tilghman
Eric "ManxPower" Wieling
2007-Sep-14 21:11 UTC
[asterisk-users] Can Asterisk match a literal "*" in extensions.conf
Anthony Messina wrote:> I am working on getting freenum.org ISN/ITAD numbers integrated into my > exiting dialplan however I am having trouble getting the extension matches to > work "as expected." > > I would like to be able to do something like: > exten => _X.*.,1,Macro(isn-outbound...) > > Where I would expect that any extension that starts with at least one number, > but includes a literal "*" followed by 1 or more numbers would match. > > This is not the case, and it matches any extension that starts with a number. > > Thank you in advance for your assistance.. must ONLY be the LAST character in a pattern match.