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 Example in my extension.conf I have: [iaxtel] exten => _1700NXXXXXX,1,Dial(IAX2/xxxx:xxxxx@iaxtel.com/${EXTEN}@iaxtel) exten => _1888NXXXXXX,1,Dial(IAX2/xxxx:xxxxx@iaxtel.com/${EXTEN}@iaxtel) exten => _1877NXXXXXX,1,Dial(IAX2/xxxx:xxxxx@iaxtel.com/${EXTEN}@iaxtel) exten => _1866NXXXXXX,1,Dial(IAX2/xxxx:xxxxx@iaxtel.com/${EXTEN}@iaxtel) exten => _1800NXXXXXX,1,Dial(IAX2/xxxx:xxxxx@iaxtel.com/${EXTEN}@iaxtel) [outgoing-voipjet] exten => _1NXXNXXXXXX,1,SetCallerID(4757894789); exten => _1NXXNXXXXXX,2,Dial,IAX2/1555@voipjet/${EXTEN} Whatever I try to dial it goes through voipjet. -- #Joseph
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 voipjetWhen 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 jens@zetwork.com Software Engineer +49-(0)441-36 18 14 38 Zetwork GmbH http://www.zetwork.com/
> -----Original Message----- > From: Joseph [mailto:syscon@interbaun.com] > 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
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. > > jensYes, 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 => _1700NXXXXXX,1,Dial(IAX2/xxx:xxx@iaxtel.com/${EXTEN}@iaxtel) exten => _1888NXXXXXX,1,Dial(IAX2/xxx:xxx@iaxtel.com/${EXTEN}@iaxtel) [outgoing-voipjet] exten => _1NXXNXXXXXX,1,SetCallerID(7475451055) exten => _1NXXNXXXXXX,2,Dial,IAX2/1555@voipjet/${EXTEN} Though what you are saying I should combine these two. -- #Joseph
> > 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 JacksonThank you! I was under impression that the order in extension.conf is important but actually it is iax/sip.conf file. -- #Joseph
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 => _NXXXXXX,1,NoOp(Number dialed ${EXTEN}) exten => _NXXXXXX,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? _NXXXXXX shouldn't be a match for a 10 digit number! The other patterns I have are: exten => _1XXXXXXXXXX,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 Thanks, Hugh
So sorry, the correct version is 1.2.6 :-) kevin -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Aaron Daniel Sent: Thursday, April 27, 2006 11:02 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] Re: Pattern matching problem> My * version is 2.1.6.... Did I miss something? -- Aaron Daniel Computer Systems Technician Sam Houston State University amdtech@shsu.edu (936) 294-4198 _______________________________________________ --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