[Home]

Summary:ASTERISK-29185: chan_pjsip: Endpoint: allow = all is broken.
Reporter:Alexander Traud (traud)Labels:patch
Date Opened:2020-11-30 03:12:45.000-0600Date Closed:2022-09-10 10:59:50
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/CodecInterface Core/RTP
Versions:16.15.0 18.1.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) allow-all.patch
Description:{{pjmedia_sdp_rtpmap_to_attr}} asserts when the clock rate of a media format is not set. If asserts are not active, you configured Asterisk without {{--enable-developer-mode}}, the SDP of egress calls is simply empty.

* testlaw
The clock rate of testlaw is never set.
* Codec 2
The clock rate of Codec 2 is set only if the codec_codec2.so module is loaded. That module is loaded only when the development package of Codec 2 existed at built-time.
* SiLK
The clock rate of SiLK is set only if the codec_silk.so module is loaded. That module has to be explicitly selected via {{make menuselect}} or downloaded from Digium.

The latter two media formats do not support pass-through without their shared library. This was simply a choice of the Asterisk Team because the RTP payload IDs get depleted. Therefore, those two media formats register themselves not in the general {{ast_rtp_engine_init(.)}} but in their {{load_module()}} via {{ast_rtp_engine_load_format}}.

Consequently, the bug is actually bigger: chan_pjsip loads cached formats instead of registered formats. Therefore, the attached patch is more like a hack because it checks whether a cached format is also registered. Theoretically (but not seen in the wild yet), there could be registered formats that are not cached.

*Workaround*
{code}type = endpoint
allow = all
disallow = testlaw,codec2,silk8,silk12,silk16,silk24{code}
Comments:By: Asterisk Team (asteriskteam) 2020-11-30 03:12:48.535-0600

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: Alexander Traud (traud) 2020-11-30 03:21:57.561-0600

Somebody else has to bring that up into the review process because I do not support chan_pjsip and I do not know if that is an architectural change; it adds a (new?) link between main/format_cap and rtp_engine.

By: Kevin Harwell (kharwell) 2020-11-30 17:12:41.937-0600

For easy replication include {{testlaw}} in an endpoint's allow line and then issue an channel originate to that endpoint.

By: Kevin Harwell (kharwell) 2020-12-03 13:16:13.278-0600

But if testing with current master, or what will be Asterisk 19+, {{testlaw}} will possibly have been removed:

https://gerrit.asterisk.org/c/asterisk/+/15206

By: Friendly Automation (friendly-automation) 2022-09-10 10:59:53.036-0500

Change 19091 merged by Friendly Automation:
res_pjsip_sdp_rtp: Skip formats without SDP details.

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

By: Friendly Automation (friendly-automation) 2022-09-10 11:00:04.488-0500

Change 18991 merged by Friendly Automation:
res_pjsip_sdp_rtp: Skip formats without SDP details.

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

By: Friendly Automation (friendly-automation) 2022-09-10 11:00:18.783-0500

Change 19089 merged by Friendly Automation:
res_pjsip_sdp_rtp: Skip formats without SDP details.

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

By: Friendly Automation (friendly-automation) 2022-09-10 11:00:30.494-0500

Change 19088 merged by Friendly Automation:
res_pjsip_sdp_rtp: Skip formats without SDP details.

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

By: Friendly Automation (friendly-automation) 2022-09-10 11:00:45.380-0500

Change 19090 merged by Friendly Automation:
res_pjsip_sdp_rtp: Skip formats without SDP details.

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