09-17-2020, 11:19 AM
(09-16-2020, 11:14 AM)proycon Wrote:(07-30-2020, 12:46 PM)arjunaithal Wrote: The incoming calls not showing up even when I toggle modem. I'm using the latest sxmo image. The command to get the incoming calls - ( mmcli -m 0 --voice-list-calls -a) is not able to pick the incoming calls but the sms works fine. The other functionality is working as expected. The incoming calls is working fine in mobian and UT for the same Sim. Can someone please help? Thanks in advanceI think I have the exact same problem. Incoming calls did used to work for me and I'm not yet sure at what point it broke for me. I'll investigate further and see if I can solve it.
I have written custom scripts to get this working, with this fix I'm able to use my phone as daily driver without any issues and the latest fix of wakeup from crust on incoming call has increased the battery life significantly- https://lists.sr.ht/~mil/sxmo-devel/patches/13923 (getting almost 10-12 hrs on moderate usage)
Custom script to monitor incoming call -
sxmo_incomingcall.sh - A script scheduled in cron or sxmo_xinit.sh to monitor incoming calls using AT commands
#!/usr/bin/env sh
LOGFILE=/home/mo/.config/sxmo/modem/modemlog.tsv
EVT_HANDLE="call_ringing"
LOCKFILE=/home/mo/.config/sxmo/modem/ongoingcall.lock
NOTIFDIR=/home/mo/.config/sxmo/notifications
while [ 1 ]
do
if [ -f $LOCKFILE ]; then
sleep 10
continue
fi
# WAKE=$(AT+QCFG="risignaltype","physical"|atinout - /dev/ttyUSB2 -)
CALL=$(echo "AT+CLCC"|atinout - /dev/ttyUSB2 -)
NUM=$(echo $CALL|perl -ne '$_=~ m/^.*\+91(.*)",145.*/;print $1;')
if [ "$NUM" != "" ]; then
TIME="$(date --iso-8601=seconds)"
printf %b "$TIME\t$EVT_HANDLE\t$NUM\n" >> "$LOGFILE"
printf %b "$NUM\n" > "$NOTIFDIR/sxmo_incomingcall"
if [ -x "/home/mo/.config/sxmo/hooks/ring" ]; then
"/home/mo/.config/sxmo/hooks/ring" & sxmo_vibratepine 2000
else
sxmo_vibratepine 2000
fi
else
sxmo_setpineled green 0
fi
sleep 3
done
I have again used AT commands to receive and end calls using user defined script hooks.
Command to accept call -
ACCEPT=$(echo "ATA"|atinout - /dev/ttyUSB2 - 2>/dev/null)
Command to end call -
CALLEND=$(echo "AT+CHUP"|atinout - /dev/ttyUSB2 - 2>/dev/null)
Command to start a call -
START=$(echo "ATD+ +91$1;"|atinout - /dev/ttyUSB2 - 2>/dev/null)
This way I don't use mmcli at all, it seems to be working without any issues.