News:

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

Main Menu

outgoing call service order

Started by skipro, May 22, 2014, 12:25:09 PM

Previous topic - Next topic

skipro

I want my outgoing call order to be SP1 and then BT. I assume I must use a Trunk Group to do this.
I set up Trunk Group 1 as follows:
Trunklist - SP1,BT
DigitMap - (Msp1)

I setup Phone 1 / Phone port / PrimaryLine as "Trunk Group 1"

This does not work. I get no service. Any suggestions?

azrobert

The OBihai user guide doesn't show BT as a valid trunk in a Trunk Group.

See page 132 here:
http://www.obihai.com/docs/OBiDeviceAdminGuide.pdf

I don't know if this is an oversight or BT is not valid.

For a test change the Trunk Group to "sp1,sp2" and see if you get the same error.

If you get the same error please post following:
ITSP A and B DigitMaps
BT DigitMap
Phone Port 1 OutboundCallRoute
What you are dialing

The standard use of a Trunk Group the call is not routed to the 2nd trunk unless the 1st trunk is down or busy.
Is this what you want?

skipro

azrobert,
Thanks for responding.
First thing, Trunk 1 does not work. ??! Tested it with SPs and no service.
Did same with Trunk 2 and it works.
Tried Trunk 2 with BT,SP1 [as a test] and it goes straight to SP1. So Trunk 2 works but BT does not.

Quote
The standard use of a Trunk Group the call is not routed to the 2nd trunk unless the 1st trunk is down or busy.
Is this what you want?
Yes, but for now to test BT in the Trunk, I am using BT,SP1 order.

ITSP A and B DigitMaps:
(*xx|1xxxxxxxxxx|<1609>[2-9]xxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*]@@.)
(*xx|*123|1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*]@@.)

BT DigitMap
(<609>[2-9]xxxxxx|xxxxxxxxxx|011xx.|[1-9]11S2|[1-9]xx)

Phone Port 1 OutboundCallRoute
{(<911:16092678300>):sp1},{(<411:18003733411>):sp1},{([1-9]x?*(Mpli)):pp},{(<##:>):li},{(<#:>):ph2},{(<**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}

Dialing 609-xxx-yyyy

azrobert

#3
1st let me explain how the OBi works without a Trunk Group assuming dialing 6091112222 and the primary line is SP1.

The Phone Port DigitMap verifies the dialed number using SP1 DigitMap.
(Mpli) points to the Primary Line DigitMap.
Rule <1>[2-9]xxxxxxxxx changes the number to 16091112222

Rule {(Mpli):pli} in the Phone Port OutboundCallRoute matches 16091112222 and routes the call out SP1
(Mpli) points to the Primary Line DigitMap.
Rule 1xxxxxxxxxx in the SP1 DigitMap matches the altered dialed number.
I hope the following is clear. There is nothing automatic on which DigitMap is used to match the dialed number. The primary line is used because it's coded that way. If I changed the rule to {(Msp2):pli} then the SP2 DigitMap will be used to match the dialed number.


Trunk Groups work differently. Instead of a 2 step process, it's a 3 step process.
Trunk List is BT,SP1 and DigitMap is (Msp1)

The Phone Port DigitMap verifies the dialed number using SP1 DigitMap.
(Mpli) points to the Primary Line DigitMap.
Rule <1>[2-9]xxxxxxxxx changes the number to 16091112222

The Trunk Group Digit Map determines if the TG will process the call.
SP1 rule 1xxxxxxxxxx will match 16091112222, so the trunk group will process the call.

BT will process the Number 1st. It uses the BT DigitMap to determine if the call is routed out BT. This cannot be changed. BT DigitMap does not contain a rule that matches 16091112222.

Because BT did not get a match SP1 will process the call. Rule 1xxxxxxxxxx will match the dialed number and the call will be routed out SP1.


To have BT route the call add 1xxxxxxxxxx to the BT DigitMap.
Sorry for the long explanation.




skipro

azrobert,
It works. I had originally removed the "1" from the default 10 digit path because it forced me to preface all dialing with a "1". I now added another 10 digit path including the "1" so BT accepts it and I can have it both ways. That works.
I replaced both 1xxxxxxxxxx and xxxxxxxxxx with <1>xxxxxxxxxx thinking the "1" would be optional and work for both purposes, but it does not work. It does not satisfy BT [1xxxxxxxxxx].
Any idea why not?
I appreciate the long explanation as I can better understand the process.

azrobert

#5
<1>xxxxxxxxxx will only match 10 digits. If it matches 10 digits it will then add a "1" prefix.
1?xxxxxxxxxx will match 10 or 11 digits.

FYI, I recently started to investigate Trunk Groups because I wanted to use one after the demise of GoogleVoice XMPP and I'm not pleased with how they work. My trunk list is SP1 and SP2. If SP1 is down in the "Not Registered" status, it still takes 30 seconds before the call transfers to SP2. I would rather hang up and dial a prefix to route the call out SP2. I did find that disabling SP1 will cause the call to immediately transfer to SP2.

If anyone knows how to speed up the process please chime in.


ianobi

azrobert,

That's an interesting finding. I've been using Trunk Groups for a long time and have never noticed that, but failures are rare events.

I think the 30 seconds is set by one of the SIP Timers in ITSP Profile X > SIP. It needs further investigation, but at least one timer relates to how long the OBi should wait for a response to the "Invite" message before deciding that the call has failed. I wonder if the Trunk Group software waits for that failure before trying the next available route.

ProfTech

You may also want to try checking "X_NoRegNoCall". I think the feature may have been added to remove the delay that you are seeing. Not sure. I use a trunk group and it works great but mine is "li,sp1" and the line is treated differently.

azrobert

Quote from: ProfTech on May 23, 2014, 08:27:41 AM
You may also want to try checking "X_NoRegNoCall".

I have Raspbx on SP1 and when I have the PBX shut down I want calls to be routed out SP2. Using your suggestion it now works perfectly without any delay.

Thank you very much!


ianobi

#9
Well spotted Prof Tech!

Also, I note that if you try to call through sp1 and the Trunk Group routes it out of sp2, then Call History will record the call as being made on sp1. It correctly records call duration, call end time etc, but does not show the call has been passed to another trunk.

Edit: With X_NoRegNoCall checked Call History does record correctly which trunk was used for the call that succeeds.

jazzy

What about when using a VGx to call out on.  I have 2 VG's for outgoing calls, but do not register them on a SPx.

My only outgoing services are those VG's.  I just register SP2 with another provider for incoming calls only.

I just use VG1 or VG2 to call out on.  If  VGx is down, or not 'enabled' my call will not go out.  Is there a way to make an automatic failover when using VG's to call out on?


ianobi

Voice Gateways work without registration, so the OBi cannot detect a Voice Gateway failure. How they behave will depend on this setting for the relevant spX that they are using for their SIP functions, let's say vg1 uses sp1:

Voice Services > SP1 Service > SP1 Service > X_NoRegNoCall

If this is checked and the voip provider on sp1 fails to register, then vg1 will also fail. If it is unchecked, then if the voip provider on sp1 fails to register, then vg1 will continue to operate normally, assuming that there is still access to broadband.

My main voip provider is on sp1, my Trunk Group looks like this:

Voice Services > Gateways and Trunk Groups > Trunk Group1 >
TrunkList: sp1,vg3,li
DigitMap: ((Msp1)|(Mvg3)|(Mli))

vg3 (voipcheap.co.uk) uses sp2 set up as a "fake" SIP provider not requiring registration for its SIP functions.

Now if sp1 fails, outgoing calls will failover to vg3 for landline and cellphone calls. (Mvg3) does not contain the rule for emergency services – 999 in my case - therefore any 999 calls that would normally go to sp1 will now failover to the Line Port. This is a way of providing emergency service backup.

@ jazzy – the only advantage of putting your vg1 and vg2 in a Trunk Group would be that if all sessions on vg1 were in use, then calls would automatically route to vg2. If you converted one of your Voice Gateways to a registered voip provider on sp1 and made sure the other Voice Gateway uses sp2 for its SIP functions, then a Trunk Group like this would work for you:

Voice Services > Gateways and Trunk Groups > Trunk Group1 >
TrunkList: sp1,vg1
DigitMap: ((Msp1)|(Mvg1))

With this checked:
Voice Services > SP1 Service > SP1 Service > X_NoRegNoCall
If sp1 fails to register, then outgoing calls will failover to vg1.


skipro

azrobert,
If 1?xxxxxxxxxx works for 10 & 11 digits, why is this not used instead of using both xxxxxxxxxx & 1xxxxxxxxxx ? Seems simpler and more universal, covering more needs.

Anyone have any idea why my Trunk Goup 1 does not work. [See my 2nd post in this thread]

azrobert

The default DigitMap doesn't contain xxxxxxxxxx
It has <1>xxxxxxxxxx
<1>xxxxxxxxxx adds a one prefix when 10 digits are dialed, xxxxxxxxxxx doesn't.
1?xxxxxxxxxx will validate 10 and 11 digits, but 10 digits will be routed without a country code.
Some providers require the country code.

You must have added {(Mtg2),tg2} to the Phone Port OutboundCallRoute.
Change it to {(Mtg1),tg1} to see if TG1 works that way.

skipro

#14
azrobert,
I have no mtgx or tgx entries.

azrobert

The last rule "{(Mpli):pli}" in the Phone Port OutboundCallRoute points to the Primary Line.

When the Primary Line is set to Trunk Group 1:
(Mpli) points to TG1 Digitmap (Mtg1)
pli points to TG1 Trunk tg1
So {(Mpli):pli} is the equivalent of {(Mtg1),tg1}

Defining Trunk Group 2 basically does nothing unless you add {(Mtg2),tg2} to the Phone Port OutboundCallRoute, so it looks like you are using Trunk Group 1.

The question is why doesn't it work if Trunk Group 2 is not defined?

How do you configure your OBI? Do you login directly to the OBi via the web interface or do you use OBiTalk?


skipro

I use OBitalk.
I get, "No service configure error" message with Trunk Group 1 which I have set to SP1, Sp2, Sp3, Sp4.
DigitMap for both TG1 & 2 is the same, default, (Msp1)

azrobert

"No service configure error" indicates the trunk you're routing a call to is not defined properly.

Your Trunk Group routes calls to all SP trunks. Do you have a valid provider defined on all your SP trunks?

skipro

SP1 is primary outgoing [and only outgoing]. It works.
I set "ToneOnPrimaryServiceDown" to SIT3 so I know if the line is ok/active.

To test Trg1 I set Trg1 & 2 to SP1 only. Trg1 gets error msg, Trg2 works. This was consistent with the testing below, Trg1 did not work, Trg2 did work.

Did a bunch of testing and this is what I found:
If there is only I item [SP1] I did not get a dial tone, but SIT. Still works even though the line shows nonfunctional via tone.
If I add a second item, even a nonfunctional item to TG, it works.
If I added it after the functional item [SP1], I get dial tone, as I would expect.
If I added a nonfunctional item before the functional item [SP1], I get a dial tone, which I would not expect since first line is nonfunctional, and it requires directing the dialing to SP1 via **1.
  It seems to "partially" work in that it works but it needs to be directed to SP1 [**1], it does not automatically redirect the call.
If I have "BT, sp1" with no BT device, I get SIT, as expected since 1st item [BT] is nonfunctional, and it works without requiring **1. The dialed number passes to second device automatically, as expected.
Seems to be a lack of consistency.

After all the testing, Trg1 finally started to work for no apparent reason. Was this a problem with OBi's servers not working properly?? Hope it lasts.
I am replying only to pass on the pattern I discovered in case it may help someone else.
Thanks azrobert for your help.

azrobert

FYI when you dial **1 the trunk group does not route the call.
Rule {(<**1:>(Msp1)):sp1} in the Phone Port OutboundCallRoute will route the call.