Working Proof · Missed Call → Instant SMS/WhatsApp & Booking

Text every missed caller back in under 60 seconds—with the right slot, CRM logging, and zero spam.

Unanswered phone calls turn into lost bookings when callbacks wait hours, while naive auto-responders double-text repeat callers or ignore STOP opt-outs. This sample run processes five missed calls across different times of day, proposes business-hours slots, writes clean CRM records, and enforces both STOP opt-out and 24-hour cooldown suppression.

Why missed calls leak revenue—and basic auto-texts backfire

FAILURE 01

Missed callers move on before anyone calls back

When a team is on another line, at lunch, or closed for the evening, callers rarely leave voicemails. By the time someone notices a missed call hours later, the prospect has already booked elsewhere.

FAILURE 02

Naive auto-responders spam repeat callers

A basic webhook trigger that fires an SMS on every missed call will double- or triple-text a caller who tries twice in the same morning—looking robotic and hurting trust before the first conversation.

FAILURE 03

Ignored STOP replies create compliance & carrier blocks

If outbound automations do not write inbound STOP opt-outs straight to the CRM suppression flag and check it before every send, repeat messages risk carrier filtering and messaging-policy violations.

How it works: time-aware slot routing + CRM state + compliance gates

Sub-60s missed-call webhook dispatch

Phone-system missed-call events normalize the caller number to strict E.164, select SMS or WhatsApp, and dispatch a personalized callback message with an explicit opt-out footer in under 60 seconds.

Time-aware business-hours slot routing

Each message proposes the next realistic 30-minute slot based on the exact call timestamp—adding a 30-minute lead buffer, skipping lunch (12:00–13:00), and rolling late-afternoon or weekend calls to the next business morning.

Automatic CRM contact creation & audit trail

Every caller is upserted by E.164 phone number with call count, proposed slot, message count, last-contacted timestamp, and structured notes—keeping full visibility without duplicate contacts.

Hard STOP opt-out & 24-hour cooldown gates

Before any outbound send, the engine checks both opt_out=True (set immediately on STOP/UNSUBSCRIBE/QUIT) and a 24-hour cooldown from last_contacted_at. Blocked events still log in the CRM with zero outbound traffic.

Call window / eventSample inputOutput / outcomeRule applied
Pre-open (before 09:00)Thu 07:42 ESTThu 09:00 ESTClamps to first opening slot of the same business day
Mid-morning (09:00–11:29)Thu 10:14 ESTThu 11:00 ESTAdds 30-minute lead buffer and rounds up to next :00 or :30 boundary
Lunch break (12:00–12:59)Thu 12:08 ESTThu 13:00 ESTSkips lunch window and offers the first post-lunch callback slot
Late afternoon (>16:30)Thu 16:41 ESTFri 09:00 ESTPast last bookable slot -> rolls to next business morning 09:00
Friday evening / weekendFri 19:25 ESTMon 09:00 ESTSkips Saturday and Sunday -> rolls directly to Monday 09:00
Guardrail: STOP replyInbound 'STOP' -> retryBLOCKED_OPT_OUTSets opt_out=True in CRM; blocks every future outbound send
Guardrail: <24h repeat callRetry 3h 23m laterSUPPRESSED_24H_WINDOWLogs missed_call_count += 1 in CRM; sends zero duplicate messages

Real execution output on 5 missed calls + 2 guardrail tests

Executed directly with python3 scripts/missed_call_demo.py (Python 3 standard library only, synthetic sample contacts). Phase 1 dispatches 5 instant SMS/WhatsApp replies within 15–29 seconds with time-appropriate booking slots and creates 5 CRM records. Phase 2 verifies an inbound STOP opt-out (0 subsequent messages sent) and a repeat missed call 3h 23m later suppressed by the 24-hour cooldown window.

Missed calls (Phase 1)

5

Sent ≤60s SLA

5 (15–29s)

STOP opt-outs honored

1

Suppressed (24h cap)

1

Phase 1 — 5 missed calls dispatched within 60 seconds

EventCallerPhone (E.164)ChannelMissed At (EST)LatencyProposed SlotActionCRM ID
MC-001Hannah Brooks+14155550198SMS2026-11-19 07:42:1018sThu 2026-11-19 09:00 ESTSENTCRM-001
MC-002Marcus Reid+13125550144WhatsApp2026-11-19 10:14:0522sThu 2026-11-19 11:00 ESTSENTCRM-002
MC-003Priya Patel+16465550172SMS2026-11-19 12:08:3015sThu 2026-11-19 13:00 ESTSENTCRM-003
MC-004Daniel Ortega+15125550135WhatsApp2026-11-19 16:41:5029sFri 2026-11-20 09:00 ESTSENTCRM-004
MC-005Claire Novak+12065550161SMS2026-11-20 19:25:1219sMon 2026-11-23 09:00 ESTSENTCRM-005

Generated SMS & WhatsApp messages (5/5 sent with opt-out footer)

MC-001SMSHannah Brooks+14155550198+18sslot: Thu 2026-11-19 09:00 EST

“Hi Hannah, sorry we missed your call. Want to grab Thu 2026-11-19 09:00 EST? Reply YES to confirm or pick a time: https://book.example.com/slot/2026-11-19-0900 Reply STOP to opt out.”

MC-002WhatsAppMarcus Reid+13125550144+22sslot: Thu 2026-11-19 11:00 EST

“Hi Marcus, sorry we missed your call just now. Our next open callback slot is Thu 2026-11-19 11:00 EST. Reply YES to hold it or pick another time: https://book.example.com/slot/2026-11-19-1100 (Reply STOP to opt out.)”

MC-003SMSPriya Patel+16465550172+15sslot: Thu 2026-11-19 13:00 EST

“Hi Priya, sorry we missed your call. Want to grab Thu 2026-11-19 13:00 EST? Reply YES to confirm or pick a time: https://book.example.com/slot/2026-11-19-1300 Reply STOP to opt out.”

MC-004WhatsAppDaniel Ortega+15125550135+29sslot: Fri 2026-11-20 09:00 EST

“Hi Daniel, sorry we missed your call just now. Our next open callback slot is Fri 2026-11-20 09:00 EST. Reply YES to hold it or pick another time: https://book.example.com/slot/2026-11-20-0900 (Reply STOP to opt out.)”

MC-005SMSClaire Novak+12065550161+19sslot: Mon 2026-11-23 09:00 EST

“Hi Claire, sorry we missed your call. Want to grab Mon 2026-11-23 09:00 EST? Reply YES to confirm or pick a time: https://book.example.com/slot/2026-11-23-0900 Reply STOP to opt out.”

Phase 2 — Compliance & anti-spam guardrails (0 unwanted sends)

OPT_OUT_RECORDEDIN-001+13125550144 (CRM-002 · WhatsApp)
Inbound reply ‘STOP’ at 2026-11-19 10:19:02 EST → CRM opt_out=True
BLOCKED_OPT_OUTMC-006Marcus Reid+13125550144 (CRM-002)
opt_out=True since 2026-11-19T10:19:02-05:00 (inbound 'STOP'); zero further outbound messages
SUPPRESSED_24H_WINDOWMC-007Hannah Brooks+14155550198 (CRM-001)
already contacted 3h 23m ago (last_contacted_at=2026-11-19T07:42:28-05:00, cooldown=24h)

Final CRM contact state (5 unique contacts)

CRM IDCallerPhone (E.164)ChannelStatusOpt-OutCallsSentProposed Slot
CRM-001Hannah Brooks+14155550198SMSawaiting_replyFalse21Thu 2026-11-19 09:00 EST
CRM-002Marcus Reid+13125550144WhatsAppopted_outTrue21Thu 2026-11-19 11:00 EST
CRM-003Priya Patel+16465550172SMSawaiting_replyFalse11Thu 2026-11-19 13:00 EST
CRM-004Daniel Ortega+15125550135WhatsAppawaiting_replyFalse11Fri 2026-11-20 09:00 EST
CRM-005Claire Novak+12065550161SMSawaiting_replyFalse11Mon 2026-11-23 09:00 EST

Verbatim stdout & assertions

5 sent (≤60s) · 1 STOP honored · 1 suppressed (24h) · exit 0
=== Phase 1: 5 Missed Calls -> Instant SMS/WhatsApp (<60s) & Slot Proposal ===
| Event | Caller | Phone (E.164) | Channel | Missed At (EST) | Latency | Proposed Slot | Action | CRM ID |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| MC-001 | Hannah Brooks | +14155550198 | SMS | 2026-11-19 07:42:10 | 18s | Thu 2026-11-19 09:00 EST | SENT | CRM-001 |
| MC-002 | Marcus Reid | +13125550144 | WhatsApp | 2026-11-19 10:14:05 | 22s | Thu 2026-11-19 11:00 EST | SENT | CRM-002 |
| MC-003 | Priya Patel | +16465550172 | SMS | 2026-11-19 12:08:30 | 15s | Thu 2026-11-19 13:00 EST | SENT | CRM-003 |
| MC-004 | Daniel Ortega | +15125550135 | WhatsApp | 2026-11-19 16:41:50 | 29s | Fri 2026-11-20 09:00 EST | SENT | CRM-004 |
| MC-005 | Claire Novak | +12065550161 | SMS | 2026-11-20 19:25:12 | 19s | Mon 2026-11-23 09:00 EST | SENT | CRM-005 |

=== Generated Messages (5/5 dispatched within 60s) ===
[MC-001 · SMS · +18s -> +14155550198]
  Hi Hannah, sorry we missed your call. Want to grab Thu 2026-11-19 09:00 EST? Reply YES to confirm or pick a time: https://book.example.com/slot/2026-11-19-0900 Reply STOP to opt out.
[MC-002 · WhatsApp · +22s -> +13125550144]
  Hi Marcus, sorry we missed your call just now. Our next open callback slot is Thu 2026-11-19 11:00 EST. Reply YES to hold it or pick another time: https://book.example.com/slot/2026-11-19-1100 (Reply STOP to opt out.)
[MC-003 · SMS · +15s -> +16465550172]
  Hi Priya, sorry we missed your call. Want to grab Thu 2026-11-19 13:00 EST? Reply YES to confirm or pick a time: https://book.example.com/slot/2026-11-19-1300 Reply STOP to opt out.
[MC-004 · WhatsApp · +29s -> +15125550135]
  Hi Daniel, sorry we missed your call just now. Our next open callback slot is Fri 2026-11-20 09:00 EST. Reply YES to hold it or pick another time: https://book.example.com/slot/2026-11-20-0900 (Reply STOP to opt out.)
[MC-005 · SMS · +19s -> +12065550161]
  Hi Claire, sorry we missed your call. Want to grab Mon 2026-11-23 09:00 EST? Reply YES to confirm or pick a time: https://book.example.com/slot/2026-11-23-0900 Reply STOP to opt out.

=== Phase 2: Guardrails (STOP Opt-Out & 24h Cooldown Suppression) ===
[IN-001] Inbound WhatsApp from +13125550144 at 2026-11-19T10:19:02-05:00: 'STOP' -> OPT_OUT_RECORDED (CRM-002)
| Event | Caller | Phone (E.164) | Channel | Missed At (EST) | Latency | Proposed Slot | Action | CRM ID |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| MC-006 | Marcus Reid | +13125550144 | WhatsApp | 2026-11-19 14:05:10 | - | - | BLOCKED_OPT_OUT | CRM-002 |
| MC-007 | Hannah Brooks | +14155550198 | SMS | 2026-11-19 11:05:40 | - | - | SUPPRESSED_24H_WINDOW | CRM-001 |
- MC-006 (BLOCKED_OPT_OUT): opt_out=True since 2026-11-19T10:19:02-05:00; zero further outbound messages
- MC-007 (SUPPRESSED_24H_WINDOW): already contacted 3h 23m ago (last_contacted_at=2026-11-19T07:42:28-05:00, cooldown=24h)

=== Final CRM Table (5 contacts) ===
| CRM ID | Caller | Phone (E.164) | Channel | Status | Opt-Out | Calls | Sent | Proposed Slot |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| CRM-001 | Hannah Brooks | +14155550198 | SMS | awaiting_reply | False | 2 | 1 | Thu 2026-11-19 09:00 EST |
| CRM-002 | Marcus Reid | +13125550144 | WhatsApp | opted_out | True | 2 | 1 | Thu 2026-11-19 11:00 EST |
| CRM-003 | Priya Patel | +16465550172 | SMS | awaiting_reply | False | 1 | 1 | Thu 2026-11-19 13:00 EST |
| CRM-004 | Daniel Ortega | +15125550135 | WhatsApp | awaiting_reply | False | 1 | 1 | Fri 2026-11-20 09:00 EST |
| CRM-005 | Claire Novak | +12065550161 | SMS | awaiting_reply | False | 1 | 1 | Mon 2026-11-23 09:00 EST |

Assertions passed: 5 missed-call inputs -> 5 messages sent (<=60s SLA), 1 STOP opt-out respected (0 further sends), 1 repeat call suppressed by 24h window (0 double sends).

Want missed-call SMS/WhatsApp recovery wired to your phone system and CRM?

Share your phone provider (Twilio, RingCentral, Aircall, VoIP), calendar rules, and CRM. We scope every build on a short call and send a tailored quote in USD.