diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 14:12:18 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 14:12:18 +0000 |
commit | 86cce578b370d97b40dcaaa5bc66a0e32a693376 (patch) | |
tree | 768fe00081d5afcb92798ac2bc0c778f3b762ff0 | |
parent | 501006268f4a1d6a3a88f2a2ad0ce89b71bd1a69 (diff) |
Merged revisions 211347 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r211347 | file | 2009-08-10 11:07:44 -0300 (Mon, 10 Aug 2009) | 5 lines
Fix retrieval of the port used for the video stream when adding SDP to a SIP message.
(closes issue #15121)
Reported by: jsmith
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@211349 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 44bf2fe3b..99168840a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8878,6 +8878,15 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int p->sessionversion++; } + /* Check if we need video in this call */ + if (add_audio && (capability & AST_FORMAT_VIDEO_MASK) && !p->novideo) { + if (p->vrtp) { + needvideo = TRUE; + ast_debug(2, "This call needs video offers!\n"); + } else + ast_debug(2, "This call needs video offers, but there's no video support enabled!\n"); + } + get_our_media_address(p, needvideo, &sin, &vsin, &tsin, &dest, &vdest); snprintf(owner, sizeof(owner), "o=%s %d %d IN IP4 %s\r\n", ast_strlen_zero(global_sdpowner) ? "-" : global_sdpowner, p->sessionid, p->sessionversion, ast_inet_ntoa(dest.sin_addr)); @@ -8895,15 +8904,6 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int if (capability & AST_FORMAT_AUDIO_MASK) needaudio = TRUE; - /* Check if we need video in this call */ - if ((capability & AST_FORMAT_VIDEO_MASK) && !p->novideo) { - if (p->vrtp) { - needvideo = TRUE; - ast_debug(2, "This call needs video offers!\n"); - } else - ast_debug(2, "This call needs video offers, but there's no video support enabled!\n"); - } - if (debug) ast_verbose("Audio is at %s port %d\n", ast_inet_ntoa(p->ourip.sin_addr), ntohs(sin.sin_port)); @@ -8916,7 +8916,7 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int if (p->maxcallbitrate) snprintf(bandwidth, sizeof(bandwidth), "b=CT:%d\r\n", p->maxcallbitrate); if (debug) - ast_verbose("Video is at %s port %d\n", ast_inet_ntoa(p->ourip.sin_addr), ntohs(vsin.sin_port)); + ast_verbose("Video is at %s port %d\n", ast_inet_ntoa(p->ourip.sin_addr), ntohs(vdest.sin_port)); } /* Check if we need text in this call */ |