How to use SIM800L GSM Module using Arduino | Make or Answer Voice Calls

Introduction

Here we will further our exploration with the SIM800L GSM Module by testing the voice call capability.

To make a voice call:

  1. Send ATD+ZZxxxxxxxxxx;<CR><LF>
    – this is tell the GSM module to dial the following mobile number
    ZZ – the country code of the mobile number you want to call
    xx – is the 10-digit mobile number
    ; – don’t forget semi-colon, it will error without the semi-colon
    CR – Cariage Return, ASCII character 13 or r
    LF – Line Feed, ASCII character 10 or n

To answer the incoming voice call:

  1. Send ATA<CR><LF>
    – this tells the GSM module to answer the incoming voice call
    CR – Cariage Return, ASCII character 13 or r
    LF – Line Feed, ASCII character 10 or n

To reject the incoming call or terminate ongoing call:

  1. Send ATH<CR><LF>
    – this tells the GSM module to hang up the call.
    CR – Cariage Return, ASCII character 13 or r
    LF – Line Feed, ASCII character 10 or n

Video Demonstration

Source Code

 1#include "SoftwareSerial.h"
 2
 3SoftwareSerial mySerial(2, 3);
 4
 5void setup() {
 6  Serial.begin(9600);
 7  mySerial.begin(9600);
 8}
 9
10void loop(){
11  while (Serial.available()) 
12  {
13    mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
14  }
15  while(mySerial.available()) 
16  {
17    Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
18  }
19}

Call To Action

If you found this tutorial helpful, please do Like and Share this to your friends so that many could benefit from it.

Also please do not forget to Subscribe to my Youtube channel: Click this to Subscribe

Thank you and have a good day.



Posts in this series



No comments yet!

GitHub-flavored Markdown & a sane subset of HTML is supported.