Hello, as a very new user, I very much appreciate all of the helpful information you have all provided in this forum which has helped me get started,
I am using FreePBX 16.0.39 with asterisk 18.16.0 and building an ARI app with nodejs and node-ari-client.
The short summary is that I am looking for a way to “import” hundreds of wav files as .system recordings, without having to create a new system recording in the GUI for each one. Even an explanation of what kind of archive may be uploaded to the system recordings would be helpful. The rest of this post are some details.
We are simulating a legacy IVR application and need to play hundreds of our existing wav files via FreePBX. From what I have seen in the wiki and sample applications, I have had success in using code like
channel.play({media: ‘sound:custom/W9615’}, …
but only after using the GUI to create a new system recording, and uploading the file in the GUI. This would be tedious for hundreds of files, so I am looking for a more efficient way, perhaps one that used from the command line which could use to streamline the process of uploading new recordings by staff that are not FreePBX admins.
Copying a wav file to /var/lib/asterisk/sounds/en/custom will not enable me to play it with the “sound: custom/myFilewav” specification, and I have searched the files in /etc/asterisk and cannot see if there is some config file I could update, and might surmise that there is some internal database used by FreePBX which I cannot access – hence my attempts fail.
The Asterisk REST documentation at:
ARI and Channels: Simple Media Manipulation (sorry, as new user the system does not allow me to post URLs…)
states that one may use a URL for “sound” so I set up a python simpleHTTPServer and tried
sound: http://… (i am not beling allowed to type the whole URL here!)
but this did not work either.
The GUI and the wiki say you may upload an archive but I could not find details on this - a tar, a tgz, and a .zip attempt each failed as unsupported types.
Lastly, there is an old thread in this forum about uploading prompts as a new language:
changing-system-recordings-from-their-default-to-uploaded-sound-files/2379
But this is based on much older versions, and I could not see how to implement the suggestions in this, or discover how to set my own language in the ARI.
Of course, if there is a better way to use the channel.play() function in the ARI which bypasses the system recordings modules, perhaps someone could point that out.
Thank you all in advance.