I wanted a voice agent that could place an ordinary phone call, wait for someone to answer, ask a question, and record the response. Getting the right conversation started as soon as the person picked up was part of the challenge.
I built a caller prototype around FastAPI, Twilio, SIP, and OpenAI Realtime to connect the outgoing call with its conversation.
The application around the conversation
The service's documented responsibilities include initiating calls, handling webhooks, bridging the SIP/Realtime path, and recording structured conversation events.
One small timing decision affects what the recipient actually hears. When the bridge has a recipient-join signal, it can hold the introduction for up to 45 seconds while the phone rings. If the recipient joins during that wait, the code gives them two seconds to settle before sending the greeting and first question. When the wait expires, it returns without starting that greeting.
Structured events are useful because they let an operator distinguish the stages: request received, call initiated, session established, conversation event recorded, and call ended.
Realtime behavior changes the engineering problem
Telephone interaction is synchronous. Delays and interruptions become part of the experience rather than a background processing concern.
The integration must also decide what happens when the call ends unexpectedly, when a webhook arrives twice, or when an audio session outlives the intended task. Those are application questions around the model, even when the model handles speech interaction.
Testing a scheduled call
I built the call initiation and Realtime bridge. My last task note still listed the scheduled end-to-end call as a test to run.
The technical focus here is a conversational Realtime connection. In a separate project for scheduled reminder calls, launch behavior is deliberately constrained to approved reminder playback.