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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 15 07:12:39 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5621 )

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
  Jenkins2: Approved for Submit
  Joshua Colp: Looks good to me, approved



diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 2e386dd..ff2e5ba 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -33589,9 +33589,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/5621
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I64e863753954d6ad67a9e722df2ebc328705ad48
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
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