Skip to content

Commit

Permalink
Use SIP pinging when NAT traversal is on
Browse files Browse the repository at this point in the history
(cherry picked from commit 67c2c91)
  • Loading branch information
bogdan-iancu committed Aug 7, 2015
1 parent 235e3e4 commit 3eba3a1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions menuconfig/configs/opensips_residential.m4
Expand Up @@ -194,6 +194,8 @@ ifelse(USE_NAT,`yes',`#### NAT modules
loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 10)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", "SIP_PING_FLAG")
modparam("nathelper", "sipping_from", "sip:pinger@127.0.0.1") #CUSTOMIZE ME
modparam("nathelper", "received_avp", "$avp(received_nh)")

loadmodule "rtpproxy.so"
Expand Down Expand Up @@ -386,8 +388,7 @@ route{

if (is_method("REGISTER"))
{
ifelse(USE_AUTH,`yes',`
# authenticate the REGISTER requests
ifelse(USE_AUTH,`yes',`# authenticate the REGISTER requests
if (!www_authorize("", "subscriber"))
{
www_challenge("", "0");
Expand All @@ -402,6 +403,10 @@ route{

if ( ifelse(ENABLE_TCP,`yes',`proto==TCP ||',`') ifelse(ENABLE_TLS,`yes',`proto==TLS ||',`') 0 ) setflag(TCP_PERSISTENT);

ifelse(USE_NAT,`yes',`if (isflagset(NAT)) {
setbflag(SIP_PING_FLAG);
}',`')

if (!save("location"))
sl_reply_error();

Expand Down

0 comments on commit 3eba3a1

Please sign in to comment.