From ebed260bf4997acd474d2b027473a172942a965d Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 3 May 2023 16:32:48 +0100 Subject: [PATCH] Add m.call.reject --- .../event-schemas/examples/m.call.reject.yaml | 9 +++++ data/event-schemas/schema/m.call.reject.yaml | 40 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 data/event-schemas/examples/m.call.reject.yaml create mode 100644 data/event-schemas/schema/m.call.reject.yaml diff --git a/data/event-schemas/examples/m.call.reject.yaml b/data/event-schemas/examples/m.call.reject.yaml new file mode 100644 index 00000000..2014566c --- /dev/null +++ b/data/event-schemas/examples/m.call.reject.yaml @@ -0,0 +1,9 @@ +{ + "$ref": "core/room_event.json", + "type": "m.call.reject", + "content": { + "version" : "1", + "party_id": "67890", + "call_id": "12345" + } +} diff --git a/data/event-schemas/schema/m.call.reject.yaml b/data/event-schemas/schema/m.call.reject.yaml new file mode 100644 index 00000000..1e2336a7 --- /dev/null +++ b/data/event-schemas/schema/m.call.reject.yaml @@ -0,0 +1,40 @@ +{ + "type": "object", + "description": "If the `m.call.invite` event has `version` `\"1\"`, a client wishing to reject the call sends an `m.call.reject` event. This rejects the call on all devices, but if the calling device sees an `answer` before the `reject`, it disregards the reject event and carries on. The reject has a `party_id` just like an answer, and the caller sends a `select_answer` for it just like an answer. If another client had already sent an answer and sees the caller select the reject response instead of its answer, it ends the call. If the `m.call.invite` event has `version` `0`, the callee sends an `m.call.hangup` event. If the calling user chooses to end the call before setup is complete, the client sends `m.call.hangup` +as previously.", + "allOf": [{ + "$ref": "core-event-schema/room_event.yaml" + }], + "properties": { + "content": { + "type": "object", + "properties": { + "call_id": { + "type": "string", + "description": "The ID of the call this event relates to." + }, + "version": { + "type": "integer", + "description": "The version of the VoIP specification this message adheres to. This specification is version 1. This field is a string such that experimental implementations can use non-integer versions. This field was an integer in the previous spec version and implementations must accept an integer 0." + }, + "party_id": { + "type": "string", + "description": "This identifies the party that sent this event. A client may choose to re-use the device ID from end-to-end cryptography for the value of this field. " + }, + "reason": { + "type": "string", + "description": "Optional error reason for the hangup. This should not be provided when the user naturally ends or rejects the call. When there was an error in the call negotiation, this should be `ice_failed` for when ICE negotiation fails or `invite_timeout` for when the other party did not answer in time.", + "enum": [ + "ice_failed", + "invite_timeout" + ] + } + }, + "required": ["call_id", "version", "party_id"] + }, + "type": { + "type": "string", + "enum": ["m.call.reject"] + } + } +}