[asterisk-dev] Lightweight keepalive for websockets?

2014-02-11 Thread Jeremy Lainé
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.

Re: [asterisk-dev] Lightweight keepalive for websockets?

2014-02-11 Thread Philippe Sultan
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

Re: [asterisk-dev] Lightweight keepalive for websockets?

2014-02-11 Thread Daniel Pocock
Another option is to use a SIP proxy My typical scenario involves repro talking to the WS or WSS client and then using TCP to talk to Asterisk or whatever else repro supports the CRLF keepalive mechanism over all streams including TCP, TLS, WS and WSS. Is is also possible to just set a very

Re: [asterisk-dev] Lightweight keepalive for websockets?

2014-02-11 Thread Jeremy Lainé
Thanks for the feedback, it's good to have alternatives. FYI, as a workaround I am currently using qualify=yes. However I'd still like to understand why the keepalive option is currently not being applied to websockets. The option is there, and is implemented for multiple transports, so I'd

Re: [asterisk-dev] Lightweight keepalive for websockets?

2014-02-11 Thread Matthew Jordan
On Tue, Feb 11, 2014 at 1:40 PM, Jeremy Lainé jeremy.la...@m4x.org wrote: Thanks for the feedback, it's good to have alternatives. FYI, as a workaround I am currently using qualify=yes. However I'd still like to understand why the keepalive option is currently not being applied to

Re: [asterisk-dev] Lightweight keepalive for websockets?

2014-02-11 Thread Jeremy Lainé
On 11 Feb 2014 21:21, Matthew Jordan mjor...@digium.com wrote: Either this is by design, in which case it needs to be documented, or it's an oversight, in which case I'd be happy to fix it. I'd go with oversight. Thanks for your answer I will propose a patch in that case. I have a

Re: [asterisk-dev] Lightweight keepalive for websockets?

2014-02-11 Thread Joshua Colp
On 14-02-11 05:42 PM, Jeremy Lainé wrote: On 11 Feb 2014 21:21, Matthew Jordan mjor...@digium.com wrote: Either this is by design, in which case it needs to be documented, or it's an oversight, in which case I'd be happy to fix it. I'd go with oversight. Thanks for your answer I