Steps to setup my asterisk server in an OpenVZ VE

  • Set the VE up
  • Install asterisk
    • wget ftp://ftp.digium.com/pub/asterisk/asterisk-1.2-current.tar.gz
    • tar -xzf asterisk-1.2-current.tar.gz
    • cd asterisk-1.2.18/
    • yum install glibc-devel ncurses-devel gcc openssl-devel zlib-devel
    • make
    • make mpg123
    • make install
    • make config
    • Edit /usr/sbin/safe_asterisk to comment out the line about TTY 9
  • Start asterisk
  • Copy asterisk config files (/etc/asterisk/*)
  • Copy moh mp3's (/var/lib/asterisk/mohmp3/)
  • Copy custom sounds (IVR)
  • Copy voicemail directory
  • Get french sounds :
    • wget ftp://ftp.digium.com/pub/telephony/sounds/asterisk-core-sounds-fr-wav-current.tar.gz
    • tar -xzf asterisk-core-sounds-fr-wav-current.tar.gz
    • Use the script "install_french.sh" (must be run in /var/lib/asterisk/sounds/fr) (see below for script)
  • Change DNS records
  • Test!
  • Create backups (with vzdump)
install_french script:
#!/bin/bash

# Script creant des liens symboliques permetannt l'utilisation des fichiers audios plus rapidement
#
# Clod Patry (removed e-mail address)
# Version 1.0 05/5/2006 (happy birthday mom)

SOUNDS_ABS=/var/lib/asterisk/sounds
LANGUAGE=fr

#root
if [ ! -e $SOUNDS_ABS ]; then
echo "Le repertoire $SOUNDS_ABS ne semble pas exister. Installez asterisk ou corriger le \$SOUNDS_ABS";
exit;
fi

DIR=dictate
CUR=$PWD/$DIR
if [ ! -e $SOUNDS_ABS/$DIR/$LANGUAGE ]; then
if [ ! -e $CUR ]; then
echo "Le repertoire $CUR ne semble pas exister.";
else
ln -s $CUR $SOUNDS_ABS/$DIR/$LANGUAGE
fi
else
echo "Impossible de creer $SOUNDS_ABS/$DIR/$LANGUAGE , il existe deja."
fi


DIR=digits
CUR=$PWD/$DIR
if [ ! -e $SOUNDS_ABS/$DIR/$LANGUAGE ]; then
if [ ! -e $CUR ]; then
echo "Le repertoire $CUR ne semble pas exister.";
else
ln -s $CUR $SOUNDS_ABS/$DIR/$LANGUAGE
fi
else
echo "Impossible de creer $SOUNDS_ABS/$DIR/$LANGUAGE , il existe deja."
fi


DIR=letters
CUR=$PWD/$DIR
if [ ! -e $SOUNDS_ABS/$DIR/$LANGUAGE ]; then
if [ ! -e $CUR ]; then
echo "Le repertoire $CUR ne semble pas exister.";
else
ln -s $CUR $SOUNDS_ABS/$DIR/$LANGUAGE
fi
else
echo "Impossible de creer $SOUNDS_ABS/$DIR/$LANGUAGE , il existe deja."
fi


DIR=phonetic
CUR=$PWD/$DIR
if [ ! -e $SOUNDS_ABS/$DIR/$LANGUAGE ]; then
if [ ! -e $CUR ]; then
echo "Le repertoire $CUR ne semble pas exister.";
else
ln -s $CUR $SOUNDS_ABS/$DIR/$LANGUAGE
fi
else
echo "Impossible de creer $SOUNDS_ABS/$DIR/$LANGUAGE , il existe deja."
fi


Comments

Popular posts from this blog

General linux performance troubleshooting

Asterisk works under OpenVZ (no zaptel)