Projet

Général

Profil

Actions

Anomalie #1533

fermé

Remettre sur Asterisk l'affichage des membres

Ajouté par Benjamin Drieu il y a environ 10 ans. Mis à jour il y a environ 3 ans.

Statut:
Rejeté
Priorité:
Normale
Assigné à:
Catégorie:
-
Version cible:
Début:
11/07/2014
Echéance:
% réalisé:

80%

Temps estimé:
Difficulté:
2 Facile

Description

J'ai configuré l'appel à un script AGI dans le dialplan (à reporter pour chaque téléphone concerné)"

@@exten = 80,n,AGI

Puis le script suivant a été développé :

#!/bin/bash

declare -a array
while read -e ARG && [ "$ARG" ] ; do
        array=(` echo $ARG | sed -e 's/://'`)
        export ${array[0]}="${array[1]}" 
done

newcaller=$(echo $agi_callerid | sed -e 's/^0\([0-9]\{9\}\)$/33\1/g')
if test "$newcaller" != "$agi_callerid" ; then
    agi_callerid=$newcaller
fi

callerid=$(grep ":$agi_callerid\$" /etc/asterisk/phone.csv | sed -e 's/:.*//g')

if test -z "$callerid" ; then
    echo "SET CALLERID \"$agi_callerid\"<$agi_callerid>" 
else
    echo "SET CALLERID \"$callerid\"<$agi_callerid>" 
fi

Le fichier phone.csv contient une association clef/valeur entre nom et téléphone.

Actions

Formats disponibles : Atom PDF