Upload wav file to the PBX Server Programmatically

Status
Not open for further replies.

aaronkohn

Joined
Jul 4, 2024
Messages
4
Reaction score
0
Trying to figure out how we can programmatically upload a wav file to the PBX server, we would like to be able to replace for example the “Away” greeting file for a particular user, without user intervention. Is there and API to facilitate such possibility? Root access to the actual file server system?
 
I do not believe 3CX provides an API for uploading files. But we do. We provide a very extensive REST API. It is the same API all our tools use to interact with 3CX. If you are a .NET developer, we also provide a .NET SDK that makes it stupid-simple to use our APIs. It is a .NET Standard library you can include in your project and then making API calls is as simple as:

UploloadFile(path, name).

No need to understand anything about invoking web API calls. But if you are not a .NET developer, then it is standard REST and JSON. You can easily do that from any language.
 
Trying to figure out how we can programmatically upload a wav file to the PBX server, we would like to be able to replace for example the “Away” greeting file for a particular user, without user intervention. Is there and API to facilitate such possibility? Root access to the actual file server system?
It's not just uploading the file, you will need to adjust the 3CX configuration for this. I'm not sure if the new XAPI supports this, but you might want to check it.
 
A little testing would be required. In this case I suspect simply replacing an existing file with a file of the same name may be sufficient. However, sometimes 3CX caches prompts. In that case, you would need to provide a different file name, and then use the API to update the extension property.
 
A little testing would be required. In this case I suspect simply replacing an existing file with a file of the same name may be sufficient. However, sometimes 3CX caches prompts. In that case, you would need to provide a different file name, and then use the API to update the extension property.
Replacing an existing WAV file will not work, as 3CX caches them and changes are not applied until you restart the services.
 
  • Like
Reactions: Evolute IT
In that case, it is not as simple as simply uploading the wav file, you will need to upload a file with a new name, and then edit the extension property. We have both the necessary APIs.
 
Status
Not open for further replies.