TMG:Automatic Text CDR Retrieval

From TBwiki
Revision as of 11:18, 3 February 2011 by Cbilodeau (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This procedure shows how to configure a Tmedia to send its CDR files to a remote server automatically.

Warning: If the destination is a Windows server, you require to install software that supports scp (i.e. freeSSHd).

Setup SSH Public/Private Key

This will enable the Tmedia to send files to the remote host without asking for a password:

  • Connect to the Tmedia using SSH as root
  • Create Tmedia public/private dsa key pair
ssh-keygen -t dsa

Note: Do not add a pass phrase, simply press enter until the key pair is generate.

  • Append the content of the public key to the remote host authorized keys

Tmedia public key location

/root/.ssh/id_dsa

Remote Host authorized keys location

~/.ssh/authorized_keys

Configure the Tmedia to Send files

  • Open the file configuration
vim /usr/bin/tbcopycdr
  • Set the following variables in the file
    • TMG_CDR_DIR (Tmedia directory where the CDR are located)
    • REMOTE_DIR (Remote host directory where the CDR will be send)
    • REMOTE_USER (Remote host user)
    • REMOTE_HOST (Remote host name or Ip address)
    • ERASE_AFTER_SEND (TMedia will erase the CDR files locally or not after a successful send)

Configure Tmedia to send the files automatically

  • Create a new crontab on the Tmedia
vim crontab -e
  • Add the tbcopycdr script to cron
Personal tools