Revision
15794
Author
anthm
Date
2009-12-04 14:54:15 -0600 (Fri, 04 Dec 2009)

Log Message

can't win

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (15793 => 15794)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-12-04 20:54:07 UTC (rev 15793)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-12-04 20:54:15 UTC (rev 15794)
@@ -886,10 +886,18 @@
 									}
 									
 									
-									tech_pvt->check_frames = MAX_CODEC_CHECK_FRAMES;
+									tech_pvt->check_frames = 0;
 									tech_pvt->last_ts = 0;
+
 									/* inform them of the codec they are actually sending */
-									sofia_glue_do_invite(session);
+									if (++tech_pvt->codec_reinvites > 2) {
+										switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, 
+														  "Ok, some devices *cough* X-lite *cough*\n"
+														  "seem to continue to lie over and over again so I guess we'll\n"
+														  "leave well-enough alone and let them lie\n");
+									} else {
+										sofia_glue_do_invite(session);
+									}
 
 								}