[asterisk-commits] kmoore: trunk r360994 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 2 17:27:17 CDT 2012
Author: kmoore
Date: Mon Apr 2 17:27:13 2012
New Revision: 360994
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=360994
Log:
Stop sending out RTCP if RTP is inactive
This change prevents Asterisk from sending RTCP receiver reports during a
remote bridge since it is no longer receiving media and should not be
reporting anything.
(related to ASTERISK-19366)
........
Merged revisions 360987 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 360993 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=360994&r1=360993&r2=360994
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Apr 2 17:27:13 2012
@@ -30402,16 +30402,48 @@
if (instance) {
changed |= ast_rtp_instance_get_and_cmp_remote_address(instance, &p->redirip);
+
+ if (p->rtp) {
+ /* Prevent audio RTCP reads */
+ ast_channel_set_fd(chan, 1, -1);
+ /* Silence RTCP while audio RTP is inactive */
+ ast_rtp_instance_set_prop(p->rtp, AST_RTP_PROPERTY_RTCP, 0);
+ }
} else if (!ast_sockaddr_isnull(&p->redirip)) {
memset(&p->redirip, 0, sizeof(p->redirip));
changed = 1;
- }
+
+ if (p->rtp) {
+ /* Enable RTCP since it will be inactive if we're coming back
+ * from a reinvite */
+ ast_rtp_instance_set_prop(p->rtp, AST_RTP_PROPERTY_RTCP, 1);
+ /* Enable audio RTCP reads */
+ ast_channel_set_fd(chan, 1, ast_rtp_instance_fd(p->rtp, 1));
+ }
+ }
+
if (vinstance) {
changed |= ast_rtp_instance_get_and_cmp_remote_address(vinstance, &p->vredirip);
+
+ if (p->vrtp) {
+ /* Prevent video RTCP reads */
+ ast_channel_set_fd(chan, 3, -1);
+ /* Silence RTCP while video RTP is inactive */
+ ast_rtp_instance_set_prop(p->vrtp, AST_RTP_PROPERTY_RTCP, 0);
+ }
} else if (!ast_sockaddr_isnull(&p->vredirip)) {
memset(&p->vredirip, 0, sizeof(p->vredirip));
changed = 1;
- }
+
+ if (p->vrtp) {
+ /* Enable RTCP since it will be inactive if we're coming back
+ * from a reinvite */
+ ast_rtp_instance_set_prop(p->vrtp, AST_RTP_PROPERTY_RTCP, 1);
+ /* Enable video RTCP reads */
+ ast_channel_set_fd(chan, 3, ast_rtp_instance_fd(p->vrtp, 1));
+ }
+ }
+
if (tinstance) {
changed |= ast_rtp_instance_get_and_cmp_remote_address(tinstance, &p->tredirip);
} else if (!ast_sockaddr_isnull(&p->tredirip)) {
More information about the asterisk-commits
mailing list