[asterisk-dev] [Code Review] 3789: media formats: Clear chan_sip's pvt caps if peer's caps are available

Matt Jordan reviewboard at asterisk.org
Tue Jul 15 09:10:27 CDT 2014


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

(Updated July 15, 2014, 9:10 a.m.)


Review request for Asterisk Developers.


Summary (updated)
-----------------

media formats: Clear chan_sip's pvt caps if peer's caps are available


Repository: Asterisk


Description (updated)
-------

When we first create a SIP pvt, we set the capabilities from the global defaults, sip_cfg.caps. This is 'good', in the sense that if an end user (a) doesn't configure much or (b) the peer definition doesn't have capabilities, we use the defaults.

Currently, however, when a peer is found, we simply append the capabililties to the pvt. This has two problems:
(1) The peer may not have any capabilities
(2) If the peer does have capabilities, we simply append them to the dialog's capabilities. This allows a dialog to have capabilities that were not allowed. For example, since alaw is a 'default' capability, if a peer is configured with ulaw only, the overall capabilities of the dialog will be alaw|ulaw, and we would accept an INVITE request with alaw.

This patch clears the dialog capabilities if a peer has capabilities.


Diffs (updated)
-----

  ./team/group/media_formats-reviewed-trunk/channels/chan_sip.c 418631 

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


Testing
-------

All SIPp scenarios in SDP_offer_answer pass with this patch and the crash fix in r3788.


Thanks,

Matt Jordan

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


More information about the asterisk-dev mailing list