]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip: Change sip_get_codec() to return correct codec list
authorVitezslav Novy <a1@vnovy.net>
Mon, 8 May 2017 18:40:47 +0000 (20:40 +0200)
committerVitezslav Novy <a1@vnovy.net>
Fri, 12 May 2017 09:32:35 +0000 (04:32 -0500)
Return cahnnel nativeformats to fix bridge technology selection process.
Same approach as in pjsip module.

ASTERISK-26143
Reported-by: Henning Holtschneider
Change-Id: I64e863753954d6ad67a9e722df2ebc328705ad48

channels/chan_sip.c

index 2e386dd5548ba55832d13d4acd909fc2fb6bddd8..ff2e5ba3fef9a5f0a8fec8196c312fe7604895db 100644 (file)
@@ -33589,9 +33589,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 = {