[asterisk-users] Strange dialplan matching issue

OCG Technical Support support at ocg.ca
Fri Feb 13 16:17:55 CST 2009


No, sorry, we match _XXX to jump to plant123

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Philipp
Kempgen
Sent: February 13, 2009 4:35 PM
To: Asterisk Users List
Subject: Re: [asterisk-users] Strange dialplan matching issue
Importance: High

OCG Technical Support schrieb:
> We use extensions like "plant201" and "tunnel12" so it does work in 1.4

As a *pattern* (e.g. "_plant2XX", "_tunnel.")?

> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jose P.
> Espinal

> On extensions.conf.sample I see this:
> 
> ; Extension names may be numbers, letters, or combinations
> ; thereof. If an extension name is prefixed by a '_'
> ; character, it is interpreted as a pattern rather than a
> ; literal.  In patterns, some characters have special meanings:
> ;
> ;   X - any digit from 0-9
> ;   Z - any digit from 1-9
> ;   N - any digit from 2-9
> ;   [1235-9] - any digit in the brackets (in this example,
1,2,3,5,6,7,8,9)
> ;   . - wildcard, matches anything remaining (e.g. _9011. matches
> ;       anything starting with 9011 excluding 9011 itself)
> ;   ! - wildcard, causes the matching process to complete as soon as
> ;       it can unambiguously determine that no other matches are possible
> 
> Maybe after using '_' Asterisk is waiting for one of the above pattern 
> matching characters.
> 
> a. The 'hilton-' part of your dialplan might not being considered valid, 
> and Asterisk *might* be trying to match the 'XX' part LITERALLY, and 
> would be trying to reach extension '2XX'
> 
> exten => _hilton-2XX,1,Goto(hilton,${EXTEN:7},1)
> 
> 
> b. then, in:
> exten => hilton-203,1,Goto(hilton,${EXTEN:7},1)
> 
> You provided the real extension number (after you take out the fist 7 
> digits).
> 
> So, Asterisk reaches '203', etc.
> 
> 
> 
> Try only using valid pattern matching characters in your dialplan to see 
> if it works.
> 
> 
> 
> Chris Bagnall wrote:

>> Wondering if anyone has come across this strange dialplan pattern
matching
> issue before:
>> 
>> I have a context defined as follows (the plus simply implies it follows
on
> from an existing context in another #include - which, yes, has been
included
> first):
>> [privatedundi](+)
>> exten => _hilton-2XX,1,Goto(hilton,${EXTEN:7},1)
>> 
>> When dialling hilton-202 from another box via IAX2, I get:
>> NOTICE[3727]: chan_iax2.c:8085 socket_process: Rejected connect attempt
> from <ip masked>, request 'hilton-202 at privatedundi' does not exist
>> 
>> Changing the context to read as follows solves the problem immediately:
>> [privatedundi](+)
>> exten => hilton-201,1,Goto(hilton,${EXTEN:7},1)
>> exten => hilton-202,1,Goto(hilton,${EXTEN:7},1)
>> exten => hilton-203,1,Goto(hilton,${EXTEN:7},1)
>> 
>> Dialling hilton-202 now works every time.
>> 
>> The *really* strange thing is that I have a number of similar pattern
> matches, and all the others work fine, it's just this one that doesn't.
>> 
>> The box in question is running 1.4.22, but I have had a similar issue in
> the past with a 1.2 box, so it does not appear to be version specific.


   Philipp Kempgen

-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

_______________________________________________
-- 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