[Asterisk-code-review] chan sip: Fix negotiation of iLBC 30. (asterisk[master])

Alexander Traud asteriskteam at digium.com
Mon Aug 10 07:54:18 CDT 2015


Alexander Traud has uploaded a new change for review.

  https://gerrit.asterisk.org/1056

Change subject: chan_sip: Fix negotiation of iLBC 30.
......................................................................

chan_sip: Fix negotiation of iLBC 30.

iLBC 20 was advertised in a SIP/SDP negotiation. However, only iLBC 30 is
supported. Removes "a=fmtp:x mode=y" from SDP. Because of RFC 3952 section 5,
only iLBC 30 is negotiated now.

ASTERISK-25309 #close

Change-Id: I92d724600a183eec3114da0ac607b994b1a793da
---
M channels/chan_sip.c
M main/format_cap.c
2 files changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/56/1056/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 4190770..627f501 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12801,9 +12801,6 @@
 	} 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 20/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);
diff --git a/main/format_cap.c b/main/format_cap.c
index 224fe33..bb65501 100644
--- a/main/format_cap.c
+++ b/main/format_cap.c
@@ -153,7 +153,9 @@
 	/* This takes the allocation reference */
 	AST_VECTOR_APPEND(&cap->preference_order, framed);
 
-	cap->framing = MIN(cap->framing, framing ? framing : ast_format_get_default_ms(format));
+	if (framing) {
+		cap->framing = MIN(cap->framing, framing);
+	}
 
 	return 0;
 }

-- 
To view, visit https://gerrit.asterisk.org/1056
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92d724600a183eec3114da0ac607b994b1a793da
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>



More information about the asterisk-code-review mailing list