[OpenSIPS-Users] Nat_keepalive help

Miha miha at softnet.si
Thu Dec 12 22:35:08 CET 2013


Ignor this question:)

Ok tnx! So the best thing is to do that on uac side.

Br
Miha

On Thu, 12 Dec 2013 14:58:45 -0500
 Ali Pey <alipey at gmail.com> wrote:
> What do you mean by "what i just do that opensips will
> triger uac"?
> 
> Trigger what?
> 
> Regards,
> Ali
> 
> 
> 
> On Thu, Dec 12, 2013 at 2:17 PM, Miha <miha at softnet.si>
> wrote:
> 
> > Ali how can i tell opensips or what i just do that
> opensips
> > will triger uac?
> >
> > I have registration time set to 3600, as on this server
> > will be around 20k users registration time 30s is not
> > possible:)
> >
> > On Thu, 12 Dec 2013 12:22:00 -0500
> >  Ali Pey <alipey at gmail.com> wrote:
> > > The udp packets should come from inside the firewall
> for
> > > nat binding to
> > > stay open so it should come from the client side.
> > > Opensips can send Options
> > > to trigger a response from the client to keep the nat
> > > binding open.
> > >
> > > If you don't have lots of clients and your clients
> don't
> > > have any other
> > > pinging capability, you can decrease the
> re-registration
> > > time on the client
> > > side to 30 seconds or so. That will also keep the nat
> > > binding open.
> > >
> > > Regards,
> > > Ali Pey
> > >
> > >
> > >
> > > On Thu, Dec 12, 2013 at 12:13 PM, Miha
> <miha at softnet.si>
> > > wrote:
> > >
> > > > Ali tnx.
> > > >
> > > > Opensips is on public ip, uac's are behind nat.
> > > >
> > > > I tried to use info, options but stikal the same
> > > error:(
> > > >
> > > > What abou that opensips sends udp packets, so that
> i
> > > would
> > > > not have to enable this on uac?
> > > >
> > > > We have One softswitch and there is no problem with
> > > expired
> > > > nat session and arso does not send
> info/notify/options,
> > > i
> > > > guess it is sending some udp packets.
> > > >
> > > > Tnx
> > > > Miha
> > > >
> > > > On Thu, 12 Dec 2013 11:22:05 -0500
> > > >  Ali Pey <alipey at gmail.com> wrote:
> > > > > BTW. the error you are getting is probably for
> the
> > > fact
> > > > > that your client
> > > > > doesn't like the Notify pinging. Change it to
> Options
> > > > > message and it will
> > > > > work.
> > > > >
> > > > > Regards,
> > > > > Ali Pey
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Dec 12, 2013 at 11:19 AM, Ali Pey
> > > > > <alipey at gmail.com> wrote:
> > > > >
> > > > > > 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
> > > > > >>
> > > > > >>
> > > > > >
> > > >
> > > >
> >
> >




More information about the Users mailing list