The Kamailio WebSocket stack will only ping on idle connections.  If nathelper is sending SIP level pings on a shorter interval than the WebSocket stack is the connection won't be considered idle.  The load-balancer doesn't understand the TCP traffic so it won't care as long as there is traffic.

However, it would seem silly to me to use nathelper pings over the WebSocket transport (unless you already have them enabled for another transport) as it is more efficient just to let the WebSocket layer take care of it.  After all, the nathelper pings from Kamailio are something of work-around that pre-dates RFC 5626.  Under outbound it's quite clear that if SIP-level keep-alives are needed for a particular transport the UA should do it, not the server.

Regards,

Peter


On 26 September 2013 14:55, Juha Heinanen <jh@tutpro.com> wrote:
Peter Dunkley writes:

> A good example is that if you are using Amazon Elastic Load-Balancer to
> distribute WebSocket connections, idle connections will be timed-out (by
> the Load-Balancer) after 60 seconds - so make sure the server sends
> WebSocket pings more frequently than that.

peter,

websocket readme has this:

  4.1. keepalive_mechanism (integer)

  The keep-alive mechanism to use for WebSocket connections.

  Note

  If nathelper is only being used for WebSocket connections then nathelper
  NAT pinging is not required. If nathelper is used for WebSocket
  connections and TCP/TLS aliasing/NAT-traversal then WebSocket
  keep-alives are not required.

based on what you write now, is the above readme text still valid, i.e.,
are nat pings enough to prevent amazon load balancer from timing out
websocket connections or are native websocket pings needed instead?

-- juha

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--
Peter Dunkley
Technical Director
Crocodile RCS Ltd