This program will list, download and delete available calls that were recorded on your MIXpbx. The action can be defined by editing the .cmd file.
Downloading soundfiles will not overwrite existing soundfiles with the same name, instead a copy will be created.
- Python 3.8
- Python script: recordings.py
- .cmd file: recordings.cmd
How to use
Simply set the parameters in recordings.cmd by editing it in a text editor and double click it when you’ve saved your changes.
Setting up recordings.cmd
Launching this program requires several parameters to be set in recordings.cmd:
%~dp0p38\python.exe %~dp0p38\recordings.py -D $USERNAME.mixpbx.net -u $USERNAME -p $MANAGER_PASSWORD -a $ACTION -d $TARGET_DIR -k -s $SECONDS -i -I pause
%~dp0p38\python.exe: Do not change this – it means that python.exe from folder p27 is used to execute the program.
%~dp0p38\recordings.py: Do not change this – it’s the script name that is executed
$USERNAME.mixpbx.net: The domain to connect to for checking the soundfiles. Replace $USERNAME by your Mixvoip username or replace
$USERNAME.mixpbx.netby an IP address of your MIXpbx server.
$USERNAME: The username to use to connect to the soundfiles. Replace $USERNAME by your Mixvoip username.
$MANAGER_PASSWORD: The password to use to connect to -D. Replace
$MANAGER_PASSWORDby the Manager password found on the MIXpbx webinterface under Konfiguration.
$ACTION: The action to use. Replace
$ACTIONby any of the following:
- index: Lists all available soundfiles. This action ignores the parameters -d and -k as they have no impact on the listing.
- get: Downloads all available soundfiles, saves them to -d and deletes them on the server (unless the parameter -k is given)
$TARGET_DIR: Target directory to save the soundfiles into. Replace
$TARGET_DIRby an absolute path (e.g.: C:\Users\Example\Recordings). If the given path/folder does not exist, this program creates it. Don’t forget to use quotes
“if your path has spaces in it (e.g. “C:\Firstname Lastname\Example\Recordings”).
- -k: Stands for “keep” and disables the deleting process of the soundfiles on the server. If -k is omitted, every downloaded soundfile is deleted on the server.
$SECONDSoptional: This parameter sets a sleep timer between downloads. The default value (if -s isn’t set) is 0.5 seconds. It was added because some systems block the script from downloading when it’s too fast. Try playing around with this parameter if the script doesn’t download everything at once.
- pause: This pauses the command window to let you see what has been done. Without this pause, the window will close as soon as the script ended. If the script is automated, this pause should be removed
- -i: Ignore already downloaded files. (If -k is not set the files will be deleted on the server)
If you execute the program for the first time, we recommend using the parameter -k to make sure everything works fine without losing the soundfiles from the server.
Worst case scenario without -k would be something like the soundfile was downloaded and deleted on the server but the file is corrupt on the local machine and no way to get back the original soundfile.
Another advantage using -k would be that you can test it on your computer at home to get to know the program and then download the files again on a different computer at work.