Remote offer sdp: Failed to set remote video description send parameters - webrtc

I am using Simple Peer to connect 2 clients over webRTC
While trying to send the offer to the receiver I am getting
Failed to set remote video description send parameters.
Here is the SDP
{"type":"offer","sdp":"v=0\r\no=- 3967002803862387085 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1 2\r\na=msid-semantic: WMS 1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge\r\nm=audio 52914 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 18.195.48.251\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3850540122 1 udp 2122260223 10.180.180.2 63782 typ host generation 0 network-id 1 network-cost 50\r\na=candidate:3165758154 1 udp 2122194687 10.100.190.5 63783 typ host generation 0 network-id 2\r\na=candidate:2868996266 1 tcp 1518280447 10.180.180.2 9 typ host tcptype active generation 0 network-id 1 network-cost 50\r\na=candidate:4063387194 1 tcp 1518214911 10.100.190.5 9 typ host tcptype active generation 0 network-id 2\r\na=candidate:1252121374 1 udp 1685987071 89.139.131.90 63783 typ srflx raddr 10.100.190.5 rport 63783 generation 0 network-id 2\r\na=candidate:257568702 1 udp 41820415 18.195.48.251 52914 typ relay raddr 89.139.131.90 rport 63783 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042943 18.195.48.251 18200 typ relay raddr 89.139.131.90 rport 59073 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042687 18.195.48.251 45877 typ relay raddr 89.139.131.90 rport 59072 generation 0 network-id 2\r\na=ice-ufrag:Ujty\r\na=ice-pwd:PEzIY+m/GLK3tIKJKzdaL+QU\r\na=ice-options:trickle\r\na=fingerprint:sha-256 9F:35:29:B7:06:35:71:A3:24:57:BB:17:1D:46:A0:8A:DF:C3:43:D7:62:4F:28:82:C2:DA:6A:D8:1E:4D:7E:5C\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:14 urn:ietf:params:rtp-hdrext:encrypt urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:13 urn:ietf:params:rtp-hdrext:encrypt urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendrecv\r\na=msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge 61b41b64-e659-44e5-b54a-fd985b0b6ab7\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:2346342125 cname:P/dCG3X5qY6a+Apj\r\na=ssrc:2346342125 msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge 61b41b64-e659-44e5-b54a-fd985b0b6ab7\r\na=ssrc:2346342125 mslabel:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge\r\na=ssrc:2346342125 label:61b41b64-e659-44e5-b54a-fd985b0b6ab7\r\nm=video 23498 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 123 127 122 125 107 108 109 124\r\nc=IN IP4 18.195.48.251\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3850540122 1 udp 2122260223 10.180.180.2 63784 typ host generation 0 network-id 1 network-cost 50\r\na=candidate:3165758154 1 udp 2122194687 10.100.190.5 63785 typ host generation 0 network-id 2\r\na=candidate:2868996266 1 tcp 1518280447 10.180.180.2 9 typ host tcptype active generation 0 network-id 1 network-cost 50\r\na=candidate:4063387194 1 tcp 1518214911 10.100.190.5 9 typ host tcptype active generation 0 network-id 2\r\na=candidate:1252121374 1 udp 1685987071 89.139.131.90 63785 typ srflx raddr 10.100.190.5 rport 63785 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042687 18.195.48.251 23498 typ relay raddr 89.139.131.90 rport 59068 generation 0 network-id 2\r\na=candidate:257568702 1 udp 41820415 18.195.48.251 47216 typ relay raddr 89.139.131.90 rport 63785 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042943 18.195.48.251 55749 typ relay raddr 89.139.131.90 rport 59067 generation 0 network-id 2\r\na=ice-ufrag:Ujty\r\na=ice-pwd:PEzIY+m/GLK3tIKJKzdaL+QU\r\na=ice-options:trickle\r\na=fingerprint:sha-256 9F:35:29:B7:06:35:71:A3:24:57:BB:17:1D:46:A0:8A:DF:C3:43:D7:62:4F:28:82:C2:DA:6A:D8:1E:4D:7E:5C\r\na=setup:actpass\r\na=mid:1\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:10 https://datatracker.ietf.org/doc/html/draft-ietf-avtext-framemarking-07\r\na=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:12 urn:ietf:params:rtp-hdrext:encrypt urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:11 urn:ietf:params:rtp-hdrext:encrypt urn:3gpp:video-orientation\r\na=extmap:0 urn:ietf:params:rtp-hdrext:encrypt http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:0 urn:ietf:params:rtp-hdrext:encrypt http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:0 urn:ietf:params:rtp-hdrext:encrypt http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:13 urn:ietf:params:rtp-hdrext:encrypt urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendrecv\r\na=msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 H264/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:102 H264/90000\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\na=rtpmap:123 rtx/90000\r\na=fmtp:123 apt=102\r\na=rtpmap:127 H264/90000\r\na=rtcp-fb:127 goog-remb\r\na=rtcp-fb:127 transport-cc\r\na=rtcp-fb:127 ccm fir\r\na=rtcp-fb:127 nack\r\na=rtcp-fb:127 nack pli\r\na=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:122 rtx/90000\r\na=fmtp:122 apt=127\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 goog-remb\r\na=rtcp-fb:125 transport-cc\r\na=rtcp-fb:125 ccm fir\r\na=rtcp-fb:125 nack\r\na=rtcp-fb:125 nack pli\r\na=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\na=rtpmap:107 rtx/90000\r\na=fmtp:107 apt=125\r\na=rtpmap:108 red/90000\r\na=rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:124 ulpfec/90000\r\na=ssrc-group:FID 351153934 628720635\r\na=ssrc:351153934 cname:P/dCG3X5qY6a+Apj\r\na=ssrc:351153934 msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\na=ssrc:351153934 mslabel:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge\r\na=ssrc:351153934 label:ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\na=ssrc:628720635 cname:P/dCG3X5qY6a+Apj\r\na=ssrc:628720635 msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\na=ssrc:628720635 mslabel:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge\r\na=ssrc:628720635 label:ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\nm=application 12497 DTLS/SCTP 5000\r\nc=IN IP4 18.195.48.251\r\na=candidate:3850540122 1 udp 2122260223 10.180.180.2 63786 typ host generation 0 network-id 1 network-cost 50\r\na=candidate:3165758154 1 udp 2122194687 10.100.190.5 63787 typ host generation 0 network-id 2\r\na=candidate:2868996266 1 tcp 1518280447 10.180.180.2 9 typ host tcptype active generation 0 network-id 1 network-cost 50\r\na=candidate:4063387194 1 tcp 1518214911 10.100.190.5 9 typ host tcptype active generation 0 network-id 2\r\na=candidate:1252121374 1 udp 1685987071 89.139.131.84 63787 typ srflx raddr 10.100.190.5 rport 63787 generation 0 network-id 2\r\na=candidate:257568702 1 udp 41820415 18.195.48.251 12497 typ relay raddr 89.139.131.90 rport 63787 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042943 18.195.48.251 55726 typ relay raddr 89.139.131.90 rport 59065 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042687 18.195.48.251 46602 typ relay raddr 89.139.131.90 rport 59066 generation 0 network-id 2\r\na=ice-ufrag:Ujty\r\na=ice-pwd:PEzIY+m/GLK3tIKJKzdaL+QU\r\na=ice-options:trickle\r\na=fingerprint:sha-256 9F:35:29:B7:06:35:71:A3:24:57:BB:17:1D:46:A0:8A:DF:C3:43:D7:62:4F:28:82:C2:DA:6A:D8:1E:4D:7E:5C\r\na=setup:actpass\r\na=mid:2\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n"}
If there is any tool to format it, please let me know, I will do it.
also, I read, that this could be a codec problem, so I tried to replaced profile-level-id=42001f with
profile-level-id=42e01f this did not do the trick.
Why does webRTC have to be so difficult? it might as well be called hellRTC
also, why is the extension part of the SDP is full of URLS?.. it just doesn't look something you want to pass in your request or signaling.
Thank you.

Related

Pandas: how to add a column with a value based on conditions on differents columns

I'm analyzing a dataset of internet communictions that consists of 5 columns and below an example of it
IPSrc
IPDst
PortSrc
PortDst
Length
IP1
IP2
Pr1
Pr2
35
IP3
IP4
Pr3
Pr4
36
IP2
IP1
Pr2
Pr1
88
IP4
IP3
Pr4
Pr3
150
IP5
IP6
Pr5
Pr6
11
IP1
IP4
Pr8
Pr9
36
I would like to get the same dataset but with a new columns Length 2, where Length 2 is the value of the row that match those conditions:
IPSrc = IPDst
IPDst = IPSrc
PortSrc = PortDst
PortDst = PortSrc
So in this example, the ideal results would be:
IPSrc
IPDst
PortSrc
PortDst
Length
Length 2
IP1
IP2
Pr1
Pr2
35
88
IP3
IP4
Pr3
Pr4
36
150
IP2
IP1
Pr2
Pr1
88
35
IP4
IP3
Pr4
Pr3
150
36
IP5
IP6
Pr5
Pr6
11
IP1
IP4
Pr8
Pr9
36
Knowing that the dataset contains 1 million rows, it would be appreciated if the given answers would considerate the performance.
Thanks in advance :)
Use DataFrame.join with matching column converted to index with columns in parameter on:
df = df.join(df.set_index(['IPSrc','PortSrc'])['Length'].rename('Length 2'),
on=['IPDst','PortDst'])
print (df)
IPSrc IPDst PortSrc PortDst Length Length 2
0 IP1 IP2 Pr1 Pr2 35 88.0
1 IP3 IP4 Pr3 Pr4 36 150.0
2 IP2 IP1 Pr2 Pr1 88 35.0
3 IP4 IP3 Pr4 Pr3 150 36.0
4 IP5 IP6 Pr5 Pr6 11 NaN
5 IP1 IP4 Pr8 Pr9 36 NaN

WebRTC chrome : Failed to set local audio description recv parameters for m-section with mid='0'

I am having an issue when toggling between on hold (pause/resume) between caller and callee. I sporadically having an issue with the following exception thrown:
Failed to set local answer sdp: Failed to set local audio description recv parameters for m-section with mid='0'.
The SDP that was sent is as following:
o=- 8123285721396425994 20 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS kHvO0o2GzTec38omRFi13PpLslU1lcJpY6h1
m=audio 6577 UDP/TLS/RTP/SAVPF 9 113 (28 more lines)
c=IN IP4 62.216.203.43
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:2140827935 1 udp 2122260223 10.8.74.108 64763 typ host generation 0 network-id 1 network-cost 50
a=candidate:411095253 1 udp 2122194687 172.19.64.1 64764 typ host generation 0 network-id 2
a=candidate:4031697573 1 udp 2122131711 2001:a61:522:3401:641d:31e2:98ce:ff45 64765 typ host generation 0 network-id 4 network-cost 10
a=candidate:3689448742 1 udp 2122066175 2001:a61:522:3401:f880:8764:be56:a574 64766 typ host generation 0 network-id 5 network-cost 10
a=candidate:4036240074 1 udp 2121998079 192.168.178.30 64767 typ host generation 0 network-id 3 network-cost 10
a=candidate:1008278873 1 udp 1685790463 62.216.203.43 6577 typ srflx raddr 192.168.178.30 rport 64767 generation 0 network-id 3 network-cost 10
a=candidate:823758319 1 tcp 1518280447 10.8.74.108 9 typ host tcptype active generation 0 network-id 1 network-cost 50
a=candidate:1443048485 1 tcp 1518214911 172.19.64.1 9 typ host tcptype active generation 0 network-id 2
a=candidate:3201117781 1 tcp 1518151935 2001:a61:522:3401:641d:31e2:98ce:ff45 9 typ host tcptype active generation 0 network-id 4 network-cost 10
a=candidate:2506848726 1 tcp 1518086399 2001:a61:522:3401:f880:8764:be56:a574 9 typ host tcptype active generation 0 network-id 5 network-cost 10
a=candidate:3189235258 1 tcp 1518018303 192.168.178.30 9 typ host tcptype active generation 0 network-id 3 network-cost 10
a=ice-ufrag:S96Y
a=ice-pwd:tpc0ST0C8afqjZ5YaGD1G73O
a=ice-options:trickle
a=fingerprint:sha-256 93:9E:87:FA:4D:4F:A1:21:06:1C:45:D7:9B:18:85:DF:47:89:9F:AE:FB:C6:1E:2F:3E:01:9A:59:4F:BB:25:14
a=setup:active
a=mid:0
a=sendrecv
a=msid:kHvO0o2GzTec38omRFi13PpLslU1lcJpY6h1 3a1d3487-2efd-4eca-83a7-9a8ff584169e
a=rtcp-mux
a=rtpmap:9 G722/8000
a=rtpmap:113 telephone-event/8000
a=ssrc:2629658636 cname:EBgjrnnDur5zui0v
a=ssrc:2629658636 msid:kHvO0o2GzTec38omRFi13PpLslU1lcJpY6h1 3a1d3487-2efd-4eca-83a7-9a8ff584169e
a=ssrc:2629658636 mslabel:kHvO0o2GzTec38omRFi13PpLslU1lcJpY6h1
a=ssrc:2629658636 label:3a1d3487-2efd-4eca-83a7-9a8ff584169e
I checked that for
m=audio 6577 UDP/TLS/RTP/SAVPF 9 126 (28 more lines)
this would also work
Does anyone know why the offer is not working for chrome, but it's fine for firefox and safari?

Creating master ID in Oracle

Let's say, I have a data table with below columns:
EMAIL PHONE IP
123#ABC.COM 123456 0.0.0.0
123#ABC.COM 123456 0.0.0.1
123#ABC.COM 654321 0.0.0.0
321#ABC.COM 123456 0.0.0.0
000#ABC.COM 000000 1.1.1.1
000#ABC.COM 000001 1.1.1.2
I want to create a table on top of that data table, which has the master ID. The rule is as long as one of each attribute (Email, Phone, IP) is matched then they will have the same master ID.
For example:
EMAIL PHONE IP Master_ID
123#ABC.COM 123456 0.0.0.0 1
123#ABC.COM 123456 0.0.0.1 1
123#ABC.COM 654321 0.0.0.0 1
321#ABC.COM 123456 0.0.0.0 1
000#ABC.COM 000000 1.1.1.1 2
000#ABC.COM 000001 1.1.1.2 2
Is there any suggestion on how can I get it done by just using query/function in Oracle?

how change G722 to PCMA codec?

Im using FreeSWITCH-mod_sofia/1.6.9~64bit + SIPJS library (http://sipjs.com/) + Chrome Version 52.0.2743.116 (64-bit).
When I make a call logs shows me codec G722. How to change it on webrtc preferences to PCMA?
this is log from browser and pbx:
v=0
o=FreeSWITCH 1473140673 1473140674 IN IP4 46.101.211.231
s=FreeSWITCH
c=IN IP4 46.101.211.231
t=0 0
a=msid-semantic: WMS bq8r7nsrBp8WZadawhiSfNUqsNZvBk2D
a=end-of-candidates
m=audio 20640 UDP/TLS/RTP/SAVPF 9 126
a=rtpmap:9 G722/8000
a=rtpmap:126 telephone-event/8000
a=ptime:20
a=fingerprint:sha-256 55:88:C7:12:0B:4C:68:25:0F:24:10:49:CE:B6:C7:3F:26:1B:DA:7D:3D:F9:CE:F9:83:BE:7D:85:77:CD:D9:CB
a=setup:active
a=rtcp-mux
a=rtcp:20640 IN IP4 46.101.211.231
a=ice-ufrag:EqTJ3DZmgPHIZAbp
a=ice-pwd:sWOwZt3i8mqMIyNcOwMI0BV6
a=candidate:4112214570 1 udp 659136 46.101.211.231 20640 typ host generation 0
a=ssrc:2815440288 cname:A1UyedPGsOthOwha
a=ssrc:2815440288 msid:bq8r7nsrBp8WZadawhiSfNUqsNZvBk2D a0
a=ssrc:2815440288 mslabel:bq8r7nsrBp8WZadawhiSfNUqsNZvBk2D
a=ssrc:2815440288 label:bq8r7nsrBp8WZadawhiSfNUqsNZvBk2Da0
sip-0.7.5.min.js:36 Tue Sep 06 2016 14:28:33 GMT+0300 (EEST) | sip.dialog | ivnr8mmnv402egp0rirsng7rg9apkhyZp6ag8m93gve | new UAC dialog created with status EARLY
sip-app-abd8abe655.js:259 Call status: Calling...
application-3c30b3ee30.js:2853 Timer.start();
application-3c30b3ee30.js:2853 Timer.reset();
sip-0.7.5.min.js:36 Tue Sep 06 2016 14:28:33 GMT+0300 (EEST) | sip.transport | received WebSocket text message:
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/WSS e3j3u9l0okm1.invalid;branch=z9hG4bK1519134;received=79.142.124.66;rport=63166
Max-Forwards: 70
From: "S S1" sip:C1-U30#CP1.sip.tech.com;tag=ng7rg9apkh
To: sip:867207276#CP1.sip.tech.com;tag=yZp6ag8m93gve
Call-ID: ivnr8mmnv402egp0rirs
CSeq: 8719 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.6.9~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: path, replaces
Allow-Events: talk, hold, conference, refer
Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"
Content-Length: 0
Remote-Party-ID: "867207276" sip:867207276#CP1.sip.tech.com;party=calling;privacy=off;screen=no
v=0
o=- 17331602012762722 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS qK3WgAq68b2Mu9e80AUclmR3NG02WYNQiSUf
m=audio 61461 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126
c=IN IP4 79.142.124.66
a=rtcp:53127 IN IP4 79.142.124.66
a=candidate:555938122 1 udp 2122260223 192.168.88.186 61461 typ host generation 0 network-id 1
a=candidate:555938122 2 udp 2122260222 192.168.88.186 53127 typ host generation 0 network-id 1
a=candidate:3987721945 2 udp 1686052606 79.142.124.66 53127 typ srflx raddr 192.168.88.186 rport 53127 generation 0 network-id 1
a=candidate:3987721945 1 udp 1686052607 79.142.124.66 61461 typ srflx raddr 192.168.88.186 rport 61461 generation 0 network-id 1
a=candidate:1872825786 1 tcp 1518280447 192.168.88.186 9 typ host tcptype active generation 0 network-id 1
a=candidate:1872825786 2 tcp 1518280446 192.168.88.186 9 typ host tcptype active generation 0 network-id 1
a=ice-ufrag:TagGNVyjjTVGdD0Y
a=ice-pwd:KjWwT6coB1eEBJJUW7LszseM
a=fingerprint:sha-256 80:33:0A:04:F4:ED:88:FF:08:A7:E2:A3:CF:89:56:17:FF:39:B8:D0:EC:D3:91:33:CE:A4:65:E5:BE:1A:D1:17
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=ssrc:3472270343 cname:W3v1/RPNLku0GWlP
a=ssrc:3472270343 msid:qK3WgAq68b2Mu9e80AUclmR3NG02WYNQiSUf 39017066-29e8-4452-85a1-f0f92b66f0c6
a=ssrc:3472270343 mslabel:qK3WgAq68b2Mu9e80AUclmR3NG02WYNQiSUf
a=ssrc:3472270343 label:39017066-29e8-4452-85a1-f0f92b66f0c6
The 1st SDP looks like its from FS server to Browser. Try setting inherit_codec before bridge in FS dial plan.
If late negotiation is on, and you set inherit_codec=true on the A leg, the negotiated codec of the B leg will be forced onto the A leg.

how-to tunnel a secure websocket (wss://) to insecure websocket (ws://) ( stunnel ? ) on linux

I have an ancient socket server script, which can only use unsecure ws:// sockets.
I upgraded my site to use https:// , and websocket connections to ws:// are not possible anymore, browsers generate an error message, that the connection is blocked and that i have to use wss://
I am using linux(centos). Is there any easy was to setup a tunnel from wss:// to ws:// on 2 ports?
I have found stunnel, but i can't get it to work properly, is there maybe an other way to do this?
What i tried to far with stunnel:
[websocket]
accept = 9301
connect = localhost:9300
and i also tried:
[https]
accept = www.flirtzo.eu:9001
connect = localhost:9000
But i have not been successfull. I hope anyone knows a proper solution or fix. Thank you very much.
[edit]
This is the logfiles from stunnel:
2014.09.04 12:45:33 LOG7[52433:139838877431744]: Snagged 64 random bytes from /root/.rnd
2014.09.04 12:45:33 LOG7[52433:139838877431744]: Wrote 1024 new random bytes to /root/.rnd
2014.09.04 12:45:33 LOG7[52433:139838877431744]: RAND_status claims sufficient entropy for the PRNG
2014.09.04 12:45:33 LOG7[52433:139838877431744]: PRNG seeded successfully
2014.09.04 12:45:33 LOG7[52433:139838877431744]: Certificate: /home/flirtzo/ssl.cert
2014.09.04 12:45:33 LOG7[52433:139838877431744]: Certificate loaded
2014.09.04 12:45:33 LOG7[52433:139838877431744]: Key file: /home/flirtzo/ssl.key
2014.09.04 12:45:33 LOG7[52433:139838877431744]: Private key loaded
2014.09.04 12:45:33 LOG7[52433:139838877431744]: SSL context initialized for service websocket
2014.09.04 12:45:33 LOG5[52433:139838877431744]: stunnel 4.29 on x86_64-redhat-linux-gnu with OpenSSL 1.0.0-fips 29 Mar 2010
2014.09.04 12:45:33 LOG5[52433:139838877431744]: Threading:PTHREAD SSL:ENGINE Sockets:POLL,IPv6 Auth:LIBWRAP
2014.09.04 12:45:33 LOG6[52433:139838877431744]: file ulimit = 1024 (can be changed with 'ulimit -n')
2014.09.04 12:45:33 LOG6[52433:139838877431744]: poll() used - no FD_SETSIZE limit for file descriptors
2014.09.04 12:45:33 LOG5[52433:139838877431744]: 500 clients allowed
2014.09.04 12:45:33 LOG7[52433:139838877431744]: FD 10 in non-blocking mode
2014.09.04 12:45:33 LOG7[52433:139838877431744]: FD 11 in non-blocking mode
2014.09.04 12:45:33 LOG7[52433:139838877431744]: FD 12 in non-blocking mode
2014.09.04 12:45:33 LOG7[52433:139838877431744]: SO_REUSEADDR option set on accept socket
2014.09.04 12:45:33 LOG7[52433:139838877431744]: websocket bound to 0.0.0.0:9301
2014.09.04 12:45:33 LOG7[52433:139838877431744]: Created pid file /var/run/stunnel_websocket.pid
2014.09.04 12:45:36 LOG7[52433:139838877431744]: websocket accepted FD=13 from 78.165.105.183:58507
2014.09.04 12:45:36 LOG7[52433:139838877427456]: websocket started
2014.09.04 12:45:36 LOG7[52433:139838877427456]: FD 13 in non-blocking mode
2014.09.04 12:45:36 LOG7[52433:139838877427456]: Waiting for a libwrap process
2014.09.04 12:45:36 LOG7[52433:139838877427456]: Acquired libwrap process #0
2014.09.04 12:45:36 LOG7[52433:139838877427456]: Releasing libwrap process #0
2014.09.04 12:45:36 LOG7[52433:139838877427456]: Released libwrap process #0
2014.09.04 12:45:36 LOG7[52433:139838877427456]: websocket permitted by libwrap from 78.165.105.183:58507
2014.09.04 12:45:36 LOG5[52433:139838877427456]: websocket accepted connection from 78.165.105.183:58507
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): before/accept initialization
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 read client hello A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 write server hello A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 write certificate A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 write server done A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 flush data
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 read client key exchange A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 read finished A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 write session ticket A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 write change cipher spec A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 write finished A
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL state (accept): SSLv3 flush data
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 items in the session cache
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 client connects (SSL_connect())
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 client connects that finished
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 client renegotiations requested
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 1 server connects (SSL_accept())
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 1 server connects that finished
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 server renegotiations requested
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 session cache hits
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 external session cache hits
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 session cache misses
2014.09.04 12:45:36 LOG7[52433:139838877427456]: 0 session cache timeouts
2014.09.04 12:45:36 LOG6[52433:139838877427456]: SSL accepted: new session negotiated
2014.09.04 12:45:36 LOG6[52433:139838877427456]: Negotiated ciphers: AES128-GCM-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(128) Mac=AEAD
2014.09.04 12:45:36 LOG7[52433:139838877427456]: FD 14 in non-blocking mode
2014.09.04 12:45:36 LOG6[52433:139838877427456]: connect_blocking: connecting 127.0.0.1:9300
2014.09.04 12:45:36 LOG7[52433:139838877427456]: connect_blocking: s_poll_wait 127.0.0.1:9300: waiting 10 seconds
2014.09.04 12:45:36 LOG5[52433:139838877427456]: connect_blocking: connected 127.0.0.1:9300
2014.09.04 12:45:36 LOG5[52433:139838877427456]: websocket connected remote server from 127.0.0.1:39519
2014.09.04 12:45:36 LOG7[52433:139838877427456]: Remote FD=14 initialized
2014.09.04 12:45:36 LOG7[52433:139838877427456]: SSL socket closed on SSL_read
2014.09.04 12:45:36 LOG7[52433:139838877427456]: Socket write shutdown
2014.09.04 12:45:36 LOG5[52433:139838877427456]: Connection closed: 0 bytes sent to SSL, 0 bytes sent to socket
2014.09.04 12:45:36 LOG7[52433:139838877427456]: websocket finished (0 left)
[tcpdump on the port stunnel is listening 9301]
13:25:18.853411 IP 78.165.105.183.dynamic.ttnet.com.tr.60291 > s1.flirtzo.eu.9301: Flags [S], seq 3851820594, win 8192, options [mss 1452,nop,wscale 8,nop,nop,sackOK], length 0
0x0000: 4500 0034 5921 4000 7406 b390 4ea5 69b7
0x0010: 5fd3 e1e2 eb83 2455 e596 1e32 0000 0000
0x0020: 8002 2000 4164 0000 0204 05ac 0103 0308
0x0030: 0101 0402
13:25:18.853430 IP s1.flirtzo.eu.9301 > 78.165.105.183.dynamic.ttnet.com.tr.60291: Flags [S.], seq 3606802872, ack 3851820595, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
0x0000: 4500 0034 0000 4000 4006 40b2 5fd3 e1e2
0x0010: 4ea5 69b7 2455 eb83 d6fb 71b8 e596 1e33
0x0020: 8012 3908 df8f 0000 0204 05b4 0101 0402
0x0030: 0103 0307
13:25:18.925957 IP 78.165.105.183.dynamic.ttnet.com.tr.60291 > s1.flirtzo.eu.9301: Flags [.], ack 1, win 64, length 0
0x0000: 4500 0028 592b 4000 7406 b392 4ea5 69b7
0x0010: 5fd3 e1e2 eb83 2455 e596 1e33 d6fb 71b9
0x0020: 5010 0040 592a 0000 0000 0000 0000
13:25:18.929145 IP 78.165.105.183.dynamic.ttnet.com.tr.60291 > s1.flirtzo.eu.9301: Flags [P.], seq 1:157, ack 1, win 64, length 156
0x0000: 4500 00c4 592c 4000 7406 b2f5 4ea5 69b7
0x0010: 5fd3 e1e2 eb83 2455 e596 1e33 d6fb 71b9
0x0020: 5018 0040 aac7 0000 1603 0100 9701 0000
0x0030: 9303 03ca 462a f6f4 8c02 b904 a7bb 6bcc
0x0040: 7031 a59d 2763 dc72 e3b6 3990 6490 442d
0x0050: af33 a200 0028 c02b c02f 009e cc14 cc13
0x0060: c00a c009 c013 c014 c007 c011 0033 0032
0x0070: 0039 009c 002f 0035 000a 0005 0004 0100
0x0080: 0042 ff01 0001 0000 0a00 0800 0600 1700
0x0090: 1800 1900 0b00 0201 0000 2300 0075 5000
0x00a0: 0000 0500 0501 0000 0000 0012 0000 000d
0x00b0: 0012 0010 0401 0501 0201 0403 0503 0203
0x00c0: 0402 0202
13:25:18.929162 IP s1.flirtzo.eu.9301 > 78.165.105.183.dynamic.ttnet.com.tr.60291: Flags [.], ack 157, win 123, length 0
0x0000: 4500 0028 c34b 4000 4006 7d72 5fd3 e1e2
0x0010: 4ea5 69b7 2455 eb83 d6fb 71b9 e596 1ecf
0x0020: 5010 007b 5853 0000
13:25:18.932573 IP s1.flirtzo.eu.9301 > 78.165.105.183.dynamic.ttnet.com.tr.60291: Flags [.], seq 1:1453, ack 157, win 123, length 1452
0x0000: 4500 05d4 c34c 4000 4006 77c5 5fd3 e1e2
0x0010: 4ea5 69b7 2455 eb83 d6fb 71b9 e596 1ecf
0x0020: 5010 007b ffd8 0000 1603 0300 3d02 0000
0x0030: 3903 0354 084c 1ec7 2b57 eac5 c7bc 4747
0x0040: 6cc9 bb68 3450 2af1 348c 6287 fa30 efec
0x0050: b734 f400 c02f 0000 11ff 0100 0100 000b
0x0060: 0004 0300 0102 0023 0000 1603 0305 380b
0x0070: 0005 3400 0531 0005 2e30 8205 2a30 8204
0x0080: 12a0 0302 0102 0203 14f7 2030 0d06 092a
0x0090: 8648 86f7 0d01 0105 0500 303c 310b 3009
0x00a0: 0603 5504 0613 0255 5331 1730 1506 0355
0x00b0: 040a 130e 4765 6f54 7275 7374 2c20 496e
0x00c0: 632e 3114 3012 0603 5504 0313 0b52 6170
0x00d0: 6964 5353 4c20 4341 301e 170d 3134 3039
0x00e0: 3031 3037 3533 3231 5a17 0d31 3530 3930
0x00f0: 3332 3330 3031 305a 3081 bb31 2930 2706
0x0100: 0355 0405 1320 6d74 4e70 776d 682d 474b
0x0110: 3745 506b 756d 4750 7247 3771 6b62 6778
0x0120: 3151 4b66 3249 3113 3011 0603 5504 0b13
0x0130: 0a47 5431 3233 3733 3831 3731 3130 2f06
0x0140: 0355 040b 1328 5365 6520 7777 772e 7261
0x0150: 7069 6473 736c 2e63 6f6d 2f72 6573 6f75
0x0160: 7263 6573 2f63 7073 2028 6329 3134 312f
0x0170: 302d 0603 5504 0b13 2644 6f6d 6169 6e20
0x0180: 436f 6e74 726f 6c20 5661 6c69 6461 7465
0x0190: 6420 2d20 5261 7069 6453 534c 2852 2931
0x01a0: 1530 1306 0355 0403 0c0c 2a2e 666c 6972
0x01b0: 747a 6f2e 6575 3082 0122 300d 0609 2a86
0x01c0: 4886 f70d 0101 0105 0003 8201 0f00 3082
0x01d0: 010a 0282 0101 00a0 563b 974b d126 329b
0x01e0: 7b13 d82c f848 f21f 810c dd7e a8f6 f971
0x01f0: 406c 8f1f 04c0 23de a16d eccc 9093 ae76
0x0200: c4db afab abfa 0a38 e18e a56d 998b 6355
0x0210: a7dd f4a1 e3d1 0009 4e01 9e6a fb45 016c
0x0220: 0701 8968 efa3 8ae2 8931 2a5a d560 f6a4
0x0230: e5f9 04f6 4bac d20b 5045 9991 453d 1ddd
0x0240: 2c6f 119a 604d df10 a5a0 37c4 c906 6f5c
0x0250: 27dc a9ce b44d 1286 4ef1 16d7 885d d468
0x0260: b3ff 5f68 b9d0 addf 856f 9b37 655f 85cc
0x0270: 2553 11f9 b791 a1d6 a97d 4b7b f79c 2cf4
0x0280: 9965 b353 efb5 219e 9ad5 30cc 4a9f 8572
0x0290: 6a11 82d7 d5d6 e53b 45e1 9b77 a905 129c
0x02a0: 7818 30fd 0bc6 b26d 4f0b 8f43 81bb 3f46
0x02b0: 6c53 c4a3 69ba e6e5 8697 d82f aa33 8c03
0x02c0: 0f67 7188 110d 2641 dc8e 860c 8170 dd47
0x02d0: c3a6 11dc 2434 e502 0301 0001 a382 01b3
0x02e0: 3082 01af 301f 0603 551d 2304 1830 1680
0x02f0: 146b 693d 6a18 424a dd8f 0265 39fd 3524
0x0300: 8678 9116 3030 0e06 0355 1d0f 0101 ff04
0x0310: 0403 0205 a030 1d06 0355 1d25 0416 3014
0x0320: 0608 2b06 0105 0507 0301 0608 2b06 0105
0x0330: 0507 0302 3023 0603 551d 1104 1c30 1a82
0x0340: 0c2a 2e66 6c69 7274 7a6f 2e65 7582 0a66
0x0350: 6c69 7274 7a6f 2e65 7530 4306 0355 1d1f
0x0360: 043c 303a 3038 a036 a034 8632 6874 7470
0x0370: 3a2f 2f72 6170 6964 7373 6c2d 6372 6c2e
0x0380: 6765 6f74 7275 7374 2e63 6f6d 2f63 726c
0x0390: 732f 7261 7069 6473 736c 2e63 726c 301d
0x03a0: 0603 551d 0e04 1604 1431 c610 096f ea04
0x03b0: 6ab1 6307 e138 3f01 65e3 6f3b 6c30 0c06
0x03c0: 0355 1d13 0101 ff04 0230 0030 7806 082b
0x03d0: 0601 0505 0701 0104 6c30 6a30 2d06 082b
0x03e0: 0601 0505 0730 0186 2168 7474 703a 2f2f
0x03f0: 7261 7069 6473 736c 2d6f 6373 702e 6765
0x0400: 6f74 7275 7374 2e63 6f6d 3039 0608 2b06
0x0410: 0105 0507 3002 862d 6874 7470 3a2f 2f72
0x0420: 6170 6964 7373 6c2d 6169 612e 6765 6f74
0x0430: 7275 7374 2e63 6f6d 2f72 6170 6964 7373
0x0440: 6c2e 6372 7430 4c06 0355 1d20 0445 3043
0x0450: 3041 060a 6086 4801 86f8 4501 0736 3033
0x0460: 3031 0608 2b06 0105 0507 0201 1625 6874
0x0470: 7470 3a2f 2f77 7777 2e67 656f 7472 7573
0x0480: 742e 636f 6d2f 7265 736f 7572 6365 732f
0x0490: 6370 7330 0d06 092a 8648 86f7 0d01 0105
0x04a0: 0500 0382 0101 000d ec47 3465 2a34 27d8
0x04b0: 9662 8b8b d5fa 0086 ebdd 78c4 1a27 08b4
0x04c0: 8701 fc9a a99e cc09 f16e 9a40 c6e3 533a
0x04d0: 1f40 d317 3c25 51ba cec3 0da5 d448 71ee
0x04e0: d156 a7a0 4bbf a374 da73 0cd7 1996 2464
0x04f0: 2ece 1a64 c53f ea6f 5e32 4d9c 0cb0 e527
0x0500: 4c9b 7eba ba1e 1557 1b07 f848 421f 750c
0x0510: fcab 4a0e afac 29c0 499e f0d9 acd9 52e4
0x0520: 6209 974f 042d 1f03 ccbc 5004 f21a b775
0x0530: a11f 12f4 1f4a 11c5 ebd1 8f73 39c6 de45
0x0540: 64f3 512b d3bc 697e 6240 f118 a11b b9ce
0x0550: 5100 00d2 0880 0179 7e0b a884 04c7 d7e5
0x0560: bfa2 dbab d8a9 4f7a 17f8 7bd8 1a0e cf67
0x0570: 9680 878c a566 ad4e 5983 f4a8 a73b c58b
0x0580: db4a 1b18 eae0 9070 68f1 ade4 c7a2 c68b
0x0590: 4c8e 9fc3 06e2 6833 fdd0 f4e1 98d3 5c54
0x05a0: 112f 2a51 9d1f 8a16 0303 014d 0c00 0149
0x05b0: 0300 1741 04e2 a5a0 5820 ab18 426c 6f74
0x05c0: 4783 0203 40c6 33eb 97b5 5f0b eaef cab5
0x05d0: 45fe 3242
13:25:18.932580 IP s1.flirtzo.eu.9301 > 78.165.105.183.dynamic.ttnet.com.tr.60291: Flags [P.], seq 1453:1755, ack 157, win 123, length 302
0x0000: 4500 0156 c34d 4000 4006 7c42 5fd3 e1e2
0x0010: 4ea5 69b7 2455 eb83 d6fb 7765 e596 1ecf
0x0020: 5018 007b fb5a 0000 9644 7c9c d18f c2e0
0x0030: 0ff8 8ae7 6f8a 1b13 d88d 81fe a956 e8f9
0x0040: a382 cd4e f34f 4775 a904 0101 006b 4e33
0x0050: d907 216b cf2e 2c7d 138c df69 3e51 a902
0x0060: 8382 c6df a26f 6c00 b716 b2ae ea76 e47c
0x0070: a377 3684 0fc8 ee33 5d57 24cb 0243 4f94
0x0080: bea6 1019 5a3a 2966 a3d3 9bc8 191c c7eb
0x0090: 5402 a886 4365 2bfc 2abd 59c6 97a6 70d1
0x00a0: 02e3 a1b3 7356 89e4 bbe4 c5fe 4e03 764c
0x00b0: 5315 2e75 cb29 4167 a42c e2c6 6362 317d
0x00c0: ac86 1e40 d8af dbb4 021d 1216 4fc4 72f6
0x00d0: 772c 214f c1f6 204c a673 634d 141f 221d
0x00e0: 039f 729c 03e9 250a 10d1 134a 7047 0fa9
0x00f0: 9180 3664 92da c4ed 19bb 9e4f 66f8 90fb
0x0100: f52c 1d79 dc47 5a84 73e5 8871 cca4 0ce2
0x0110: ecc8 db69 f4f0 515f 228e 5549 9b64 99ff
0x0120: 1d5b 3865 0df0 a836 97d5 171a 100c cb55
0x0130: 3639 0f52 7fd0 7526 ebb6 067d 1752 245f
0x0140: 9dea c068 02ee 8ada 57b1 4f6e a616 0303
0x0150: 0004 0e00 0000
13:25:19.028901 IP 78.165.105.183.dynamic.ttnet.com.tr.60291 > s1.flirtzo.eu.9301: Flags [.], ack 1755, win 64, length 0
0x0000: 4500 0028 5936 4000 7406 b387 4ea5 69b7
0x0010: 5fd3 e1e2 eb83 2455 e596 1ecf d6fb 7893
0x0020: 5010 0040 51b4 0000 0000 0000 0000
13:25:19.032832 IP 78.165.105.183.dynamic.ttnet.com.tr.60291 > s1.flirtzo.eu.9301: Flags [P.], seq 157:283, ack 1755, win 64, length 126
0x0000: 4500 00a6 5938 4000 7406 b307 4ea5 69b7
0x0010: 5fd3 e1e2 eb83 2455 e596 1ecf d6fb 7893
0x0020: 5018 0040 d8e2 0000 1603 0300 4610 0000
0x0030: 4241 0480 e743 b4ca d486 fc66 f233 d481
0x0040: 1466 d2c6 132c b9de 696d 69fc b6bb efee
0x0050: 812d bb41 7bf7 5420 888a 6fc6 868a ca1a
0x0060: cebf 0730 5d93 4e83 c00f ae8e 0bb1 6daa
0x0070: 24d5 3414 0303 0001 0116 0303 0028 0000
0x0080: 0000 0000 0000 f000 d80d c829 2d20 3a03
0x0090: e4ca db9c a9d5 0048 6248 716b 171d 4313
0x00a0: 90fb 13db 1c30
13:25:19.033946 IP s1.flirtzo.eu.9301 > 78.165.105.183.dynamic.ttnet.com.tr.60291: Flags [P.], seq 1755:1981, ack 283, win 123, length 226
0x0000: 4500 010a c34e 4000 4006 7c8d 5fd3 e1e2
0x0010: 4ea5 69b7 2455 eb83 d6fb 7893 e596 1f4d
0x0020: 5018 007b fb0e 0000 1603 0300 aa04 0000
0x0030: a600 0038 4000 a07f 78f8 6c03 ba30 68aa
0x0040: 2525 c10a c48c b360 cc25 1cb2 8d9c ce45
0x0050: 7127 e55f fefc bb06 6c9f c57e b486 5f50
0x0060: 3c28 78fa ffc4 baf8 89bc fede 25ce 5f23
0x0070: 13f4 8ce8 f6dd 6619 f953 44bc d22f 7249
0x0080: 1041 0c7e be77 5334 df33 5060 242f 2938
0x0090: 8c7c 4949 760b f290 4224 96a3 04a6 f2ce
0x00a0: c415 f804 d0e8 fb80 9cb3 4e82 a231 c65f
0x00b0: 2089 2244 3456 8162 6abd 6a3b 9301 f4c4
0x00c0: 2228 2cfa 06e8 b996 418b c2ee fdc9 600f
0x00d0: 4050 09f1 98c8 3914 0303 0001 0116 0303
0x00e0: 0028 3078 fb0a 85ce bd8c 8fb1 e4c3 5e2c
0x00f0: aaf4 4d69 765e d151 66fb 3550 ff7f f688
0x0100: 9ea1 0e08 3558 090d eb61
13:25:19.034498 IP s1.flirtzo.eu.9301 > 78.165.105.183.dynamic.ttnet.com.tr.60291: Flags [R.], seq 1981, ack 283, win 123, length 0
0x0000: 4500 0028 c34f 4000 4006 7d6e 5fd3 e1e2
0x0010: 4ea5 69b7 2455 eb83 d6fb 7975 e596 1f4d
0x0020: 5014 007b 5015 0000
[edit2]
new tcpdump: https://www.cloudshark.org/captures/255d70134527
Config file for stunnel:
foreground = yes
key = /home/flirtzo/ssl.key
cert = /home/flirtzo/ssl.cert
CAfile = /home/flirtzo/ssl.cert
debug = 7
output = /var/log/stunnel_websocket.log
[websocket]
accept = www.flirtzo.eu:9301
connect = 9300
Regards Arjan
Answer based on the last pcap, for details see discussion at the question:
The client simply closes the connection after a successful handshake without sending any data. Since I don't see a server name extension in the ClientHello I assume you access the server as IP and not hostname, in which case the client will probably not accept the certificate (because name does not match). Although I would expect the browser to log such things to console.
So it looks like hostname validation was the real issue and changing from wss://ip to wss://hostname solved the problem.