{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jambonz.org/schema/callbacks/dial",
  "title": "Dial ActionHook Payload",
  "description": "Payload sent to the actionHook when a dial verb completes, either because the dialed party hung up, the call was not answered, or an error occurred.",
  "allOf": [
    { "$ref": "base" }
  ],
  "type": "object",
  "properties": {
    "dial_call_status": {
      "type": "string",
      "enum": ["completed", "failed", "busy", "no-answer", "trying", "ringing", "early-media", "in-progress"],
      "description": "Final status of the outbound (dialed) call leg."
    },
    "dial_sip_status": {
      "type": "integer",
      "description": "SIP response code from the dialed party (e.g. 200, 486, 487).",
      "examples": [200, 486, 487]
    },
    "dial_call_sid": {
      "type": "string",
      "description": "Call SID of the outbound (dialed) call leg."
    },
    "dial_sbc_callid": {
      "type": "string",
      "description": "SBC-level Call-ID for the outbound (dialed) call leg."
    }
  },
  "additionalProperties": true
}
