vicigeeksimple guides
Browse
All guides

Running your system · Delivery setup

Plan a VICIdial sales-recording SFTP export

Plan a filtered recording export and verify authenticated SFTP delivery using synthetic data before scheduling.

Reader setup

Before you choose

  1. Access to the VICIdial exporter and a separate synthetic test campaign
  2. An SFTP destination, permitted directory and independently verified host-key fingerprint
  3. A protected staging area and an agreed retention and recovery procedure
Expected result
A reviewable delivery design and acceptance checklist; this article does not provide a production-ready push script.
Before making changes
Do not schedule or send recordings until selection, transfer, retry and cleanup behavior have been verified on synthetic data.

What this guide builds

Record the exact campaign, sale statuses, date window and destination. Use the native exporter only after checking its installed options and testing selection against synthetic records.

This article outlines a delivery design. It does not provide a production-ready script or claim that a destination has been tested.

  • Use a dedicated private staging directory and lock for each profile.
  • Verify the SFTP host key through a separate trusted channel.
  • Compare the intended synthetic selection with staged and received files before scheduling.
Trace path · read left to right
01Native exporter selection02Reviewed script + lock03Verified SFTP delivery

Step 1 — Confirm the exporter, stock tools and its real flags

Run this on the VICIdial server before writing anything else. It confirms the native exporter is present and executable, that `sftp` and `flock` exist, and shows the web-report path this build actually uses; this guide never touches the database, so only `PATHweb` is needed here.

The last command reads the exporter's own source for its long-option names instead of asking you to trust a list in this article. Flag names and defaults can differ between VICIdial releases. Confirm the installed exporter’s supported filters before designing an implementation.

Before you use it
Run as root on the VICIdial server. This only reads the exporter's presence, the web-report path key and the exporter's own source text; nothing is written or transferred.
Confirm the exporter, stock tools and its option names
test -x /usr/share/astguiclient/AST_VDsales_export.pl && echo presentcommand -v sftp flockgrep -E '^PATHweb=' /etc/astguiclient.confgrep -oE -- '--[a-z][a-z-]*' /usr/share/astguiclient/AST_VDsales_export.pl | sort -u
Evidence · ViciBox 12 demo capture

Captured demo response · 2026-09-24 22:25 UTC. Any filtering, hidden values or test-only data are identified in the capture label. Select Replay transcript to read the recorded output.

Command output line: test -x /usr/share/astguiclient/AST_VDsales_export.pl && echo present
present
Command output line: command -v sftp flock
/usr/bin/sftp
/usr/bin/flock
Command output line: grep -E '^PATHweb=' /etc/astguiclient.conf
PATHweb=/srv/www/htdocs
Command output line: grep -oE -- '--[a-z][a-z-]*' /usr/share/astguiclient/AST_VDsales_export.pl | sort -u
--calltime
--campaign
--date
--debug
--email-list
--email-post-audio
--email-sender
--filedate-calldate
--filename
--ftp-audio-transfer
--ftp-dir
--ftp-login
--ftp-norun
--ftp-pass
--ftp-server
--ftp-transfer
--help
--hour-offset
--http-pass
--http-password
--http-user
--nodatedir
--outbound-calltime-ignore
--output-document
--output-format
--quiet
--sale-statuses
--skip-rec-xtra
--temp-dir
--test
--totals-only
--with-did-lookup
--with-inbound
--with-transfer-audio
--without-camp
--without-in
Success looks like
The exporter path prints `present`, both tools resolve, one `PATHweb` line prints, and the last command lists the exporter's real long-option names.
Stop if
Stop if the exporter is missing or not executable, either tool is absent, or `PATHweb` is empty; confirm the equivalent key on your own install before continuing.

Step 2 — Design the export and delivery

A delivery job needs explicit campaign and status filters, a bounded date window, a private staging area, a lock, authenticated SFTP and a durable record of verified delivery.

Do not delete an existing staging directory at startup. Define how partial transfers are recovered and how a completed date is recognized before allowing a retry. Validate all values used in shell paths or SFTP commands.

Before you use it
Fill each field for a synthetic test; do not include secrets.
Delivery design worksheet
campaign = [exact ID]statuses = [exact values]date_window = [start and end]staging = [dedicated protected directory]lock = [per-profile lock]recipient = [host and directory]verification = [count and content integrity check]retry_and_cleanup = [reviewed procedure]
Not executed · worksheet or reference text

This sample is a template or reading aid, not a terminal command. There is no output to show.

Success looks like
Every field names a testable value and recovery action.
Stop if
Stop if selection, remote verification, retry or cleanup remains unspecified.

Step 3 — Verify the host key, then generate the client key

Retrieve the recipient host key and compare its fingerprint with the value received over a separate trusted channel. Only install a key after an exact match.

Use a dedicated known-hosts file and client key. Check whether either path already exists before creating files; never overwrite an existing key pair or bypass host-key checking.

The candidate key scan, installation and key generation below are prospective changes. Confirm the hostname and fingerprint independently; never publish a private key.

Before you use it
Replace the placeholders with the approved recipient endpoint and your chosen profile alias. Obtain the expected fingerprint independently before running the final install command.
Verify the host key, install it, and generate the client key
test ! -e '<PROFILE>-known-hosts.candidate' || exit 1ssh-keyscan -p 22 '<SFTP_HOST>' > '<PROFILE>-known-hosts.candidate' || exit 1ssh-keygen -lf '<PROFILE>-known-hosts.candidate' # Continue only after the recipient confirms the exact fingerprint:sudo install -d -m 0750 /etc/vicidial-sales-sftp-push# Stop if either destination exists; preserve any existing files.test ! -e '/etc/vicidial-sales-sftp-push/<PROFILE>_known_hosts' && test ! -e '/etc/vicidial-sales-sftp-push/<PROFILE>_ed25519' || exit 1sudo install -o root -g root -m 0600 \  '<PROFILE>-known-hosts.candidate' \  "/etc/vicidial-sales-sftp-push/<PROFILE>_known_hosts" # Generate the key pair the script authenticates with, then send only the .pub half:sudo ssh-keygen -t ed25519 -N '' -C 'vicidial-sales-sftp-push' \  -f "/etc/vicidial-sales-sftp-push/<PROFILE>_ed25519"
Reader-run example · not executed for this guide

This example has no recorded result here. Follow its preparation, expected result and stop conditions before using it.

Success looks like
The independently supplied and locally displayed fingerprints match exactly, the dedicated known-hosts file is root-owned mode 0600, and a new private/public key pair exists at the path the script expects.
Stop if
Stop on a mismatch, multiple unexplained keys, DNS uncertainty or an unverified fingerprint; do not bypass checking.

Step 4 — Test locally with synthetic data

Run the installed exporter against a dedicated synthetic campaign using the exact supported filters. Compare the selected records with the expected list and inspect staging in a protected environment.

Verify that a repeated run and a simulated interruption do not delete unrelated files or silently duplicate delivery. This article does not supply an executable check-only script.

Step 5 — Verify the recipient before scheduling

Using strict host-key verification and the dedicated client key, upload a harmless test file to the approved folder. Confirm that the recipient can read and remove it.

Then send only synthetic recordings and compare the expected and received count and content integrity. Schedule a separately reviewed implementation only after partial transfer, retry, duplicate and cleanup tests pass.

Step 6 — Verify operation and know the rollback

For each delivery, compare the intended selection and staged files with the recipient’s confirmed files and integrity results. A local completion marker alone does not prove remote receipt.

To stop future delivery, disable the scheduled job and verify no run is still active. Preserve the staging and delivery evidence needed to reconcile a partial run.

Checks and sources

What was checked

  • AST_VDsales_export.pl is present in the referenced build; options and behavior must be checked against the installed revision.
  • No external destination or completed end-to-end delivery is verified by this article.

Primary references

Sources

  1. OpenSSH sftp manualOpenBSD · accessed August 4, 2026
  2. OpenSSH client configurationOpenBSD · accessed August 4, 2026
  3. VICIdial product overviewVICIdial Group · accessed August 4, 2026

Follow without guesswork

Get the next article

RSS is live now. Email delivery below is an explicit local preview and sends nothing.Open the RSS feed
Email preview only. The address stays in this browser and is never transmitted.