res_stasis_playback.c:302 play_on_cha nnel: Attempted to pla

ARI will not play back recordings in IVR.

That message is clearly incomplete, and the missing part probably includes the important information.

Also line numbers (the 302) and even whether the message exists, depend on which version of Asterisk you are using.

This is the complete error message from cli when I attempt to run my node.js application.
This file is in the /sounds/en folder. It exist. I have verified it.
[Sep 25 10:50:40] ERROR[5799][C-00000039]: res_stasis_playback.c:302 play_on_channel: Attempted to play recording ‘45700001’ on channel ‘SIP/1900-0000000d’ but recording does not exist

Does the file exist. How was the filename derived?

How did the file get there?

As far as I know Asterisk still has no native IVR construct, so what was used to create the IVR from the lower level constructs provided by Asterisk.

Asterisk Version 13.4.0

The file exist in the /sounds/en folder. I put he file there.

The JS variable menu array(which includes dtmf options and sounds). This builds the IVR variables.

What is the extension part of the file name?

updated error:
Console verbose was OFF and is now 10.
== Using SIP RTP CoS mark 5
– Executing [1005@default:1] NoOp(“SIP/1900-00000012”, “”) in new stack
– Executing [1005@default:2] Stasis(“SIP/1900-00000012”, “survey”) in new s
[Sep 28 11:05:48] WARNING[16482][C-0000034c]: file.c:774 ast_openstream_full: Fi
le q1_wouldyouhire,sound:45700001 does not exist in any format
[Sep 28 11:05:48] WARNING[16482][C-0000034c]: file.c:1100 ast_streamfile: Unable
to open q1_wouldyouhire,sound:45700001 (format (ulaw)): No such file or directo
[Sep 28 11:05:48] WARNING[16482][C-0000034c]: res_stasis_playback.c:248 playback
_final_update: 1443452747.27: Playback failed for sound:q1_wouldyouhire,sound:45
> 0x7fc184018300 – Probation passed - setting RTP source address to
[Sep 28 11:06:33] WARNING[16264]: res_http_websocket.c:457 ws_safe_read: Web socket closed abruptly
Deactivating Stasis app ‘survey’
== WebSocket connection from ‘’ closed
– Inactive Stasis app ‘survey’ missed message
– Inactive Stasis app ‘survey’ missed message
– Inactive Stasis app ‘survey’ missed message
– Inactive Stasis app ‘survey’ missed message
– Inactive Stasis app ‘survey’ missed message
Shutting down application ‘survey’
– Inactive Stasis app ‘survey’ missed message
Destroying Stasis app survey

Last question still stands.

The nodejs app is .js
The audio file is .gsm

For anyone in the future trying to create an ivr I found a very simple starting place.
This is built into example.js:

[code] incoming.on(‘ChannelDtmfReceived’,
* Handle the dtmf event appropriately. # will hangup the channel,
* * will play a sound on the channel, and all digits will be played
* back on the channel.
* @callback channelDtmfReceivedCallack
* @memberof example
* @param {Object} event - the full event object
* @param {module:resources~Channel} channel - the channel that
* received the dtmf event
function (event, channel) {

  var digit = event.digit;
  switch (digit) {
    case '2':
      play(channel, 'sound:vm-goodbye', function (err) {
        channel.hangup(function (err) {
    case '1':
      play(channel, 'sound:q2_wereyousatisfied');
      play(channel, util.format('sound:digits/%s', digit));

incoming.answer(function (err) {
  play(incoming, 'sound:q1_wouldyouhire');



  • Initiate a playback on the given channel.

  • @function play

  • @memberof example

  • @param {module:resources~Channel} channel - the channel to send the

  • playback to

  • @param {string} sound - the string identifier of the sound to play

  • @param {Function} callback - callback invoked once playback is finished
    function play (channel, sound, callback) {
    var playback = ari.Playback();
    function (event, instance) {

    if (callback) {
    });{media: sound}, playback, function (err, playback) {});