From b0bb9ac9fc251b2463924869ab9dd2cee6317506 Mon Sep 17 00:00:00 2001 From: Anjandev Momi Date: Fri, 4 Dec 2020 04:10:01 +0000 Subject: [PATCH] simplify code to get phone number for incoming calls This code uses fewer programs and the code now matches the code for getting phone number of incoming text. Signed-off-by: Anjandev Momi Signed-off-by: Maarten van Gompel --- scripts/modem/sxmo_modemmonitor.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/modem/sxmo_modemmonitor.sh b/scripts/modem/sxmo_modemmonitor.sh index 82fc93b..a1893b7 100755 --- a/scripts/modem/sxmo_modemmonitor.sh +++ b/scripts/modem/sxmo_modemmonitor.sh @@ -22,9 +22,7 @@ modem_n() { lookupnumberfromcallid() { VOICECALLID=$1 mmcli -m "$(modem_n)" --voice-list-calls -o "$VOICECALLID" -K | - grep call.properties.number | - cut -d ':' -f 2 | - tr -d ' ' + sed -E 's/^call\.properties\.number\s+:\s+//' } checkformissedcalls() {