To detect missed calls you can try three things.
Check if there is a suitable AT+CIND
indicator you can turn on. I do not think call
will do since I assume it only goes to 1
when the call is answered. If your phone supports callsetup
or something similar that should be what you need (you will have to implement logic to detect when a call does not go to state active).
For an example of enabling AT+CIND indicators, see chapter "8.57 Informative examples" in 27.007 for more explanation, and pay close attention to The subparameter order in the command is defined by the query command order
, e.g.
if AT+CIND=? returns
+CIND: ("abc",(0-1)),("xyz",(0,1)),("call",(0,1))
then call is index 3, and for
+CIND: ("abc",(0-1)),("call",(0,1)),("xyz",(0,1))
call is index 2. Do not hard code any assumptions here, this should be parsed and checked run-time (one check at the beginning is enough).
Alternatively you can upon RING
start polling call status with AT+CLCC
until the call is no longer listed.
Or you could poll the MC
phonebook storage and detect changes.