News:

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

Main Menu

International calls via SP2

Started by VANJ, March 05, 2013, 04:33:07 PM

Previous topic - Next topic

VANJ

How can I setup a digit map such that only international calls (starting with 011) are sent via SP2, all other calls are sent via SP1?

Ideally, even the 011 prefix is not necessary since all international calls (country code + number) are longer than 10-digit US numbers so if the digit map can automatically route all 10+ digit numbers to SP2 that would be fantastic.

Help? Thanks

azrobert

#1
I'm assuming your Phone Port primary line is SP1.

Service Provider ==> ITSP Profile B ==> General
Change DigitMap To:
(011xx.|xxxxxxxxxxxx.)

Physical Interfaces ==> Phone Port
Add to DigitMap after the beginning parenthesis:
(Msp2)|

and

Add to beginning of OutboundCallRoute:
{(Msp2):sp2},

Now any dialed number beginning with 011 or any number longer than 10 digits will be routed out SP2.
18005551212 will be routed out SP2.

If you use ITSP B DigitMap:
(011xx.|[02-9]xxxxxxxxxx|xxxxxxxxxxxxx.)
Now any dialed number beginning with 011, any number 11 digits long not starting with "1" or any number longer than 11 digits will be routed out SP2.

VANJ

Quote from: azrobert on March 05, 2013, 08:09:10 PM
If you use ITSP B DigitMap:
(011xx.|[02-9]xxxxxxxxxx|xxxxxxxxxxxxx.)
Now any dialed number beginning with 011, any number 11 digits long not starting with "1" or any number longer than 11 digits will be routed out SP2.

Let me wrap my head around this. Yes, my phone port primary line is SP1. So here is what I want

1. 10-digit number - Prefix with 1 and send via SP1
2. 1 followed by 10-digit number - Leave it alone and send via SP1
3. 10+ digit number NOT starting with 1 - Send via SP2
4. Any number starting with 011 - Send via SP2

How can I do this? I am almost there but haven't quite mastered the syntax yet, appreciate the assist.

Thanks

azrobert

I'm starting over.

Service Provider ==> ITSP Profile B ==> General
Change DigitMap To:
(011xx.|[02-9]xxxxxxxxxx|xxxxxxxxxxxxx.)

Physical Interfaces ==> Phone Port
Add to DigitMap after the beginning parenthesis:
(Msp2)|

and

Add to beginning of OutboundCallRoute:
{(Msp2):sp2},

Now any dialed number beginning with 011, any number 11 digits long not starting with "1" or any number longer than 11 digits will be routed out SP2.

Explanations:

In ITSP Profile B DigitMap:

011xx. will match any number beginning with "011".
[02-9]xxxxxxxxxx will match an 11 digit number beginning with 0,2,3,4,5,6,7,8 or 9.
xxxxxxxxxxxxx. will match any number longer than 11 digits.
Above matches will be routed to SP2 by rule {(Msp2):sp2}.

In ITSP Profile A DigitMap:

1xxxxxxxxxx will match an 11 digit number beginning with 1.
<1>[2-9]xxxxxxxxx will match an 10 digit number beginning with 2 thru 9 and prefix it with "1".
Above matches will be routed to SP1 by rule {(Mpli):pli}.
011xx. is in both profiles, but rule {(Msp2):sp2} is before (left) of rule {(Mpli):pli} and therefore international calls will not be routed out SP1.


Felix

I take advantage that international numbers never start from 1, and have the following digitmap:

PHONE Port - OutboundCallRoute: {(Msp1):sp1},{(Msp2):sp2}
ITSP Profile A General - DigitMap: (1[2-9]xxxxxxxxxS0)

ITSP Profile B General - DigitMap: ([2-9]xxxxxxxxxxx.)

This way, numbers starting with 1 go through SP1 (Google Voice). I also use S0 to start dialing after 11 digits. Anything that starts with 2-9 and is at least 11 digits, goes to SP2 (Call with us doesn't require or allow any prefixes before the country code).

It doesn't cover your first use case. My dad prefers it that way; but you can add <:1>[2-9]xxxxxxxxx to the first rule: (1[2-9]xxxxxxxxxS0|<:1>[2-9]xxxxxxxxx)

And, to accommodate 011 (assuming it's optional), you can change Profile B to ([2-9]xxxxxxxxxxx.|011xxx.)

Note, that I didn't test the changes - so I am sure I made a typo somewhere!

artm

Current setup:
OBI110
Voice Services: SP2 enabled
ITS Profile B: Callcentric, outbound/inbound
Physical interfaces: Phone port used


Goal:
I'd like to try out a different provider for international calls, starting with 011 of course. Can I do so by editing ITS Profile A without touching anything else? Can it also be done so I can disable it at will and revert to my current config,with Callcentric for everything?

I can provide device settings if you like.

Thanks for the help!

azrobert

You can't by just changing a digit map.
Add the following to the beginning of the Phone Port OutboundCallRoute:
{(011xx.):sp1},

You have to remove this code to revert back to SP2.

You could do this:
{(<00:011>xx.):sp1},

Now dial the number 00xxxxxxxxxx and it will be routed to SP1 as 011xxxxxxxxx
Dialing 011xxxxxxxxxx will still be routed to SP2

You should have rules 011xx. and xx. in the ITSP B digit map
Change them to 011xx.S3 and xx.S3
This will speed up the routing process

The above assumes your Primary Line is SP2

artm

Correct, primary is SP2, ITSP Profile B (callcentric).

So, I have:

ITSP Profile B > General > DigitMap (recommended by Callcentric)
(*xx.|**275*x.|[3469]11|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*#]@@.)

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


Physical Interfaces > Phone Port > CallReturnDigitMaps (default)
{pli:(xx.)},{sp1:(<**1>xx.)},{sp2:(<**2>xx.)},{li:(<**8>xx.)},{pp:(<**9>xx.)}


==========================================

And the new setup should be...?

ITSP Profile B > General > DigitMap (recommended by Callcentric)
(*xx.|**275*x.|[3469]11|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.S3|xx.S3|(Mipd)|[^*#]@@.)

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

==========================================

That's it? That certainly is easy!




artm

#8
It was that easy, simply changing the OutboundCallRoute to the one below routes all international calls through SP1.

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


But, now, I think I need all outbound calls routed through SP1 except 911, which is SP2. All inbound calls are SP1

Can I simply use the same above but change the PrimaryLine to SP1 (it is now SP2)? Will 911 still go through SP2? Seems that it should. I'd like to do it this way so I can switch back easily to primary line SP2 if necessary (for non-international).


artm

#9
OK...so, changing the Primary to SP1 works with the existing route.

Now, the only issue is extensions: Callcentric (SP2) allows a three digit number to connect to another extension. How can I preserve that on SP2 now that the primary is SP1?

Thej DigitMap for SP2 is currently:

(*xx.|**275*x.|[3469]11|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*#]@@.)

azrobert

The last rule in the outbound route is "{(Mpli):pli}". This rule compares the dialed number to the Primary Line's DigitMap and if it gets a match it will route the call to the Primary Line. If you want to route a call to somewhere other than the Primary Line, you have to add a rule before the last. After changing the Primary Line to SP1, you can add rules like the one I did or you can change the SP2 DigitMap and use it to route calls to SP2.

SP2 DigitMap: (xxx)

xxx will include 911.

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

or

{(xxx):sp2},{([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 SP1 digit map rule 011xx. to 011xxS3
When you match a rule that ends with "x." you will have a 10 second routing delay. The S3 will decrease it to 3 seconds. You need a delay so the call won't be routed before entering all the digits.

artm

Thank you very much for the input; learning a lot here.

So, all I did was add {(xxx):sp2}, to the PHONE PORT > OutboundCallRoute, now having:

{(xxx):sp2},{(011xx.):sp1},{911:sp2},{([1-9]x?*(Mpli)):pp},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}


PrimaryLine is still SP1.

So, now I have;

1. SP1: all outbound calls except in #2.
2. SP2: outbound 911 and Callcentric extensions (xxx).
3. SP2: all inbound

This allows me to try TeleCallMart on SP1 for better all around rates than Callcentric, especially international rates to Greece. Plus, I can easily revert to my CC setup by deleting {(xxx):sp2},{(011xx.):sp1}, and setting primary as SP2.

Never realized how easy this can be!




artm

Revisiting this, I recently had an issue with Telecallmart and switched back to Callcentric for outgoing calls. Instead of editing the phone port parameters, I'm wondering if I can do this instead:

1. normally, SP1 is Telecallmart, all outbound.
2. If there's an issue, dial "99" before the number and have it go through SP2, Callcentric.
3. PhonePort>PrimaryLine is SP1. I do NOT want to edit this when I have the issue.

So, Phone Port>OutboundCallRoute is:

{(xxx):sp2},{(011xx.):sp1},{911:sp2},{([1-9]x?*(Mpli)):pp},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}

How can I edit this to do what I want? It seems I can add:
{(99011xx.):sp1} to handle international calls

...but what do I add for non-international calls?

azrobert

Your rule has 2 problems. It doesn't strip the 99 prefix and it routes the call to SP1, not SP2.

You could use the OBi default of **2 followed by any number to route a call to SP2. This will use rule {(<**2:>(Msp2)):sp2}".

If you want to use the 99 prefix use this rule to route any number to SP2:
{(<99:>xx.):sp2}

artm

Beautiful.

So, {(<99:>xx.):sp2} will route all calls starting with 99 to SP2 and strip the 99 as well?

That's exactly what I want, to control the call from the handset and not edit the Obi.

artm

...also, does it matter where I place this code? Is there a priority of sequence?

Would this work:

{(xxx):sp2},{(<99:>xx.):sp2},{(011xx.):sp1},{911:sp2},{([1-9]x?*(Mpli)):pp},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}


So, we have:

1. 3 digit extension to SP2 (Callcentric)
2. any calls starting with 99 to SP2
3. any calls starting with 011 to SP1
4. 911 to SP2