From: Terry Wilson Date: Mon, 9 May 2011 20:23:15 +0000 (+0000) Subject: Merged revisions 318331 via svnmerge from X-Git-Tag: 1.8.5-rc1~11^2~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f96cf8821239051b90d47649c1af9f2f914bb887;p=thirdparty%2Fasterisk.git Merged revisions 318331 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r318331 | twilson | 2011-05-09 15:04:41 -0500 (Mon, 09 May 2011) | 12 lines Don't offer video to directmedia callee unless caller offered it as well Make sure that when directmedia is enabled, that video is not offered to the callee even if it supports it. p->vrtp will not exist since the caller didn't offer video. (closes issue #19195) Reported by: one47 Patches: sip_cant_add_video_rtp uploaded by one47 (license 23) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318337 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d092e3bf35..aa0720b58b 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10829,11 +10829,14 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int doing_directmedia = (!ast_sockaddr_isnull(&p->redirip) && p->redircodecs) ? TRUE : FALSE; /* Check if we need video in this call */ if ((p->jointcapability & AST_FORMAT_VIDEO_MASK) && !p->novideo) { - if (p->vrtp) { + if (doing_directmedia && !(p->jointcapability & AST_FORMAT_VIDEO_MASK & p->redircodecs)) { + ast_debug(2, "This call needs video offers, but caller probably did not offer it!\n"); + } else if (p->vrtp) { needvideo = TRUE; ast_debug(2, "This call needs video offers!\n"); - } else + } else { ast_debug(2, "This call needs video offers, but there's no video support enabled!\n"); + } } /* Check if we need text in this call */ if ((p->jointcapability & AST_FORMAT_TEXT_MASK) && !p->notext) {