DigitMap and In/Outbound CallRoute Tutorial

(1/6) > >>

azrobert:
I've helped several people with their dialing rules by suggesting fixes to what they have already done, but never showed the forum how I setup my own dialing rules.  This example follows my coding philosophy. I tried to include the most common requirements.

First, a lot of people don't understand the process.  Here is what happens after a number is dialed.

- The Phone DigitMap validates the number dialed.
   The dialed number can be modified.
   If the number is validated it's passed to the Phone OutboundCallRoute.

- The Phone OutboundCallRoute determines the trunk and makes the call.
   The dialed number can be modified.

Notice there is no mention of the trunk DigitMaps.  The trunk DigitMaps do nothing by themselves. They are only relevant when referred to by the Phone DigitMap or Phone OutboundCallRoute.

Here's what I'm trying to accomplish in this example:

SP1 - 7, 10 or 11 digits numbers. Add local area code to 7 digits.
SP2 - 10 digits numbers with prefix "2".  Strip prefix and replace with "1".  International calls.  
VG3 - 11 digit 1-800 numbers.
LIne - 7 and 10 digit numbers with prefix 9. Strip prefix.  Replace prefix with "1" on 10 digit call. Skip adding country code for  area code "602".  "9" for dial tone on PSTN line.

Setup a user defined DigitMap to only validate and not modify the dialed number for all trunks. I'm naming it "ud1" and it looks like this:
([129]?xxxxxxxxxx|9?xxxxxxx|011xx.|9)

[129]?xxxxxxxxxx validates 10 and 11 digit numbers for all trunks.
9?xxxxxxx validates 7 digit numbers for SP1 and Line.
011xx. validates international calls for SP2.
 9  for Line.

Place (Mud1)| at the beginning of the default Phone DigitMap.
If you don't want to create a User Defined DigitMap place the above rules at the beginning of the default Phone DigitMap.

Trunk DigitMaps:
SP1 DigitMap = (1?xxxxxxxxxx|<480>xxxxxxx)
SP2 DigitMap = (<2:1>xxxxxxxxxx|011xx.)
VG3 DigitMap = (18(00|88|77|66|55|44)xxxxxxx)
Line DigitMap = (<9:>602xxxxxxx|<9:1>xxxxxxxxxx|<9:>xxxxxxx|<9:>)

Place the following at the beginning of the default Phone OutboundCallRoute:
{(Mvg3):vg3},{Msp1:sp1},{(Msp2):sp2},{(Mli):li},

All the substitution is accomplished in the Phone OutboundCallRoute by referring back to the Trunk DigitMaps.  Notice that I placed VG3 first.  If I didn't all 1-800 numbers would go out SP1.


For those of you that re-route calls from another ATA/OBiApp  this coding technique incorporates very easily without changing any code. The remote ATA/OBIApp would dial the outgoing number in the same format as the local OBi. Setup Speed Dial #9 on the OBION App to dial "9" to get dial tone on the PSTN line.


SP2 X_InboundCallRoute:
{(userid)>(Mvg3):vg3},{(userid)>(Msp1):sp1},{(userid)>(Msp2):sp2},{(userid)>(Mli):li},{(userid)>:},{ph}

 OBiTalk InboundCallRoute:
{(2xxxxxxxx)>(Mvg3):vg3},{(2xxxxxxxx)>(Msp1):sp1},{(2xxxxxxxx)>(Msp2):sp2},{(2xxxxxxxx)>(Mli):li}}

That's it.

To summarize my coding technique:
- The Phone DigitMap only  does validation.  No modifications.
- A trunk's DigitMap only contains rules for its self.
- Refer back to the trunk DigitMaps in the Phone OutboundCallRoute or InboundCallRoutes.
-When you code this way the Phone OutboundCallRoute and all the InboundCallRoutes can use the same DigitMaps.

I'm biased, but I think this config is concise and easy to understand and modify.
You can look at a trunk DigitMap and know exactly what's happening on that trunk.
I'm not saying this is the only way to go.  Ultimately it's the end user that decides which technique is best for his/her requirements.

Disclaimer:
I did not test this config, so please don't beat me up too badly if you find errors.

azrobert:
I want to show you how easily this config can be modified for additional requirements.
Say you bought another OBi110 and you wanted each OBi110 to access the other's trunks.

Each OBi will be configured the same except for some minor differences.
Add a second prefix of "1" or "2" to the dialed number.
These would only be used to dial the other OBi110's trunks.
"1" for the OBi110#1 and "2" for the OBi110#2.
Dialing remains the same for local trunks on both OBi110s.
OBi110#1 can call out on the OBi110#2's SP1 by dialing "214085551212"  or 295551212  to make a local call on OBi110#2's PSTN.
OBi110#2 can call out on the OBi110#1's SP1 by dialing "114085551212"  or 195551212  to make a local call on OBi110#1's PSTN.  

No changes required for the following:

SP1 DigitMap = (1?xxxxxxxxxx|<480>xxxxxxx)
SP2 DigitMap = (<2:1>xxxxxxxxxx|011xx.)
VG3 DigitMap = (18(00|88|77|66|55|44)xxxxxxx)
Line DigitMap = (<9:>602xxxxxxx|<9:1>xxxxxxxxxx|<9:>xxxxxxx|<9:>)
SP2 X_InboundCallRoute:
{(userid)>(Mvg3):vg3},{(userid)>(Msp1):sp1},{(userid)>(Msp2):sp2},{(userid)>(Mli):li},{(userid)>:},{ph}
 OBiTalk InboundCallRoute:
{(2xxxxxxxx)>(Mvg3):vg3},{(2xxxxxxxx)>(Msp1):sp1},{(2xxxxxxxx)>(Msp2):sp2},{(2xxxxxxxx)>(Mli):li}
Phone OutboundCallRoute:
{(Mvg3):vg3},{Msp1:sp1},{(Msp2):sp2},{(Mli):li},
ud1 user defined DigitMap:
 ([129]?xxxxxxxxxx|9?xxxxxxx|011xx.|9)

Make the following changes:

Speed Dial 21 =  PP(ob200100001)
Speed Dial 22 =  PP(ob200100002)

create another user defined DigitMap "ud2":
 (<2:22*>1xxxxxxxxxx|(<2:22*>2xxxxxxxxxx|<2:22*> 9xxxxxxx|<2:22*>9)

Place (Mud2)| at the beginning of the  Phone DigitMap.

That's four lines of code for both OBi110s to have access to the other's trunks.
I didn't allow 7 digit dialing on SP1 or 1xxxxxxxxxx on PSTN.
These didn't make sense.
I didn't allow international calls because rule "<2:22*>011xx." could match a domestic number.  Coding more of the number would solve that problem.
Speed Dials 9 and 29 must be blank so "9" and "29" can be dialed to access PSTN dial tone on both OBis.
Different Speed Dials might have to be defined on OBi110#2 to ring remote devices.

I could have used 1 Speed Dial, so both OBis would use the same SD to access each other.
I did it this way in case you wanted to add more devices.
Each OBi would have its own speed dial.

I know I'm breaking my rule of no modifications in the Phone DigitMap, but rules are meant to be broken. LOL

These are the config differences between OBis:
OBi110#2 would use a different area code in its SP1 DigitMap for 7 digit dialing.
It would use prefix "1" and Speed Dial 21  to access OBi110#1. The User Defined DigitMap "ud2" would be changed to reflect this.
Speed Dials 9 and 19 must be blank so "9" and "19" can be dialed to access PSTN dial tone on both OBis.

BIG Disclaimer:
I only have one OBi110, so I could not test this configuration.
I have never done a config like this.
This is my understanding how accessing another OBi's resources work.

ianobi:
azrobert,

A very interesting post. The good clear explanation of how the Phone Port DigitMap and OutboundCallRoutes work will be helpful to many users.

Using ud2 as a “look-up table” is interesting. It allows for each OBi to have a plain number, 1, 2, 3 etc, but each can be allocated almost any speed dial number.

As you say, there’s always more than one way to do things with OBi configuring, but it’s good to feed off each others’ ideas.

Ostracus:
Quote from: ianobi on January 19, 2013, 03:28:29 am

As you say, there’s always more than one way to do things with OBi configuring, but it’s good to feed off each others’ ideas.


BRAAAINS! ;D

azrobert:
I did not know how an OBION App could dial "9".  I have since figured it out and have updated my post.  Just setup Speed Dial#9 to dial "9".

I have a question.  In my example the OBION App could dial PP(ob200.....) to ring the Phone Port on the OBi110, but what if the device was an OBi202.  Which Phone Port would ring or would both?  How would you ring the other port without calling the PSTN number pointing to it?

Judging by the number of responses I received, not too many people were impressed by my post.  I suppose someone with a working device would not reconfigure even if they liked my coding technique.  I don't think I would.

Anyway, I hope my effort helps a least one person out there.

Navigation

[0] Message Index

[#] Next page