Programmatically upload system recording

I’m searching for a programmatically way to upload / replace a system recording.
The Rest-API doesnt support his As far as I know. Is there an other way to do this?

Nobody?

Uploading is tricky, to replace one, the files are all in

/var/lib/asterisk/sounds/(language)/custom

They are owned by asterisk and there is one for each supported audio format by extension

1 Like

@dicko points out that it will be tricky, and I have no doubt that he’s right.

There’s no “good” way to do this under the control of either Asterisk or FreePBX.

My suggestion would be to look at the code in the admin programs and see how they manage the files. Keep in mind that many things in FreePBX look “simple enough” because of the code that lives behind the management pages, but nothing is as simple as it would appear.