mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
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:
parent
e6caf05501
commit
e2897f2d83
1 changed files with 11 additions and 4 deletions
|
|
@ -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 &
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue