I need to disable the dialing tone on my SIM800L and for that I need to know if the receiving end has answered the call. AT+CPAS returns 4 which stands for 'in progress' both during conversation as well as during the tone before the call is answered so it's of no use.
Is there a way using AT commands? Or should I resort to doing some singal analisis of the output audio? Is there any other device that does have this capability?
The command you are looking for is
+CLCC
. It is a standard ETSII command, so you will find it in every cellular modem. For the present answer I will refer to the SIM800 AT command guide.Execution command
AT+CLCC
list the status of the current calls. For each call you will get a row such aswhere:
<idx>
<dir>
1 Mobile terminated (MT) call
<stat>
1 Held
2 Dialing (MO call)
3 Alerting (MO call)
4 Incoming (MT call)
5 Waiting (MT call)
6 Disconnect
<mode>
1 Data
2 Fax
<mpty>
1 Call is one of multiparty (conference) call parties
<number>
<type>
)<type>
<alphaId>
<number>
corresponding to the entry found in phone book (String type to be included in quotation marks)Usually there is only one call, but anyway you'll be able to determine the call of your interest by checking the
number
field of the answer.The
<stat>
field of the response provides what you need. In fact, it will contain the status of the current call showing a different value between when the modem is dialing (2
, in case of Mobile Originated call) and when the call is active (0
; also1
if you want to include held calls).