DoubangoTelecom / sipml5

The world's first HTML5 SIP client (WebRTC)
BSD 3-Clause "New" or "Revised" License
939 stars 456 forks source link

Sometimes SDP is incomplete #292

Open zerodiatcne opened 7 years ago

zerodiatcne commented 7 years ago

When you dial the phone, SDP is incomplete, but this is not always the case. But often this happens. Under what circumstances was it caused? The SDP is not completed as follows:

96bef83e-c27b-454c-b3f0-b9aeffbe8340 2017-05-28 16:57:06.205382 [DEBUG] sofia.c:6624 Remote SDP: 96bef83e-c27b-454c-b3f0-b9aeffbe8340 v=0 96bef83e-c27b-454c-b3f0-b9aeffbe8340 o=- 4132343254162592300 2 IN IP4 127.0.0.1 96bef83e-c27b-454c-b3f0-b9aeffbe8340 s=Doubango Telecom - chrome 96bef83e-c27b-454c-b3f0-b9aeffbe8340 t=0 0 96bef83e-c27b-454c-b3f0-b9aeffbe8340 a=group:BUNDLE audio 96bef83e-c27b-454c-b3f0-b9aeffbe8340 a=msid-semantic: WMS jscP8RcM9dqz1b37FSmauoX4J8UmC4zQtNJV 96bef83e-c27b-454c-b3f0-b9aeffbe8340 m=audio 0 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126 96bef83e-c27b-454c-b3f0-b9aeffbe8340 c=IN IP4 192.168.1.73

zerodiatcne commented 7 years ago

Browser version is "google chorme 41.0.2272.118",

zerodiatcne commented 7 years ago

SIPml.init(function (e) { g_sipStack = new SIPml.Stack({ realm: realm, impi: uname, impu: 'sip:' + uname + '@' + realm, password: pwd, display_name: uname, websocket_proxy_url: wsproxy, enable_rtcweb_breaker: false, ice_servers: ("[]"), dtls_setup: "actpass", events_listener: { events: '*', listener: function (e) { if (e.type == "started") { var registerSession = g_sipStack.newSession('register', { events_listener: {

zerodiatcne commented 7 years ago

There is an error in the log above, and the following is the correct log

State machine: c0000_Started_2_Outgoing_X_oINVITE SIPml-api.js:1258 ICE servers:[] SIPml-api.js:1258 onGetUserMediaSuccess SIPml-api.js:1258 createOffer SIPml-api.js:1258 onNegotiationNeeded null:1 GET http://192.168.1.9/null 404 (Not Found) SIPml-api.js:1258 onCreateSdpSuccess SIPml-api.js:1258 onSignalingstateChange:have-local-offer SIPml-api.js:1258 onSetLocalDescriptionSuccess 2SIPml-api.js:1258 onIceCandidate = gathering SIPml-api.js:1258 onIceCandidate = complete SIPml-api.js:1258 ICE GATHERING COMPLETED! SIPml-api.js:1258 onIceGatheringCompleted SIPml-api.js:1258 SEND: INVITE sip:17188570505@192.168.1.9 SIP/2.0 Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKtEQ9X6wciah5W4HazEHko22USgB5uu68;rport From: "1001"sip:1001@192.168.1.9;tag=eQq78cHQwH9HNSWFgm0B To: sip:17188570505@192.168.1.9 Contact: "1001"sip:1001@df7jal23ls0d.invalid;rtcweb-breaker=no;click2call=no;transport=ws Call-ID: 6f2bc1fd-cc8e-cf6e-a335-f1b82f798235 CSeq: 40655 INVITE Content-Type: application/sdp Content-Length: 1589 Max-Forwards: 70

v=0 o=- 2450861331222436000 2 IN IP4 127.0.0.1 s=Doubango Telecom - chrome t=0 0 a=group:BUNDLE audio a=msid-semantic: WMS k2pEeYHFND1gRajljArqoxRRvmyauyDpAQV1 m=audio 0 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126 c=IN IP4 192.168.1.118 a=rtcp:0 IN IP4 192.168.1.118 a=candidate:99792375 1 tcp 1518280447 192.168.1.118 0 typ host tcptype active generation 0 a=candidate:99792375 2 tcp 1518280447 192.168.1.118 0 typ host tcptype active generation 0 a=candidate:1265715463 1 udp 2122260223 192.168.1.118 1293 typ host generation 0 a=candidate:1265715463 2 udp 2122260223 192.168.1.118 1293 typ host generation 0 a=ice-ufrag:ZF985fUPVaUzngEj a=ice-pwd:BHJuPRXfQrGMteagDgIzW84a a=ice-options:google-ice a=fingerprint:sha-256 01:B5:95:DA:A4:27:68:1E:B7:7A:82:56:D5:E1:16:BC:03:F0:B9:DF:63:46:3E:BE:A9:31:08:44:10:2D:49:DE 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=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=maxptime:60 a=ssrc:3581216195 cname:VMv1ePKc6/Ionu0R a=ssrc:3581216195 msid:k2pEeYHFND1gRajljArqoxRRvmyauyDpAQV1 bac1aa3e-2ea2-4584-bbbf-46103b967e2c a=ssrc:3581216195 mslabel:k2pEeYHFND1gRajljArqoxRRvmyauyDpAQV1 a=ssrc:3581216195 label:bac1aa3e-2ea2-4584-bbbf-46103b967e2c

SIPml-api.js:1258 onIceCandidate = complete SIPml-api.js:1258 ICE GATHERING COMPLETED! SIPml-api.js:1258 onIceGatheringCompleted SIPml-api.js:1263 onIceGatheringCompleted but no local sdp request is pending SIPml-api.js:1258 onIceCandidate = complete SIPml-api.js:1258 ICE GATHERING COMPLETED! SIPml-api.js:1258 onIceGatheringCompleted SIPml-api.js:1263 onIceGatheringCompleted but no local sdp request is pending SIPml-api.js:1258 __tsip_transport_ws_onmessage SIPml-api.js:1258 recv=SIP/2.0 100 Trying Via: SIP/2.0/WS df7jal23ls0d.invalid;rport=1088;received=192.168.1.118;branch=z9hG4bKtEQ9X6wciah5W4HazEHko22USgB5uu68 From: "1001"sip:1001@192.168.1.9;tag=eQq78cHQwH9HNSWFgm0B To: sip:17188570505@192.168.1.9 Call-ID: 6f2bc1fd-cc8e-cf6e-a335-f1b82f798235 CSeq: 40655 INVITE Content-Length: 0 User-Agent: FreeSWITCH-mod_sofia/1.5.15b~32bit

SIPml-api.js:1258 State machine: x0000_Any_2_Any_X_i1xx SIPml-api.js:1258 __tsip_transport_ws_onmessage SIPml-api.js:1258 recv=SIP/2.0 488 Not Acceptable Here Via: SIP/2.0/WS df7jal23ls0d.invalid;rport=1088;received=192.168.1.118;branch=z9hG4bKtEQ9X6wciah5W4HazEHko22USgB5uu68 From: "1001"sip:1001@192.168.1.9;tag=eQq78cHQwH9HNSWFgm0B To: sip:17188570505@192.168.1.9;tag=e5X8p69D6XQ1D Call-ID: 6f2bc1fd-cc8e-cf6e-a335-f1b82f798235 CSeq: 40655 INVITE Content-Length: 0 Max-Forwards: 70 User-Agent: FreeSWITCH-mod_sofia/1.5.15b~32bit Accept: application/sdp Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY,PUBLISH,SUBSCRIBE Supported: timer,path,replaces Allow-Events: talk,hold,conference,presence,as-feature-event,dialog,line-seize,call-info,sla,include-session-description,presence.winfo,message-summary,refer Reason: text="INCOMPATIBLE_DESTINATION";cause=88;text="INCOMPATIBLE_DESTINATION" Remote-Party-ID: screen=no;party=calling;privacy=off;screen=no

SIPml-api.js:1258 SEND: ACK sip:17188570505@192.168.1.9 SIP/2.0 Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKtEQ9X6wciah5W4HazEHko22USgB5uu68;rport From: "1001"sip:1001@192.168.1.9;tag=eQq78cHQwH9HNSWFgm0B To: sip:17188570505@192.168.1.9;tag=e5X8p69D6XQ1D Call-ID: 6f2bc1fd-cc8e-cf6e-a335-f1b82f798235 CSeq: 40655 ACK Content-Length: 0 Max-Forwards: 70

SIPml-api.js:1258 State machine: c0000_Outgoing_2_Terminated_X_i300_to_i699INVITE SIPml-api.js:1258 === INVITE Dialog terminated === SIPml-api.js:1258 PeerConnection::stop()

zerodiatcne commented 7 years ago

I guess the ICE Servers didn't fill in the relationship. I was using it in the LAN, so I don't have to fill ICE Servers?