Convert hangup & reject events to YAML

So we can have a bulleted list in the description for the values
of 'reason'.
pull/1511/head
David Baker 3 years ago
parent f4b6c62daa
commit d9bd32d687

@ -1,39 +1,43 @@
{ ---
"type": "object", type: object
"description": "Sent by either party to signal their termination of the call. This can be sent either once the call has has been established or before to abort the call.", description: Sent by either party to signal their termination of the call. This can
"allOf": [{ be sent either once the call has has been established or before to abort the call.
"$ref": "core-event-schema/room_event.yaml" allOf:
}], - "$ref": core-event-schema/room_event.yaml
"properties": { properties:
"content": { content:
"type": "object", type: object
"properties": { properties:
"call_id": { call_id:
"type": "string", type: string
"description": "The ID of the call this event relates to." description: The ID of the call this event relates to.
}, version:
"version": { type: integer
"type": "integer", description: The version of the VoIP specification this message adheres to.
"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." This specification is version 1. This field is a string such that experimental
}, implementations can use non-integer versions. This field was an integer
"party_id": { in the previous spec version and implementations must accept an integer
"type": "string", 0.
"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. " party_id:
}, type: string
"reason": { description: 'This identifies the party that sent this event. A client may
"type": "string", choose to re-use the device ID from end-to-end cryptography for the value
"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.", of this field. '
"enum": [ reason:
"ice_failed", type: string
"invite_timeout" 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.
"required": ["call_id", "version", "party_id"] enum:
}, - ice_failed
"type": { - invite_timeout
"type": "string", required:
"enum": ["m.call.hangup"] - call_id
} - version
} - party_id
} type:
type: string
enum:
- m.call.hangup

@ -1,40 +1,50 @@
{ ---
"type": "object", 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` description: If the `m.call.invite` event has `version` `"1"`, a client wishing to
as previously.", reject the call sends an `m.call.reject` event. This rejects the call on all devices,
"allOf": [{ but if the calling device sees an `answer` before the `reject`, it disregards the
"$ref": "core-event-schema/room_event.yaml" 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
"properties": { had already sent an answer and sees the caller select the reject response instead
"content": { of its answer, it ends the call. If the `m.call.invite` event has `version` `0`,
"type": "object", the callee sends an `m.call.hangup` event. If the calling user chooses to end the
"properties": { call before setup is complete, the client sends `m.call.hangup` as previously.
"call_id": { allOf:
"type": "string", - "$ref": core-event-schema/room_event.yaml
"description": "The ID of the call this event relates to." properties:
}, content:
"version": { type: object
"type": "integer", properties:
"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." call_id:
}, type: string
"party_id": { description: The ID of the call this event relates to.
"type": "string", version:
"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. " type: integer
}, description: The version of the VoIP specification this message adheres to.
"reason": { This specification is version 1. This field is a string such that experimental
"type": "string", implementations can use non-integer versions. This field was an integer
"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.", in the previous spec version and implementations must accept an integer
"enum": [ 0.
"ice_failed", party_id:
"invite_timeout" 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. '
"required": ["call_id", "version", "party_id"] reason:
}, type: string
"type": { description: Optional error reason for the hangup. This should not be provided
"type": "string", when the user naturally ends or rejects the call. When there was an error
"enum": ["m.call.reject"] 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

Loading…
Cancel
Save