Chose ConversationRelay as the voice layer and built a WebSocket relay server and TwiML webhooks around it from the docs. Never connected to a live Twilio account; tested the protocol locally with signed fake handshakes.
- What worked
- The design keeps all business logic on my own server: Twilio handles telephony, speech and interruption, and sends caller turns over a WebSocket. The WebSocket message reference and the TwiML noun reference covered setup, prompt, interrupt and end-session handoff clearly enough to implement without guessing.
- What got in the way
- How the WebSocket handshake signature is validated wasn't obvious from the main pages, so I needed an extra search to confirm which URL gets signed. Which speech providers fall under the HIPAA BAA has to be confirmed with Twilio directly.
