wrong NAT keep alive method over udp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

wrong NAT keep alive method over udp

Philip Morant
Hi,

I'm running linphone version 3.9.1-1231-gecda7e6 on Ubuntu, configured
to use UDP (through NAT).

I read in https://tools.ietf.org/html/rfc5626#section-4.4.1 that keep
alive with CRLF
" MUST only be used with connection oriented transports
   such as TCP or SCTP; it MUST NOT be used with connection-less
   transports such as UDP "
yet when I wireshark my calls (which abort roughly one in every 4
calls) I find that linphone is sending double CRLF keepalives over
UDP.

The code in static int send_keep_alive(belle_sip_channel_t* obj) in
listeningpoint.c appears to confirm this, since it sends a double CRLF
regardless of what transport is in use.

Please confirm / deny this analysis.

Thanks !

Philip

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: wrong NAT keep alive method over udp

jehan.monnier
Hi Philip,

You are right, CRLF are supposed to be for TCP only.
However CRLF keep alives are pretty simple and works with most SIP server.
If it’s not the case, you can still disabled keep alives using  linphone_core_keep_alive_enabled(LinphoneCore* lc) 

Best regards


Le 19 juin 2017 à 20:57, Philip Morant <[hidden email]> a écrit :

Hi,

I'm running linphone version 3.9.1-1231-gecda7e6 on Ubuntu, configured
to use UDP (through NAT).

I read in https://tools.ietf.org/html/rfc5626#section-4.4.1 that keep
alive with CRLF
" MUST only be used with connection oriented transports
  such as TCP or SCTP; it MUST NOT be used with connection-less
  transports such as UDP "
yet when I wireshark my calls (which abort roughly one in every 4
calls) I find that linphone is sending double CRLF keepalives over
UDP.

The code in static int send_keep_alive(belle_sip_channel_t* obj) in
listeningpoint.c appears to confirm this, since it sends a double CRLF
regardless of what transport is in use.

Please confirm / deny this analysis.

Thanks !

Philip


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers
Reply | Threaded
Open this post in threaded view
|

Re: wrong NAT keep alive method over udp

Philip Morant
Hi Jehan,

The server is sending empty udp packets, ie length 0.  I'm guessing
that these empty packets are a response to the udp double CRLF ping.
linphone is interpreting those empty packets as an error, and then
starting more REGISTER transactions.  The REGISTERs are happening
approx one every minute instead of the once an hour that I would
expect.  My ISP confirmed that I have multiple concurrent
registrations on the server.

As for switching keep alive off, that would presumably just trade one
problem for another (ie lost NAT mappings).  Also, it sounds like a
recompile.

So can you comment on those empty reply packets ?

Thanks
Philip

On 20 June 2017 at 10:51,  <[hidden email]> wrote:

> Hi Philip,
>
> You are right, CRLF are supposed to be for TCP only.
> However CRLF keep alives are pretty simple and works with most SIP server.
> If it’s not the case, you can still disabled keep alives using
> linphone_core_keep_alive_enabled(LinphoneCore* lc)
>
> Best regards
>
> Jehan
> www.linphone.org
>
>
>
> Le 19 juin 2017 à 20:57, Philip Morant <[hidden email]> a écrit :
>
> Hi,
>
> I'm running linphone version 3.9.1-1231-gecda7e6 on Ubuntu, configured
> to use UDP (through NAT).
>
> I read in https://tools.ietf.org/html/rfc5626#section-4.4.1 that keep
> alive with CRLF
> " MUST only be used with connection oriented transports
>   such as TCP or SCTP; it MUST NOT be used with connection-less
>   transports such as UDP "
> yet when I wireshark my calls (which abort roughly one in every 4
> calls) I find that linphone is sending double CRLF keepalives over
> UDP.
>
> The code in static int send_keep_alive(belle_sip_channel_t* obj) in
> listeningpoint.c appears to confirm this, since it sends a double CRLF
> regardless of what transport is in use.
>
> Please confirm / deny this analysis.
>
> Thanks !
>
> Philip
>
>
> _______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>
>
>
> _______________________________________________
> Linphone-developers mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers