[Home]

Summary:ASTERISK-29237: chan_sip: SDP: m=video is parsed even when disabled.
Reporter:Alexander Traud (traud)Labels:fax patch
Date Opened:2021-01-09 11:12:50.000-0600Date Closed:2021-01-13 07:44:26.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/CodecHandling Channels/chan_sip/Video
Versions:16.15.1 18.1.1 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sidestep_SDP_stream_parsing.patch
Description:When videosupport=no is configured, which is the default, the SIP channel driver chan_sip still parses {{m=video}} streams in SDP. The same happens for textsupport=no and {{m=text}}. This is a waste of processor power.

When videosupport=no, p->vrtp is NULL.
When textsupport=no, p->trtp is NULL.
see dialog_initialize_rtp(.) in channels/chan_sip.c

Furthermore, this always-SDP-parsing complicates the remaining code in process_sdp(.) because for video streams, not only p->vrtp but also vportno and/or vsa must be checked again and again. Same for text streams. Actually, this issue here was found because of two existing issues. Those issues are caused because the states of those three variables are not checked correctly. Those two issues have a higher severity than this issue here.

*Notes*
* The attached patch adds this check for audio streams as well. However, with the current source code, p->rtp is never null. Therefore, this check is just for symmetry reasons.
* The same should be done for image streams based on T.38 FAX (UDPTL). However, code inspection showed that in process_sdp(.), in the part "Setup audio address and port", chan_sip allows no audio but T.38 pass-through without checking p->udptl. It is questionable whether a T.38 session was required before. Nevertheless, because I cannot test this part, the attached patch does not introduce this change for image streams as well.
Comments:By: Asterisk Team (asteriskteam) 2021-01-09 11:12:52.165-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: Friendly Automation (friendly-automation) 2021-01-13 07:44:27.180-0600

Change 15271 merged by Friendly Automation:
chan_sip: SDP: Sidestep stream parsing when its media is disabled.

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

By: Friendly Automation (friendly-automation) 2021-01-13 08:31:29.132-0600

Change 15233 merged by George Joseph:
chan_sip: SDP: Sidestep stream parsing when its media is disabled.

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

By: Friendly Automation (friendly-automation) 2021-01-13 08:31:42.699-0600

Change 15272 merged by George Joseph:
chan_sip: SDP: Sidestep stream parsing when its media is disabled.

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