onsip / onsip-cordova

Other
48 stars 29 forks source link

iOS to Web interoperability? #10

Open nickw opened 9 years ago

nickw commented 9 years ago

We're getting an error when our iOS app calls a user that is using Chrome. As soon as the Chrome user answers the call, the iOS app crashes and this error shows up in Xcode:

*** Assertion failure in -[PhoneRTCDelegate peerConnection:didSetSessionDescriptionWithError:], ../Plugins/com.onsip.cordova/PhoneRTCDelegate.m:118

Ignored line: c=IN IP4 199.7.175.171
Ignored line: a=rtcp:53775 IN IP4 199.7.175.171
Ignored line: a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
Ignored line: a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
Ignored line: a=sendrecv
Ignored line: a=rtcp-mux
Ignored line: a=rtpmap:103 ISAC/16000
Ignored line: a=rtpmap:111 opus/48000/2
Ignored line: a=rtpmap:0 PCMU/8000
Ignored line: a=rtpmap:8 PCMA/8000
Ignored line: a=rtpmap:106 CN/32000
Ignored line: a=rtpmap:105 CN/16000
Ignored line: a=rtpmap:13 CN/8000
Ignored line: a=rtpmap:126 telephone-event/8000
Ignored line: a=maxptime:60
Ignored line: a=ssrc:2767636768 cname:t+qt1XNiWOZV/vVd
Ignored line: a=ssrc:2767636768 msid:ZfQEHzqJ0uVxUvhUSRTb5HqK6k3Gjl7zzoC5 ab15e6f7-c0e6-4781-b2a5-8803f93b6df1
Ignored line: a=ssrc:2767636768 mslabel:ZfQEHzqJ0uVxUvhUSRTb5HqK6k3Gjl7zzoC5
Ignored line: a=ssrc:2767636768 label:ab15e6f7-c0e6-4781-b2a5-8803f93b6df1
Error(webrtcsdp.cc:354): Failed to parse: "". Reason: Failed to parse audio codecs correctly.

2014-12-22 16:21:00.294 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error Domain=RTCSDPError Code=-1 "The operation couldn’t be completed. (RTCSDPError error -1.)" UserInfo=0x146b9510 {error=SessionDescription is NULL.}'

I think the key line is:

Error(webrtcsdp.cc:354): Failed to parse: "". Reason: Failed to parse audio codecs correctly.

It appears that the codecs aren't compatible?

wakamoleguy commented 9 years ago

Do you by chance have the full SDP that is causing the error? It looks like the m= line before that wasn't parsing correctly, causing it to skip over the entire audio portion of the SDP. That would indeed cause a codec mismatch, as it did not read any codec support.

nickw commented 9 years ago

Hi @wakamoleguy, here's a gist of the entire Xcode console output. I think the highlighted line #583 is what you're looking for but not sure: https://gist.github.com/nickw/8e951a863109470844a2#file-onsip_error-L583

I also copied the console on the Chrome side just in case that's helpful: https://gist.github.com/nickw/d09289860468e1b72ee9

wakamoleguy commented 9 years ago

The highlighted line looks to contain the SDP that was sent out, whereas the error is occurring with the incoming SDP from the remote end. Could you try turning on the traceSip option for your UA and see if that sheds any light on what is happening?

nickw commented 9 years ago

@wakamoleguy let me know if this is what you're looking for: https://gist.github.com/nickw/405ef4a7d0ceff23f5d1

nickw commented 9 years ago

Might be related to this? https://code.google.com/p/webrtc/issues/detail?id=3481

wakamoleguy commented 9 years ago

It may be related to that issue, if you are doing things with renegotiation. It shouldn't affect normal call setup, though. Is the SDP in your last gist from the remote party? Is there any chance you can capture it just before the error, using traceSip or wireshark? The one you gisted specifies a c= with 0.0.0.0, where the one causing the error has c=IN IP4 199.7.175.171. This IP address is the OnSIP media relay which gets injected along the call flow. It shouldn't cause any changes to the m= line above, but it is at least one way that the SDP is different.