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

Freeswitch SVN anthm at freeswitch.org
Thu Mar 8 20:15:54 EST 2007


Author: anthm
Date: Thu Mar  8 20:15:54 2007
New Revision: 4488

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

Log:
tweak

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 Mar  8 20:15:54 2007
@@ -1647,7 +1647,9 @@
                               vad_in ? "in" : "", vad_out ? "out" : "");
 		}
 
-		switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
+		if (tech_pvt->te) {
+			switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
+		}
 		if (tech_pvt->cng_pt) {
 			switch_rtp_set_cng_pt(tech_pvt->rtp_session, tech_pvt->cng_pt);
 		}
@@ -2471,6 +2473,9 @@
 				if (!te && !strcasecmp(map->rm_encoding, "telephone-event")) {
 					te = tech_pvt->te = (switch_payload_t)map->rm_pt;
 					switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set 2833 dtmf payload to %u\n", te);
+					if (tech_pvt->rtp_session) {
+						switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
+					}
 				}
 
 				if (!cng_pt && !strcasecmp(map->rm_encoding, "CN")) {



More information about the Freeswitch-svn mailing list