Example Code for Arduino-Make Voice Call (Library)

Last revision 2026/01/24

This article provides a comprehensive guide on making voice calls using Arduino and the SIM808 library. It covers necessary hardware and software preparations, detailed setup instructions, and explains key functions involved in initiating and managing voice calls.

Hardware Preparation

Software Preparation

Preparations

  1. Install library to Arduino-1.5.*\libraries (not Documents\Arduino\Library)
  2. Open sample sketch from File > Examples > SIM808 > VoiceCall
  3. Set Serial Monitor to 9600 baud (Newline line ending)
  4. Upload the code, open the serial monitor, and you will see a ready notification.
  5. Send the number. e.g. 1709***9217 If the number is incorrect, you will receive a warning
  6. If the call is answered, the monitor will print text like lable 3
  7. If the call is rejected, the monitor will print text like lable 4
    • You can send aNewlinecharacter to hang up, i.e.
      • \n in code
      • Do NOT type anything and click Send/ press Enter on your keyboard in serial monitor
    • If you close the serial monitor and open it again, you will not see any information in the window but it will still be waiting for you to input a number to call. This is because the code runs the setup() only once.

Result

DFR0355_notice_call_failed

Make sure you have prepared everything ready to go, i.e. the NET led is flashing properly, please check the chapter above.
The first time you open the serial monitor after uploading the sketch, the SIM808 module would reboot automatically whether the previous NET state is ON or OFF, and after about 1 minute, the Not connected message will disappear. If not, you can press BOOT button on board to BOOT it manually.

Function Explanation:

  • GsmAccess.begin (): Initialize SIM808 module, some AT commands for setting is finished in this function, and it will return SIM808_READY after starting
  • RemoteNumber.toCharArray (): Convert a number entered by the user into an array
  • Vcs.getvoiceCallStatus (): Gets the current call status
  • Vcs.hangCall (): Hangs up the call

Was this article helpful?

TOP