Fix the notification for outgoing call hanged up by the contact

There was a hole in the event logging where we start a call that the
contact hang up. As we dont have an event for outgoing call,
modemmonitor think this is a missed call.

Adding a dedicated event file help modemmonitor to know what happen.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
master
Stacy Harper 3 years ago committed by Maarten van Gompel
parent f63852a801
commit 7cf1dadf5f
  1. 1
      scripts/modem/sxmo_modemcall.sh
  2. 7
      scripts/modem/sxmo_modemmonitor.sh

@ -106,6 +106,7 @@ acceptcall() {
)" )"
if [ "$DIRECTION" = "outgoing" ]; then if [ "$DIRECTION" = "outgoing" ]; then
modem_cmd_errcheck -m "$(modem_n)" -o "$CALLID" --start modem_cmd_errcheck -m "$(modem_n)" -o "$CALLID" --start
touch "$CACHEDIR/${CALLID}.initiatedcall" #this signals that we started this call
log_event "call_start" "$CALLID" log_event "call_start" "$CALLID"
echo "sxmo_modemcall: Started call $CALLID">&2 echo "sxmo_modemcall: Started call $CALLID">&2
elif [ "$DIRECTION" = "incoming" ]; then elif [ "$DIRECTION" = "incoming" ]; then

@ -103,10 +103,15 @@ checkforfinishedcalls() {
rm -f "$CACHEDIR/${FINISHEDCALLID}.pickedupcall" rm -f "$CACHEDIR/${FINISHEDCALLID}.pickedupcall"
printf %b "$TIME\tcall_finished\t$FINISHEDNUMBER\n" >> "$LOGDIR/modemlog.tsv" printf %b "$TIME\tcall_finished\t$FINISHEDNUMBER\n" >> "$LOGDIR/modemlog.tsv"
elif [ -f "$CACHEDIR/${FINISHEDCALLID}.hangedupcall" ]; then elif [ -f "$CACHEDIR/${FINISHEDCALLID}.hangedupcall" ]; then
#this call was hanged up #this call was hung up by the user
echo "sxmo_modemmonitor: Finished call from $FINISHEDNUMBER">&2 echo "sxmo_modemmonitor: Finished call from $FINISHEDNUMBER">&2
rm -f "$CACHEDIR/${FINISHEDCALLID}.hangedupcall" rm -f "$CACHEDIR/${FINISHEDCALLID}.hangedupcall"
printf %b "$TIME\tcall_finished\t$FINISHEDNUMBER\n" >> "$LOGDIR/modemlog.tsv" printf %b "$TIME\tcall_finished\t$FINISHEDNUMBER\n" >> "$LOGDIR/modemlog.tsv"
elif [ -f "$CACHEDIR/${FINISHEDCALLID}.initiatedcall" ]; then
#this call was hung up by the contact
echo "sxmo_modemmonitor: Finished call from $FINISHEDNUMBER">&2
rm -f "$CACHEDIR/${FINISHEDCALLID}.initiatedcall"
printf %b "$TIME\tcall_finished\t$FINISHEDNUMBER\n" >> "$LOGDIR/modemlog.tsv"
elif [ -f "$CACHEDIR/${FINISHEDCALLID}.mutedring" ]; then elif [ -f "$CACHEDIR/${FINISHEDCALLID}.mutedring" ]; then
#this ring was muted up #this ring was muted up
echo "sxmo_modemmonitor: Muted ring from $FINISHEDNUMBER">&2 echo "sxmo_modemmonitor: Muted ring from $FINISHEDNUMBER">&2

Loading…
Cancel
Save