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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 15 09:28:11 CDT 2017


Joshua Colp has submitted this change and it was merged. ( 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(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



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: merged
Gerrit-Change-Id: I64e863753954d6ad67a9e722df2ebc328705ad48
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Vitezslav Novy <a1 at vnovy.net>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list