Author: brian Date: Tue Feb 17 13:50:12 2009 New Revision: 12110 Log: tweak ilbc to default to 30 if no mode= fmtp is defined on the inbound which seems to be the default behavior of everything out there. Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c freeswitch/trunk/src/switch_core_codec.c 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 Tue Feb 17 13:50:12 2009 @@ -2615,7 +2615,12 @@ tech_pvt->iananame = switch_core_session_strdup(session, (char *) mimp->iananame); tech_pvt->pt = (switch_payload_t) map->rm_pt; tech_pvt->rm_rate = map->rm_rate; - tech_pvt->codec_ms = mimp->microseconds_per_packet / 1000; + if (!strcasecmp((char *) mimp->iananame, "ilbc") && switch_strlen_zero((char*)map->rm_fmtp)) { + /* default to 30 when no mode is defined for ilbc ONLY */ + tech_pvt->codec_ms = 30; + } else { + tech_pvt->codec_ms = mimp->microseconds_per_packet / 1000; + } tech_pvt->remote_sdp_audio_ip = switch_core_session_strdup(session, (char *) connection->c_address); tech_pvt->rm_fmtp = switch_core_session_strdup(session, (char *) map->rm_fmtp); tech_pvt->remote_sdp_audio_port = (switch_port_t) m->m_port; Modified: freeswitch/trunk/src/switch_core_codec.c ============================================================================== --- freeswitch/trunk/src/switch_core_codec.c (original) +++ freeswitch/trunk/src/switch_core_codec.c Tue Feb 17 13:50:12 2009 @@ -446,6 +446,8 @@ ms = mms; } } + } else if (!strcasecmp(codec_name, "ilbc")) { + ms = 30; } /* If no specific codec interval is requested opt for 20ms above all else because lots of stuff assumes it */