[asterisk-dev] [Code Review] 3365: res_pjsip_session: decline SDP offers with no audio streams

Matt Jordan reviewboard at asterisk.org
Sun Mar 16 15:36:15 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3365/
-----------------------------------------------------------

Review request for Asterisk Developers and Joshua Colp.


Repository: Asterisk


Description
-------

In a perfect world, an Asterisk channel would care very little (if at all) about the media streams that happened to be related to it. It would merrily exist as a path of communication between some endpoint and Asterisk, and the data (which may or may not be media at all!) that flowed (like a stream!) between the endpoint and Asterisk would be a completely separate concept. Alas, such is not the world we exist in. Asterisk *needs* audio. As frames. At a nice periodic rate, please. Strange things happen when it doesn't get it.

Today, the res_pjsip stack will do some funky things if you give it an offer with no media. There will be a slew of warnings, some compatibility errors, strange transcoding attempts, and finally you may get an Answer to the Offer that contains an audio codec in a video media stream (probably ulaw) - just because Asterisk *really* wants audio. (Can you please send some with this video?)

This is clearly not right. This patch makes it so that res_pjsip_session looks to see if we have an audio stream (in validate_sdp) and, if not, it declines the offer.

I offer this patch in the hopes that it will some day be removed...


Diffs
-----

  /branches/12/res/res_pjsip_session.c 410554 
  /branches/12/res/res_pjsip_sdp_rtp.c 410554 
  /branches/12/include/asterisk/res_pjsip_session.h 410554 

Diff: https://reviewboard.asterisk.org/r/3365/diff/


Testing
-------

Tests are ongoing. A test has been written that offers only a single video stream. Prior to this patch; hilarity. With this patch, Asterisk rejects the offer with a 488.


Thanks,

Matt Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140316/fa34bf6b/attachment.html>


More information about the asterisk-dev mailing list