From 6f94bb8159c968bd17a7eb7584c0923efa3a0460 Mon Sep 17 00:00:00 2001 From: Reed Wade Date: Mon, 2 Nov 2020 23:09:06 +0100 Subject: [PATCH] Add a new pickup hook that trigger on accept incoming calls Signed-off-by: Reed Wade Signed-off-by: Maarten van Gompel --- scripts/modem/sxmo_modemcall.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/modem/sxmo_modemcall.sh b/scripts/modem/sxmo_modemcall.sh index 279a36d..b56e6ed 100755 --- a/scripts/modem/sxmo_modemcall.sh +++ b/scripts/modem/sxmo_modemcall.sh @@ -86,6 +86,9 @@ acceptcall() { modem_cmd_errcheck -m "$(modem_n)" -o "$CALLID" --start log_event "call_start" "$CALLID" elif [ "$DIRECTION" = "incoming" ]; then + if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/pickup" ]; then + "$XDG_CONFIG_HOME/sxmo/hooks/pickup" & + fi modem_cmd_errcheck -m "$(modem_n)" -o "$CALLID" --accept log_event "call_pickup" "$CALLID" else