Nicolás,
That didn't work. There were two places that I had to change it. The calls on the respective channels of the trunk are still not appearing. Here is the code after I made the requested adjustments:
echo $LINEA | sed 's/^channel=\(.*\)/\n[\1]/g'
echo $LINEA | grep -qi "^email=splitme"
if [ $? = 0 ]; then
RANGE=`echo $LINEA | sed 's/^email=splitme-//g' | sed 's/-/ /g'`
for ZAPNUM in `seq $RANGE`
do
echo "channel=DAHDI/i$ZAPNUM"
echo "channel=DAHDI/$ZAPNUM"
echo "channel=ZAP/$ZAPNUM"
done
fi
done
else
mysql -ENB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e \
"SELECT if(type='extension',CONCAT('USER/',exten),device) AS channel,type,if(type<>'trunk',exten,' ') AS extension,\
label,mailbox,context,'$QUEUECONTEXT' as queuecontext,concat('*',mailbox) AS extenvoicemail, \
privacy,\`group\`,IF(type='trunk',IF(email<>'',concat('splitme-',email),''),email) as email, \
queuechannel,originatechannel FROM fop2buttons WHERE device<>'' ORDER BY type,exten" | \
sed '/\*\*/d' | sed 's/: /=/g' | sed '/.*=$/d' | while read LINEA
do
echo $LINEA | sed 's/^channel=\(.*\)/\n[\1]/g'
echo $LINEA | grep -qi "^email=splitme"
if [ $? = 0 ]; then
RANGE=`echo $LINEA | sed 's/^email=splitme-//g' | sed 's/-/ /g'`
for ZAPNUM in `seq $RANGE`
do
echo "channel=DAHDI/i$ZAPNUM"
echo "channel=DAHDI/$ZAPNUM"
echo "channel=ZAP/$ZAPNUM"
done
fi
done
fi
Did I execute the code change correctly? Let me know if there are other steps we can take. Is there an upgrade? Would installing the latest version or even re-installing the version I have resolve this problem?
Thanks, Josh