From 378fe01738d0fec4ce4a7fd3a6104cfdd15098d6 Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Wed, 17 Mar 2021 19:25:29 +0100 Subject: [PATCH] Add a missed call hook Signed-off-by: Stacy Harper Signed-off-by: Maarten van Gompel --- scripts/modem/sxmo_modemmonitor.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/modem/sxmo_modemmonitor.sh b/scripts/modem/sxmo_modemmonitor.sh index 65d4b69..90c1a62 100755 --- a/scripts/modem/sxmo_modemmonitor.sh +++ b/scripts/modem/sxmo_modemmonitor.sh @@ -73,6 +73,11 @@ checkforfinishedcalls() { mmcli -m "$(modem_n)" --voice-delete-call "$FINISHEDCALLID" rm -f "$NOTIFDIR/incomingcall_${FINISHEDCALLID}_notification"* #there may be multiple actionable notification for one call + if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/missed_call" ]; then + echo "sxmo_modemmonitor: Invoking missed call hook (async)">&2 + "$XDG_CONFIG_HOME/sxmo/hooks/missed_call" "$CONTACTNAME" & + fi + TIME="$(date --iso-8601=seconds)" mkdir -p "$LOGDIR" if [ -f "$CACHEDIR/${FINISHEDCALLID}.discardedcall" ]; then