[Asterisk-code-review] chan sip: Change sip get codec() to return correct codec list (asterisk[master])

Vitezslav Novy asteriskteam at digium.com
Fri May 12 04:33:13 CDT 2017


Vitezslav Novy has uploaded a new change for review. ( https://gerrit.asterisk.org/5622 )

Change subject: chan_sip: Change sip_get_codec() to return correct codec list
......................................................................

chan_sip: Change sip_get_codec() to return correct codec list

Return cahnnel nativeformats to fix bridge technology selection process.
Same approach as in pjsip module.

ASTERISK-26143
Reported-by: Henning Holtschneider

Change-Id: I64e863753954d6ad67a9e722df2ebc328705ad48
---
M channels/chan_sip.c
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/5622/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e7c15bc..930dc0f 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -33588,9 +33588,7 @@
 
 static void sip_get_codec(struct ast_channel *chan, struct ast_format_cap *result)
 {
-	struct sip_pvt *p = ast_channel_tech_pvt(chan);
-
-	ast_format_cap_append_from_cap(result, !ast_format_cap_count(p->peercaps) ? p->caps : p->peercaps, AST_MEDIA_TYPE_UNKNOWN);
+	ast_format_cap_append_from_cap(result, ast_channel_nativeformats(chan), AST_MEDIA_TYPE_UNKNOWN);
 }
 
 static struct ast_rtp_glue sip_rtp_glue = {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I64e863753954d6ad67a9e722df2ebc328705ad48
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Vitezslav Novy <a1 at vnovy.net>



More information about the asterisk-code-review mailing list