[Freeswitch-svn] [commit] r5976 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Thu Oct 18 15:33:49 EDT 2007


Author: anthm
Date: Thu Oct 18 15:33:48 2007
New Revision: 5976

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c

Log:
fix late neg codec change

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Thu Oct 18 15:33:48 2007
@@ -294,6 +294,8 @@
 		} 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 @@
 				} 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());



More information about the Freeswitch-svn mailing list