summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2016-08-16 15:57:24 -0500
committerKevin Harwell <kharwell@digium.com>2016-08-18 17:14:45 -0500
commitd2bee6b535f84557708dbb725173b8d612b6b71e (patch)
treecc4719d99a663a666cbb1b5e3acd51abffa234e6 /channels/chan_sip.c
parentba91710bc4685f1458d9dcfd5b1acea691ac09a6 (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/chan_sip.c')
-rw-r--r--channels/chan_sip.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 46c42e96b..332e260ac 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12991,10 +12991,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) {