Skip to content

Commit

Permalink
Add note on control messages and phone sessions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fancycode committed Oct 24, 2023
1 parent 709cfe8 commit d4763f8
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions docs/standalone-signaling-api-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,74 @@ Message format (Server -> Client, receive message)
- The `userid` is omitted if a message was sent by an anonymous user.


## Control messages

Similar to regular messages between clients which can be sent by any session,
messages with type `control` can only be sent if the permission flag `control`
is available.

These messages can be used to perform actions on clients that should only be
possible by some users (e.g. moderators).

Message format (Client -> Server, mute phone):

{
"id": "unique-request-id",
"type": "message",
"message": {
"recipient": {
"type": "session",
"sessionid": "the-session-id-to-send-to"
},
"data": {
"type": "mute",
"audio": "audio-flags"
}
}
}

The bit-field `audio-flags` supports the following bits:
- `1`: mute speaking (i.e. phone can no longer talk)
- `2`: mute listening (i.e. phone is on hold and can no longer hear)

To unmute, a value of `0` must be sent.

Message format (Client -> Server, hangup phone):

{
"id": "unique-request-id",
"type": "message",
"message": {
"recipient": {
"type": "session",
"sessionid": "the-session-id-to-send-to"
},
"data": {
"type": "hangup"
}
}
}

Message format (Client -> Server, send DTMF):

{
"id": "unique-request-id",
"type": "message",
"message": {
"recipient": {
"type": "session",
"sessionid": "the-session-id-to-send-to"
},
"data": {
"type": "dtmf",
"digit": "the-digit"
}
}
}

Supported digits are `0`-`9`, `*` and `#`.


## Transient data

Transient data can be used to share data in a room that is valid while sessions
Expand Down Expand Up @@ -936,6 +1004,13 @@ Message format (Client -> Server):
}


Phone sssions will have `type` set to `phone` in the additional user data
(which will be included in the `joined` [room event](#room-events)),
`callid` will be the id of the phone call and `number` the target of the call.
The call id will match the one returned for accepted outgoing calls and the
associated session id can be used to hangup a call or send DTMF tones to it.


### Update virtual session

Message format (Client -> Server):
Expand Down

0 comments on commit d4763f8

Please sign in to comment.