I have made this script to add the asterisk4fritz on the DS-MOD26 menu, works quite well but i guess it can be made better
i am running the asterisk of a usb stick (installed with the usb_install parameter)
To install this on dsmod, put the rc.asterisk file into the "addons" folder on the usb stick, then add the following code to the debug.cfg file (check forum on how to modify this file):
after rebooting the fritz!box, the new item "asterisk" will be added to the "Dienste" menu, and you can start and stop asterisk from there.
there is a known bug, that even if the stop gives a result of "failed" (always), the daemon is actually stopped, still looking for a way to fix this.
the credit goes for han-solo post, as i modified his code to make it work with asterisk
i am running the asterisk of a usb stick (installed with the usb_install parameter)
To install this on dsmod, put the rc.asterisk file into the "addons" folder on the usb stick, then add the following code to the debug.cfg file (check forum on how to modify this file):
Code:
max=5
i=0
USBDEVICE1='uStor01'
usbroot=/var/media/ftp/$USBDEVICE1
# check for a successful mount of the usb drive
while [ $i -lt $max ]; do
if mount | grep " on /var/media/ftp/" > /dev/null; then
break
fi
let i=$i+1
sleep 15
done
# Asterisk start stop from Daemons interface
if [ -f /var/media/ftp/$USBDEVICE1/addons/rc.asterisk ]
then
ln -s $usbroot/addons/rc.asterisk /var/mod/etc/init.d
cp /etc/static.pkg /var/tmp
echo "asterisk" >> /var/tmp/static.pkg
mount -o bind /var/tmp/static.pkg /etc/static.pkg
#activate asterisk installation on the usb drive
INST_DIR=$usbroot $usbroot/addons/cfg_asterisk14 usb_install
# auto-startup of asterisk (comment next line for manual start from dsmod menu)
$usbroot/addons/cfg_asterisk14 start
fi
after rebooting the fritz!box, the new item "asterisk" will be added to the "Dienste" menu, and you can start and stop asterisk from there.
there is a known bug, that even if the stop gives a result of "failed" (always), the daemon is actually stopped, still looking for a way to fix this.
the credit goes for han-solo post, as i modified his code to make it work with asterisk