]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
sigh
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 25 Sep 2008 17:39:08 +0000 (17:39 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 25 Sep 2008 17:39:08 +0000 (17:39 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9648 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index d89ed30f235d581b1ff4fa03ee2ce34ca3ade0c2..2712a39fbd9fe64d6c9a7d254228a970ae695d62 100644 (file)
@@ -1931,6 +1931,13 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
                if (tech_pvt->te) {
                        switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
                }
+
+               if (sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG) ||
+                       ((val = switch_channel_get_variable(tech_pvt->channel, "supress_cng")) && switch_true(val)) ||
+                       ((val = switch_channel_get_variable(tech_pvt->channel, "suppress_cng")) && switch_true(val))) {
+                       tech_pvt->cng_pt = 0;
+               }
+
                if (tech_pvt->cng_pt && !(tech_pvt->profile->pflags & PFLAG_SUPPRESS_CNG)) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set comfort noise payload to %u\n", tech_pvt->cng_pt);
                        switch_rtp_set_cng_pt(tech_pvt->rtp_session, tech_pvt->cng_pt);