Re: [Asterisk-Users] Pattern matching problem
1) Your exten => _1XX,n,Dial(Zap/1/${EXTEN}) does not start with priority "1" so it will never match 2) The 10 digit number you dialed does not start with a 1 so it will never match, even if the priority issue is fixed. Asterisk knows that once you've dialed 7 digits no OTHER pattern can match what you are dialing and so it matches the 7 digits you dialed. For the most part exten => i is only run during IVR (WaitExten, Background, etc) and not when dialing from a phone. BTW, this works just like the Telco. You can dial as many extra digits as you want, and the telco will ignore the extra ones, which is why you can dial 1-800-PROGRESSIVE it will work (assuming such a number exists). hugolivude wrote: I'm running Asterisk 1.2.7.1 on Red hat 9 and have a strange pattern matching problem: I have the following in my dial plan: exten => _NXX,1,NoOp(Number dialed ${EXTEN}) exten => _NXX,n,Dial(Zap/1/${EXTEN}) Unless I'm missing something, I wouldn't expect the pattern above to match a 10 digit number, but when I dial 6137451576, I see the following in the CLI: -- Executing NoOp("Zap/1-1", "Number dialed 6137451") in new stack -- Executing Dial("Zap/1-1", "Zap/1/6137451") in new stack As you can see, the last 3 digits are truncated in the dial cmd. This is odd behaviour isn't it? _NXX shouldn't be a match for a 10 digit number! The other patterns I have are: exten => _1XX,n,Dial(Zap/1/${EXTEN}) exten => _011.,n,Dial(Zap/1/${EXTEN}) so in fact I would have expected 6137451576 to fall thru to here: exten => i,1,AbsoluteTimeout(15) exten => i,n,Playtones(congestion) exten => i,n,Congestion exten => i,n,Hangup -- Now accepting new clients in Birmingham, Atlanta, Huntsville, Chattanooga, and Montgomery. ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] pattern matching problem
> > How do I solve the problem with between patterns: > > _1800 > > _1NXX > > > > I would like all numbers 1800, 1877 etc to go through iaxtel > > but all other numbers 1xxx via voipjet > > > In your default context (i.e. the one specified in sip.conf/iax.conf) > include the iaxtel context before the outgoing-voipjet context. The > system should stop at the first match. > > Good luck, > > Robert Jackson Thank you! I was under impression that the order in extension.conf is important but actually it is iax/sip.conf file. -- #Joseph ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] pattern matching problem
On Mon, 2005-01-17 at 09:02 +0100, Jens Vagelpohl wrote: > On Jan 17, 2005, at 7:29, Joseph wrote: > > > How do I solve the problem with between patterns: > > _1800 > > _1NXX > > > > I would like all numbers 1800, 1877 etc to go through iaxtel > > but all other numbers 1xxx via voipjet > > When you combine these contexts, e.g. when you include them in your > default context, you need to make sure that the more specific > expression (in this case the iaxtel expression) appears *before* the > less specific expression (outgoing-voipjet). First match wins. > > jens Yes, I recall reading about it in they way they are sorted. So I include them in Internal context. [internal] include => iaxtel include => outgoing-voipjet [iaxtel] exten => _1700NXX,1,Dial(IAX2/xxx:[EMAIL PROTECTED]/[EMAIL PROTECTED]) exten => _1888NXX,1,Dial(IAX2/xxx:[EMAIL PROTECTED]/[EMAIL PROTECTED]) [outgoing-voipjet] exten => _1NXXNXX,1,SetCallerID(7475451055) exten => _1NXXNXX,2,Dial,IAX2/[EMAIL PROTECTED]/${EXTEN} Though what you are saying I should combine these two. -- #Joseph ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] pattern matching problem
> -Original Message- > From: Joseph [mailto:[EMAIL PROTECTED] > Sent: Monday, January 17, 2005 1:29 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: [Asterisk-Users] pattern matching problem > > > How do I solve the problem with between patterns: > _1800 > _1NXX > > I would like all numbers 1800, 1877 etc to go through iaxtel > but all other numbers 1xxx via voipjet > In your default context (i.e. the one specified in sip.conf/iax.conf) include the iaxtel context before the outgoing-voipjet context. The system should stop at the first match. Good luck, Robert Jackson ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] pattern matching problem
On Jan 17, 2005, at 7:29, Joseph wrote: How do I solve the problem with between patterns: _1800 _1NXX I would like all numbers 1800, 1877 etc to go through iaxtel but all other numbers 1xxx via voipjet When you combine these contexts, e.g. when you include them in your default context, you need to make sure that the more specific expression (in this case the iaxtel expression) appears *before* the less specific expression (outgoing-voipjet). First match wins. jens --- Jens Vagelpohl [EMAIL PROTECTED] Software Engineer +49-(0)441-36 18 14 38 Zetwork GmbHhttp://www.zetwork.com/ ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users