Skip to main content
Register a handler that fires when a call session ends. Use this to save call data, trigger post-call workflows, or log outcomes. The BotSessionEnded event carries a termination_reason field that tells you why the session ended:
The event payload contains a dnc boolean field (defaulting to False). If the voice agent detects a verbal opt-out during the call, this field is set to True and the caller’s phone number is automatically added to your organization’s Do Not Call list.
DNC detection is exclusive to outbound campaigns (inbound calls are not supported). Opted-out numbers are added directly to your organization-wide DNC list rather than a campaign-specific list.

Signature

signature
Return value: None

Example

controller.py