Ask whether the caller is still there
Keep the dict-based configuration from the earlier lessons and add:Bound a quiet call
Expand the policy to use two prompts and an eventual hangup:hangup_after_secs to keep waiting after the prompts. instructions can generate a check-in instead of using fixed text; this adds model generation and speech usage. Empty optional blocks mean unset and preserve server inheritance.
Recover an empty reply
If the first model step finishes successfully with no speech or tool call on a caller turn, the session retries once using the same input messages. The retry shares the original voice-turn deadline and does not add another copy of the caller’s prompt or the empty reply to conversation memory. Event turns may deliberately stay silent and are never retried. Turns that invoked a tool, were interrupted, failed, or paused for input or approval are also excluded. If the retry is empty too, the session returns to listening.A slow agent turn
The voice turn timeout defaults to 60 seconds. To change it and its spoken fallback:Agent.timeout separately bounds the runnable’s execution. Neither a timeout nor hangup rolls back completed side effects.
Once the conversation behaves as intended, continue to Recording calls, Transports and phone calls, and Events and usage.