ERROR topology_hiding_match() and WSS

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ERROR topology_hiding_match() and WSS

Dragomir Haralambiev
Hello,

I have problem with "topology_hiding_match()" and WSS.

Zoiper ---(send BYE)--> Opensips --(can not relay to)---> SIP.JS 


Here part ot script:
if (has_totag()) {
if (topology_hiding_match()) {
t_relay();
exit;
}
...

Opensips receive BYE. When execute "t_relay()" give follow ERRORS:

INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 23
ERROR:core:tcp_connect_blocking: timeout 99195 ms elapsed from 100000 s
ERROR:proto_ws:ws_sync_connect: tcp_blocking_connect failed
ERROR:proto_ws:ws_connect: connect failed
ERROR:proto_ws:proto_ws_send: connect failed
ERROR:tm:msg_send: send() for proto 5 failed
ERROR:tm:t_forward_nonack: sending request failed

Where is problem?

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR topology_hiding_match() and WSS

Bogdan-Andrei Iancu-2
Hi,

Same question, same answer - see http://lists.opensips.org/pipermail/users/2017-April/036925.html

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/21/2017 07:24 PM, Dragomir Haralambiev wrote:
Hello,

I have problem with "topology_hiding_match()" and WSS.

Zoiper ---(send BYE)--> Opensips --(can not relay to)---> SIP.JS 


Here part ot script:
if (has_totag()) {
if (topology_hiding_match()) {
t_relay();
exit;
}
...

Opensips receive BYE. When execute "t_relay()" give follow ERRORS:

<a class="moz-txt-link-freetext" href="INFO:core:probe_max_sock_buff">INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
<a class="moz-txt-link-freetext" href="INFO:core:init_sock_keepalive">INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 23
ERROR:core:tcp_connect_blocking: timeout 99195 ms elapsed from 100000 s
ERROR:proto_<a class="moz-txt-link-freetext" href="ws:ws_sync_connect">ws:ws_sync_connect: tcp_blocking_connect failed
ERROR:proto_<a class="moz-txt-link-freetext" href="ws:ws_connect">ws:ws_connect: connect failed
ERROR:proto_<a class="moz-txt-link-freetext" href="ws:proto_ws_send">ws:proto_ws_send: connect failed
ERROR:tm:msg_send: send() for proto 5 failed
ERROR:tm:t_forward_nonack: sending request failedscheduled

Where is problem?


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR topology_hiding_match() and WSS

Bogdan-Andrei Iancu-2
Hi Dragomir,

So, the problem is about the BYE. Just before sending BYE from Zoiper, please run on your opensips:
    opensipsctl fifo list_tcp_conns

Lets see if your SIP.JS still has a connection to OpenSIPS at that point.

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/25/2017 12:14 AM, Dragomir Haralambiev wrote:
Hi Bogdan,

Thanks for the detailed and comprehensive answer.

Zoiper talking (connection is established) with SIP.JS
Zoiper ---(over UDP)--> Opensips --(over WSS)---> SIP.JS

Why not possible Opensips send BYE to SIP.JS over established connection?
Why all is OK when SIP.JS send BYE?

I need help to setup Opensips to solve this problem.

Best regards,
Dragomir

2017-04-24 17:47 GMT+03:00 Bogdan-Andrei Iancu <[hidden email]>:
Hi,

Same question, same answer - see http://lists.opensips.org/pipermail/users/2017-April/036925.html

Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/21/2017 07:24 PM, Dragomir Haralambiev wrote:
Hello,
I have problem with "topology_hiding_match()" and WSS.
Zoiper ---(send BYE)--> Opensips --(can not relay to)---> SIP.JS 
Here part ot script:
if (has_totag()) {
if (topology_hiding_match()) {
t_relay();
exit;
}
...
Opensips receive BYE. When execute "t_relay()" give follow ERRORS:
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 23
ERROR:core:tcp_connect_blocking: timeout 99195 ms elapsed from 100000 s
ERROR:proto_ws:ws_sync_connect: tcp_blocking_connect failed
ERROR:proto_ws:ws_connect: connect failed
ERROR:proto_ws:proto_ws_send: connect failed
ERROR:tm:msg_send: send() for proto 5 failed
ERROR:tm:t_forward_nonack: sending request failedscheduled
Where is problem?
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR topology_hiding_match() and WSS

Bogdan-Andrei Iancu-2
Thank you Dragomir,

So, there is an existing connection to your browser.

Please redo the list_tcp_conns and send me the capture of the BYE request received by OpenSIPS.

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/25/2017 04:35 PM, Dragomir Haralambiev wrote:
Here is connection list before send BYE

[root@dev opensips]# opensipsctl fifo list_tcp_conns
Connection::  ID=1 Type=wss State=0 Source=<IP:SIP.JS>0:59562 Destination=<IP:Opensips>:10062 Lifetime=2017-04-25 16:31:14


2017-04-25 11:37 GMT+03:00 Bogdan-Andrei Iancu <[hidden email]>:
Hi Dragomir,

So, the problem is about the BYE. Just before sending BYE from Zoiper, please run on your opensips:
    opensipsctl fifo list_tcp_conns

Lets see if your SIP.JS still has a connection to OpenSIPS at that point.

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/25/2017 12:14 AM, Dragomir Haralambiev wrote:
Hi Bogdan,
Thanks for the detailed and comprehensive answer.
Zoiper talking (connection is established) with SIP.JS
Zoiper ---(over UDP)--> Opensips --(over WSS)---> SIP.JS
Why not possible Opensips send BYE to SIP.JS over established connection?
Why all is OK when SIP.JS send BYE?
I need help to setup Opensips to solve this problem.
Best regards,
Dragomir
2017-04-24 17:47 GMT+03:00 Bogdan-Andrei Iancu <[hidden email]>:
Hi, Same question, same answer - see http://lists.opensips.org/pipermail/users/2017-April/036925.html Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/21/2017 07:24 PM, Dragomir Haralambiev wrote:
Hello,
I have problem with "topology_hiding_match()" and WSS.
Zoiper ---(send BYE)--> Opensips --(can not relay to)---> SIP.JS 
Here part ot script:
if (has_totag()) {
if (topology_hiding_match()) {
t_relay();
exit;
}
...
Opensips receive BYE. When execute "t_relay()" give follow ERRORS:
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 23
ERROR:core:tcp_connect_blocking: timeout 99195 ms elapsed from 100000 s
ERROR:proto_ws:ws_sync_connect: tcp_blocking_connect failed
ERROR:proto_ws:ws_connect: connect failed
ERROR:proto_ws:proto_ws_send: connect failed
ERROR:tm:msg_send: send() for proto 5 failed
ERROR:tm:t_forward_nonack: sending request failedscheduled
Where is problem?
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR topology_hiding_match() and WSS

Bogdan-Andrei Iancu-2
Hi,

Just to update the list with the outcome of this investigation.

The problem is generated by an ambiguity in WS/WSS specs (RFC 7118) which state that a WSS client must advertise "transport=ws" - this is really confusing for a SIP proxy which has no clue on which transport (WS or WSS) to use to reach the user.

Most of the WSS UAC decided to disobey the IETF specs and to actually advertise wss. See the case for SIPjs:
      https://github.com/onsip/SIP.js/issues/97

After updating the SIP.js client, the call flow works like a charm.

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/26/2017 02:03 PM, Bogdan-Andrei Iancu wrote:
Thank you Dragomir,

So, there is an existing connection to your browser.

Please redo the list_tcp_conns and send me the capture of the BYE request received by OpenSIPS.

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/25/2017 04:35 PM, Dragomir Haralambiev wrote:
Here is connection list before send BYE

[root@dev opensips]# opensipsctl fifo list_tcp_conns
Connection::  ID=1 Type=wss State=0 Source=<IP:SIP.JS>0:59562 Destination=<IP:Opensips>:10062 Lifetime=2017-04-25 16:31:14


2017-04-25 11:37 GMT+03:00 Bogdan-Andrei Iancu <[hidden email]>:
Hi Dragomir,

So, the problem is about the BYE. Just before sending BYE from Zoiper, please run on your opensips:
    opensipsctl fifo list_tcp_conns

Lets see if your SIP.JS still has a connection to OpenSIPS at that point.

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/25/2017 12:14 AM, Dragomir Haralambiev wrote:
Hi Bogdan,
Thanks for the detailed and comprehensive answer.
Zoiper talking (connection is established) with SIP.JS
Zoiper ---(over UDP)--> Opensips --(over WSS)---> SIP.JS
Why not possible Opensips send BYE to SIP.JS over established connection?
Why all is OK when SIP.JS send BYE?
I need help to setup Opensips to solve this problem.
Best regards,
Dragomir
2017-04-24 17:47 GMT+03:00 Bogdan-Andrei Iancu <[hidden email]>:
Hi, Same question, same answer - see http://lists.opensips.org/pipermail/users/2017-April/036925.html Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/21/2017 07:24 PM, Dragomir Haralambiev wrote:
Hello,
I have problem with "topology_hiding_match()" and WSS.
Zoiper ---(send BYE)--> Opensips --(can not relay to)---> SIP.JS 
Here part ot script:
if (has_totag()) {
if (topology_hiding_match()) {
t_relay();
exit;
}
...
Opensips receive BYE. When execute "t_relay()" give follow ERRORS:
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 23
ERROR:core:tcp_connect_blocking: timeout 99195 ms elapsed from 100000 s
ERROR:proto_ws:ws_sync_connect: tcp_blocking_connect failed
ERROR:proto_ws:ws_connect: connect failed
ERROR:proto_ws:proto_ws_send: connect failed
ERROR:tm:msg_send: send() for proto 5 failed
ERROR:tm:t_forward_nonack: sending request failedscheduled
Where is problem?
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR topology_hiding_match() and WSS

Dragomir Haralambiev
When add in SIP.UA(sip.js):
hackIpInContact: true,
contactTransport: "wss",
rtcpMuxPolicy: 'negotiate',

All working fine.
Thanks Bogdan!

2017-05-18 16:28 GMT+03:00 Bogdan-Andrei Iancu <[hidden email]>:
maybe you should reply it again on the mailing list too, so people can benefit of it ;)
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 05/18/2017 04:20 PM, Dragomir Haralambiev wrote:
When add in SIP.UA:
hackIpInContact: true,
contactTransport: "wss",
rtcpMuxPolicy: 'negotiate',

All working fine.
Thanks Bogdan!

2017-05-18 13:42 GMT+03:00 Bogdan-Andrei Iancu <[hidden email][hidden email]>:
Hi,

Just to update the list with the outcome of this investigation.

The problem is generated by an ambiguity in WS/WSS specs (RFC 7118) which state that a WSS client must advertise "transport=ws" - this is really confusing for a SIP proxy which has no clue on which transport (WS or WSS) to use to reach the user.

Most of the WSS UAC decided to disobey the IETF specs and to actually advertise wss. See the case for SIPjs:
      https://github.com/onsip/SIP.js/issues/97

After updating the SIP.js client, the call flow works like a charm.

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/26/2017 02:03 PM, Bogdan-Andrei Iancu wrote:
Thank you Dragomir, So, there is an existing connection to your browser. Please redo the list_tcp_conns and send me the capture of the BYE request received by OpenSIPS. Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/25/2017 04:35 PM, Dragomir Haralambiev wrote:
Here is connection list before send BYE
[root@dev opensips]# opensipsctl fifo list_tcp_conns
Connection::  ID=1 Type=wss State=0 Source=<IP:SIP.JS>0:59562 Destination=<IP:Opensips>:10062 Lifetime=2017-04-25 16:31:14
2017-04-25 11:37 GMT+03:00 Bogdan-Andrei Iancu <[hidden email]>:
Hi Dragomir, So, the problem is about the BYE. Just before sending BYE from Zoiper, please run on your opensips:     opensipsctl fifo list_tcp_conns Lets see if your SIP.JS still has a connection to OpenSIPS at that point. Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/25/2017 12:14 AM, Dragomir Haralambiev wrote:
Hi Bogdan,
Thanks for the detailed and comprehensive answer.
Zoiper talking (connection is established) with SIP.JS
Zoiper ---(over UDP)--> Opensips --(over WSS)---> SIP.JS
Why not possible Opensips send BYE to SIP.JS over established connection?
Why all is OK when SIP.JS send BYE?
I need help to setup Opensips to solve this problem.
Best regards,
Dragomir
2017-04-24 17:47 GMT+03:00 Bogdan-Andrei Iancu <[hidden email]>:
Hi, Same question, same answer - see http://lists.opensips.org/pipermail/users/2017-April/036925.html Regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/21/2017 07:24 PM, Dragomir Haralambiev wrote:
Hello,
I have problem with "topology_hiding_match()" and WSS.
Zoiper ---(send BYE)--> Opensips --(can not relay to)---> SIP.JS 
Here part ot script:
if (has_totag()) {
if (topology_hiding_match()) {
t_relay();
exit;
}
...
Opensips receive BYE. When execute "t_relay()" give follow ERRORS:
INFO:core:probe_max_sock_buff: using snd buffer of 416 kb
INFO:core:init_sock_keepalive: TCP keepalive enabled on socket 23
ERROR:core:tcp_connect_blocking: timeout 99195 ms elapsed from 100000 s
ERROR:proto_ws:ws_sync_connect: tcp_blocking_connect failed
ERROR:proto_ws:ws_connect: connect failed
ERROR:proto_ws:proto_ws_send: connect failed
ERROR:tm:msg_send: send() for proto 5 failed
ERROR:tm:t_forward_nonack: sending request failedscheduled
Where is problem?
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users