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

Freeswitch SVN brian at freeswitch.org
Mon Feb 18 22:41:12 EST 2008


Author: brian
Date: Mon Feb 18 22:41:11 2008
New Revision: 7695

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

Log:
its best to not activate SRTP when we aren't in secure mode.  Bad things do happen with most phones since they aren't in secure mode and we expect encrypted packets thus when they hold unhold this would cause it to go into secure mode when it wasn't needed.  So this will totally bypass this becuase you can't go secure midcall becuase thats dumb.

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Mon Feb 18 22:41:11 2008
@@ -1653,7 +1653,7 @@
 								tech_pvt->remote_crypto_key = switch_core_session_strdup(tech_pvt->session, crypto);
 								tech_pvt->crypto_tag = crypto_tag;
 
-								if (switch_rtp_ready(tech_pvt->rtp_session)) {
+								if (switch_rtp_ready(tech_pvt->rtp_session) && switch_test_flag(tech_pvt, TFLAG_SECURE)) {
 									sofia_glue_add_crypto(tech_pvt, tech_pvt->remote_crypto_key, SWITCH_RTP_CRYPTO_RECV);
 									switch_rtp_add_crypto_key(tech_pvt->rtp_session, SWITCH_RTP_CRYPTO_RECV, tech_pvt->crypto_tag, 
 															  tech_pvt->crypto_type, tech_pvt->remote_raw_key, SWITCH_RTP_KEY_LEN);



More information about the Freeswitch-svn mailing list