Asterisk on DS-Mod menu

ramik

Neuer User
Mitglied seit
3 Mai 2007
Beiträge
168
Punkte für Reaktionen
0
Punkte
16
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):
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
 

Anhänge

  • daemons.JPG
    daemons.JPG
    71.2 KB · Aufrufe: 94
  • rc.asterisk.zip
    603 Bytes · Aufrufe: 22
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.