Wait for the next turn
nextWait (up to timeout seconds, max 50) for the next event in the call and return it. Event type: user (text = what the person said; after a pause also missed = earlier turns, oldest first, and away_s), revise (queued says were replaced; reason user_stop = the person said stop), status_request (the person asked what the agent is doing), decision (answer to a decide question: id, number, verdict yes|no|option|other, option, text, by), timeout (nothing happened; reconnect true = server restart), human_left / human_rejoined (the person dropped out / is back; greeted true = the join greeting was just spoken), operator (another agent addressed this one: addressed_to_you), data (another agent sent data with send_data: from, kind, payload or url + file_id; never spoken), context (the call language changed, new context), superseded (a newer next call replaced this one), ended (the call is over; detail live_budget, wallet_empty, free_limit or review_budget = budget used up (quota), unspoken says were dropped). Every answer has humans_present; user events and operators_said lines carry addressed_to / addressed_to_you. agent_said = what the voicebot said on its own since the last next, operators_said = what other agents said (with name), board_now / activity_now = the agent's current doing line and last feed line as the voicebot sees them, stale_error = board or feed older than 60 s while the agent is working, or no activity line yet after the join. Errors: 404 = unknown session (after leave); 5xx, 503 or a network error leave the session valid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session | Yes | The `session` value returned by join. | |
| timeout | No | Seconds to wait, max 50. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||