[OpenSIPS-Users] UAC Registrant - keepalive messages?
Ovidiu Sas
osas at voipembedded.com
Tue Apr 15 16:03:45 UTC 2025
Hello Thomas,
On Tue, Apr 15, 2025 at 10:17 AM Thomas <tomasz.buty at o2.pl> wrote:
>
> It doesn't have to be SIP OPTIONS. It can be anything as long as it's
> sent to the server from the same UDP socket. For example, the MicroSIP
> windows client sends 2 bytes 0x0D 0x0A every dozen of seconds.
> This keeps a NAT state and allows subsequent SIP Register messages to be
> sent to the server from the same source port.
>
> Since dispatcher is a different module than UAC Registrant, I assume it
> creates its own UDP connections meaning the packets will be sent to the
> server from a different source port and will be treated as a new
> session/binding.
It does not. Take a look at the socket param:
https://www.opensips.org/Documentation/Script-CoreParameters-3-6#toc73
If you bind to a single UDP socket, the same socket is used for
sending and receiving UDP traffic.
Also, for dispatcher you can set/force the socket:
https://opensips.org/docs/modules/3.6.x/dispatcher.html#param_ds_probing_sock
Also, you can do a port forwarding on port 5060 on your router and you
no longer need to ping the registrar server.
> I want to sent all subsequent SIP register messages from the same source
> port. Otherwise, the VoIP provider will terminate the ongoing phone call.
>
>
> W dniu 15.04.2025 o 15:05, Pavel Eremin pisze:
> > if i understood, you whant to send options to provider you registered to?
> > May be this is some kind of workaround, but you can add providers into
> > dispatcher module and check their statuses via OPTIONS.
> >
> > пн, 14 апр. 2025 г. в 19:26, Thomas <tomasz.buty at o2.pl>:
> >>
> >> Hi everyone.
> >> Is there any keepalive feature available to keep a NAT state for UAC
> >> Registrant module which connects through UDP to VoIP provider?
> >> Something like Asterisk's pjsip qualify_frequency that sends SIP OPTIONS
> >> message every xx seconds.
> >> It is useful if you use opensips as a proxy and it's behind NAT.
> >>
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list