Remove +1 stripping from numbers in modem scripts
Note prefix stripping was unreliable because any +1XX number would break things. The advice should be to always dial with +1 / international prefixes and store contacts in your contacts.tsv with international codes; this way we avoid any duplicate errors since we can be assured things in mmcli always come back w/ international prefixing automatically.
This commit is contained in:
parent
9f930e742a
commit
a032e4923e
4 changed files with 5 additions and 15 deletions
|
@ -50,8 +50,7 @@ checkforincomingcalls() {
|
|||
mmcli -m "$(modem_n)" --voice-list-calls -o "$VOICECALLID" -K |
|
||||
grep call.properties.number |
|
||||
cut -d ':' -f 2 |
|
||||
sed 's/^[+]//' |
|
||||
sed 's/^1//'
|
||||
tr -d ' '
|
||||
)
|
||||
|
||||
# Log to /tmp/incomingcall to allow pickup and log into modemlog
|
||||
|
@ -86,9 +85,7 @@ checkfornewtexts() {
|
|||
NUM="$(
|
||||
echo "$TEXTDATA" |
|
||||
grep sms.content.number |
|
||||
sed -E 's/^sms\.content\.number\s+:\s+[+]?//' |
|
||||
sed 's/^[+]//' |
|
||||
sed 's/^1//'
|
||||
sed -E 's/^sms\.content\.number\s+:\s+[+]?//'
|
||||
)"
|
||||
TIME="$(echo "$TEXTDATA" | grep sms.properties.timestamp | sed -E 's/^sms\.properties\.timestamp\s+:\s+//')"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue