hangupAll

View as Markdown

hangupAll

  • hangupAll(): Promise<void>

Hangs up the active calls in the RoomSession and will send a REJECT_ALL message to the rejected participant(s).

REJECT_ALL message

When a participant is rejected, the causeCode will be 825 and the cause will be REJECT_ALL. Below is an example of the JSON response when a participant is rejected:

1{
2 "jsonrpc": "2.0",
3 "id": "cbcbe519-39db-4585-9a89-f0e1fdf036e9",
4 "result": {
5 "node_id": "105f2e4f-69a7-4907-bc01-36399fe34bdd@west-us",
6 "result": {
7 "jsonrpc": "2.0",
8 "id": "f4a9c207-e1de-49bb-98bf-e8f4b243c4e0",
9 "result": {
10 "callID": "fc456094-6f0e-44b5-8209-7a474cac7ef7",
11 "message": "CALL ENDED",
12 "causeCode": 825,
13 "cause": "REJECT_ALL"
14 }
15 },
16 "code": "200"
17 }
18}

Returns

Promise<void>

Example

1await roomSession.hangupAll();