{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jambonz.org/schema/callbacks/sip-refer",
  "title": "SipRefer ActionHook Payload",
  "description": "Payload sent to the sip-refer verb's actionHook when the REFER completes. Sent once the REFER response is received, or after a final NOTIFY arrives.",
  "allOf": [
    { "$ref": "base" }
  ],
  "type": "object",
  "properties": {
    "refer_status": {
      "type": "integer",
      "description": "SIP status code from the REFER response (e.g. 202 for accepted, 4xx/5xx for failure)."
    },
    "final_referred_call_status": {
      "type": "integer",
      "description": "Final SIP status of the referred call, extracted from a NOTIFY sipfrag. Present only when the REFER was accepted (202) and a final NOTIFY was received."
    }
  },
  "required": ["refer_status"],
  "additionalProperties": true
}
