Closed TomDmitriev closed 7 years ago
I'm surprised that play does not send an error status in this case. One thing to try is looking at the playback control object returned after play is called:
channel.play({media: 'sound:nope'}, playback).then(function (playbackControl) {
console.log(playbackControl.state); // state will contain the state of the playback
});
That might show some sort of failure state in your case.
FYI, the asterisk repo on github is a mirror only, please see [1] for creating issues against the Asterisk project itself.
Unfortunately, playbackControl.state
isn't different from the one that a successful play has. My work-around is to measure the time period between PlaybackStarted
and PlaybackFinished
events. I've created an issue in the Asterisk jira, https://issues.asterisk.org/jira/browse/ASTERISK-26661.
I verified that this is the case. What's more, the state of the playback on the PlaybackFinished
event is done
. I would say opening an issue against the Asterisk project itself is the correct move at this point.
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
@praiseable , can you please provide the code or snippet , I am also facing the same issue.
When I try to play a non-existing media by doing something like this
I never get an error even though in asterisk's logs I can find
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.