TODO

1. Prérequis

2. Faire un menu d'accueil

3. Spécifier les contextes

4. reglage volume et wav2gsm

   sox foo-in.wav -r 8000 -c 1 foo-out.gsm

sox -V in.gsm -s out.wav 

Fichiers à completer

etc/asterisk/indication.conf

zone SN

etc/asterisk/zapata.conf

[trunkgroups]

[channels]
language=fr
signalling=fxs_ks
echocancel=yes
rxgain=0.0
txgain=0.0

; fin de communication : detection ALACON 
busydetect=yes
busycount=6

; fin de communication : detection "polarite"
hanguponpolarityswitch=yes

group=1
callgroup=1
pickupgroup=1

; Context d'accueil 
context=AUF-MENU
immediate=no

channel => 1

/usr/share/asterisk/agi-bin/openclose.agi

TODAY=`date +%m%d%y`
TODAYSHORT=`date +%m%d`
#
DAY=`date +%a`
HOUR=`date +%H`
MINUTE=`date +%M`
TIMENOW=$HOUR$MINUTE
#
STATUS=closed

#
case "$TODAYSHORT" in
  0101 ) STATUS=holiday;; # Nouvel an
  0404 ) STATUS=holiday;; # indepandance senegal
  1224 ) STATUS=halfday;; # Veille de Noel
  1225 ) STATUS=holiday;; # Jour de Noel
  1226 ) STATUS=holiday;; # Fin d'année
  1227 ) STATUS=holiday;; # Fin d'année
  1228 ) STATUS=holiday;; # Fin d'année
  1229 ) STATUS=holiday;; # Fin d'année
  1230 ) STATUS=holiday;; # Fin d'année
  1231 ) STATUS=holiday;; # Fin d'année
esac
# A reviser tous les ans ...:(
case "$TODAY" in  
  052608 ) STATUS=holiday;; # Memorial Day
  090108 ) STATUS=holiday;; # Labor Day
  112708 ) STATUS=holiday;; # Thanksgiving
  112808 ) STATUS=holiday;; # Day after ThanksGiving
esac
#
#Normalement on bosse de 08h.. à 17h
if  test "$STATUS" != "holiday" -a \
    "$DAY" != "Sat" -a \
    "$DAY" != "Sun" -a \
    "$TIMENOW" -gt "0800" -a \
    "$TIMENOW" -lt "1700"
then
    STATUS=open
fi


#
#
if test "$STATUS" = "holiday"
then
 STATUS=closed
fi
#
echo SET VARIABLE STATUS $STATUS
echo VERBOSE STATUS=$STATUS

exit 0

/etc/asterisk/auf/extensions-macros.local

http://www.thomsonbroadbandpartner.com/getfile.php?id=6466

Monitor les sorties lignes

ztmonitor 1 -v

*FXS= Foreign Exchange Station (module Verte) #fxsks

*FXO= Foreign Exchange Office (module Rouge) #fxoks --terminaison de la ligne téléphonique analogique--

Coversion /etc/asterisk/auf/utilisateur en phonebook pour ST2030

for i in `cat phone`; do sed -e s/NOM/$(echo $i | cut -d"," -f3)/ -e s/NUMERO/$(echo $i | cut -d"," -f1)/ test; done

NdimbyAndriantsoavina/NotesPerso/Asterisk (dernière édition le 2011-01-20 12:11:52 par NdimbyAndriantsoavina)