diff --git a/event-schemas/examples/m.call.answer b/event-schemas/examples/m.call.answer new file mode 100644 index 00000000..0301fb3b --- /dev/null +++ b/event-schemas/examples/m.call.answer @@ -0,0 +1,17 @@ +{ + "age": 242352, + "content": { + "version" : 0, + "call_id": "12345", + "lifetime": 60000, + "answer": { + "type" : "answer", + "sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]" + } + }, + "origin_server_ts": 1431961217939, + "event_id": "$WLGTSEFSEF:localhost", + "type": "m.call.answer", + "room_id": "!Cuyf34gef24t:localhost", + "user_id": "@example:localhost" +} diff --git a/event-schemas/examples/m.call.candidates b/event-schemas/examples/m.call.candidates new file mode 100644 index 00000000..389d2271 --- /dev/null +++ b/event-schemas/examples/m.call.candidates @@ -0,0 +1,19 @@ +{ + "age": 242352, + "content": { + "version" : 0, + "call_id": "12345", + "candidates": [ + { + "sdpMid": "audio", + "sdpMLineIndex": 0, + "candidate": "candidate:863018703 1 udp 2122260223 10.9.64.156 43670 typ host generation 0" + } + ] + }, + "origin_server_ts": 1431961217939, + "event_id": "$WLGTSEFSEF:localhost", + "type": "m.call.candidates", + "room_id": "!Cuyf34gef24t:localhost", + "user_id": "@example:localhost" +} diff --git a/event-schemas/examples/m.call.hangup b/event-schemas/examples/m.call.hangup new file mode 100644 index 00000000..52ddad16 --- /dev/null +++ b/event-schemas/examples/m.call.hangup @@ -0,0 +1,12 @@ +{ + "age": 242352, + "content": { + "version" : 0, + "call_id": "12345" + }, + "origin_server_ts": 1431961217939, + "event_id": "$WLGTSEFSEF:localhost", + "type": "m.call.hangup", + "room_id": "!Cuyf34gef24t:localhost", + "user_id": "@example:localhost" +} diff --git a/event-schemas/examples/m.call.invite b/event-schemas/examples/m.call.invite new file mode 100644 index 00000000..2df25929 --- /dev/null +++ b/event-schemas/examples/m.call.invite @@ -0,0 +1,17 @@ +{ + "age": 242352, + "content": { + "version" : 0, + "call_id": "12345", + "lifetime": 60000, + "offer": { + "type" : "offer", + "sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]" + } + }, + "origin_server_ts": 1431961217939, + "event_id": "$WLGTSEFSEF:localhost", + "type": "m.call.invite", + "room_id": "!Cuyf34gef24t:localhost", + "user_id": "@example:localhost" +} diff --git a/event-schemas/schema/m.call.answer b/event-schemas/schema/m.call.answer new file mode 100644 index 00000000..8976aa33 --- /dev/null +++ b/event-schemas/schema/m.call.answer @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "allOf": [{ + "$ref": "core#/definitions/room_event" + }], + "properties": { + "content": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "answer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["answer"] + }, + "sdp": { + "type": "string" + } + }, + "required": ["type", "sdp"] + }, + "version": { + "type": "number" + } + }, + "required": ["call_id", "answer", "version"] + }, + "type": { + "type": "string", + "enum": ["m.call.answer"] + } + } +} diff --git a/event-schemas/schema/m.call.candidates b/event-schemas/schema/m.call.candidates new file mode 100644 index 00000000..0a2937a1 --- /dev/null +++ b/event-schemas/schema/m.call.candidates @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "allOf": [{ + "$ref": "core#/definitions/room_event" + }], + "properties": { + "content": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "candidates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sdpMid": { + "type": "string" + }, + "sdpMLineIndex": { + "type": "number" + }, + "candidate": { + "type": "string" + } + }, + "required": ["candidate", "sdpMLineIndex", "sdpMid"] + } + }, + "version": { + "type": "number" + } + }, + "required": ["call_id", "candidates", "version"] + }, + "type": { + "type": "string", + "enum": ["m.call.candidates"] + } + } +} diff --git a/event-schemas/schema/m.call.hangup b/event-schemas/schema/m.call.hangup new file mode 100644 index 00000000..48d008b9 --- /dev/null +++ b/event-schemas/schema/m.call.hangup @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "allOf": [{ + "$ref": "core#/definitions/room_event" + }], + "properties": { + "content": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "version": { + "type": "number" + } + }, + "required": ["call_id", "version"] + }, + "type": { + "type": "string", + "enum": ["m.call.hangup"] + } + } +} diff --git a/event-schemas/schema/m.call.invite b/event-schemas/schema/m.call.invite new file mode 100644 index 00000000..4bdbccab --- /dev/null +++ b/event-schemas/schema/m.call.invite @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "allOf": [{ + "$ref": "core#/definitions/room_event" + }], + "properties": { + "content": { + "type": "object", + "properties": { + "call_id": { + "type": "string" + }, + "offer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["offer"] + }, + "sdp": { + "type": "string" + } + }, + "required": ["type", "sdp"] + }, + "version": { + "type": "number" + } + }, + "required": ["call_id", "offer", "version"] + }, + "type": { + "type": "string", + "enum": ["m.call.invite"] + } + } +}