{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jambonz.org/schema/callbacks/enqueue",
  "title": "Enqueue ActionHook Payload",
  "description": "Payload sent to the enqueue actionHook when the enqueue verb completes — i.e. the call was bridged, abandoned, left the queue, or an error occurred.",
  "allOf": [
    { "$ref": "base" }
  ],
  "type": "object",
  "properties": {
    "queue_sid": {
      "type": "string",
      "description": "Queue identifier in the format 'queue:{account_sid}:{queue_name}'."
    },
    "queue_time": {
      "type": "integer",
      "description": "Time in seconds the caller spent waiting in the queue."
    },
    "queue_result": {
      "type": "string",
      "enum": ["bridged", "hangup", "leave", "error"],
      "description": "Outcome of the enqueue. 'bridged' — call was dequeued and connected; 'hangup' — caller hung up while waiting; 'leave' — caller executed a leave verb from the waitHook; 'error' — an error occurred during bridging."
    }
  },
  "required": ["queue_sid", "queue_time", "queue_result"],
  "additionalProperties": true
}
