From: Anthony Minessale Date: Fri, 4 Dec 2009 20:54:15 +0000 (+0000) Subject: can't win X-Git-Tag: v1.0.6~1157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10db68adcec5c9579c22f5d48a570570ab6ae42f;p=thirdparty%2Ffreeswitch.git can't win git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15794 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index ae4bfe3e78..ca15700faf 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -886,10 +886,18 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f } - 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); + } }