[OpenSIPS-Users] websocket recover after opensips restart

Răzvan Crainea razvan at opensips.org
Tue Apr 25 08:09:55 EDT 2017


Hi, Mikhail!

Unfortunately there is no way for OpenSIPS to recover TCP connections to 
the browser. You'll have to modify your sip.js client to automatically 
try to reconnect when the connection with OpenSIPS goes down.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 04/25/2017 01:15 PM, Mikhail Sidorov wrote:
> Hi
>
> I am using opensips 2.2.3 to handle websocket connections from web 
> client (sip.js).
> I just started testing recover after opensips restart and find that I 
> could not handle t_relay() failure.
>
> Assume I have a call between 2 webrtc clients and I restart opensips 
> during this call. Media handled by freeswitch, so call continue 
> without problem.
>
> Then, one client send BYE. I use loose_route to find another party and 
> send him message.
> But here I got error that I could not handle.
> t_on_failure trigger does not fire
> t_relay return success.
>
> Are there any special flags or triggers to handle this case?
>
> Opensips log:
>
> loose_route success
> INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
> INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 16
> ERROR:core:tcp_connect_blocking: poll error: flags 28 - 4 8 16 32
> ERROR:core:tcp_connect_blocking: failed to retrieve SO_ERROR 
> [server=172.19.235.225:62594 <http://172.19.235.225:62594>] (111) 
> Connection refused
> ERROR:proto_wss:ws_sync_connect: tcp_blocking_connect failed
> ERROR:proto_wss:ws_connect: connect failed
> ERROR:proto_wss:proto_wss_send: connect failed
> ERROR:tm:msg_send: send() for proto 6 failed
> ERROR:tm:t_forward_nonack: sending request failed
>
> My configuration:
>
> if (has_totag())
> {
> xlog("L_ERR", "Following ToTag: $tt $proto");
> # sequential requests within a dialog should
> # take the path determined by record-routing
> if (loose_route())
> {
> #if (is_method("INVITE"))
> #{
> #record_route();
> #}
> xlog("L_ERR", "loose_route success\n");
> route(relay);
> }
> --------------------------------
> route[relay]
> {
> t_on_failure("loose_route");
> if (!t_relay())
> {
> xlog("L_ERR", "t_relay error]");
> send_reply("500","Internal Error");
> }
> exit;
> }
>
> failure_route[loose_route]
> {
> xlog( "L_ERR", "loose_route failed" );
> ...
> }
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170425/d1693d86/attachment.html>


More information about the Users mailing list