Package: asterisk / 1:13.14.1~dfsg-2+deb9u4

875450-chan_sip-oneway-audio.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Vitezslav Novy <a1@vnovy.net>
Date: Mon, 8 May 2017 20:40:47 +0200
Subject: [PATCH] chan_sip: Change sip_get_codec() to return correct codec list
Origin: upstream, https://github.com/asterisk/asterisk/commit/93b7f84c1ac61208607ec6f7360b594dee921a1b
Bug: https://issues.asterisk.org/jira/browse/ASTERISK-26143
Bug-Debian: https://bugs.debian.org/875450

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 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e7c15bcbd0c..930dc0f6756 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 = {