Every call in AgenTao progresses through a defined set of states. Understanding these states is critical for building correct call flows.

connect() directly from the PENDING state without answering the call first. This lets you route calls to the original callee before your agent picks up the caller.answer(), the call enters ANSWERED and your application is responsible for the live audio exchange with the caller.connect(), your agent remains in the conference. You can use barge(), whisper(), and spy() to control who hears your agent’s audio.connect() followed by close().close() ends the call for the agent and caller. In CONNECTED, close() removes the agent while the caller and callee can remain connected.disconnect().ActiveCall method reference