- Python
- TypeScript
This callback covers both ways the agent’s digits get pressed:The
- Agentic — the agent decided to press the digits itself, which it can do once you have called
call.set_agent_dtmf(enabled=True)(e.g. to work through an IVR menu on a call it placed). - Developer-requested — you asked for the digits explicitly with
call.send_dtmf(...).
requested_by, so a single handler can log every tone the agent sends.Agent keypresses only: for digits pressed by the person on the other end of the call, use
on_caller_dtmf instead.AgentDTMFSentEvent is a pydantic model imported from guava.events:Digits are reported, not confirmed: the event fires when the agent sends the tones, which is the same moment the digits are handed to the carrier. It is not an acknowledgement that the far end registered them.
Signature
- Python
- TypeScript
signature
Return value:
NoneExample
- Python
- TypeScript
controller.py