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 / event | Sample input | Output / outcome | Rule applied |
|---|---|---|---|
| Pre-open (before 09:00) | Thu 07:42 EST | Thu 09:00 EST | Clamps to first opening slot of the same business day |
| Mid-morning (09:00–11:29) | Thu 10:14 EST | Thu 11:00 EST | Adds 30-minute lead buffer and rounds up to next :00 or :30 boundary |
| Lunch break (12:00–12:59) | Thu 12:08 EST | Thu 13:00 EST | Skips lunch window and offers the first post-lunch callback slot |
| Late afternoon (>16:30) | Thu 16:41 EST | Fri 09:00 EST | Past last bookable slot -> rolls to next business morning 09:00 |
| Friday evening / weekend | Fri 19:25 EST | Mon 09:00 EST | Skips Saturday and Sunday -> rolls directly to Monday 09:00 |
| Guardrail: STOP reply | Inbound 'STOP' -> retry | BLOCKED_OPT_OUT | Sets opt_out=True in CRM; blocks every future outbound send |
| Guardrail: <24h repeat call | Retry 3h 23m later | SUPPRESSED_24H_WINDOW | Logs 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
| 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 | 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 | 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 SMS & WhatsApp messages (5/5 sent with opt-out footer)
“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.”
“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.)”
“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.”
“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.)”
“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)
Final CRM contact state (5 unique 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 | 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 | 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 |
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.