Skip to end of metadata
Go to start of metadata


Sep 21, 2020 06:56


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

Permalink: https://confluence.wildix.com/x/L4BpAg

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.


Copy hostkey

  • 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:password@pbxname.wildixin.com:2222/ -hostkey="ssh-rsa 2048 sC3GbYt5Wm2hncmstFP3ROF55oA4FE6kR2mAycu0FRU="

lcd C:\Backup

cd /media/

get -delete -resume -nopreservetime -filemask="*.wav" /media/2018.11* C:\Backup\Recordings\2018\Nov

exit

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



Not finding the help you need?
Join the Facebook group to ask a question!
facebook_tech-wizards