From: Vitezslav Novy Date: Mon, 8 May 2017 18:40:47 +0000 (+0200) Subject: chan_sip: Change sip_get_codec() to return correct codec list X-Git-Tag: 13.16.0-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bcce442d05301f50715065dd76c6f5e10782d4a;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2c5d3c3140..43084cebb6 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -33481,9 +33481,7 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *i 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 = {