Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Call state

agent.state returns a CallState — a call’s current phase. Compare it against the State::* constants, usually inside await_until:

await_until(|| assert(callee.state).equals(State::Ringing));
  • State::Idle — No active call.
  • State::Ringing — A call is ringing — incoming or outgoing — but not yet answered.
  • State::Established — The call is connected and media is flowing.