1) creer un "friend" dans iax.conf
cf. google -> asterisk config iax.conf
sur voip-info.org
le friend(ton telephone) est relie sur un contexte
contexte qui doit inclure une extension 888
soit nativement
soit a travers un include
dans les extensions.conf

#!/bin/sh

function echoTask
{
  TITLE=$1
  TASK=$2
  echo $TASK
  echo -e "["`date "+%Y-%m-%d %H:%M"`"]\t$TITLE\t$TASK" >> $LOGFILE
}

LOGFILE="install.txt"
SOURCE=ftp://ftp.digium.com/pub/telephony/asterisk/asterisk-1.2.5.tar.gz
FILENAME=`basename $SOURCE`
DIRNAME=`basename $SOURCE .tar.gz`

if [ ! -e $FILENAME ]; then
 echoTask "wget" "Getting $SOURCE"
 wget $SOURCE
fi

if [ ! -d $DIRNAME ]; then
 echoTask "tar" "Extracting $FILENAME"
 tar xzvf $FILENAME
fi

cd $DIRNAME
less README

echo -n "Do you want to compile $DIRNAME? (y/n): "
read userAskInstall
if [ $userAskInstall == 'y' ]; then
 echoTask "make" "Compiling $DIRNAME"
 make
fi

echo -n "Do you want to install $DIRNAME? (y/n): "
read userAskInstall
if [ $userAskInstall == 'y' ]; then
 echoTask "make install" "Installing $DIRNAME"
 echo "su will ask your password to be root"
 su -c "make install"
fi

echo -n "Do you want to create new configuration file? (y/n): "
read userAskInstall
if [ $userAskInstall == 'y' ]; then
  echoTask "make samples" "Creating configuration file for $DIRNAME"
  echo "su will ask your password to be root"
  su -c "make samples"
fi

echo -n "Do you want to install program documentation? (y/n): "
read userAskInstall
if [ $userAskInstall == 'y' ]; then
  echoTask "make progdocs" "Installing program documentation for $DIRNAME"
  echo "su will ask your password to be root"
  su -c "make progdocs"
fi

echo "Asterisk command is /usr/sbin/asterisk"

Hyperliens...