pass incoming phone number to the ring hook (allows distinctive rings/actions based on caller) and added a similar sms hook
This commit is contained in:
parent
dbdb45bd6c
commit
7ec9ca2db1
1 changed files with 10 additions and 0 deletions
|
@ -53,6 +53,12 @@ checkforincomingcalls() {
|
||||||
tr -d ' +'
|
tr -d ' +'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/ring" ]; then
|
||||||
|
"$XDG_CONFIG_HOME/sxmo/hooks/ring" "$(sxmo_contacts.sh | grep -E "^$INCOMINGNUMBER")"
|
||||||
|
else
|
||||||
|
sxmo_vibratepine 2000 &
|
||||||
|
fi
|
||||||
|
|
||||||
# Log to /tmp/incomingcall to allow pickup and log into modemlog
|
# Log to /tmp/incomingcall to allow pickup and log into modemlog
|
||||||
TIME="$(date --iso-8601=seconds)"
|
TIME="$(date --iso-8601=seconds)"
|
||||||
mkdir -p "$LOGDIR"
|
mkdir -p "$LOGDIR"
|
||||||
|
@ -96,6 +102,10 @@ checkfornewtexts() {
|
||||||
"st -e tail -n9999 -f $LOGDIR/$NUM/sms.txt" \
|
"st -e tail -n9999 -f $LOGDIR/$NUM/sms.txt" \
|
||||||
"$LOGDIR/$NUM/sms.txt" \
|
"$LOGDIR/$NUM/sms.txt" \
|
||||||
"Message from $(sxmo_contacts.sh | grep -E "^$NUM:"): $TEXT" &
|
"Message from $(sxmo_contacts.sh | grep -E "^$NUM:"): $TEXT" &
|
||||||
|
|
||||||
|
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/sms" ]; then
|
||||||
|
"$XDG_CONFIG_HOME/sxmo/hooks/sms" "$(sxmo_contacts.sh | grep -E "^$INCOMINGNUMBER")" "$TEXT"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue