Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playback not found #140

Open
mpbanna opened this issue May 16, 2020 · 2 comments
Open

Playback not found #140

mpbanna opened this issue May 16, 2020 · 2 comments

Comments

@mpbanna
Copy link

mpbanna commented May 16, 2020

Hello all,
I am using some code to create playback and then i check it using ARI then it shows there is no playback using this created playback.
It give error as : 'Error: {"message":"Playback not found"}'
I am using following code :

        var commonPlayback1 = ari.Playback();
    logger.log('commonPlayback1::',commonPlayback1.id)
    ari.playbacks.get({
        playbackId: commonPlayback1.id
    }, function(err, playback) {
        if (err) {
            console.log(err);
        }else{
            console.log('valid playback::', commonPlayback1.id);
        }
    });	
@danjenkins
Copy link
Contributor

I'm guessing the underlying Playback application hasnt been loaded into Asterisk. Can you go into the Asterisk console and do a core show applications and see if Playback is listed?

@samuelg
Copy link
Contributor

samuelg commented May 18, 2020

From the example above it doesn't look like that playback object was used to play a sound on a channel. What was done was create an object with a placeholder ID but Asterisk doesn't know about it yet. You'll need to use that object to play a sound on a channel or bridge first:

channel.play({ media: 'sound:some-sound' }, playback, function (err, updatedPlayback) {});

The goal of creating the playback object is so you have an ID ahead of time for registering events and controlling the playback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants