[Asterisk-code-review] ARI: Detect duplicate channel IDs (asterisk[14])
Mark Michelson
asteriskteam at digium.com
Thu Oct 20 12:59:00 CDT 2016
Mark Michelson has uploaded a new patch set (#3). ( https://gerrit.asterisk.org/4154 )
Change subject: ARI: Detect duplicate channel IDs
......................................................................
ARI: Detect duplicate channel IDs
ARI and AMI allow for an explicit channel ID to be specified
when originating channels. Unfortunately, there is nothing in
place to prevent someone from using the same ID for multiple
channels. Further complicating things, adding ID validation to channel
allocation makes it impossible for ARI to discern why channel allocation
failed, resulting in a vague error code being returned.
The fix for this is to institute a new method for channel errors to be
discerned. The method mirrors errno, in that when an error occurs, the
caller can consult the channel errno value to determine what the error
was. This initial iteration of the feature only introduces "unknown" and
"channel ID exists" errors. However, it's possible to add more errors as
needed.
ARI uses this feature to determine why channel allocation failed and can
return a 409 error during origination to show that a channel with the
given ID already exists.
ASTERISK-26421
Change-Id: Ibba7ae68842dab6df0c2e9c45559208bc89d3d06
---
M include/asterisk/channel.h
M include/asterisk/channel_internal.h
M main/channel.c
M main/channel_internal_api.c
M res/ari/resource_channels.c
M res/res_ari_channels.c
M rest-api/api-docs/channels.json
7 files changed, 100 insertions(+), 6 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/54/4154/3
--
To view, visit https://gerrit.asterisk.org/4154
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibba7ae68842dab6df0c2e9c45559208bc89d3d06
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-code-review
mailing list