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 <anjan@momi.ca>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Anjandev Momi 2020-12-04 04:10:01 +00:00 committed by Maarten van Gompel
parent 17e3b623bf
commit b0bb9ac9fc

View file

@ -22,9 +22,7 @@ modem_n() {
lookupnumberfromcallid() { lookupnumberfromcallid() {
VOICECALLID=$1 VOICECALLID=$1
mmcli -m "$(modem_n)" --voice-list-calls -o "$VOICECALLID" -K | mmcli -m "$(modem_n)" --voice-list-calls -o "$VOICECALLID" -K |
grep call.properties.number | sed -E 's/^call\.properties\.number\s+:\s+//'
cut -d ':' -f 2 |
tr -d ' '
} }
checkformissedcalls() { checkformissedcalls() {