If a caller hangs up the call after few rings, notification is not shown when in crust

Caller hangs up the call after few rings. The phone in crust just rings and again goes back to sleep. There is no green led and no indication of missed call. Modem log or dialer menu should be checked to know a call was missed.

Assigned to
3 months ago
2 months ago

~arjunaithal 2 months ago*

This issue is due <callid>.discarded file which gets created in cache dir when call is hangup even after the call was received. This file is never deleted and piles up. When a call is received with same id as *.discarded file, the notification is not shown in such scenario.

~stacyharper 2 months ago

I cant figure out the workflow you mean. The only issue I really can see is that cached events are not droped on outgoing calls. Is that what you means ?

~stacyharper 2 months ago

~arjunaithal 2 months ago


  1. Make an outgoing call, and hangup the call -> This creates <callid>.discardedcall file (which is actually not required for an outgoing call)
  2. The above scenario repeats when making outgoing calls, creating a number of <callid>.discardedcall files.
  3. And there is no housekeeing for .discardedcall files.
  4. And when there is an incoming call with same id as cached *.discardedcall file, the phone rings but there would be no notification indicating the call was missed.

Reason :- The existing old cache file gets deleted, instead of going to else block to create notification.

            if [ -f "$CACHEDIR/${FINISHEDCALLID}.discardedcall" ]; then
                    #this call was discarded
                    echo "sxmo_modemmonitor: Discarded call from $FINISHEDNUMBER">&2
                    rm -f "$CACHEDIR/${FINISHEDCALLID}.discardedcall"
                    printf %b "$TIME\tcall_discarded\t$FINISHEDNUMBER\n" >> "$LOGDIR/modemlog.tsv"
                    #this is a missed call
                    # Add a notification for every missed call
                    pkill -f sxmo_modemcall.sh
                    echo "sxmo_modemmonitor: Missed call from $FINISHEDNUMBER">&2
                    printf %b "$TIME\tcall_missed\t$FINISHEDNUMBER\n" >> "$LOGDIR/modemlog.tsv"

                    if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/missed_call" ]; then
                            echo "sxmo_modemmonitor: Invoking missed call hook (async)">&2
                            "$XDG_CONFIG_HOME/sxmo/hooks/missed_call" "$CONTACTNAME" &

                    CONTACT="$(lookupcontactname "$FINISHEDNUMBER")"
                    sxmo_notificationwrite.sh \
                            random \
                            "st -f Terminus-20 -e sh -c \"echo 'Missed call from $CONTACT at $(date)' && read\"" \
                            none \
                            "Missed call - $CONTACT"

~stacyharper 2 months ago

Okay, so my patch should fix this. I'm now sure I missed some call cause of this.

Thanks a lot for the report and the analysis!

~arjunaithal REPORTED FIXED 2 months ago

Register here or Log in to comment, or comment via email.