So, how and where do I set it up so the fxotune settings are loaded in the correct sequence after a re-boot? ie: before asterisk starts.
Hi Sean,
I'm pretty sure we did this for one of our customers who was having echo problems but for some reason it never found its way into the product proper. If you want to patch it yourself and you know a bit of bash scripting you can do it in the start routine in
/etc/init.d/rc.d/asterisk.
Put it in at the beginning of our mods.....
start)
#
# selintra mod for SARK/SAIL
#
if [ -e /home/e-smith/db/selintra ]; then
ZAPHFC=`/sbin/e-smith/db selintra getprop zaphfc status`
WCTDM=`/sbin/e-smith/db selintra getprop wctdm status`
WCFXO=`/sbin/e-smith/db selintra getprop wcfxo status`
ZTDUMMY=`/sbin/e-smith/db selintra getprop ztdummy status`
if [ ! -e /dev/zap ]; then
/sbin/modprobe zaptel
WAITCNT=0
echo "Waiting for udev."
while [ ! -e /dev/zap -a $WAITCNT -le 60 ]; do
sleep 1
WAITCNT=`expr $WAITCNT + 1`
done
if [ $WAITCNT -gt 60 ]; then
echo "Waited too long for udev, - aborting Asterisk startup."
exit 1
fi
if [ $ZAPHFC = 'YES' ]; then
/sbin/modprobe zaphfc
fi
if [ $WCTDM = 'YES' ]; then
/sbin/modprobe wctdm
fi
if [ $WCFXO = 'YES' ]; then
/sbin/modprobe wcfxo
fi
if [ $ZTDUMMY = 'YES' ]; then
/sbin/modprobe ztdummy
fi
/sbin/ztcfg
fi
fi
#
# end selintra mod
#
If you want to make the patch generic then check for the existence of fxotune (depending upon where you saved it) before you execute it. You might even want to do it "sme-server fashion" and create a service record in the configuration database with a status of enabled/disabled and check that. We check a similar field in the selintra database to see which drivers to load.
hint:-
/sbin/e-smith/config set fxotune service status enabled
You can then query that in the startup routine to decide whether to issue the fxotune -s or not.
FXOTUNE=`/sbin/e-smith/config getprop fxotune status`
You can put fxotune into /etc/selintra for want of somewhere better.
If you do have a go, send it to us and we'll shove it into the next release.
Kind Regards
Selintra