Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
selective Nat traversal in dial plan
Author Message
CastB
Brekeke Addict


Joined: 05 Feb 2011
Posts: 32
Location: the Netherlands

PostPosted: Mon Jul 18, 2011 8:00 am    Post subject: selective Nat traversal in dial plan Reply with quote

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/networkpatterns.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
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Mon Jul 18, 2011 10:52 am    Post subject: Reply with quote

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

set it true in the dial plan used for the call need to handle nat
set it false for all other calls
Back to top
View user's profile
CastB
Brekeke Addict


Joined: 05 Feb 2011
Posts: 32
Location: the Netherlands

PostPosted: Mon Jul 18, 2011 1:06 pm    Post subject: Reply with quote

Thanks, going to try it
Back to top
View user's profile
CastB
Brekeke Addict


Joined: 05 Feb 2011
Posts: 32
Location: the Netherlands

PostPosted: Wed Jul 20, 2011 7:54 am    Post subject: Reply with quote

Hi,

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

Matching Patterns
$request = ^REGISTER
To = <sip:dummy_1@
Deploy Patterns
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!
Back to top
View user's profile
taitan
Brekeke Master Guru


Joined: 15 Mar 2008
Posts: 237

PostPosted: Wed Jul 20, 2011 10:13 am    Post subject: Reply with quote

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".
Back to top
View user's profile
CastB
Brekeke Addict


Joined: 05 Feb 2011
Posts: 32
Location: the Netherlands

PostPosted: Fri Jul 22, 2011 1:27 am    Post subject: Reply with quote

> 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!
Back to top
View user's profile
taitan
Brekeke Master Guru


Joined: 15 Mar 2008
Posts: 237

PostPosted: Fri Jul 22, 2011 11:01 am    Post subject: Reply with quote

wow. I'm glad to know it!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1