Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: Franco on September 21, 2009, 03:26:54 PM

Title: Loading prefix codes into dialplan from a file
Post by: Franco 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?
Title: Re: Loading prefix codes into dialplan from a file
Post by: SARK devs 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



Title: Re: Loading prefix codes into dialplan from a file
Post by: Franco 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,

Title: Re: Loading prefix codes into dialplan from a file
Post by: SARK devs on September 21, 2009, 10:37:35 PM
so are these codes different to the regular area codes?
Title: Re: Loading prefix codes into dialplan from a file
Post by: Franco 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,
Title: Re: Loading prefix codes into dialplan from a file
Post by: SARK devs 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

 
Title: Re: Loading prefix codes into dialplan from a file
Post by: gippsweb 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...