[Home]

Summary:ASTERISK-30015: pjsip / WebRTC: Chrome creating large number of SDP attributes
Reporter:Josh Hogan (joshVxt)Labels:webrtc
Date Opened:2022-04-10 20:35:36Date Closed:2022-04-25 15:38:45
Priority:MajorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:18.8.0 18.11.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:Using the most recent chrome update (100.0.4896.75-1) when initiating a *video* call generates a longer SDP section for INVITE packets.
This seems to exceed the upper limit of PJMEDIA_MAX_SDP_ATTR.
Asterisk responds with a 400 response to the INVITE, and the call fails to start.

Here are the asterisk error logs
sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
**repeats above error several times**
sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
sip_inv.c .Error parsing/validating SDP body: Missing SDP rtpmap for dynamic payload type (PJMEDIA_SDP_EMISSINGRTPMAP)`

We noticed that on an older version of chrome (99.0.4844.84-1) the INVITE packet was not as long so the issue did not occur.
When chrome was updated to the newest version (100.0.4896.75-1) we started getting these errors, and 400 responses from Asterisk.

Here is a diff of the two INVITES https://www.diffchecker.com/GXFq5nYm

Although the chrome update isn't necessarily the bad guy here, it was the catalyst that triggered this issue.

I can confirm that the fix of increasing the PJMEDIA_MAX_SDP_ATTR did fix the issue and the errors no longer occurred.

Temporary fix
#define PJMEDIA_MAX_SDP_ATTR   (PJMEDIA_MAX_SDP_FMT*3 + 4)


Here is a link to the discussion
https://community.asterisk.org/t/invite-from-some-chrome-webrtc-clients-rejected-with-pjmedia-sdp-emissingrtpmap/92199/2
Comments:By: Asterisk Team (asteriskteam) 2022-04-10 20:35:36.902-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Edvin Vidmar (edvinv) 2022-04-15 02:19:12.851-0500

I can also confirm that suggested fix works. Applied one week ago and no more errors.


By: Friendly Automation (friendly-automation) 2022-04-25 15:38:46.457-0500

Change 18384 merged by Friendly Automation:
pjsip: Increase maximum number of format attributes.

[https://gerrit.asterisk.org/c/asterisk/+/18384|https://gerrit.asterisk.org/c/asterisk/+/18384]

By: Friendly Automation (friendly-automation) 2022-04-25 15:44:31.338-0500

Change 18383 merged by Friendly Automation:
pjsip: Increase maximum number of format attributes.

[https://gerrit.asterisk.org/c/asterisk/+/18383|https://gerrit.asterisk.org/c/asterisk/+/18383]

By: Friendly Automation (friendly-automation) 2022-04-25 18:31:31.909-0500

Change 18370 merged by Kevin Harwell:
pjsip: Increase maximum number of format attributes.

[https://gerrit.asterisk.org/c/asterisk/+/18370|https://gerrit.asterisk.org/c/asterisk/+/18370]

By: Friendly Automation (friendly-automation) 2022-04-25 18:31:48.026-0500

Change 18382 merged by Kevin Harwell:
pjsip: Increase maximum number of format attributes.

[https://gerrit.asterisk.org/c/asterisk/+/18382|https://gerrit.asterisk.org/c/asterisk/+/18382]