Asterisk 1.6 using dahdi
In autoconfig-buttons-freepbx.sh, the following code is supposed to be checking for dahdi trunks, it executes a "zap show channels" command. Zap show channels will report it as "no such command". It should be "dahdi show channels" - I've bolded the error.
DAHDI=`asterisk -rx "zap show channels" | grep -v from-internal | grep -v pseudo | grep -v Language | awk '{print $1}' | head -n 1`
if [ "X${DAHDI}" != "X" ]; then
echo
echo "[DAHDI/$DAHDI]"
echo "type=trunk"
echo "label=DAHDI"
asterisk -rx "zap show channels" | grep -v from-internal | grep -v pseudo | grep -v Language | awk '{print $1}' | tail -n +2 | while read LINEA
do
echo "channel=DAHDI/$LINEA"
done