Koozali.org: home of the SME Server

Loading prefix codes into dialplan from a file

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Loading prefix codes into dialplan from a file
« on: September 21, 2009, 03:26:54 PM »
My voip provider has given me a excel sheet with all their prefix codes, so I can call others users using the lowest rates. The thing is: this sheet has 4.500 lines/prefixes, is there an weasy way for me to load them into the dial plan?

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Loading prefix codes into dialplan from a file
« Reply #1 on: September 21, 2009, 09:41:21 PM »
Hi Franco,

I'm not sure I fully understand,,,

Can you explain (with an example or two of these codes) what the codes are and how you want them to appear in the dialplan?

Kind Regards

S




Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Re: Loading prefix codes into dialplan from a file
« Reply #2 on: September 21, 2009, 10:14:57 PM »
Hi S,
This is an example of what they gave me:
CELLULAR AREA 68   RIO BRANCO ÁREA 68   AC   689283
PALMAS   PALMAS   TO   633309


this is the prefix code that serves that area, so in routes I would need to set up a new route:
689283XXXX >> go to my provider's route

So the sheet has all the routes and I'm being lazy 'cause it has about 4500 different prefixes I would need to go through. And they're all different, so I can't make _.XXXX...

If there's a way, fine. Otherwise I'll get to work ;-)

Thanks,


Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Loading prefix codes into dialplan from a file
« Reply #3 on: September 21, 2009, 10:37:35 PM »
so are these codes different to the regular area codes?

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Re: Loading prefix codes into dialplan from a file
« Reply #4 on: September 22, 2009, 12:18:01 AM »
so are these codes different to the regular area codes?
That's right, each State has several area codes, and after 04 digits that tell you the provider they're using. Complicated, huh?!

Thanks,

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Loading prefix codes into dialplan from a file
« Reply #5 on: September 22, 2009, 12:21:58 AM »
Wow!

Guess you've got some coding to do.  You can put the code into a custom app I guess.  I'm just not sure how well asterisk will cope with thousands of numbers in the dialplan.


Best

S

 

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Loading prefix codes into dialplan from a file
« Reply #6 on: September 22, 2009, 11:05:37 AM »
One of our providers has such a list, but he does all that at his end.
I just have to select which provider to use for which type of outgoing call.

We just you 2 main providers, one for Aust landlines and another for mobiles, I rarely make international calls, but it could become complex if I started trying to use the cheapest provider for each country...