[asterisk-dev] Lightweight keepalive for websockets?

Philippe Sultan philippe.sultan at gmail.com
Tue Feb 11 09:21:37 CST 2014


Hi Jeremy,

Another option is just to activate TCP keepalive on your Linux server.
Take a look at :
http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html

This what we use to maintain SIP sessions over TCP that sometimes get
killed by NAT routers.

Hope that helps,

Philippe

2014-02-11 15:58 GMT+01:00 Jeremy Lainé <jeremy.laine at m4x.org>:
> I encountered a situation where a websocket connection was getting
> killed (presumably by the user's router) after ~ 2-3 minutes of inactivity.
>
> To remedy this I looked into the "keepalive" option which was introduced
> in Asterisk 11, as it is both simple and supported by libraries such as
> JsSIP. However, I was unable to get the option to work for websockets,
> and digging into the code, it seems it is not implemented:
> sip_send_keepalive does not seem to have a codepath for sending the
> keepalive over websockets.
>
> Is this by design (and if so, why?) or would you accept a patch to
> support keepalive over websockets?
>
> Cheers,
> Jeremy
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



-- 
Philippe Sultan



More information about the asterisk-dev mailing list