--- channels/chan_sip.c.orig 2016-07-01 06:42:01.830651938 -0400 +++ channels/chan_sip.c 2016-07-01 10:13:48.479650585 -0400 @@ -13001,7 +13001,12 @@ ast_format_generate_sdp_fmtp(format, rtp_code, a_buf); - framing = ast_format_cap_get_format_framing(p->caps, format); + /* iLBC should not use cap_get because we don't care what the other end wants */ + if (ast_format_cmp(format, ast_format_ilbc) == AST_FORMAT_CMP_EQUAL) { + framing = ast_format_get_default_ms(format); + } else { + framing = ast_format_cap_get_format_framing(p->caps, format); + } if (ast_format_cmp(format, ast_format_g729) == AST_FORMAT_CMP_EQUAL) { /* Indicate that we don't support VAD (G.729 annex B) */ @@ -13009,6 +13014,9 @@ } else if (ast_format_cmp(format, ast_format_g723) == AST_FORMAT_CMP_EQUAL) { /* Indicate that we don't support VAD (G.723.1 annex A) */ ast_str_append(a_buf, 0, "a=fmtp:%d annexa=no\r\n", rtp_code); + } else if (ast_format_cmp(format, ast_format_ilbc) == AST_FORMAT_CMP_EQUAL) { + /* Add information about us using only 30 ms packetization */ + ast_str_append(a_buf, 0, "a=fmtp:%d mode=%u\r\n", rtp_code, framing); } else if (ast_format_cmp(format, ast_format_siren7) == AST_FORMAT_CMP_EQUAL) { /* Indicate that we only expect 32Kbps */ ast_str_append(a_buf, 0, "a=fmtp:%d bitrate=32000\r\n", rtp_code);