Automatically classify outbound calls as conversation or voicemail and respond appropriately
text
output modality). Realtime LLMs are not compatible for
the main conversation LLM due to output control requirements.detector()
: between STT and user context aggregatorgate()
: immediately after TTS serviceon_voicemail_detected
event is triggered. In your event handler, you have access to processor
, which is a FrameProcessor instance, allowing you to push frames to the pipeline. For example, you may want to have the bot output a pre-canned message and then end the call.
CLASSIFIER_RESPONSE_INSTRUCTION
constant contains the required response
format: 'Respond with ONLY "CONVERSATION" if a person answered, or "VOICEMAIL" if it\'s voicemail/recording.'
voicemail_response_delay
parameter controls how long to wait after the user stops speaking before triggering the voicemail event: