{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jambonz.org/schema/verbs/dequeue",
  "minVersion": "0.9.6",
  "title": "Dequeue",
  "description": "Removes a caller from a named queue and bridges them to the current call. Typically used by an agent or operator call flow to connect with the next waiting caller.",
  "type": "object",
  "properties": {
    "verb": {
      "const": "dequeue"
    },
    "id": {
      "type": "string",
      "description": "An optional unique identifier for this verb instance."
    },
    "name": {
      "type": "string",
      "description": "The name of the queue to dequeue from.",
      "examples": [
        "support",
        "sales"
      ]
    },
    "actionHook": {
      "$ref": "../components/actionHook",
      "description": "A webhook invoked when the dequeued call ends."
    },
    "timeout": {
      "type": "number",
      "description": "Time in seconds to wait for a caller to be available in the queue."
    },
    "beep": {
      "type": "boolean",
      "description": "If true, play a beep when the calls are connected."
    },
    "callSid": {
      "type": "string",
      "description": "Dequeue a specific call by its call SID, rather than the next caller in line."
    }
  },
  "required": [
    "name"
  ],
  "examples": [
    {
      "verb": "dequeue",
      "name": "support",
      "beep": true
    }
  ]
}
