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 short REGISTER timeout and use that to keep the connection up On 11/02/14 16:21, Philippe Sultan wrote: > 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é <[email protected]>: >> 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 > > > -- _____________________________________________________________________ -- 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
