[OpenSIPS-Users] Fwd: websocket recover after opensips restart
Mikhail Sidorov
m.sidorov83 at gmail.com
Wed Apr 26 07:42:45 EDT 2017
Hi
You could find opensips logs here (log_level=3)
https://pastebin.com/Gmq3BLkt
And here I tried to extract last BYE proceed from logs in debug mode
(log_level=4)
https://pastebin.com/exyVuqj0
I am using load balancer to send requests to one of 2 freeswitches.
Both users (USER_1 and USER_2) are webrtc users.
After opensips restart both clients reconnects and re-register, you could
find it in logs.
First routing of BYE from webrtc to freeswitch is successful, but secondary
from freeswitch to another client fails.
Below is a part of my routing for totag.
It works fine till I restart opensips.
I expect to see in log "t_relay error" message, but it is not there.
if (has_totag())
{
xlog("L_ERR", "Following ToTag: $tt $proto");
if (loose_route())
{
xlog("L_ERR", "loose_route success\n");
if (!t_relay())
{
xlog("L_ERR", "t_relay error [$du]");
send_reply("500","Internal Error");
}
}
else
{
xlog("L_ERR", "loose_route fail\n");
if ( is_method("ACK") )
{
if ( t_check_trans() )
{
t_relay();
exit;
}
else
{
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}
2017-04-26 16:05 GMT+07:00 Răzvan Crainea <razvan at opensips.org>:
> Are you sure t_relay() is not returning an error? Can you post somewhere
> the entire log for this scenario?
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 04/26/2017 12:00 PM, Mikhail Sidorov wrote:
>
> I am sorry for spamming you, I missed subscription verification email.
>
> Regarding my question, I understand that opensips could not recover
> connection and my client already reconnect.
> All I need is ability to catch this error to execute lookup and find
> reconnected client.
> And I could not find how to detect this kind of failure, because t_relay
> does not return error.
> Do you have any suggestions?
>
> ср, 26 апр. 2017 г. в 15:49, Răzvan Crainea <razvan at opensips.org>:
>
>> Hi, Mikhail!
>>
>> I've already replied to your question[1]. Please register to the opensips
>> list if you want to get further emails.
>>
>> [1] http://lists.opensips.org/pipermail/users/2017-April/037179.html
>>
>> Best regards,
>>
>> Răzvan Crainea
>> OpenSIPS Solutionswww.opensips-solutions.com
>>
>> On 04/26/2017 11:05 AM, 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] (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 listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> 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/20170426/2f8dca34/attachment-0001.html>
More information about the Users
mailing list