From 3cfc19fd4c3eba14ac4ad66a025ca49098b9df85 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 14 Feb 2007 22:14:32 +0000 Subject: [PATCH] fix codec neg git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4276 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 545a378e30..c7e71248a4 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -802,7 +802,9 @@ static void tech_set_codecs(private_object_t *tech_pvt) codec_string = abs; } else { if (!(codec_string = switch_channel_get_variable(channel, "codec_string"))) { - codec_string = tech_pvt->profile->codec_string; + if (tech_pvt->profile->codec_string) { + codec_string = switch_core_session_strdup(tech_pvt->session, tech_pvt->profile->codec_string); + } } if ((ocodec = switch_channel_get_variable(channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) { @@ -2373,7 +2375,7 @@ static uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp) if (!strcasecmp(map->rm_encoding, "telephone-event")) { tech_pvt->te = (switch_payload_t)map->rm_pt; } - + for (i = 0; i < tech_pvt->num_codecs; i++) { const switch_codec_implementation_t *imp = tech_pvt->codecs[i]; switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Codec Compare [%s:%d]/[%s:%d]\n",