selective Nat traversal in dial plan

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
CastB
Posts: 32
Joined: Sat Feb 05, 2011 1:51 am
Location: the Netherlands

selective Nat traversal in dial plan

Post by CastB »

1. Brekeke Product Name and version: Brekeke SIP Server advanced 2.4.7.3/286.1

2. Java version: 1.6.0_17

3. OS type and the version: Linux 2.6.18-194.32.1.el5.centos.plus

4. UA (phone), gateway or other hardware/software involved: several

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html : UA behind NAT BKK on the public

6. Your problem:

Hi,

We want to use the NAT traversal option only for certain registered users (we do not want to turn it on for all users in the bkk config/sip page).
Is there a way to do this by using a dialplan rule say for example for those users which username starts with "xxx"?

Thanks
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

there is $nat in sip server admin document Page 76
http://www.brekeke-sip.com/download/bss ... min_en.pdf

set it true in the dial plan used for the call need to handle nat
set it false for all other calls
CastB
Posts: 32
Joined: Sat Feb 05, 2011 1:51 am
Location: the Netherlands

Post by CastB »

Thanks, going to try it
CastB
Posts: 32
Joined: Sat Feb 05, 2011 1:51 am
Location: the Netherlands

Post by CastB »

Hi,

I did not get this to work. This is what i tried:

Matching pattern:
$request=^REGISTER
To=<sip:dummy_1@

Deploy Pattern
user-agent=pipo2
$nat=true
$action=register
$continue=true

I use the "user-agent = pipo2" rule for a quick check in the registererd client tab to see if the dial plan is being executed. I can see that it is executed as soon as UA "dummy_1" is registering. However i do not receive any keep-alive packets at the UA.

So it looks like that this does not the same as the "keep address/port mapping" setting in the Configuration > Sip tab in the BKK admin tool. (When i set this to "on" i do receive the keep alive packages but then all my UA receive them and that is not what i want)

Any other suggestions?

Thanks!
taitan
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by taitan »

Do you want to receive keep-alive packets at the certain SIP UA?
And do you not want to receive them at others?


Keep the [Keep address/port mapping] = "on" and use the following DialPlan rule.

--------------------------------------
[Matching Patterns]
$request = ^REGISTER
To = !sip:dummy_1@

[Deploy Patterns]
$action = register
&register.contact.nat = false
--------------------------------------

This rule means..
keep-alive packets will not be sent if To-URI is not "dummy_1".
CastB
Posts: 32
Joined: Sat Feb 05, 2011 1:51 am
Location: the Netherlands

Post by CastB »

> Do you want to receive keep-alive packets at the certain SIP UA?
> And do you not want to receive them at others?

Yes that is exactly what i want!

And, your suggested dialplan did the job! Thank you very much!
taitan
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by taitan »

wow. I'm glad to know it!
Post Reply