|
|
|
@ -259,85 +259,7 @@ Call events are sent to a room, like any other event. This means that clients
|
|
|
|
|
must only send call events to rooms with exactly two participants as currently
|
|
|
|
|
the WebRTC standard is based around two-party communication.
|
|
|
|
|
|
|
|
|
|
Events
|
|
|
|
|
~~~~~~
|
|
|
|
|
``m.call.invite``
|
|
|
|
|
This event is sent by the caller when they wish to establish a call.
|
|
|
|
|
|
|
|
|
|
Required keys:
|
|
|
|
|
- ``call_id`` : "string" - A unique identifier for the call
|
|
|
|
|
- ``offer`` : "offer object" - The session description
|
|
|
|
|
- ``version`` : "integer" - The version of the VoIP specification this
|
|
|
|
|
message adheres to. This specification is version 0.
|
|
|
|
|
- ``lifetime`` : "integer" - The time in milliseconds that the invite is
|
|
|
|
|
valid for. Once the invite age exceeds this value, clients should discard
|
|
|
|
|
it. They should also no longer show the call as awaiting an answer in the
|
|
|
|
|
UI.
|
|
|
|
|
|
|
|
|
|
Optional keys:
|
|
|
|
|
None.
|
|
|
|
|
|
|
|
|
|
Example::
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
"version" : 0,
|
|
|
|
|
"call_id": "12345",
|
|
|
|
|
"offer": {
|
|
|
|
|
"type" : "offer",
|
|
|
|
|
"sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
``Offer Object``
|
|
|
|
|
Required keys:
|
|
|
|
|
- ``type`` : "string" - The type of session description, in this case
|
|
|
|
|
'offer'
|
|
|
|
|
- ``sdp`` : "string" - The SDP text of the session description
|
|
|
|
|
|
|
|
|
|
``m.call.candidates``
|
|
|
|
|
This event is sent by callers after sending an invite and by the callee after
|
|
|
|
|
answering. Its purpose is to give the other party additional ICE candidates to
|
|
|
|
|
try using to communicate.
|
|
|
|
|
|
|
|
|
|
Required keys:
|
|
|
|
|
- ``call_id`` : "string" - The ID of the call this event relates to
|
|
|
|
|
- ``version`` : "integer" - The version of the VoIP specification this
|
|
|
|
|
messages adheres to. his specification is version 0.
|
|
|
|
|
- ``candidates`` : "array of candidate objects" - Array of object
|
|
|
|
|
describing the candidates.
|
|
|
|
|
|
|
|
|
|
``Candidate Object``
|
|
|
|
|
|
|
|
|
|
Required Keys:
|
|
|
|
|
- ``sdpMid`` : "string" - The SDP media type this candidate is intended
|
|
|
|
|
for.
|
|
|
|
|
- ``sdpMLineIndex`` : "integer" - The index of the SDP 'm' line this
|
|
|
|
|
candidate is intended for
|
|
|
|
|
- ``candidate`` : "string" - The SDP 'a' line of the candidate
|
|
|
|
|
|
|
|
|
|
``m.call.answer``
|
|
|
|
|
|
|
|
|
|
Required keys:
|
|
|
|
|
- ``call_id`` : "string" - The ID of the call this event relates to
|
|
|
|
|
- ``version`` : "integer" - The version of the VoIP specification this
|
|
|
|
|
messages
|
|
|
|
|
- ``answer`` : "answer object" - Object giving the SDP answer
|
|
|
|
|
|
|
|
|
|
``Answer Object``
|
|
|
|
|
|
|
|
|
|
Required keys:
|
|
|
|
|
- ``type`` : "string" - The type of session description. 'answer' in this
|
|
|
|
|
case.
|
|
|
|
|
- ``sdp`` : "string" - The SDP text of the session description
|
|
|
|
|
|
|
|
|
|
``m.call.hangup``
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Required keys:
|
|
|
|
|
- ``call_id`` : "string" - The ID of the call this event relates to
|
|
|
|
|
- ``version`` : "integer" - The version of the VoIP specification this
|
|
|
|
|
messages
|
|
|
|
|
{{voip_events}}
|
|
|
|
|
|
|
|
|
|
Message Exchange
|
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|