Carrier with NAT / Carrier without NAT Failover Dial Plan

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
vinylmike
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

Carrier with NAT / Carrier without NAT Failover Dial Plan

Post by vinylmike »

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
james
Posts: 501
Joined: Mon Dec 10, 2007 12:56 pm

Post by james »

Which carrier do you need to set $nat=false? is it Carrier-A?
vinylmike
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

Post by vinylmike »

We'd need to set $nat = false for Carrier B.

Thanks,
Mike
james
Posts: 501
Joined: Mon Dec 10, 2007 12:56 pm

Post by james »

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.
vinylmike
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

Post by vinylmike »

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.
james
Posts: 501
Joined: Mon Dec 10, 2007 12:56 pm

Post by james »

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".
vinylmike
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

Post by vinylmike »

James, your solution worked. Thanks a lot for the assistance.

Regards,
Mike
james
Posts: 501
Joined: Mon Dec 10, 2007 12:56 pm

Post by james »

nice!
Post Reply