Oct 27, 2020 21:13
The following Document describes how to download and delete call recordings from Cloud PBX’s on Windows. The Document will guide you through manually downloading the files through WinSCP and also a script to automate the procedure on a Windows Server 2012 R2 64bit machine.
Created: April 2019
Step1. Download WinSCP
- Download and install WinSCP with full setup: LINK
Step 2. Connect to Cloud PBX with WinSCP
SSH is disabled by default on Cloud PBXs. You can temporarily enable it on WMP. For instructions, read PBX Licensing and Activation - Admin guide (Enable SSH port on Cloud PBXs).
Step 3. Browse to /media/
- Use the up arrow to browse to the root of /media/:
Step 4. Download recordings
Recordings are stored in the following setup (year.month.day)/hour/minute
You can download then delete these files.
Step 5. Scripting download and delete process
Create directory to download recordings
- From the Windows machine create the following directories C:\Backup\Recordings
In our example we are using C:\Backup\Recordings – these directories can be edited, and the script will need to be modified accordingly.
- Download the following ZIP file: https://drive.google.com/file/d/1VZtuDX-AdXSy4H_Y5d9p6Ra-P7Roxh5p/view?usp=sharing
- Extract the ZIP file to C:\Backup
- To find the host key, open your WinSCP session
- Click Session -> Generate Session URL/Code…
- Copy the hostkey:
- Change DownloadRec.txt by editing the following information:
- Replace /media/(Year.Month eg 2018.10) to represent the month to download and on add (Month2 to end eg Oct) to end of line 4
- Replace pbxpassword with the admin password
- Replace pbxname with the wildixin name on the pbx you are connecting to
- Replace host key with scripted key
- Month2 in format Jan / Feb / Mar / Apr / May / Jun / Jul / Aug / Sep / Oct / Nov / Dec
- Replace Year2 with the Year you want to download
Example format of script:
# Example script for downloading Oct 2018 recordings:
open sftp://admin:firstname.lastname@example.org:2222/ -hostkey="ssh-rsa 2048 sC3GbYt5Wm2hncmstFP3ROF55oA4FE6kR2mAycu0FRU="
get -delete -resume -nopreservetime -filemask="*.wav" /media/2018.11* C:\Backup\Recordings\2018\Nov
Run bat file
- Right click Rundownload.bat and run as administrator
- Check recording folder to make sure recordings have been downloaded
If you schedule this to run through Windows Scheduler you will need to remove the “pause” from Rundownload.bat.
Wildix Media Sync
Wildix Media Sync script can be downloaded by clicking here.
Additional information about Wildix Media Sync:
- Us the WinSCP synchronise feature
- This will copy ALL the files on first run and only copy new files on subsequent runs, this runs perfects on scheduled task scenarios
- The script does not delete any recordings, it is designed to let the pbx do this using either the retention setting in WMS > Settings > Call and Chat history or the inbuilt job when storage fills up.
- The script accommodates for all system date/time formats