diff options
author | Vitezslav Novy <a1@vnovy.net> | 2017-05-08 20:40:47 +0200 |
---|---|---|
committer | Vitezslav Novy <a1@vnovy.net> | 2017-05-12 04:33:12 -0500 |
commit | 93b7f84c1ac61208607ec6f7360b594dee921a1b (patch) | |
tree | 8e44b049560e0edc236e99b21667c7560d49fd82 /channels/chan_sip.c | |
parent | 57217e4cc20ff17e8ea736ee19b03b264b166900 (diff) |
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
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e7c15bcbd..930dc0f67 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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) { - 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 = { |