News:

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

Main Menu

North America calling, no fancy codes, wife approved

Started by rjdyck, January 30, 2017, 07:18:20 PM

Previous topic - Next topic

rjdyck

This is just a continuation of of a rather old thread I found on the forum. ianobi amd a suggestion which I adopted for my setup. First, I don't fully understand why it worked and secondly when I tried to extend it I ran into grief.

I have an obi200 with FXO. To make the wife happy this needs to appear to work just like the landline. I have set the PSTN as my primary line. If I understand the previous post correctly, with PSTN primary, the call first traverses the the line digit map, then the phone map and possibly an SP map. The following is what I borrowed from ianobi's post.

(18xxxxxxxxx|8xxxxxxxxx|[2-9]xxxxxxS4|[2-8]11S4|(00|011)xx.S4|<**1>(Msp1)|xx.S4)

The way it appears to work is a match on  <**1>(Msp1) and then **1 matches in the phone digit map which directs the call to SP1. I don't understan why dialing 1-xxx-yyy-zzzz didn't match on xx.S4. Maybe if someone enlightens me then I may understand why my attempt to get international calling working failed.

With the above configuration 011 whatever goes to the PSTN. I tried <**3>(00|011)xx.S4 in the hope of sending the call to SP3 which is my preferred provider for international calling. I get a recording which I believe comes from the obi which says the call ended with error 503. This is confirmed by the call history. The call was routed to SP3 alright. The call was 011441483604781 which is a test number in the UK. That is exactly how it appeared in the call history. With my softphone set up with my preferred provider and dialing that exact number, the call goes through.

azrobert

Routing an outbound call is a 2 step process.
The Phone Port DigitMap validates the dialed number.
Rule (Mpli) will include the rules in primary line's DigitMap.
If the dialed number doesn't match a rule, you will receive a fast busy.
None of the SPx DigitMaps come into play except for dialed numbers with an **x prefix or you added code.

If the dialed number matches a rule in the DigitMap the Phone Port OutboundCallRoute will route the call to the primary line using rule "{(Mpli):pli}".

If you added a "**1" prefix to the dialed number with Phone Port DigitMap rule "<**1>(Msp1)" then Phone Port OutboundCallRoute rule "{(<**1:>(Msp1)):sp1}" will route the call to SP1.

You haven't posted the SP1 DigitMap, but most likely rule "{(<**1:>(Msp1)):sp1}" matched 1-xxx-yyy-zzzz and the call was routed to SP1.

I don't know why the UK test number failed. 503 is Service Unavailable. Try calling the number again. Maybe there was a temporary outage.

rjdyck

I guess I had it backwards concerning the order of the maps. Assuming that the line port is the phone's primary line and that there is no match prior to Mpli in the outgoing route then we jump to the line port's map. Do I have that right?

The phone port has an outgoing route and a digit map. How do they work together?

The PSTN is 10 digit dialing for local calls. I want [2-9] + 9D to go to the PSTN.
1 + 8 + 44|55|66|77|88 + 7D should go to the PSTN
3 digit service codes should go to the PSTN
1 + exactly 10D should go to SP2.   Note SP1 is my playground.
011 + variable length should go to SP3.
The PSTN can sort out any invalid combinations.

That international test number fails consistently but perhaps when I learn how this works it will get sorted. Syslog was not helpful. I could try sending it to SP1 ( my playground ). It wouldn't go through of course but I could use Wireshark to see what is being sent.

azrobert

#3
QuoteI guess I had it backwards concerning the order of the maps. Assuming that the line port is the phone's primary line and that there is no match prior to Mpli in the outgoing route then we jump to the line port's map. Do I have that right?

You don't have it right. The "Best" (more precise) match will be used. After dialing 3333, 3xxx in the Line digit map will be used when you have xxxx in the phone digit map.

QuoteThe phone port has an outgoing route and a digit map. How do they work together?

Routing is not automatic. You must have a rule in the outbound route.
{(Msp1):sp1}
The dialed number or a number modified in the phone digit map matching the SP1 digit map will be routed to SP1.
You can do anything you want in the outbound route. I do not recommend the following and it would be confusing, but you could do it:
{(Msp2):sp1}
The dialed number or a number modified in the phone digit map matching the SP2 digit map will be routed to SP1.

Anything between the parentheses is considered a digit map, so you can do this:
{(011xx.S3):sp1}

I don't like adding "**x" prefix in the phone digit map, so this is how I would code your requirements:

Phone digit map:
((Msp1)|(Msp3)|[1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|911|**0|***|#|##|**70(Mli)|**8(Mbt)|**81(Mbt)|**82(Mbt2)|**1(Msp1)|**2(Msp2)|**3(Msp3)|**4(Msp4)|**9(Mpp)|(Mpli))

Phone outbound route:
{(18(00|88|77|66|55|44)xxxxxxx):li},{(Msp2):sp2},{(Msp3):sp3},{([1-9]x?*(Mpli)):pp},{(<##:>):li},{(<**70:>(Mli)):li},{(<**82:>(Mbt2)):bt2},{(<**81:>(Mbt)):bt},{(<**8:>(Mbt)):bt},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**3:>(Msp3)):sp3},{(<**4:>(Msp4)):sp4},{(<**9:>(Mpp)):pp},{(Mpli):pli}

ITSP B digit map:
(1xxxxxxxxxx)

ITSP C digit map:
(011xx.S3)

Line digit map:
([2-9]xxxxxxxxx|xxx)

rjdyck

So I make my changes at the front of the phone outgoing route and the phone digit map and ensure I get a match before the star and hash codes and the wife is happy. I can leave the star and hash codes in place for me to play with. I can remove my changes from the line map and the defaults there will work. I see 1 + 10D in the line map but I think it is ignored because I should have already matched 1 + 10D and sent it off to voip provider.

Am I making any more incorrect asumptions?

rjdyck

I registered my device on obitalk without realizing the implications. Now I cannot make changes directly on my device. How do I override this behaviour?

drgeoff

Quote from: rjdyck on January 31, 2017, 01:18:24 PM
I registered my device on obitalk without realizing the implications. Now I cannot make changes directly on my device. How do I override this behaviour?
Registering your device on the portal and using the portal to configure it are separate things. You can have the former without the latter. If you really want to configure the device via its local onboard GUI, log in to it and click on System Management, then on Auto Provisioning. Then in the Obitalk Provisioning section, set the Method to Disabled.

However, virtually everthing you can configure locally can also be done using Expert mode on the portal.


azrobert

Quote from: rjdyck on January 31, 2017, 11:58:31 AM
Am I making any more incorrect asumptions?

Your assumptions are correct, but there might be minor implications depending on the modifications you make.

I wrote the following for someone else:
The OBi analyzes each digit as they are received and will process the received digits immediately or wait for more digits depending on the rules in the DigitMap.

There are 2 timers.
The short timer is 2 seconds.
The long timer is 10 seconds.

If a dialed number only matches a rule ending with "x.", there will be a 10 second delay.
This is considered an Indefinite Match because "x." will match any number of digits and the long timer is used. The OBi doesn't know if you will enter additional digits, so it waits.

If the dialed number matches a rule without "x.", it will result in an Exact Match. If the dialed number can potentially match another rule if more digits are entered, the OBi will use the short timer of 2 seconds. If the dialed number cannot potentially match another rule if more digits are entered the OBi will process the call immediately and not wait for additional digits.

An S suffix on a DigitMap rule followed by a number will override the wait period.
The OBi2xx has the option to globally change the default short and long timers.
_______________________________________________

The way I coded the digit maps, there is zero wait for 10 or 11 digit numbers. If you add "xx." or "xx.S3" to the line digit map you will introduce a 2 second wait. Not a big deal, but I thought you should be aware of this. You could add "S0" to the 10 and 11 digit rules.

rjdyck

[quoteHowever, virtually everthing you can configure locally can also be done using Expert mode on the portal.][/quote]

I recently purchased an obi110 which I returned but not before registering it on the portal. For my obi200 I see I can delete it from the portal but the entry for obi110 does not that option or anything else.

rjdyck

Thank you azrobert aand drgeoff for your help.

The routing suggestions work fine and I learned a lot. My early attempts were not wrong it would seem although the new configuration is more straight forward and understandable. What threw me off was the grief I had getting my international routing working and it still was not working after implementing your suggestions.

I had been getting error 503 service unavailable with my call attempts. Then my attempts started failing differently. I just got dead air. The call history was very perplexing. It showed two simultaneous calls. One showed as connected to my service provider with correct digits dialed. The other showed an origination from SP1 ( my play account ) and connected to LI. Now I knew why I got 503 sometimes. It happened when the line was busy. I never figured out how that routing happened but at least I found the root cause. There was a typo in the proxy uri but the registrar was fine. When checking the provider's dashboard I could see my registration. The bogus proxy however would not accept calls of course.

Perhaps time for wifey to test drive it.