Flexible table-controlled dialplan, Version 2

Catalog of dial plans
kadalz
Posts: 7
Joined: Thu Jan 06, 2011 2:55 am

Re: Flexible table-controlled dialplan, Version 2

Post by kadalz » Thu Jan 06, 2011 1:21 pm

I'm confused. I followed previous thread, and I added 00 in the VSP descriptor:
Rynga = VSP.new '*3', '00${EXTEN}@Rynga', 'Rynga'

Thus I do not need to type: *3 00 62351869352. Instead I should type *3 62351869352. Did I miss something. Thanks.

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: Flexible table-controlled dialplan, Version 2

Post by MikeTelis » Thu Jan 06, 2011 2:53 pm

Dialed numbers undergone two procedures. First, they are converted into ENUM format (country code followed by area code and phone number). Second, they are formatted as necessary for this or that particular VSP.

Why ENUM? I decided to represent all numbers in uniform format because it's much easier to route the call with a single "when" statement instead of writing the same code for the numbers that begin with 1, +1, 001 etc.

ENUM conversion is done with to_ENUM() method. The to_ENUM code supplied with this dialplan has been tailored for the U.S. If the number is 7-digit, it's prepended with 1 and area code. If it's 10 and more digit and doesn't begin with 1, it will be prepended with 1 (country code) and truncated to 11 digits (some US numbers are longer, such as 1-800-CITIBANK and must be truncated).

Now, if your provider (Rynga) wants the numbers in 00+ENUM format, you're do it by adding 00 in the format string.

Bottom line: 00 in the dial string and 00 in format string are not the same, they play different roles.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Flexible table-controlled dialplan, Version 2

Post by Aaron » Sat Feb 05, 2011 9:01 am

Shouldn't the route_to calls in SelectVSP be using nil instead of false?

Code: Select all

route_to Voxalot, "Voxalot Services", false
...
def route_to vsp, dest=nil, enum = EnumDB
Using false results in an ENUM lookup attempt with a hostname of "false". Using nil prevents the ENUM lookup from taking place.

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: Flexible table-controlled dialplan, Version 2

Post by MikeTelis » Tue Feb 08, 2011 1:03 pm

Yes, it's a bug on my side. Will update the manual in a few minutes.

Alternatively, this line:

enum = nil if enum == false

placed right after def route_to ... should fix the issue.

LHM
Posts: 164
Joined: Tue Jul 28, 2009 7:11 pm

Re: Flexible table-controlled dialplan, Version 2

Post by LHM » Thu May 05, 2011 4:06 pm

What am I missing by using the Complex Dial Plan (Sept 10, 2010) rather than this Version 2 Plan?

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: Flexible table-controlled dialplan, Version 2

Post by MikeTelis » Sun May 08, 2011 6:11 am

You can think of the Complex dialplan as of "Version 1", currently abandoned. Version 2 offers more flexibility, more natural routing scheme (no difference between regular and Google Voice providers, route_to method, VSP descriptors etc) and in general, it's more up to date.

I think that you were actually asking this: why should I upgrade to Version 2? Well, if you're satisfied with what you get with Complex dialplan, you probably shouldn't consider the upgrade.

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: Flexible table-controlled dialplan, Version 2

Post by MikeTelis » Mon Oct 29, 2012 6:33 am

Updated dialplan on the first page to accomodate the new sys.GoogleContactLookup feature (thanks Aaron)!

Post Reply