From db777415214af3b612293dddd5cbc6afb988e7da Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 23 Oct 2008 05:27:32 +0000 Subject: [PATCH] don't put CN in sdp answer if it was not in the offer. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10129 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 8 ++++++++ src/mod/endpoints/mod_sofia/sofia_glue.c | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index cc68a60a3d..9d0c35940c 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2116,6 +2116,14 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session sofia_glue_attach_private(nsession, profile, tech_pvt, dest); + if (!(tech_pvt->profile->pflags & PFLAG_SUPPRESS_CNG)) { + if (tech_pvt->bcng_pt) { + tech_pvt->cng_pt = tech_pvt->bcng_pt; + } else if (!tech_pvt->cng_pt) { + tech_pvt->cng_pt = profile->cng_pt; + } + } + if (tech_pvt->local_url) { switch_channel_set_variable(nchannel, "sip_local_url", tech_pvt->local_url); if (profile->pres_type) { diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index f481ecc8b5..ffb4c321f3 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -413,14 +413,6 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t * tech_pvt->dtmf_type = profile->dtmf_type; - if (!(tech_pvt->profile->pflags & PFLAG_SUPPRESS_CNG)) { - if (tech_pvt->bcng_pt) { - tech_pvt->cng_pt = tech_pvt->bcng_pt; - } else if (!tech_pvt->cng_pt) { - tech_pvt->cng_pt = profile->cng_pt; - } - } - tech_pvt->session = session; tech_pvt->channel = switch_core_session_get_channel(session); switch_core_session_set_private(session, tech_pvt);