The Last Step Won’t Work!
**NEED HELP: Complex Call Routing System - Transfers Not Reaching Intended Phone Numbers** **THE SYSTEM I’VE BUILT:** I’m working on an emergency call routing system for a disaster restoration company. Here’s how it’s supposed to work: **Tech Stack:** - **Retell AI** - AI phone agent (“Julia”) that answers calls - **Relay.app** - Handles the routing logic via webhooks - **Google Sheets** - Stores zip codes, schedules, and contact info **How It Should Work:** 1. Customer calls the emergency line 1. Julia (AI agent) answers, collects zip code and emergency info 1. Julia triggers a Custom Function that calls my Relay webhook 1. Relay looks up the zip code → determines EAST or WEST region 1. Relay checks the current time/day to determine routing: - **Weeknights** (Mon-Thu 4:30 PM - 7:30 AM) → Project Coordinator - **Weekends** (Fri 4:30 PM - Mon 7:30 AM) → Project Manager from weekly rotation 1. Relay returns the correct phone number to Retell 1. Julia does a warm transfer to that number **THE PROBLEM I’M EXPERIENCING:** The system logic works - Relay correctly identifies the region, time, and which person should get the call. BUT when Julia tries to transfer, one of these happens: 1. **Call goes straight to voicemail** (phone never rings) 1. **Long silence, then disconnects** 1. **Operator message “call cannot be connected”** 1. **System pulls from FALLBACK data** instead of the correct coordinator **WHAT I’VE ALREADY TRIED:** ✅ Phone numbers formatted correctly in E.164 format (+12085551234) ✅ Outbound calling ENABLED in Retell phone number settings ✅ Webhook URL is correct and Relay receives the calls ✅ Custom Function in Retell is configured with proper JSON schema ✅ Testing with my own phone numbers (so I know they work) ✅ Verified the Google Sheets lookup is finding the right person/number **ADDITIONAL COMPLEXITY:** I also battled a **timestamp/timezone bug** where Retell was sending incorrect UTC timestamps to my webhook, causing Sunday night calls to be tagged as Monday morning (business hours). I worked around this by having my Relay workflow generate the current Mountain Time instead of trusting Retell’s timestamp.