Call States and Lifecycle
Every call in Telcoflow progresses through a defined set of states. Understanding these states is critical for building correct call flows.

States Explained
State Transitions
Key Behaviors
- Pre-answer connect: You can call
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. - Answered media session: After
answer(), the call enters ANSWERED and your application is responsible for the live audio exchange with the caller. - Agent stays in call: After a successful
connect(), your agent remains in the conference. You can usebarge(),whisper(), andspy()to control who hears your agent’s audio. - Connect then leave: To replicate a handoff pattern where the agent exits after connecting the other parties, use
connect()followed byclose(). - Close behavior depends on state: In ANSWERED,
close()ends the call for the agent and caller. In CONNECTED,close()removes the agent while the caller and callee can remain connected. - Universal termination: Any active state can transition to DISCONNECTED when the call is terminated server-side. Your application can also end the call explicitly with
disconnect().
Next Steps
- Call Commands - Detailed reference for each command
- Event Handling - How to listen for state change events
- API Reference - Full
ActiveCallmethod reference
