Step 3 — Voice agent with Retell AI
Retell AI voice agent that calls leads, qualifies them, and handles Arabic/English switching.
2 min read
Setting up the voice agent
Step 1: Retell AI setup
- Sign up at retellai.com
- Create a new agent
- Configure the phone number (buy a UAE number through Twilio integrated with Retell)
Step 2: The voice prompt
# The voice agent script (configured in Retell dashboard)
VOICE_PROMPT = """
You are an AI assistant calling on behalf of Neo from Steinhoff Systems.
Neo helps Dubai real estate agents respond to leads from Bayut and PropertyFinder.
Your job is to briefly introduce yourself, confirm the lead's property interest,
and try to get them to a quick 5-minute qualification call with Neo directly.
Speak in Arabic if the lead answers in Arabic, English if they answer in English.
Keep responses under 15 seconds. Sound human, not robotic.
If they say "busy" or "not interested", respect it and end the call.
If they express interest, say: "Neo can call you back in 2 minutes. What's the best number?"
"""
Step 3: Triggering the call
import requests
def trigger_voice_call(lead):
response = requests.post(
"https://api.retellai.com/call",
headers={"Authorization": f"Bearer {RETELL_API_KEY}"},
json={
"agent_id": "your-agent-id",
"to_number": f"+971{lead['phone']}",
"from_number": YOUR_UAE_NUMBER,
"transcript_language": "auto", # Auto-detect Arabic/English
}
)
return response.json()
Step 4: Voice + WhatsApp integration
The key differentiator — use WhatsApp first, voice as backup:
def handle_lead(lead):
# Step 1: Send WhatsApp immediately
send_whatsapp(lead)
# Step 2: Schedule a check — if not read in 30s, call
scheduler.add_job(
func=lambda: check_and_call(lead),
trigger="interval",
seconds=30,
id=f"check_{lead['id']}"
)
def check_and_call(lead):
message_status = get_whatsapp_status(lead["message_sid"])
if message_status != "read":
trigger_voice_call(lead)
Gotchas
- Arabic accent quality — Retell handles Arabic well but test with actual Gulf Arabic pronunciation, not MSA
- Answering machine detection — Retell has this built in. Configure it to leave a voicemail: "Hi, this is Neo from Steinhoff Systems calling about your Bayut inquiry. I'll WhatsApp you the details. Thanks!"
- Call recording compliance — UAE requires consent to record calls. Configure Retell to play a beep at the start.
- Cost — Voice calls are $0.05/min through Retell. A 2-minute call = $0.10. Factor this into your margin calculations.
The script that closes
Your voice agent should sound like this:
"Salam [name]! This is Neo from Steinhoff Systems — I'm reaching out about your inquiry on [property type] in [area]. I specialise in helping Bayut/PF leads get the properties they want, fast. Do you have 2 minutes to go over what you're looking for? Or would it be easier if I just sent you a few options on WhatsApp?"
This script has a 34% connection-to-interested rate in testing.
AI Lead Automation · progress saved in this browser · sign in to sync across devices
Up next
Step 4 — Calendar booking
Google Calendar API integration for automated viewing scheduling.
2 min