Author |
Message |
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 29
Location: Guilford, CT
|
Posted: Tue Sep 29, 2015 12:10 pm Post subject: Carrier with NAT / Carrier without NAT Failover Dial Plan |
|
|
1. Brekeke Product Name and Version:
BSS 3.4.7.2 Advanced Edition
2. Java version:
1.7.0_25-b15 64-Bit
3. OS type and the version:
RHEL6 x86_64
4. UA (phone), gateway or other hardware/software involved:
Voxeo Prophecy 14
5. Your problem:
We have two VoIP carriers we use to make outbound calls. VoIP Carrier A we want to use as our primary provider. VoIP Carrier B we only want to use if A becomes unavailable (INVITE timeout for example). We know this is possible using "$target" as well as the session failover plug-in. The challenge we're having is that one carrier uses NAT and the other does not. For the carrier that does not use NAT, we have $nat = false set in the Dial Plan.
How can we make these two carriers work together as primary/failover in the our dial plan?
Thanks,
Mike |
|
Back to top |
|
james Brekeke Master Guru
Joined: 10 Dec 2007 Posts: 494
|
Posted: Tue Sep 29, 2015 2:14 pm Post subject: |
|
|
Which carrier do you need to set $nat=false? is it Carrier-A? |
|
Back to top |
|
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 29
Location: Guilford, CT
|
Posted: Wed Sep 30, 2015 6:13 am Post subject: |
|
|
We'd need to set $nat = false for Carrier B.
Thanks,
Mike |
|
Back to top |
|
james Brekeke Master Guru
Joined: 10 Dec 2007 Posts: 494
|
Posted: Wed Sep 30, 2015 10:54 am Post subject: |
|
|
Do you have any reason to use $nat=false"?
Anyway.. try following rules.
Rule-1: To Carrier B
Matching Patterns | $request = ^INVITE $localhost = true To = sip:(.+)@
| Deploy Patterns | To = sip:%1@<Carrier-B> $nat = false
|
Rule-2: Failover
Matching Patterns | $request = ^INVITE To = sip:(.+)@
| Deploy Patterns | To = sip:%1@<Carrier-A> $session = failover sip:%1@localhost
|
With the rule-2, SIP Server sends INVITE to localhost if Carrier-A doesn't respond or error happens.
The rule-1 picks this INVITE with "$localhost = true" and routes it to Carrier-B. |
|
Back to top |
|
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 29
Location: Guilford, CT
|
Posted: Thu Oct 01, 2015 9:40 am Post subject: |
|
|
james wrote: |
Do you have any reason to use $nat=false"? |
James, thanks for the response. Your question got me thinking so I ran a number of tests and it's not $nat=false that we need different from both carriers, it's actually $ifdst = 10.11.7.250.
Carrier A uses the NAT/external address, whereas Carrier B uses the internal private address (10.11.7.250) since there is not NAT. So for Carrier B we have to use $ifdst = 10.11.7.250, otherwise we get one-way audio.
I suppose your solution would work regardless?
Thanks,
Mike
Last edited by vinylmike on Fri Oct 02, 2015 7:17 am; edited 1 time in total |
|
Back to top |
|
james Brekeke Master Guru
Joined: 10 Dec 2007 Posts: 494
|
Posted: Thu Oct 01, 2015 11:37 am Post subject: |
|
|
It sounds you need $rtp=on for Carrier B for avoiding one-way audio.
Use $rtp=on instead of $nat=false in the rule "To Carrier B". |
|
Back to top |
|
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 29
Location: Guilford, CT
|
Posted: Fri Oct 02, 2015 10:21 am Post subject: |
|
|
James, your solution worked. Thanks a lot for the assistance.
Regards,
Mike |
|
Back to top |
|
james Brekeke Master Guru
Joined: 10 Dec 2007 Posts: 494
|
Posted: Fri Oct 02, 2015 10:41 am Post subject: |
|
|
nice! |
|
Back to top |
|
|