Closed Bug 1221837 Opened 9 years ago Closed 9 years ago

sdp without rtpmap for static codec IDs => "Failed to negotiate codec details for all codecs" error.

Categories

(Core :: WebRTC: Signaling, defect, P2)

42 Branch
x86_64
All
defect

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox42 --- affected
firefox43 --- affected
firefox44 --- affected
firefox45 --- fixed

People

(Reporter: gled, Assigned: drno)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151029151421

Steps to reproduce:

Install Firefox 42
Browse to a demo service using sip.js
Call a webrtc enabled echo test ( freeswitch for example, with the verbose_sdp param to false, ie default config ).


Actual results:

Firefox rejects the calls and we can see in the logs:

17:33:49.803 Wed Nov 04 2015 17:33:49 GMT-0800 (PST) | sip.transport | received WebSocket text message:

SIP/2.0 200 OK
(...)

v=0
o=#22565356 2232 3510 IN IP4 54.80.250.244
s=Talk
c=IN IP4 54.80.250.244
b=AS:380
t=0 0
m=audio 51618 RTP/SAVPF 0
a=sendrecv
a=rtcp:51618
a=rtcp-mux
a=setup:active
a=fingerprint:sha-1 5D:57:49:A1:29:75:8C:C7:CA:83:4D:34:4B:D9:5E:C8:7A:5F:16:C6
a=ice-ufrag:PhiviwWI
a=ice-pwd:9zIdUvg1fYKqmFl6fY9DGDJtV0
a=candidate:Ji5N9SqYh58Awk9I 1 UDP 2130706431 54.80.250.244 51618 typ host
m=video 51642 RTP/SAVPF 120
a=rtpmap:120 VP8/90000
a=sendrecv
a=rtcp:51642
a=rtcp-mux
a=setup:active
a=fingerprint:sha-1 5D:57:49:A1:29:75:8C:C7:CA:83:4D:34:4B:D9:5E:C8:7A:5F:16:C6
a=ice-ufrag:wURDrzRk
a=ice-pwd:57li34JqH2wU0FxEjf7cf5lJXd
a=candidate:Ji5N9SqYh58Awk9I 1 UDP 2130706431 54.80.250.244 51642 typ host

17:33:49.825 DOMException [InvalidSessionDescriptionError: "Failed to negotiate codec details for all codecs"

That ends with a SIP 488.

This is due to a missing a=rtpmap:0 PCMU/8000 in the sdp, which is a totally valid sdp.


Expected results:

Call should be accepted even if the rtpmap is not present. 0 is a static assigned id, always PCMU.

RFC specifies that rtpmap is only mandatory for dynamic ids.
Component: Untriaged → WebRTC
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → x86_64
Confirmed.

I think this may be a regression from landing the JSEP rewrite - nils?  

We should support the default mappings for codecs we understand (PCMA/PCMU/G722)
Status: UNCONFIRMED → NEW
backlog: --- → webrtc/webaudio+
Rank: 22
Component: WebRTC → WebRTC: Signaling
Ever confirmed: true
Flags: needinfo?(drno)
Priority: -- → P2
Bug 1221837: Accept hard coded codec numbers without rtpmaps. r?bwc
Attachment #8688030 - Flags: review?(docfaraday)
Comment on attachment 8688030 [details]
MozReview Request: Bug 1221837: Accept hard coded codec numbers without rtpmaps. r?bwc

https://reviewboard.mozilla.org/r/25273/#review22759

::: media/webrtc/signaling/src/jsep/JsepCodecDescription.h:59
(Diff revision 1)
> +    if (!entry &&
> +        (fmt.compare("0") || fmt.compare("8") || fmt.compare("9"))) {
> +      return true;
> +    }

This is going to cause PCMU to match PCMA, and vice-versa. You probably need to do something like:

```
std::string name;
// ints for clock/channels

if (entry) {
  name = entry->name;
  // etc
} else if(fmt == "0") {
  name = "PCMU";
  // etc
} else if //etc

if (nsCRT::strcasecmp(nName.c_str(), name) &&
    // etc )
```
Attachment #8688030 - Flags: review?(docfaraday)
Comment on attachment 8688030 [details]
MozReview Request: Bug 1221837: Accept hard coded codec numbers without rtpmaps. r?bwc

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25273/diff/1-2/
Attachment #8688030 - Flags: review?(docfaraday)
See Also: → 1188391
Comment on attachment 8688030 [details]
MozReview Request: Bug 1221837: Accept hard coded codec numbers without rtpmaps. r?bwc

https://reviewboard.mozilla.org/r/25273/#review22771

::: media/webrtc/signaling/src/jsep/JsepCodecDescription.h:65
(Diff revisions 1 - 2)
> +    } else if (fmt.compare("9") && mName == "G722") {
> +      return true;
> +    } else if (fmt.compare("0") && mName == "PCMU") {
> +      return true;
> +    } else if (fmt.compare("8") && mName == "PCMA") {
> +      return true;
> +    }

Just to be complete, we probably want to check the clock rate and channels too.
Attachment #8688030 - Flags: review?(docfaraday) → review+
https://reviewboard.mozilla.org/r/25273/#review22771

> Just to be complete, we probably want to check the clock rate and channels too.

But there is nothing to compare them against here. This covers for the case where we only got a codec number in the m-line, but no matching fmtpmap. So we could only compare rate and channels only against our own expectations, which seems rather silly...
Just my 2 cents, clock rate for PCM(a|u) and G722 will only be 8khz, and mono anyway.

Well, to be correct, G722 is 16khz, but advertised as 8khz because of RFC1890.
(In reply to Nils Ohlmeier [:drno] from comment #7)
> https://reviewboard.mozilla.org/r/25273/#review22771
> 
> > Just to be complete, we probably want to check the clock rate and channels too.
> 
> But there is nothing to compare them against here. This covers for the case
> where we only got a codec number in the m-line, but no matching fmtpmap. So
> we could only compare rate and channels only against our own expectations,
> which seems rather silly...

   Hmm, I suppose since 8khz mono is an inherent property of these codecs, we can do without.
Try run looks sane
Assignee: nobody → drno
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/12b1bc4e7220
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Blocks: 1246011
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: