We intensively use Asterisk ARI /bridges/{bridgeId}/play method for playing external files using http/https, sometimes we’ve experienced an issue that files stop playing with errors in log:
[Sep 3 11:45:34] WARNING[45902][C-0000001a] res_http_media_cache.c: Failed to create temporary storage for 'http://.wav’
[Sep 3 11:45:34] WARNING[45902][C-0000001a] res_http_media_cache.c: Failed to create temporary storage for 'http://.wav’
[Sep 3 11:45:34] WARNING[45902][C-0000001a] file.c: File http://.wav does not exist in any format
[Sep 3 11:45:34] WARNING[45902][C-0000001a] file.c: Unable to open http://.wav (format (slin)): No such file or directory
[Sep 3 11:45:34] WARNING[45902][C-0000001a] res_stasis_playback.c: 1567500334.252: Playback failed for sound:http://*.wav
After reboot server and some time about 1 hours the error disappears and everything work as expected.
Yes a lot, and we have a cron that removes them every hour but only which are 60 min old.
But in one moment asterisk stop playing with the error. The problem resolves only if reboot a server and wait for an hour and more.
The mkstemp function[1] returned failure. Why that is you would need to examine further, it’s entirely possible you had so many files that it couldn’t generate a new random one.
According to the source of mkstemp function there are 62^3 possible names. I’m not sure that we create so many files.
Is there any way to remove these temporary cache using ARI, I cannot find, the playback methods can only stop playing but not deleting?