diff --git a/imageroot/systemd/user/sftp.service b/imageroot/systemd/user/sftp.service index 77927ccd0..07da3f298 100644 --- a/imageroot/systemd/user/sftp.service +++ b/imageroot/systemd/user/sftp.service @@ -16,6 +16,7 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/sftp.pid \ --name=%N \ --volume=moh:/var/sftp/moh:z \ --volume=sounds:/var/sftp/sounds:z \ + --volume=spool:/var/sftp/spool:z \ --volume=sftp_ssh_config:/etc/ssh:Z \ --env=ASTERISK_RECORDING_SFTP_PORT \ --env=AMPMGRUSER \ diff --git a/sftp/README.md b/sftp/README.md index 92634d7de..dc918b693 100644 --- a/sftp/README.md +++ b/sftp/README.md @@ -12,3 +12,25 @@ On NethVoice, systemd unit file is provided. To enable it automatically, launch - `AMPDBNAME` FreePBX MariaDB database name (default: asterisk) - `NETHVOICE_MARIADB_PORT` Port of MariaDB - `ASTERISK_RECORDING_SFTP_PORT` Port where sftp service will be reachable + +## Access volumes + +Shared volumes are: + +- `sounds` - All asterisk system sounds, recordings and announcements +- `moh` - Hold music +- `spool` - All Asterisk spool directories (with call recordings under `spool/monitor`) + +To access sftp server, connect using sftp on port `$ASTERISK_RECORDING_SFTP_PORT` using the user `asterisk` and the NethVoice admin password. +By default sftp access is only enabled from the same machine, to access from the outside, you have to open the port on firewall: + +example: ASTERISK_RECORDING_SFTP_PORT=20033, nethvoice instace is 1 +``` +firewall-cmd --permanent --service=nethvoice1 --add-port=20033/tcp +firewall-cmd --reload +``` + +sample scp command: +``` +scp -r -P 20033 asterisk@HOST:spool/monitor ./ +``` \ No newline at end of file