For udp you have this in the account config:
/** * Set the interval for periodic keep-alive transmission for this account. * If this value is zero, keep-alive will be disabled for this account. * The keep-alive transmission will be sent to the registrar's address, * after successful registration. * * Default: 15 (seconds) */ unsigned ka_interval;
Just look at the docs, you also have a setting for what to send as ka if you have a custom method implemented. Normally there is a ping pong mechanism based on CRLF but you can send whatever you want as long as the server is happy. REGISTER would work as well if the extra load on the registrar is not an issue.
Johan
From: pjsip on behalf of Denis
Reply-To: pjsip list Date: Saturday, 25 February 2017 at 15:25 To: "pjsip@xxxxxxxxxxxxxxx" Subject: [pjsip] PjSip UDP NAT keepalive Hello,
How to configure pjSip 2.5 to send UDP keep alive packets to avoid NAT break SIP connection? I mean force firewall/nat to keep ports mapping opened. What
will be the format of such messages? How SIP server should respond to them (We have hand written SIP server)
I saw only TCP keep alive setting, but I'm talking about UDP. Not sure if sending REGISTER is suitable for me. I need this packets to be send ONLY
during the call, so the other side can send BYE message.
We are using Android
Thanks
|
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org