[Home]

Summary:ASTERISK-27445: ARI: Updating a bridge gives wrong error message.
Reporter:Frank Durden (frank.durden)Labels:
Date Opened:2017-11-25 13:20:37.000-0600Date Closed:2017-11-27 16:56:53.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_ari
Versions:15.0.0 Frequency of
Occurrence
Constant
Related
Issues:
is caused byASTERISK-24560 Creating a named ARI bridge twice causes a crash
Environment:Ubuntu 16.04Attachments:( 0) bridges.pcapng
Description:First time calling /bridges/\{bridgeId\} works, subsequent calls return 500. If both type and name are provided the returned error is "Changing bridge name is not implemented" even though the name is the same. If the name field is empty the error is "Supplying a bridge type when updating a bridge is not allowed."

I feel that this used to work for a while so I don't know what happened. I've restarted Asterisk multiple times and tested multiple times. Wireshark capture attached.
Comments:By: Asterisk Team (asteriskteam) 2017-11-25 13:20:38.835-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Frank Durden (frank.durden) 2017-11-25 13:21:31.323-0600

Wireshark capture

By: Richard Mudgett (rmudgett) 2017-11-26 09:07:01.503-0600

Once a bridge is created you *cannot* update its properties.  What you are doing has not been implemented in *any* version.  In fact, ASTERISK-24560 fixed a crash that your third POST in the pcap would have triggered.  However, your second POST in the pcap does point out that the ASTERISK-24560 patch inverted the test that is giving you the "Changing bridge name is not implemented" message.  You should have gotten the "Supplying a bridge type when updating a bridge is not allowed." message instead.

I'm opening this issue up only to fix the inverted test.  Otherwise, the rest of the issue would not be a bug.

By: Richard Mudgett (rmudgett) 2017-11-26 09:32:15.792-0600

FYI: The below would have worked as a bridge update before only because it does nothing.
{noformat}
POST /ari/bridges/test?name=test&api_key=asterisk:asterisk HTTP/1.1
{noformat}


By: Frank Durden (frank.durden) 2017-11-27 08:42:26.320-0600

Ok. But isn't the point of "create or update" that you don't have to know if a bridge exists, that it creates it for you if it isn't there and updates it otherwise? What's the difference between "create" and "create or update" then? Thanks!

By: Friendly Automation (friendly-automation) 2017-11-27 16:56:53.865-0600

Change 7367 merged by Joshua Colp:
res_ari: Fix inverted test giving wrong error message.

[https://gerrit.asterisk.org/7367|https://gerrit.asterisk.org/7367]

By: Friendly Automation (friendly-automation) 2017-11-27 17:25:03.043-0600

Change 7368 merged by Joshua Colp:
res_ari: Fix inverted test giving wrong error message.

[https://gerrit.asterisk.org/7368|https://gerrit.asterisk.org/7368]

By: Friendly Automation (friendly-automation) 2017-11-27 17:25:20.905-0600

Change 7369 merged by Joshua Colp:
res_ari: Fix inverted test giving wrong error message.

[https://gerrit.asterisk.org/7369|https://gerrit.asterisk.org/7369]