From 7eed9481c65e1ea8a8b06bb5638ece5c67a06ad3 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 12 Sep 2013 20:40:10 +0500 Subject: [PATCH] FS-5781 --resolve try now --- src/mod/endpoints/mod_sofia/sofia_glue.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index c73c8850df..1724f5ad56 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -330,7 +330,9 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen, if (!cng_type) { //switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=rtpmap:%d CN/8000\n", cng_type); //} else { - switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=silenceSupp:off - - - -\n"); + if (sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG)) { + switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=silenceSupp:off - - - -\n"); + } } if (append_audio) { @@ -542,13 +544,14 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch && tech_pvt->te > 95) { switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=rtpmap:%d telephone-event/8000\na=fmtp:%d 0-16\n", tech_pvt->te, tech_pvt->te); } - if (!sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG) && tech_pvt->cng_pt && use_cng) { + + if (sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG)) { + switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=silenceSupp:off - - - -\n"); + } else if (tech_pvt->cng_pt && use_cng) { switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=rtpmap:%d CN/8000\n", tech_pvt->cng_pt); if (!tech_pvt->rm_encoding) { tech_pvt->cng_pt = 0; } - } else { - switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=silenceSupp:off - - - -\n"); } if (append_audio) {