]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip: Use video and text crypto attributes to append RTP profiles to SDP
authorJonathan Rose <jrose@digium.com>
Fri, 15 Feb 2013 17:12:20 +0000 (17:12 +0000)
committerJonathan Rose <jrose@digium.com>
Fri, 15 Feb 2013 17:12:20 +0000 (17:12 +0000)
Some bad copy/pasting resulted in using the audio crypto attribute for both
text and video RTP. Also the audio crypto isn't set until after these, so it
was really just bad all around.

(closes ASTERISK-20905)
Reported by: Kristopher Lalletti
patches:
rtp_crypto_video_text.diff uploaded by Jonathan Rose (license 6182)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381553 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 917850291f25136234d478414f28fa969a2bfba2..8e43ef69e9cf5fba305ccf1f6180a4939c5939f7 100644 (file)
@@ -13097,7 +13097,7 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int
                if (needvideo) {
                        get_crypto_attrib(p, p->vsrtp, &v_a_crypto);
                        ast_str_append(&m_video, 0, "m=video %d %s", ast_sockaddr_port(&vdest),
-                                      get_sdp_rtp_profile(p, a_crypto ? 1 : 0, p->vrtp));
+                                      get_sdp_rtp_profile(p, v_a_crypto ? 1 : 0, p->vrtp));
 
                        /* Build max bitrate string */
                        if (p->maxcallbitrate)
@@ -13122,7 +13122,7 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int
                                ast_verbose("Lets set up the text sdp\n");
                        get_crypto_attrib(p, p->tsrtp, &t_a_crypto);
                        ast_str_append(&m_text, 0, "m=text %d %s", ast_sockaddr_port(&tdest),
-                                      get_sdp_rtp_profile(p, a_crypto ? 1 : 0, p->trtp));
+                                      get_sdp_rtp_profile(p, t_a_crypto ? 1 : 0, p->trtp));
                        if (debug) {  /* XXX should I use tdest below ? */
                                ast_verbose("Text is at %s\n", ast_sockaddr_stringify(&taddr));
                        }