[asterisk-bugs] [JIRA] (ASTERISK-28219) Some ARI calls results in "BUG! Must supply a channel name.." intermittently
Anil Gupta (JIRA)
noreply at issues.asterisk.org
Fri Dec 21 06:46:47 CST 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-28219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anil Gupta updated ASTERISK-28219:
----------------------------------
Attachment: create-bug.js
script to reproduce the error
> Some ARI calls results in "BUG! Must supply a channel name.." intermittently
> -----------------------------------------------------------------------------
>
> Key: ASTERISK-28219
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28219
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_ari_channels
> Affects Versions: 16.1.0
> Reporter: Anil Gupta
> Severity: Minor
> Attachments: create-bug.js
>
>
> Hello!
> If /ari/channels/create is called without the optional parameter `originator` it results in the following error:
> [Dec 21 12:03:50] ERROR[10769]: channel.c:1311 ast_channel_by_name_cb: BUG! Must supply a channel name or partial name to match!
> I am not sure if this happens after a certain threshold of hits or randomly. However, it is easy to reproduce by repeatedly hitting the API. I'll attach a nodejs script in a short while to help reproduce this.
> Looking at the code in res/ari/resource_channels.c:ast_ari_channels_create() it seems the originator is queried with ast_channel_get_by_name(originator) and cleaned up by ast_channel_cleanup(originator) without checking if the parameter was provided or not. Wrapping these two lines in
> if (!ast_strlen_zero(args->originator)) {
> //
> }
> resolves the issue.
> ASTERISK-27797 might be the result of this as the ARI trace attached there indicates that /ari/channels/create is called without the `originator` parameter.
> Furthermore, /ari/channels/$channelId/dial behaves the same if the optional parameter `caller` is not provided.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list