Corrected LED setting in voice-monitor script. LED was set to On when starting to dial digits.

The LED is now kept set on Notice until hook on.

Ref: #15325
This commit is contained in:
Kent Ekholm 2018-11-21 10:04:22 +01:00
parent e6caf05501
commit e2897f2d83

View file

@ -48,17 +48,24 @@ while read event ; do
fi
elif json_select asterisk.endpoint >/dev/null; then
json_get_var event event
if [ "$event" == "OFFHOOK" ]; then
case $event in
OFFHOOK)
OFFHOOK=1
ubus call led.voice1 set '{"state":"notice"}'
else
;;
ONHOOK)
OFFHOOK=0
if [ $REGISTERED -eq 1 ]; then
ubus call led.voice1 set '{"state":"ok"}'
else
ubus call led.voice1 set '{"state":"error"}'
ubus call led.voice1 set '{"state":"error"}'
fi
fi
;;
*)
# Do nothing for other events.
;;
esac
fi
done &