[OpenSIPS-Users] Fwd: websocket recover after opensips restart

Mikhail Sidorov m.sidorov83 at gmail.com
Wed Apr 26 04:05:18 EDT 2017


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] (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" );
...
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170426/0b74f37a/attachment.html>


More information about the Users mailing list