diff options
author | Kevin Harwell <kharwell@digium.com> | 2016-08-16 15:57:24 -0500 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2016-08-18 17:15:04 -0500 |
commit | 43f400ef95e761bc9f58dfc2f44e8b36534e6ae1 (patch) | |
tree | 0b4fea1619542034f112b1b05b051ca548741943 /channels | |
parent | 455bc789013a5f79ff37d68be4b3847173ecaca7 (diff) |
res_format_attr_g729: Add annexb=no format parameter to SDPs
Historically, Asterisk has always specified annexb=no for the g729 format.
However, when using res_pjsip no format attribute was specified. This patch
makes it so the SDP now contains a format attribute line with annexb=no.
Note, that this means only g729a is negotiated. Even for pass through support.
According to rfc7261 the type of annex used (a or b) is dependent upon the
answerer. However, Asterisk being a back to back user agent makes this tricky
to support at this time, thus we only allow annex 'a' for now.
ASTERISK-26228 #close
patches:
res_format_attr_g729.c submitted by Jason Parker (license 4993)
Change-Id: I76bc20cc0a01af01536e9915afef319c269c22d0
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f58c19e6d..c0aae46c5 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12981,10 +12981,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p, 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) */ - ast_str_append(a_buf, 0, "a=fmtp:%d annexb=no\r\n", rtp_code); - } else if (ast_format_cmp(format, ast_format_g723) == AST_FORMAT_CMP_EQUAL) { + 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_g719) == AST_FORMAT_CMP_EQUAL) { |