]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
missed a spot on commit 50727f56c63714e83b9a2c52492b5694b5a32097
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 23 Feb 2012 18:23:18 +0000 (12:23 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 23 Feb 2012 18:23:18 +0000 (12:23 -0600)
src/mod/endpoints/mod_sofia/sofia_glue.c

index bf31f3c5ca6015ee319b93f77b4b45f9ea29b86a..4b31e760e1a64116d5dd898efb257ff9dc40416e 100644 (file)
@@ -565,13 +565,22 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
                
                if (mult && switch_false(mult)) {
                        char *bp = buf;
-                       
+                       int both = 1;
+
                        if ((!zstr(tech_pvt->local_crypto_key) && sofia_test_flag(tech_pvt, TFLAG_SECURE))) {
                                generate_m(tech_pvt, buf, sizeof(buf), port, 0, append_audio, sr, use_cng, cng_type, map, verbose_sdp, 1);
                                bp = (buf + strlen(buf));
+
+                               /* asterisk can't handle AVP and SAVP in sep streams, way to blow off the spec....*/
+                               if (switch_true(switch_channel_get_variable(tech_pvt->channel, "sdp_secure_savp_only"))) {
+                                       both = 0;
+                               }
+
                        }
 
-                       generate_m(tech_pvt, bp, sizeof(buf) - strlen(buf), port, 0, append_audio, sr, use_cng, cng_type, map, verbose_sdp, 0);
+                       if (both) {
+                               generate_m(tech_pvt, bp, sizeof(buf) - strlen(buf), port, 0, append_audio, sr, use_cng, cng_type, map, verbose_sdp, 0);
+                       }
 
                } else {