From 89ce85e13b13f174413f80444c1b91d1e5673f62 Mon Sep 17 00:00:00 2001 From: Yading Fang Date: Tue, 16 Dec 2025 09:52:07 +0800 Subject: [PATCH] Add callback definition for call status change events --- code/API_definitions/click-to-dial.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/code/API_definitions/click-to-dial.yaml b/code/API_definitions/click-to-dial.yaml index bf41da0..e8f6aa0 100644 --- a/code/API_definitions/click-to-dial.yaml +++ b/code/API_definitions/click-to-dial.yaml @@ -94,7 +94,26 @@ paths: $ref: '#/components/responses/Conflict409' '422': $ref: '#/components/responses/UnprocessableEntity422' - + callbacks: + callStatusChanged: + '{$request.body#/sink}': + post: + summary: Call status changed event + description: | + Event notification delivered to the sink URL when the call status + changes (CloudEvents structured mode). + requestBody: + required: true + content: + application/cloudevents+json: + schema: + $ref: '#/components/schemas/EventCTDStatusChanged' + examples: + CALL_STATUS_CHANGED_EXAMPLE: + $ref: '#/components/examples/CALL_STATUS_CHANGED_EXAMPLE' + responses: + '2XX': + description: Event successfully received by the sink. /calls/{callId}: get: tags: