News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Need help with dial plan

Started by VoipAndre, June 23, 2013, 08:26:40 AM

Previous topic - Next topic

VoipAndre

Hi,

I am located in Canada and I am a newbie with the Obi110. I have been experimenting with it trying to set it up the way I like without success!  I am having issues with the dial plan ( or Digitmap ).  My setup is the following:

Pots (line) as the primary, should handle all local calls ( 10 digit dial pattern xxxxxxxxxx), all toll-free numbers and also 911 service.

SP1 is GV, should handle all long distance calls ( prefix of one, 1xxxxxxxxxx )

SP2 is voip.ms, should handle overseas (011 prefix).

I have good results with a dial plan found in this forum which achieves exactly this, however, I am struggling to modify it in order to be able to force a call with SP1 or SP2. This would be used in case either GC or voip.ms is not up, or simply to give me control on which provider to use.

So to reiterate, everything besides long distance goes to POTS (LINE), by default all long distances go to GV, but a dial prefix would allow me to choose between SP1 and SP2.  When the dial prefix condition is met and matched, it should also allow local and long distance calls. All x11 services, including 911 should always go to POTS, and dialing # would give you the POTS provider dial tone.

Is there anyone who could give me a hand with this?  This is what I have so far (which I have not fully tested):

ITSP Profile A (Google voice)
Digitmap: (1[2-9]xx[2-9]xxxxxx)

ITSP Profile B (voip.ms)
Digitmap: (011.xx|1[2-9]xx[2-9]xxxxxx)

PHONE Port
DigitMap: ((Msp1)|(Msp2)|(Mli)|#|911)
OutboundCallRoute: {(Mli):li},{(Msp1):sp1},{(Msp2):sp2},{(<#:>|911):li}

LINE Port
(xxxxxxx|xxxxxxxxxx|18(00|88|77|66|55|44)xxxxxxx)

Can anyone help me out?  I want to add that I am very interested in understanding the OBI110 dial plan config, not necessarily asking for a copy and paste solution!

Thanks!




azrobert

#1
You have a very good understanding of DigitMaps and Routes. You are almost there.

ITSP Profile B (voip.ms)
Digitmap: (011.xx|2[2-9]xx[2-9]xxxxxx|2xxxxxxx)

PHONE Port
DigitMap: ((Msp1)|(Msp2)|(Mli)|#|[49]11)
OutboundCallRoute: {(Mli):li},{(Msp1):sp1},{(<2:1>[2-9]xx[2-9]xxxxxx) |<2:1480>xxxxxxx)|(Msp2):sp2},{(<#:>|[49]11):li}

Use a "2" prefix to force calls out SP2.  480 for 7 digit dialing out SP2 is your local area code.
If you need other x11 numbers just add between brackets.

Did I forget anything?

VoipAndre

Thanks for the fast reply!

in order to match x11 instead of

[49]11

I could simply do [2-9] which would match all the following: 211,311,411...911?



azrobert

Quote from: VoipAndre on June 23, 2013, 09:34:54 AM

I could simply do [2-9] which would match all the following: 211,311,411...911?


That is correct.

VoipAndre

Umm...now I get a "No service configured error" voice prompt...

SP2 Service Status (voip.ms) shows as being registered...both on the OBI and at the voip.ms service provider webpage.

looking at the call status when the call is in progress shows that it is trying to connect to OBITALK1...   

So I went to Voice services, disabled OBITALK, and then I get "There is no service available to complete your call".

Routing somewhere is not sending the call to the SP2....Any ideas on where to start looking?

azrobert

Is the problem with the "2" prefix or did I screw up other things?

ianobi

I'm going to suggest a different approach, which lets you dial local, long distance and international on either sp1 or sp2 using the **1 and **2 codes. Try it or file it as you wish   :)  If it's not the answer for you, it might well be the answer for someone else.

If you ask three "experts" here you will get three different answers   ;)   It just shows how configurable the OBi is. Here is my way:

Leave these at default they will do most of the work for you:

Physical Interfaces > PHONE Port > DigitMap:
([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|911|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

Physical Interfaces > PHONE Port > OutboundCallRoute:
{([1-9]x?*(Mpli)):pp},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}

Change all of the DigitMaps:

Service Providers -> ITSP Profile A -> General -> DigitMap:
(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<1aaa>[2-9]xxxxxxS4|011xx.)
Replace aaa with your local code.

Service Providers -> ITSP Profile B -> General -> DigitMap:
(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<1aaa>[2-9]xxxxxxS4|011xx.)
Replace aaa with your local code.

Physical Interfaces > LINE Port > DigitMap:
(xxxxxxxS4|xxxxxxxxxx|18(00|88|77|66|55|44)xxxxxxx|<**1>1[2-79]xxxxxxxxx|<**2>011xx.|x11)

I'll try some explanation, please feel free to ask for more.

Dialling any number with no ** code will be processed first by your Primary Line – in your case the Line Port DigitMap. If you now dial 12345678912 then this rule <**1>1[2-79]xxxxxxxxx will prepend **1 to the number. Then in the Phone Port OutboundCallRoute this rule {(<**1:>(Msp1)):sp1} will match **112345678912, strip off the **1 and send the number out on sp1.

I have added the S4 to give a four second delay after dialling seven digits in case you mean to dial ten digits, but dial slowly so OBi thinks you have finished dialling after seven digits.

911 is dealt with as a special case and is sent direct to the Line Port with no reference to any digit maps.

When dialling, if you prefix any of the following numbers with **1 or **2 they will be sent out of sp1 or sp2 respectively:
1xxxxxxxxxx – will be sent out unchanged.
xxxxxxxxxx – will have a "1" prepended, then sent out.
xxxxxxx – will have "1aaa" prepended, then sent out, where aaa is your area code.
011xx. will be sent out unchanged.

There's a lot more to be said about how an OBi device processes dialled numbers using a two stage method, but I think we have covered enough for one post! Try the above and check the outcomes with Status > Call History, which will tell you where each call goes.

The above may need some fine tuning, often small bugs show up after new configurations have been in use for a while.

I do look in here most days, but I'm in a different time zone (UK), so answers may be a bit slow coming!


VoipAndre

Sorry forgot to include that piece of info...:)  This only happens when I dial the "2" prefix...

VoipAndre

Ianobi:

Thanks for your post, however since my dear wife is not tech oriented, asking her to dial a prefix when calling long distance will not work very well...  What I am trying to achieve is to replicate our regular PSTN provider dial plan, but sending all long distances to SP1,  while giving me the flexibility of choosing SP1 or SP2 with a dial prefix....

azrobert

I had an extra space in my outbound call route.
I corrected it at 9:06.
Is it possible you copied it before the correction?

I have to take  shower now and then we are going out for breakfast and grocery shopping. I don't know if I have time before we leave. I will try the config on my OBi when I get back about 3:00pm Pacific time.

ianobi

VoipAndre,

I should have been more clear. The "automatic" routing with no ** codes is built into my configuration. The **1 and **2 codes are there for when you wish to force any call to GV or voip.ms. This does the automatic routing:

Physical Interfaces > LINE Port > DigitMap:
(xxxxxxxS4|xxxxxxxxxx|18(00|88|77|66|55|44)xxxxxxx|<**1>1[2-79]xxxxxxxxx|<**2>011xx.|x11)

These rules <**1>1[2-79]xxxxxxxxx|<**2>011xx. automatically prepend the required prefix without the user having to dial them. So dialling normally with no ** codes all calls route as you wish.


azrobert

#11
O.K. Shower done and I have a little time, but not enough time to start playing with my OBi.
I don't like the way I setup the OutboundCallRoute. Too busy.

Try this:

ITSP Profile A (Google voice)
Digitmap: (1[2-9]xx[2-9]xxxxxx)

ITSP Profile B (voip.ms)
Digitmap: (011.xx|<2:1>[2-9]xx[2-9]xxxxxx|<2:1480>xxxxxxx)

PHONE Port
DigitMap: ([12][2-9]xx[2-9]xxxxxx |2xxxxxxx|(Mli)|#|[2-9]11)
OutboundCallRoute: {(Mli):li},{(Msp1):sp1},{(Msp2):sp2},{(<#:>|[2-9]11):li}

LINE Port
(xxxxxxx|xxxxxxxxxx|18(00|88|77|66|55|44)xxxxxxx)


Update:

Do you want to be able route international calls out SP1?

VoipAndre

#12
Azrobert:

We have liftoff!  Thank you for your help, it is now doing exactly what I wanted.  I can now start tearing this apart and modify, as well as digest ianobi post as well!  For the time being I do not need to route international to SP1 since I don't have credits with GV to allow those, and I rarely do international.  I would use SP2 for those calls anyways. I could get this achieved by having this as digitmap for GV:

ITSP Profile A (Google voice)
Digitmap: (011.xx|1[2-9]xx[2-9]xxxxxx)

and by modifying to

ITSP Profile B (voip.ms)
Digitmap: (<2>011.xx|<2:1>[2-9]xx[2-9]xxxxxx|<2:1480>xxxxxxx)

Do I understand the <2:> properly?  My understanding is that <2:> will be matched but not passed to the provider, and that <2:1> will match 2 and pass 1 + whatever follows...

Again, thanks for the help, I really appreciate!

Cheers!

azrobert

#13
Your understanding is not correct.

Anything to the left of the colon is used to compare to the dialed number. Upon a match the left portion is removed from the dialed number.

Anything to the right of the colon is NOT used to compare to the dialed number. Upon a match the right portion is prepended to the dialed number. I should say it's added to the dialed string.
(1<2:7>3456)
The above is comparing for "123456" upon a match it will change the dialed number to "173456".

If you are only adding a string (right of colon) the colon is optional.
<2> is the equivalent of <:2>

You are not showing your complete configuration, but I don't think it's working correctly. Your international calls will route out SP2, but it looks like it will have a "2" prepended.

This is how things work and how I code.
First the Phone Port DigitMap gets control and verifies the dialed number.
I do not make any changes to the dialed string here.
In my last example I do not reference Msp2 because I don't want to make any changes.

If the dialed number passes verification it is passed to the Phone OutboundRoute unchanged.
Again, it's only unchanged because of the way I code.
The Phone OutboundRoute compares to the dialed number. Upon a match it makes any changes and then routes the call to a Trunk.

I think not changing the dialed number in the Phone Port DigitMap simplifies the logic. You can look at the trunk DigitMap and see exactly what happening for that trunk. I'm in the minority on the forum with this coding technique and most people code like ianobi.

The bottom line is there is no wrong way of coding as long as it works. The correct way to code is what the end user is most comfortable with.

Anyway, I made a couple of errors in my last post. I forgot about verifying international numbers and I inserted a blank, plus the Phone Port DigitMap is starting to get busy. Let me show you more closely how I code. I setup a user defined DigitMap to verify the dialed number in Phone Port DigitMap.

ITSP Profile A (Google voice)
Digitmap: (1[2-9]xx[2-9]xxxxxx)

ITSP Profile B (voip.ms)
Digitmap: (011.xx|<2:1>[2-9]xx[2-9]xxxxxx|<2:1480>xxxxxxx)

PHONE Port
DigitMap: ((Mver)|(Mli)|#|[2-9]11)
OutboundCallRoute: {(Mli):li},{(Msp1):sp1},{(Msp2):sp2},{(<#:>|[2-9]11):li}

LINE Port
DigitMap: (xxxxxxx|xxxxxxxxxx|18(00|88|77|66|55|44)xxxxxxx)

User Settings -> User Defined Digit Maps
User Defined Digit Map 2
Label: ver
DigitMap: ([12][2-9]xx[2-9]xxxxxx|2xxxxxxx|011.xx)

[12][2-9]xx[2-9]xxxxxx verifies dialed 11 digit numbers for SP1 and SP2.

You don't need the User Defined DigitMap. I think it organizes things better and makes the configuration more readable.

You don't prefix international numbers with the above configuration. You only prefix long distance numbers and 7 digit numbers with "2" to route them out SP2.

I hope I didn't make any errors with the above.


Update:
I misread your last post. Your understanding of <> is correct.
If your config is working you must be removing the "2" prefix for international numbers in the OutboundRoute.



ianobi

QuoteI think not changing the dialed number in the Phone Port DigitMap simplifies the logic. You can look at the trunk DigitMap and see exactly what happening for that trunk. I'm in the minority on the forum with this coding technique and most people code like ianobi.

I am indeed a graduate from the RonR School of Digitmapping   8)  However, I always look forward to an azrobert digit map - it makes me look at things from a fresh point of view - always a good thing. I like to think that we pick up ideas from each other. Long may the difference continue   :)


One thing to point out about the azrobert/VoipAndre versions of the Phone Port DigitMap and OutboundCallRoute is that some functions have been lost. You may be happy to keep it simple and not worry about those functions - it's always a personal choice. Here's some to think about:

[1-9]S9|[1-9][0-9]S9 These rules are there to prevent anyone dialling 911 very slowly (maybe you are injured) from getting speed dial 9 or speed dial 11.
**0 Gives access to the Auto Attendant - I accept of limited value, but can be useful for testing.
*** Gives access to Auto Attendant 2 - This can be very valuable for changing settings.

One last consideration is Auto Attendant 1. It has its own DigitMap and OutboundCallRoute. One day it might be needed for single-stage dialling from OBiON etc.


QuoteI want to add that I am very interested in understanding the OBI110 dial plan config

VoipAndre - Good luck with that   :)


Novice

Quote from: ianobi on June 23, 2013, 10:09:14 AM

Physical Interfaces > PHONE Port > DigitMap:
([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|911|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

Physical Interfaces > PHONE Port > OutboundCallRoute:
{([1-9]x?*(Mpli)):pp},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}



Can someone please explain what this part of the digit map/call route does?
[1-9]x?*(Mpli)
Mpli is the primrary line digit map. Are we taking a fully defined digit map and making a new digit map with a prefix?
Doesn't x? mean 0 or 1 digits? How can you have a '*' after a '?' ?

Thanks in advance

azrobert

[1-9]   You are comparing the 1st digit of the dialed number for 1 thru 9
x?       Optionally followed by zero thru 9
*         Followed by a star
[1-9]x?*(Mpli)  You are comparing for anything in Mpli prefixed by 1* thru 99*

{([1-9]x?*(Mpli)):pp}
This is used to route a call over the OBiTalk network.
The 1* thru  99* points to Speed Dial 1 thru 99 that is set to the target OBi number.