I have an ARI application that makes calls and some times plays an audio file. The audio files are stored locally on the Asterisk server. I am facing a problem where about 50% of the times the playback of the file fails (not always) and it prints the below message in the logs:
[May 10 06:10:24] WARNING[125725]: res_stasis_playback.c:276 playback_final_update: c01dbe837-e541-4923-b7cd-0f8528c9b294: Playback failed for sound:/content-files/81d3961c-68ab-4b26-bbab-d59644023637
Here is the format / Encoding of the file.
root@ip-172-31-8-209:/content-files# sox --info 81d3961c-68ab-4b26-bbab-d59644023637.wav
Input File : ‘81d3961c-68ab-4b26-bbab-d59644023637.wav’
Channels : 1
Sample Rate : 8000
Precision : 16-bit
Duration : 00:00:33.24 = 265920 samples ~ 2493 CDDA sectors
File Size : 532k
Bit Rate : 128k
Sample Encoding: 16-bit Signed Integer PCM
My ARI call to play the file is:
await thisChannel.play({ media: sound:${obj.callDetails.VMAudio}
, playbackId: playback.id });
I specify format “slin” when creating the channel.