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
This commit is contained in:
Vitezslav Novy
2017-05-08 20:40:47 +02:00
parent 57217e4cc2
commit 93b7f84c1a

View File

@@ -33588,9 +33588,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) 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_channel_nativeformats(chan), AST_MEDIA_TYPE_UNKNOWN);
ast_format_cap_append_from_cap(result, !ast_format_cap_count(p->peercaps) ? p->caps : p->peercaps, AST_MEDIA_TYPE_UNKNOWN);
} }
static struct ast_rtp_glue sip_rtp_glue = { static struct ast_rtp_glue sip_rtp_glue = {