What This AI Phone Caller Can Do
-> Make real phone calls using the SIM800L GSM module. -> Play a pre-recorded or AI-generated audio message during the call. -> Work fully offline (just a SIM card with balance). -> Trigger calls automatically or from a web interface.What You’ll Need
1. **ESP32 board** (Wi-Fi + Bluetooth capable). 2. **SIM800L GSM module** (to handle calls and SMS). 3. A **working SIM card** (Jio, Airtel, or any other with call balance). 4. A small **speaker/ISD1820 voice module** (optional, for AI-generated voice). 5. Jumper wires, power supply (5V 2A recommended for SIM800L).Step 1: Wiring ESP32 with SIM800L
Connect the SIM800L to the ESP32 as follows: -> ESP32 TX (GPIO 17) → SIM800L RX -> ESP32 RX (GPIO 16) → SIM800L TX -> GND → GND -> 5V → VCC (use a stable power supply!) Tip: SIM800L is sensitive to power drops, so use a dedicated power source.Step 2: Test Calls Using AT Commands
Before adding AI, test basic calling. Upload this code to ESP32:#include <HardwareSerial.h>
HardwareSerial sim800(1);
void setup() {
Serial.begin(115200);
sim800.begin(9600, SERIAL_8N1, 16, 17); // RX=16, TX=17
delay(3000);
Serial.println("Dialing...");
sim800.println("ATD+91xxxxxxxxxx;"); // Your phone number
}
void loop() {}
If wiring is correct, your phone will ring.
Step 3: Add AI-Generated Voice
I wanted the caller to play AI-generated messages. There are two ways: 1. Use **ISD1820 voice module** to record a static message. 2. Use **ESP32 + AI voice API (e.g., OpenAI TTS)** to generate audio on the fly and play via a DAC output. Here’s a sample text-to-speech conversion using OpenAI API:
curl https://api.openai.com/v1/audio/speech -H "Authorization: Bearer YOUR_API_KEY"
Step 4: Trigger Calls from a Web Dashboard
To make it more fun, I connected ESP32 to **n8n automation platform** and created a small dashboard: -> When I type a phone number and message, n8n sends a trigger to ESP32 over Wi-Fi. -> ESP32 then calls that number using SIM800L and plays the message. You can even set it to auto-call daily reminders or emergency alerts.🔗 Related: My AI Assistant Project – This shows how I used the same AI APIs for screen reading and answering.
Comments