Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Control script to change the status of a custom device state in Asterisk
- # Called from Asterisk whenever a voicemail message is left
- #
- VM_CONTEXT=$1
- EXTEN=$2
- VM_COUNT=$3
- ASTCMD="/usr/sbin/asterisk -rx"
- if [ $EXTEN -ne 4444 ]; then
- exit 0
- fi
- if [[ $VM_COUNT = "0" ]]; then
- logger -t groupmwi "Switching OFF Group mailbox message"
- $ASTCMD "originate Local/s@groupmwi-off extension 4@default"
- else
- logger -t groupmwi "Switching ON Group mailbox message"
- $ASTCMD "originate Local/s@groupmwi-on extension 4@default"
- fi
- exit 0
Add Comment
Please, Sign In to add comment