Is my PlaybackResource automatically destroyed?

Using the ARI, I added a playbackresource to a bridge and it played the audio file fine. I then hung up the channel and the channel and bridge were destroyed.

I watched the various websocket messages, and I can see the channel being destroyed, and the bridge being destroyed, but not the playbackresource!

So I used the DELETE command to /playbacks/{playbackId} , and it returned an error that “playback not found”. (And the playbackId is correct). So…what happened to the playback resource? Was it automatically deleted with the bridge (but there was no websocket notification of the destruction)?

In case it’s related, I did see 2 identical playbackFinsihed messages (see below) when playback was done. But no destruction notification. Should one of these be a destruction notification (assuming a playback resource is automatically destroyed after playback is complete)? Or is this just a red herring.

{
    "application": "myAriApp",
    "asterisk_id": "54:b2:03:10:1f:3a",
    "playback": {
        "id": "PR0",
        "language": "en",
        "media_uri": "sound:/var/lib/asterisk/sounds/en/andnowstandby",
        "state": "done",
        "target_uri": "bridge:BR0"
    },
    "timestamp": "2024-10-19T18:44:12.174-0400",
    "type": "PlaybackFinished"
}
{
    "application": "myAriApp",
    "asterisk_id": "54:b2:03:10:1f:3a",
    "playback": {
        "id": "PR0",
        "language": "en",
        "media_uri": "sound:/var/lib/asterisk/sounds/en/andnowstandby",
        "state": "done",
        "target_uri": "bridge:BR0"
    },
    "timestamp": "2024-10-19T18:44:12.174-0400",
    "type": "PlaybackFinished"
}

PlaybackFinished is the notification. Once the playback is finished, its state is destroyed.

Ok then I understand what happened. The syntax of destruction notification is a bit different from channels & bridges, but that works for me.

Does the first PlaybackFinished mean the media is stopped, and the second one means it’s deleted? (Just wondering why two notifications)

I don’t know why there are two.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.