#!/bin/bash # Script to control Message Waiting Indicator (MWI) on SIP phones # by K0KN 6/2014. Updated 10/2023 for multi-box control of cooling fan etc # # Make sure that /etc/asterisk/voicemail.conf defines the pollfreq # variable. This determines how often Asterisk will update the MWI status # pollfreq=8 ; Check every 8 seconds # CONTEXT="radio-control" if [ "$1" == "" ] ; then echo "Usage: mwi_on [ext] [optional asterisk cmd to execute]" exit fi # echo "Turning on MWI for ext $1" touch /var/spool/asterisk/voicemail/"$CONTEXT"/"$1"/INBOX/msg0001.txt if [ -n "$2" ] ; then echo "executing: asterisk -rx $2" asterisk -rx "$2" fi # Done exit 0