[Home]

Summary:ASTERISK-26661: res_ari: channels/play REST api call should send an error when media resource not found
Reporter:Artyom Dmitriev (dm.artyom)Labels:
Date Opened:2016-12-13 08:10:01.000-0600Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Resources/res_ari_channels
Versions:14.1.2 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:The issue is described [here|https://github.com/asterisk/node-ari-client/issues/75].

[Edit by Rusty - copying issue description from Github to here.. ]

When I try to play a non-existing media by doing something like this
{code}
       channel.play({media: 'sound:nonexisting'}, playback).then(function() {
           console.log('Everything is fine');
       }).catch((err) => {
           console.log('Error>', err);
       });
{code}
I never get an error even though in asterisk's logs I can find
{noformat}
WARNING[10620] res_stasis_playback.c: 1481280112.80: Playback failed for sound:nonexisting
{noformat}
I don't know if this is a node-ari-client issue or rather an ari one. I haven't been able to create an issue in https://github.com/asterisk/asterisk repo.
Comments:By: Asterisk Team (asteriskteam) 2016-12-13 08:10:02.526-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: Rusty Newton (rnewton) 2016-12-13 16:48:10.457-0600

[~ulexus@gmail.com] I think you reported this as AstriDevCon - did we already have a ticket open for this? I can't find it anywhere if so...

By: Seán C. McCord (ulexus@gmail.com) 2016-12-13 19:47:16.885-0600

I don't think I had one referenced, no.  I wasn't totally sure it was officially a "bug."

By: Rusty Newton (rnewton) 2016-12-14 13:06:03.106-0600

[~ulexus@gmail.com] Thanks for responding. Just wanted to make sure I wasn't creating a redundant issue.

By: Ali Raza (praiseable) 2020-04-17 14:48:59.461-0500

I have done some changes at asterisk side code and now i am getting proper response. I can differentiate between actual file played successful and complete and when was unable to play successful then i got error response on PlaybackFinished. I want to share my contribution with asterisk code i am finding a way to do that. please help me

By: Kevin Harwell (kharwell) 2020-04-17 15:41:44.469-0500

[~praiseable]

If you'd like to submit a patch to Asterisk you should submit your patch for code review by the Asterisk Developer Community. To do so, please follow the Code Review [1] instructions on the wiki. Be sure to:
* Verify that your patch conforms to the Coding Guidelines [2]
* Review the Code Review Checklist [3] for common items reviewers will look for

When ready, submit your patch and any tests to Gerrit [4] for code review.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Code+Review
[2] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines
[3] https://wiki.asterisk.org/wiki/display/AST/Code+Review+Checklist
[4] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage