Greetings list, 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. Any thoughts? TIA. Regards, Chris
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:> Greetings list, > > 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. > > Any thoughts? > > TIA. > > Regards, > > Chris > > > > _______________________________________________ > -- 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 >-- Jose P. Espinal http://www.eSlackware.com IRC: [OFTC|FreeNode] Khratos @ #slackware | #asterisk/-doc/-bugs
Asterisk is looking for hilto[1-9]-2[0-9][0-9], if you know what I mean? -- Nabeel Jafferali X2 Networks -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Chris Bagnall Sent: February-11-09 8:18 PM To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: [asterisk-users] Strange dialplan matching issue Greetings list, 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. Any thoughts? TIA. Regards, Chris _______________________________________________ -- 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
Hi, As others have mentioned, the 'n' is a pattern char. I have a system that uses similar tricks to yours. What I did about this issue was to change the pattern match chars to be upper case only. Drop me a line if you want the patch. Regards, Steve On 2/12/09, Chris Bagnall <lists at minotaur.cc> wrote:> Greetings list, > > 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. > > Any thoughts? > > TIA. > > Regards, > > Chris > > > > _______________________________________________ > -- 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 >-- Sent from my mobile device