[Asterisk-Users] Re: Local calls to x100p all else to iax term

Randy Bush randy at psg.com
Sun Jun 13 08:11:19 MST 2004


>> I have a list of all my local prefixes(free) on my POTS.  Is
>> there a way to integrate that so * decides if it is going to use
>> iax or POTS?  There is about 60 prefixes..  1831-XXX
> ; your first prefix will be 555
> exten => _91831555XXXX,1,Dial(pstn...)
> ; your second prefix will be 678
> exten => _91831678XXXX,1,Dial(pstn...)
> ; ok, no match from any of the previous 60 prefixes, so IAX
> exten => _91NXNNNNNNNN.,1,Dial(IAX...)
> 
> Remember that you can "combine" prefixes using the exten "regular
> expression":
> 
> ; your first prefix will be 555, 556, 557, 558 or 559
> exten => _9183155[5-9]XXXX,1,Dial(pstn...)

i think the point may be that there can be massive prefix lists and
folk don't want the extensions.conf from hell.  it would be a nice
hack to have an external utility to load one's named [0] prefix
lists into something that can be used for matching analogously to
DBGet().

randy

---

[0] - named so one can have more than one.  i have out-dials in
      four locations each with a non-trivial set of prefixes.  so 
      i kinda wanna do

      exten => biwa.,1,Dial(SIP/${EXTEN}@biwa0,60,Ttr)
      exten => hawi.,2,Dial(SIP/${EXTEN}@hawi0,60,Ttr)
      exten => marais.,3,Dial(SIP/${EXTEN}@marais0,60,Ttr)
      exten => tokyo.,4,Dial(SIP/${EXTEN}@tokyo0,60,Ttr)
      exten => _.,5,Dial(SIP/${EXTEN}@fallback-provider,60,Ttr)

      and let some external process/cron/gui/... keep the four
      databases up to date.




More information about the asterisk-users mailing list