News:

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

Main Menu

Prepend international + area code

Started by Vitenka, March 08, 2015, 12:45:14 AM

Previous topic - Next topic

Vitenka

So - the good news is:  Obi + voip.ms works as advertised.  I can receive incoming calls, I can make outgoing ones.

But outgoing calls require the full international dialling code; because voip.ms appears to want to be wholly US based.

So I think I need to change my DigitMap / CallRoute to prepend the international dialling code.

There's lots of advice on this forum; but I tried and got stuck.

I think my main point of confusion is that there are at least four different possible fields for this (SIP DigitMap, Phone port DigitMap, Outbound CallRoute, Call Return Digit Maps) and I'm not clear how they relate to one another.

I think what I want is something like:

00xx.|<01:00441>xx.|<00441555>[^0]x.

That is: If this looks like an international call, send it as it is.
If it looks like a national call, prepend the international dialling code for the country.
And if it looks like a local call, prepend international and area code.

But that doesn't work, in any of the places I tried it.  If someone can explain where a rewrite rule of that sort can go, I'll be happy (and can then start on setting explicit lengths etc. permitting ** codes to work and what have you)

Alternately - maybe this is something I can configure in voip.ms setup?  I know this is the wrong forum for that; but if I'm beating my head against a tree for no reason and there's just something I can do to tell them to rtoute as though local, that would be fine.

Vitenka

#1
Ah; I may have found it.  It seems <x:y> doesn't work, but <x><y:> does.  Placed the rule in DigitMap in ITSP profile.

For the record the code that is working for me is:
ISTP Profile A -> General -> DigitMap : (1xxxxxxxxxx|<00CC><0:>[1-9]xxxxxxxxx|<00CCAAAA>[2-9]xxxxx|00[2-9]x.|(Mipd)|[^*]@@.)
PHONE Port -> OutboundCallroute: {(<:00CCAAAA>[1-9]x?*(Mpli)):pp},{(<0:00CC>1x?*(Mpli)):pp},{(00[1-9]x?*(Mpli)):pp},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**9:>(Mpp)):pp},{(Mpli):pli}

(Replace CC with country code, and AAAA with area code)

202Owner

Quote from: Vitenka on March 08, 2015, 12:45:14 AM
But that doesn't work, in any of the places I tried it.  If someone can explain where a rewrite rule of that sort can go, I'll be happy (and can then start on setting explicit lengths etc. permitting ** codes to work and what have you)

My notes http://ozarkedge.mypressonline.com/index.htm may or may not help depending on how motivated you are to think them through.  See the OBi Dial Plan... it suggests where to put what.  You may need to adjust things for your location... maybe not.

ianobi

If Primary Line is set to SP1 Service then:

ITSP Profile A DigitMap = (Msp1) = (Mpli)

Note that (Msp1) and (Mpli) both occur in the Phone Port DigitMap and the Phone Port OutboundCallRoute. Therefore, any changes made to ITSP Profile A DigitMap will appear in the Phone Port DigitMap and the Phone Port OutboundCallRoute by reference to (Msp1) and (Mpli). Also note that number processing is a two-stage process; digits are checked (and transformed if required) when being dialled by the Phone Port DigitMap and then the whole number is checked (and transformed if required) rule by rule from left to right in the Phone Port OutboundCallRoute.

So much for the theory! In your case using UK code 0044:

ISTP Profile A -> General -> DigitMap :

(1xxxxxxxxxx|<0:0044>[1-9]xxxxxxxxx|<0044AAAA>[2-9]xxxxx|00xx.S3|(Mipd)|[^*]@@.)
Replace AAAA with your area code.

Leave the Phone Port DigitMap and OutBoundCallRoute at their default settings.

If you dial 012345678901, then rule <0:0044>[1-9]xxxxxxxxx within (Mpli) will strip the leading "0" and add "0044" resulting in 004412345678901 as the digits are processed through the Phone Port DigitMap. This number is then passed to the Phone Port OutboundCallRoute where rule 00xx.S3 will match 004412345678901 and route it through the Primary Line pli = sp1.


Vitenka

I'm sure I tried that <0:0044>; and found it didn't work - while <0044><0:> did work.

I'm really unclear on when the different digit maps are applied, even after reading those tutorials.

Anyway - through trial and error, this appears to work:
ISTP digit map set to: (where AAAA is area code)
(1xxxxxxxxxx|<0044><0:>[1-9]xxxxxxxxx|<0044AAAA>[2-9]xxxxx|00[2-9]x.|(Mipd)|[^*]@@.)

and outbound callroute set to:
{(<:0044AAAA>[1-9]x?*(Mpli)):pp},{(<0:0044>1x?*(Mpli)):pp},{(00[1-9]x?*(Mpli)):pp},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**9:>(Mpp)):pp},{(Mpli):pli}

Probably very hacky, but it's working.

Things that are still a bit odd.  A wrong number gives this strange "Service provider 404" voice - not sure where to change that message?

And is there any way to get the most recent caller ID over the phone?  It is on the web-page of course, call history - but can I get it spoken back to me?

ianobi

Quoteand outbound callroute set to:
{(<:0044AAAA>[1-9]x?*(Mpli)):pp},{(<0:0044>1x?*(Mpli)):pp},{(00[1-9]x?*(Mpli)):pp},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**9:>(Mpp)):pp},{(Mpli):pli}

These rules: {(<:0044AAAA>[1-9]x?*(Mpli)):pp},{(<0:0044>1x?*(Mpli)):pp},{(00[1-9]x?*(Mpli)):pp} are all trying to send calls through the OBiTALK network rather than voip.ms on sp1. pp is the trunk to the  OBiTALK network. This may be why you are getting a "404" message. The only rule working for you is {(Mpli):pli}. I'm sure that putting Phone Port OutboundCallRoute back to default can only improve things, even if you don't change your ITSP DigitMap.


QuoteAnd is there any way to get the most recent caller ID over the phone?

Not as far as I know. Although most DECT and other modern phones will display the most recent and more callerIDs.

202Owner

#6
Quote from: Vitenka on March 08, 2015, 09:55:35 AM
I'm really unclear on when the different digit maps are applied, even after reading those tutorials.

The active digit maps are applied en mass, all at once, NOT left-to-right, on a best match basis, as they are encountered.

When you make a call, the 'digits dialed' are evaluated/modified by the PHONE port digit map.  If this yields a permissible 'number', it is passed to the PHONE port outbound call route.

The PHONE port outbound call route will then evaluate/modify and route a permissible 'number' to a trunk (or virtual trunk or trunk group).

The trunk digit map will then evaluate/modify and pass a permissible 'number' to make the call.

If using a trunk group, the trunk group digit map is applied first; then the individual trunk digit maps are applied in trunk list order, left-to-right.  The first 'available' trunk in the group to pass a permissible 'number' will be used to make the call.

A trunk group can aggregate many/all trunks with automatic failover; trunk list order, trunk availability, and the respective trunk digit maps properly defined determine which trunk will be used to make the call.

Check the OBi web interface Status - Call History to confirm dialing results when testing a dial plan. If the digits dialed were not successfully mapped and routed to a service provider, the DMP will return an error message/fast busy signal and there will be no Call History.