[OpenSIPS-Users] Nat_keepalive help

Ali Pey alipey at gmail.com
Thu Dec 12 17:19:52 CET 2013


Hello Miha,

The best way to handle nat keep alive is from your sip clients. They
usually offer a variety of option and the most efficient one is the udp
pinging, in which it keeps sending opensips a udp packet with 4 zeros in it
to keep the nat binding open. That would work perfectly if you have static
nat binding on the opensips server which means doing port forwarding on the
firewall the opensips sits behind.

You can also enable options pinging on your client as well and that will
keep nats open on both side as opensips will respond with 200 OK.

Enabling nat keep alive from opensips is more expensive in terms of
resources but that is also a possible way to do.

Regards,
Ali Pey



On Thu, Dec 12, 2013 at 7:16 AM, Miha <miha at softnet.si> wrote:

>  HI,
>
> I need a little help with nat. UAC register's ok and it is reachable but
> after a while it become unreachable due to nat issue. If I use
> nat_keepalive on uac deivce everything is ok, but I would like that this is
> handled by opensips.
>
> I tried to use  nat_keepalive but getting all the time this:
>
>  54.820695 opensips -> uac_public_ip SIP 308 Request: NOTIFY
> sip:uac_public_ip:13401 |
>  54.829847 uac_public_ip -> opensips SIP 297 Status: *481 Call
> Leg/Transaction Does Not Exis*t |
>
> What is the best way to implement this?
>
>
>
> modparam("registrar", "received_avp", "$avp(received_avp)")
> modparam("registrar", "tcp_persistent_flag", 10)
> modparam("nathelper", "received_avp", "$avp(received_avp)")
> modparam("nathelper", "natping_interval", 10)
> modparam("nathelper", "ping_nated_only", 1)
>
>
>               if (nat_uac_test("18")) {
>                         xlog("fixing nat");
>                          if (method=="REGISTER") {
>                                 nat_keepalive();
>                                  fix_nated_register();
>
>                         } else {
>                                 fix_nated_contact();
>                         }
>                 force_rport();
>                 }
>
> tnx!
>
> miha
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20131212/4d29d239/attachment.htm>


More information about the Users mailing list