From b6b5356148b4a14bacad7c24eb79212c46d98c26 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 18 Oct 2007 19:33:48 +0000 Subject: [PATCH] fix late neg codec change git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5976 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index c11c31dbb4..1e4ffaa60e 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -294,6 +294,8 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session) } else { if (switch_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION)) { char *r_sdp = switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE); + tech_pvt->num_codecs = 0; + sofia_glue_tech_prepare_codecs(tech_pvt); if (sofia_glue_tech_media(tech_pvt, r_sdp) != SWITCH_STATUS_SUCCESS) { switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "CODEC NEGOTIATION ERROR"); nua_respond(tech_pvt->nh, SIP_488_NOT_ACCEPTABLE, TAG_END()); @@ -884,6 +886,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi } else { if (switch_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION)) { char *r_sdp = switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE); + tech_pvt->num_codecs = 0; + sofia_glue_tech_prepare_codecs(tech_pvt); if (sofia_glue_tech_media(tech_pvt, r_sdp) != SWITCH_STATUS_SUCCESS) { switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "CODEC NEGOTIATION ERROR"); nua_respond(tech_pvt->nh, SIP_488_NOT_ACCEPTABLE, TAG_END());