Add back a notification when receiving a call

If a menu already is open while receiving a call, the dedicated menu
could not open itself. It prevent completly the user to pickup the call.

We add a notification to open this menu manually.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
master
Stacy Harper 4 years ago committed by Maarten van Gompel
parent 0df2ae3c95
commit 02a37c9dea
  1. 1
      scripts/modem/sxmo_modemcall.sh
  2. 6
      scripts/modem/sxmo_modemmonitor.sh

@ -252,6 +252,7 @@ incomingcallmenu() {
elif echo "$PICKED" | grep -q "Mute"; then elif echo "$PICKED" | grep -q "Mute"; then
mute "$1" mute "$1"
fi fi
rm -f "$NOTIFDIR/incomingcall_${1}_notification"* #there may be multiple actionable notification for one call
} }
modem_n || finish "Couldn't determine modem number - is modem online?" modem_n || finish "Couldn't determine modem number - is modem online?"

@ -86,6 +86,7 @@ checkforfinishedcalls() {
FINISHEDNUMBER="$(lookupnumberfromcallid "$FINISHEDCALLID")" FINISHEDNUMBER="$(lookupnumberfromcallid "$FINISHEDCALLID")"
FINISHEDNUMBER="$(cleanupnumber "$FINISHEDNUMBER")" FINISHEDNUMBER="$(cleanupnumber "$FINISHEDNUMBER")"
mmcli -m "$(modem_n)" --voice-delete-call "$FINISHEDCALLID" mmcli -m "$(modem_n)" --voice-delete-call "$FINISHEDCALLID"
rm -f "$NOTIFDIR/incomingcall_${FINISHEDCALLID}_notification"* #there may be multiple actionable notification for one call
rm -f "$CACHEDIR/${FINISHEDCALLID}.monitoredcall" rm -f "$CACHEDIR/${FINISHEDCALLID}.monitoredcall"
@ -178,6 +179,11 @@ checkforincomingcalls() {
mkdir -p "$LOGDIR" mkdir -p "$LOGDIR"
printf %b "$TIME\tcall_ring\t$INCOMINGNUMBER\n" >> "$LOGDIR/modemlog.tsv" printf %b "$TIME\tcall_ring\t$INCOMINGNUMBER\n" >> "$LOGDIR/modemlog.tsv"
sxmo_notificationwrite.sh \
"$NOTIFDIR/incomingcall_${VOICECALLID}_notification" \
"sxmo_modemcall.sh incomingcallmenu '$VOICECALLID'" \
none \
"Incoming Call - $CONTACTNAME" &
sxmo_modemcall.sh incomingcallmenu "$VOICECALLID" & sxmo_modemcall.sh incomingcallmenu "$VOICECALLID" &
echo "sxmo_modemmonitor: Call from number: $INCOMINGNUMBER (VOICECALLID: $VOICECALLID)">&2 echo "sxmo_modemmonitor: Call from number: $INCOMINGNUMBER (VOICECALLID: $VOICECALLID)">&2

Loading…
Cancel
Save