News:

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

Main Menu

Outbound Call Route help

Started by sviv, December 22, 2020, 04:43:45 PM

Previous topic - Next topic

sviv

Hi there,

I have been reading through forum posts and manuals and can't find a solution to my problem.

My set up is OBi200:

sp1 = voip.ms SIP = Canadian number:
digit map:
(*xx|1xxxxxxxxxx|<1519>[2-9]xxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*]@@.)

sp2 = GV outgoing calls only, no number assigned
digit map:
(!911|*xx|<+>1xxxxxxxxxx|<+1519>[2-9]xxxxxx|<+1>[2-9]xxxxxxxxx|<011:+>xx.|(Mipd)|[^*]@@.)

sp3 = zadarma SIP = local land line number in Poland country code = 48, area code = 22 plus 7 digit local phone number
digit map:
(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*#]@@.)

Physical Interface PHONE 1:

digit map:
([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))

OutboundCallRoute:
{911:sp1},{933:sp1},{([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}

I just got zadarma service couple days ago and I can receive inbound calls, however, I cannot dial out from sp3.  When I use **3 and dial 9 digit number in Poland I get "Call Ended (400 Content-Length mis-match)" error.  Same problem when dialing 00 1 and 10 digit NA phone number.

I have no idea why this is happening, I am out of ideas what to try.  If anyone can help me that would be great.

What I would like to eventually achieve is to be able to use sp3 whenever I dial 011 48 (without dialing **3) which I was able to successfully test by using {(01148xx.):SP3} in the OutboundCallRoute.  I could see in the logs that the call was routed through sp3, but not completed due to the above described problem.

All other outbound calls I would like to route through sp2 (I have checked box in sp2 for Primary Line for Outgoing Calls Phone 1.

Thank you in advance for your input!



zapattack

When you dial using **3, does your call history
show 48 22 xxxxxxx being sent on SP3?
See Zadarma support IP Telephony/Dialing Format for more info.

sviv

Quote from: zapattack on December 22, 2020, 11:29:08 PM
When you dial using **3, does your call history
show 48 22 xxxxxxx being sent on SP3?
See Zadarma support IP Telephony/Dialing Format for more info.
Yes it does show going to sp3 in the history.

I think you are right about Zadarma dialing format may be an issue. I checked and it says that I need to dial country code which I was not doing.  If dialing the country code is a requirement is my digit map okay or would it have to be changed?

azrobert

#3
Try the following. The "+" is not required for GV and can cause problems.

sp1 = voip.ms SIP = Canadian number:
digit map: no change

sp2 = GV outgoing calls only, no number assigned
digit map:
(*xx|xxxxxxxxxx|<1519>[2-9]xxxxxx|<1>[2-9]xxxxxxxxx|011xx)

sp3 = zadarma SIP = local land line number in Poland country code = 48, area code = 22 plus 7 digit local phone number
digit map:
(<011>48xxxxxxxxx|01148xxxxxxxxx)

Physical Interface PHONE 1:

digit map:
(48xxxxxxxxx|[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))

OutboundCallRoute:
{911:sp1},{933:sp1},{(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}

Now dial "48xxxxxxxxx", no "011"

Edit
Make sure you include my edits

sviv

#4
azrobert,

thank you very much for your input.

I updated all the settings with the edits you have provided.  Dialing from sp3 via **3 still didn't work so I tried something else.
Your suggestion was to do  this for sp3 digit map:

(<011>48xxxxxxxxx|01148xxxxxxxxx)

Based on what I had read on Zadarma website I tried below and it worked:

(<+>48xxxxxxxxx|+48xxxxxxxxx)

So current situation is as follows:

sp2 - GV is default primary line to dial out
sp1 - voip.ms works when selected by **1
sp3 - Zadarma is selected automatically when I dial 48 xxx xxx xxx - this is awesome! Thank you very much for your help!

If you don't mind, I have one more question.  What would I need to add or edit to have calls in area code 226 and 519 automatically routed through sp1?  I would be ok if these calls went through sp2 - GV but when dialed from GV the call display shows "unknown".  I would prefer to have my home phone number displayed on caller ID within local calling area.

Again, thank you for your help.

azrobert

#5
OutboundCallRoute:
{(911|933|1(226|519)xxxxxxx):sp1},{(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}

FYI the dialed number is validated by a combination of the Phone and Primary Line digit maps. Translation can occur during validation then the outbound route will route the call to a provider. Rule "<1>[2-9]xxxxxxxxx" in the SP2 digit map will convert 10 digits to 11, so the above will work for both 10 and 11 digit numbers.

azrobert

Add "|933" after "911" in the phone DigitMap

sviv

Quote from: azrobert on December 23, 2020, 08:17:32 PM
OutboundCallRoute:
{(911|933|1(226|519)xxxxxxx):sp1},{(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}

FYI the dialed number is validated by a combination of the Phone and Primary Line digit maps. Translation can occur during validation then the outbound route will route the call to a provider. Rule "<1>[2-9]xxxxxxxxx" in the SP2 digit map will convert 10 digits to 11, so the above will work for both 10 and 11 digit numbers.


azrobert,

thank you for your help, I will give it a try and report back.

I am trying to understand how all this work so maybe one day I can be more independent.  Can you confirm if I understand the dialing process sequence correctly?

1.  When you start dialing first thing being checked is Physical Interface PHONE 1 OutboundCallRoute

2.  Next Physical Interface PHONE 1 DigitMap is verified

3.  Next, if OutboundCallRoute request is within parameters set in PHONE 1 DigitMap then its directed to SPx DigitMap (based on OutboundCallRoute rule)

4.  Next SPx DigitMap is checked against the dialed number and if the dialed number parameters are within parameters set in the SPx DigitMat the call is placed through that SP.

Does this even make sense?
Is there a document that explains this process I could refer to?

TIA

azrobert

The Phone DigitMap gets control first and validates the dialed number.
The last rule, "(Mpli)" includes the Primary Line's digit map rules.
Substitution can happen here.
If the number matches more than 1 rule, the "Best" rule will be used, not the 1st.
If the number doesn't match a rule, you will get a busy.
If the number matches a rule, the outbound route gets control.

The outbound call route processes the rules between the "{ }" left to right.
If substitution occurred in the digit map, the OCR will see the transformed number, not the original dialed number. People get in trouble because they don't understand this behavior.
If the dialed number matches a rule, the call is routed to a provider and processing stops.
Substitution can also happen in the OCR.
The last rule "(Mpli):pli" will route the call to the primary line.
If you want to route a call to a provider other than the primary line without "**n", you must include additional code.
If the number doesn't match a rule, you will get a No Routes Available error.

Trunk Groups can be used for automatic failover or just routing when you have multiple providers.
Trunk Groups work the same up to routing.
TG definition can be found at Voice Services/Gateways and TGs.
When the Primary line is set to TG1, rule "(Mpli):pli" routes the call to TG1.
The TG will process the SPs in the Trunk List left to right.
Substitution can also happen here.
If the dialed number matches the SP's digit map, the call is routed to that provider.
If the call fails or the number doesn't match the digit map, processing switches to the next SP in the List.

sviv

Thank for clarification, I will have to process this over the holidays and see if I am capable of understanding all this stuff.