EricssonResearch / bowser

A WebRTC browser for iOS developed in the open
BSD 2-Clause "Simplified" License
208 stars 65 forks source link

SSL support issue for IOS? #77

Open winer632 opened 8 years ago

winer632 commented 8 years ago

Dear Stefan:

I deployed sipml5 on a nginx webserver. Then I visit https://nginx webserver url/sipml5/call.htm# on smart phone's browser and tried to make call. The result is odd. When use android phone with chrome, everything is OK. When use iphone with safari/chrome, I can not even login. Once I press "Login" button, it fails.

It seems not a webrtc supporting issue. I also tested bowser (https://github.com/EricssonResearch/bowser) which claims it has support for audio, video and data on IOS, but it failed to login either.

I visited https://nginx webserver url/sipml5/call.htm with bowser and press "Login" button, the browser suggest "Failed to connect to the server" just the same as safari/chrome, error log from webrtc2sip server is pasted below.

It seems like SSL support issue for IOS? I used signed certs from startssl (https://www.startssl.com/) and everything works fine on android chrome and windows 10 chrome.

Could you please help me to solve this problem ?

Any suggestion would be appreciated !

[root@iZ23a928efdZ sbin]# ./webrtc2sip --config=/opt/webrtc2sip/sbin/config.xml


Copyright (C) 2012-2015 Doubango Telecom http://www.doubango.org PRODUCT: webrtc2sip HOME PAGE: http://webrtc2sip.org LICENCE: GPLv3 or proprietary VERSION: 2.7.0 'quit' to quit the application.


SSL is enabled :) DTLS supported: yes DTLS-SRTP supported: yes [DOUBANGO INFO]: transport = udp://:10060 [DOUBANGO INFO]: transport = ws://:10060 [DOUBANGO INFO]: transport = wss://:10062 [DOUBANGO INFO]: transport = tcp://:10063 [DOUBANGO INFO]: transport = tls://:10064 [DOUBANGO INFO]: enable-rtp-symetric = yes [DOUBANGO INFO]: enable-100rel = no [DOUBANGO INFO]: enable-media-coder = yes [DOUBANGO INFO]: enable-videojb = yes [DOUBANGO INFO]: video-size-pref = vga [DOUBANGO INFO]: rtp-buffsize = 65535 [DOUBANGO INFO]: avpf-tail-length = [100-400] [DOUBANGO INFO]: srtp-mode = optional [DOUBANGO INFO]: srtp-type = sdes;dtls [DOUBANGO INFO]: dtmf-type = rfc4733 *[DOUBANGO INFO]: codecs = opus;pcma;pcmu;g729;gsm;vp8;h264-bp;h264-mp;h263;h263+

_[DOUBANGO INFO]: UnRegister codec: PCMA, G.711a codec (native) [DOUBANGO INFO]: UnRegister codec: PCMU, G.711u codec (native) [DOUBANGO INFO]: UnRegister codec: GSM, GSM Full Rate (libgsm) [DOUBANGO INFO]: UnRegister codec: VP8, VP8 codec (libvpx) [DOUBANGO INFO]: 'h264-bp' codec enabled but not supported [DOUBANGO INFO]: 'h264-mp' codec enabled but not supported [DOUBANGO INFO]: UnRegister codec: H263, H263-1996 codec (FFmpeg) [DOUBANGO INFO]: UnRegister codec: H263-1998, H263-1998 codec (FFmpeg) [DOUBANGO INFO]: codec-opus-maxrates = 48000;48000 [DOUBANGO INFO]: enable-icestun = no [DOUBANGO INFO]: max-fds = -1 [DOUBANGO INFO]: ssl-certificates = /etc/ssl/private/xphone_online.key; /etc/ssl/private/xphone.online.pem; ; no [DOUBANGO INFO]: transport = c2c://:10070 [DOUBANGO INFO]: transport = c2cs://:10072 [DOUBANGO INFO]: database = sqlite;_ [DOUBANGO INFO]: sqlite3_threadsafe = 1 [DOUBANGO INFO]: Database opened = TRUE [DOUBANGO INFO]: tnet_transport_prepare() [DOUBANGO INFO]: pipeR fd=8, pipeW=9 [DOUBANGO INFO]: Socket added[TCP/IPv4 transport]: fd=8, tail.count=1 [DOUBANGO INFO]: master fd=3 [DOUBANGO INFO]: Socket added[TCP/IPv4 transport]: fd=3, tail.count=2 [DOUBANGO INFO]: tnet_transport_prepare() [DOUBANGO INFO]: pipeR fd=10, pipeW=11 [DOUBANGO INFO]: Socket added[TLS/IPv4 transport]: fd=10, tail.count=1 [DOUBANGO INFO]: master fd=4 [DOUBANGO INFO]: Socket added[TLS/IPv4 transport]: fd=4, tail.count=2 [DOUBANGO INFO]: Stack running in SERVER mode [DOUBANGO INFO]: tsk_timer_manager_start [DOUBANGO INFO]: Best source at 0: 121.40.147.38 [DOUBANGO INFO]: Best source at 2: 121.40.147.38 [DOUBANGO INFO]: Best source at 3: 121.40.147.38 [DOUBANGO INFO]: Best source at 4: 121.40.147.38 [DOUBANGO INFO]: Best source at 5: 121.40.147.38 [DOUBANGO INFO]: Timer manager run()::enter [DOUBANGO INFO]: SIP STACK::run -- START [DOUBANGO INFO]: tnet_transport_prepare() [DOUBANGO INFO]: pipeR fd=17, pipeW=18 [DOUBANGO INFO]: Socket added[SIP transport]: fd=17, tail.count=1 [DOUBANGO INFO]: master fd=12 [DOUBANGO INFO]: Socket added[SIP transport]: fd=12, tail.count=2 [DOUBANGO INFO]: tnet_transport_prepare() [DOUBANGO INFO]: pipeR fd=19, pipeW=20 [DOUBANGO INFO]: Socket added[SIP transport]: fd=19, tail.count=1 [DOUBANGO INFO]: master fd=13 [DOUBANGO INFO]: Socket added[SIP transport]: fd=13, tail.count=2 [DOUBANGO INFO]: tnet_transport_prepare() [DOUBANGO INFO]: pipeR fd=21, pipeW=22 [DOUBANGO INFO]: Socket added[SIP transport]: fd=21, tail.count=1 [DOUBANGO INFO]: master fd=14 [DOUBANGO INFO]: Socket added[SIP transport]: fd=14, tail.count=2 [DOUBANGO INFO]: tnet_transport_prepare() [DOUBANGO INFO]: pipeR fd=23, pipeW=24 [DOUBANGO INFO]: Socket added[SIP transport]: fd=23, tail.count=1 [DOUBANGO INFO]: master fd=15 [DOUBANGO INFO]: Socket added[SIP transport]: fd=15, tail.count=2 [DOUBANGO INFO]: tnet_transport_prepare() [DOUBANGO INFO]: pipeR fd=25, pipeW=26 [DOUBANGO INFO]: Socket added[SIP transport]: fd=25, tail.count=1 [DOUBANGO INFO]: master fd=16 [DOUBANGO INFO]: Socket added[SIP transport]: fd=16, tail.count=2 [DOUBANGO INFO]: SIP STACK -- START [DOUBANGO INFO]: Transport::run(TLS/IPv4 transport) - enter [DOUBANGO INFO]: Transport::run(TCP/IPv4 transport) - enter [DOUBANGO INFO]: TIMER MANAGER -- START [DOUBANGO INFO]: Transport::run(SIP transport) - enter [DOUBANGO INFO]: Starting [TLS/IPv4 transport] server with IP {0.0.0.0} on port {10072} using fd {4} with type {17}... [DOUBANGO INFO]: Starting [TCP/IPv4 transport] server with IP {0.0.0.0} on port {10070} using fd {3} with type {9}... [DOUBANGO INFO]: Transport::run(SIP transport) - enter [DOUBANGO INFO]: Transport::run(SIP transport) - enter [DOUBANGO INFO]: Transport::run(SIP transport) - enter [DOUBANGO INFO]: Transport::run(SIP transport) - enter [DOUBANGO INFO]: Starting [SIP transport] server with IP {121.40.147.38} on port {10062} using fd {16} with type {128}... [DOUBANGO INFO]: Starting [SIP transport] server with IP {121.40.147.38} on port {10063} using fd {13} with type {8}... [DOUBANGO INFO]: Starting [SIP transport] server with IP {121.40.147.38} on port {10060} using fd {15} with type {64}... [DOUBANGO INFO]: Starting [SIP transport] server with IP {121.40.147.38} on port {10064} using fd {14} with type {16}... *[DOUBANGO INFO]: Starting [SIP transport] server with IP {121.40.147.38} on port {10060} using fd {12} with type {2}...

_[DOUBANGO INFO]: ioctlt(16), len=0 returned zero or failed [DOUBANGO INFO]: NETWORK EVENT FOR SERVER [SIP transport] -- FD_ACCEPT(fd=27) [DOUBANGO INFO]: Socket added[SIP transport]: fd=27, tail.count=3 [DOUBANGO INFO]: WebSocket Peer accepted/connected with fd = 27 [DOUBANGO INFO]: #1 peers in the 'SIP transport' transport __[DOUBANGO ERROR]: function: "tnet_tls_socket_accept()" file: "src/tls/tnet_tls.c" line: "168" MSG: SSL_accept() failed with error code [5, error:00000000:lib(0):func(0):reason(0)] [DOUBANGO INFO]: Removing socket 27 [DOUBANGO INFO]: Socket to remove: fd=27, index=2, tail.count=3 [DOUBANGO INFO]: CloseSocket(27) __[DOUBANGO ERROR]: function: "tnet_transport_mainthread()" file: "src/tnet_transport_poll.c" line: "726" MSG: SSL_accept() failed __[DOUBANGO ERROR]: function: "tnet_transport_mainthread()" file: "src/tnet_transportpoll.c" line: "726" MSG: (SYSTEM)NETWORK ERROR ==>Success [DOUBANGO INFO]: PipeR event = 1 [DOUBANGO INFO]: WebSocket Peer closed with fd = 27 [DOUBANGO INFO]: #0 peers in the 'SIP transport' transport [DOUBANGO INFO]: ** Stream Peer destroyed ** [DOUBANGO INFO]: WebSocket Peer closed with fd = 27

winer632 commented 8 years ago

Some additional information. The networking diagram is sipml5 client----webrtc2sip server--------IMS---------mobile phone. Sipml5 webpage is visited via web browser on PC/android/IOS.