]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak ilbc to default to 30 if no mode= fmtp is defined on the inbound which seems...
authorBrian West <brian@freeswitch.org>
Tue, 17 Feb 2009 19:50:12 +0000 (19:50 +0000)
committerBrian West <brian@freeswitch.org>
Tue, 17 Feb 2009 19:50:12 +0000 (19:50 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12110 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c
src/switch_core_codec.c

index 4b0b1ba05cde0ae34959438901f8b8c083c82275..9912b9701ff646fd387b7594c3b2bf4a28f4403c 100644 (file)
@@ -2615,7 +2615,12 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
                                        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;
index 6242a403c406687abe719cd5c652d5f4405640ed..8a5942dba3f413974703f54dde945afdcb630dc4 100644 (file)
@@ -446,6 +446,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, co
                                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 */