[Asterisk-code-review] chan_sip: Set up calls without audio (text+video), again. (asterisk[18])
Alexander Traud
asteriskteam at digium.com
Wed Jan 27 11:44:09 CST 2021
Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15378 )
Change subject: chan_sip: Set up calls without audio (text+video), again.
......................................................................
chan_sip: Set up calls without audio (text+video), again.
ASTERISK-29265
Change-Id: Ic16a3bf13cd1b5c4fc4041ed74961177d96b600f
---
M channels/chan_sip.c
1 file changed, 2 insertions(+), 12 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/78/15378/1
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 23b22e8..e5d6cb6 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -30795,7 +30795,6 @@
char *ext = NULL, *host;
char tmp[256];
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
- struct ast_str *cap_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
char *dnid;
char *secret = NULL;
char *md5secret = NULL;
@@ -30811,17 +30810,8 @@
AST_APP_ARG(remote_address);
);
- /* mask request with some set of allowed formats.
- * XXX this needs to be fixed.
- * The original code uses AST_FORMAT_AUDIO_MASK, but it is
- * unclear what to use here. We have global_capabilities, which is
- * configured from sip.conf, and sip_tech.capabilities, which is
- * hardwired to all audio formats.
- */
- if (!(ast_format_cap_has_type(cap, AST_MEDIA_TYPE_AUDIO))) {
- ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format %s while capability is %s\n",
- ast_format_cap_get_names(cap, &codec_buf),
- ast_format_cap_get_names(sip_cfg.caps, &cap_buf));
+ if (ast_format_cap_empty(cap)) {
+ ast_log(LOG_NOTICE, "Asked to get a channel without offering any format\n");
*cause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL; /* Can't find codec to connect to host */
return NULL;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15378
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Ic16a3bf13cd1b5c4fc4041ed74961177d96b600f
Gerrit-Change-Number: 15378
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210127/d2a7a06a/attachment-0001.html>
More information about the asterisk-code-review
mailing list