On Mon, Jun 05, 2006 at 10:44:14PM -0700, Ira wrote: > At 10:33 PM 6/5/2006, you wrote: > >> exten => s,n,set(EXCHANGES=310323805714) > >> exten => s,n(begin),set(TEST=${EXCHANGES:0:3) > >> exten => s,n,set(EXCHANGES=${EXCHANGES:3) > >> exten => s,n,gotoif($["${TEST}" = ""]?passed) > >> exten => s,n,gotoif($[${TEST} = ${EXTEN?3}:gotone] > >> exten => s,n,gotoif($[${TEST} = ${EXTEN?1:3}:gotone] > >> exten => s,n,goto(begin) > > > >Why would you re-implement the dialplan logic in dialplan? > > > >exten => 310323805714,1,NoOp > >exten => 310324445714,1,NoOp > >exten => 310323804444,1,NoOp > >exten => 310323444714,1,NoOp > > > >exten => _X.,2,; the rest of the dialplan > > > >The block of NoOps for each "good" extension (or pattern of extensions) > >is what you maintain in a separate file and #include or in a database. > > Because he was looking for a way to test a dial prefix against a > list, or that's what I though he wanted. This would let him test an > area code against the list in EXCHANGES and do something based on that > result.
I did mention usig patterns: exten => _310.,1,NoOp It can get tricky if several pattern cover the same range. But I odn't believe that this is the case. -- Tzafrir Cohen sip:[EMAIL PROTECTED] icq#16849755 iax:[EMAIL PROTECTED] +972-50-7952406 [EMAIL PROTECTED] http://www.xorcom.com _______________________________________________ --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