Plus prefix strip numbers before storing into modem log

This commit is contained in:
Miles Alan 2020-06-29 15:24:10 -05:00
parent e3f50e9d1b
commit 844ce9ddef
3 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ vid_to_number() {
mmcli -m "$(modem_n)" -o "$1" -K |
grep call.properties.number |
cut -d ':' -f2 |
tr -d ' '
tr -d ' +'
}
log_event() {

View file

@ -50,7 +50,7 @@ checkforincomingcalls() {
mmcli -m "$(modem_n)" --voice-list-calls -o "$VOICECALLID" -K |
grep call.properties.number |
cut -d ':' -f 2 |
tr -d ' '
tr -d ' +'
)
# Log to /tmp/incomingcall to allow pickup and log into modemlog

View file

@ -52,7 +52,7 @@ sendtextmenu() {
awk NF |
sxmo_dmenu_with_kb.sh -p "Number" -fn "Terminus-20" -l 10 -c |
cut -d: -f1 |
tr -d -- '- '
tr -d -- '-+ '
)"
echo "$NUMBER" | grep -E "^Cancel$" && exit 1
echo "$NUMBER" | grep -qE '^[+0-9]+$' || err "That doesn't seem like a valid number"