phone_session_end only when the entire workflow is finished.
Parameters
string
required
The active session that owns the task.
string
required
The task to cancel.
string
Optional note recorded with the cancellation.
Behavior
- Monitor the original
task_iduntil it reportscompletedwithterminal: "stopped_by_user". - If the task finished before the cancel arrived, the response contains
already_completed: trueand nothing is sent to the phone - act on the task’s actualterminalinstead.
Example
Related
phone_session_end- cancel everything and close the workflowphone_task_pause- suspend instead of stopping