From 2ba8d7011169a6eae8ba89de0417fec0144551e8 Mon Sep 17 00:00:00 2001 From: Jozsef Vass Date: Wed, 28 May 2025 13:41:17 -0700 Subject: [PATCH 1/5] More voice disconnect reasons --- docs/topics/opcodes-and-status-codes.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/topics/opcodes-and-status-codes.md b/docs/topics/opcodes-and-status-codes.md index 74ce2e707e..fdd70e62fa 100644 --- a/docs/topics/opcodes-and-status-codes.md +++ b/docs/topics/opcodes-and-status-codes.md @@ -88,10 +88,13 @@ Our voice gateways have their own set of opcodes and close codes. | 4009 | Session timeout | Your session has timed out. | | 4011 | Server not found | We can't find the server you're trying to connect to. | | 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. | -| 4014 | Disconnected | Channel was deleted, you were kicked, voice server changed, or the main gateway session was dropped. Should not reconnect. | +| 4014 | Disconnected | Disconnect indiviual client (you were kicked, the main gateway session was dropped, etc.). Should not reconnect. | | 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). | | 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). | | 4020 | Bad request | You sent a malformed request | +| 4021 | Disconnected | Disconnect due to rate limit exceeded. Should not reconnect. | +| 4022 | Disconnected | Disconnect all clients (channel deleted, voice server changed, etc,). Should not reconnect. | + ## HTTP From 91c5f257b904da633c9e334fcf86743dcf5179d7 Mon Sep 17 00:00:00 2001 From: Jozsef Vass Date: Wed, 28 May 2025 17:20:52 -0700 Subject: [PATCH 2/5] typo --- docs/topics/opcodes-and-status-codes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/opcodes-and-status-codes.md b/docs/topics/opcodes-and-status-codes.md index fdd70e62fa..5aa45eed3a 100644 --- a/docs/topics/opcodes-and-status-codes.md +++ b/docs/topics/opcodes-and-status-codes.md @@ -88,7 +88,7 @@ Our voice gateways have their own set of opcodes and close codes. | 4009 | Session timeout | Your session has timed out. | | 4011 | Server not found | We can't find the server you're trying to connect to. | | 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. | -| 4014 | Disconnected | Disconnect indiviual client (you were kicked, the main gateway session was dropped, etc.). Should not reconnect. | +| 4014 | Disconnected | Disconnect individual client (you were kicked, the main gateway session was dropped, etc.). Should not reconnect. | | 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). | | 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). | | 4020 | Bad request | You sent a malformed request | From 7243e8f779b9bd1dbd72314bd348f3475d746eab Mon Sep 17 00:00:00 2001 From: Jozsef Vass Date: Wed, 28 May 2025 17:22:34 -0700 Subject: [PATCH 3/5] etc --- docs/topics/opcodes-and-status-codes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/opcodes-and-status-codes.md b/docs/topics/opcodes-and-status-codes.md index 5aa45eed3a..85423c2e05 100644 --- a/docs/topics/opcodes-and-status-codes.md +++ b/docs/topics/opcodes-and-status-codes.md @@ -93,7 +93,7 @@ Our voice gateways have their own set of opcodes and close codes. | 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). | | 4020 | Bad request | You sent a malformed request | | 4021 | Disconnected | Disconnect due to rate limit exceeded. Should not reconnect. | -| 4022 | Disconnected | Disconnect all clients (channel deleted, voice server changed, etc,). Should not reconnect. | +| 4022 | Disconnected | Disconnect all clients (channel deleted, voice server changed, etc.). Should not reconnect. | ## HTTP From 3c47a44c88b8993b996bc80eeb7afec67491c375 Mon Sep 17 00:00:00 2001 From: Jozsef Vass Date: Thu, 5 Jun 2025 14:58:47 -0700 Subject: [PATCH 4/5] updated description --- docs/topics/opcodes-and-status-codes.md | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/topics/opcodes-and-status-codes.md b/docs/topics/opcodes-and-status-codes.md index 85423c2e05..29ddeeabb4 100644 --- a/docs/topics/opcodes-and-status-codes.md +++ b/docs/topics/opcodes-and-status-codes.md @@ -77,23 +77,23 @@ Our voice gateways have their own set of opcodes and close codes. ###### Voice Close Event Codes -| Code | Description | Explanation | -|------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| 4001 | Unknown opcode | You sent an invalid [opcode](/docs/topics/opcodes-and-status-codes#voice-voice-opcodes). | -| 4002 | Failed to decode payload | You sent an invalid payload in your [identifying](/docs/events/gateway-events#identify) to the Gateway. | -| 4003 | Not authenticated | You sent a payload before [identifying](/docs/events/gateway-events#identify) with the Gateway. | -| 4004 | Authentication failed | The token you sent in your [identify](/docs/events/gateway-events#identify) payload is incorrect. | -| 4005 | Already authenticated | You sent more than one [identify](/docs/events/gateway-events#identify) payload. Stahp. | -| 4006 | Session no longer valid | Your session is no longer valid. | -| 4009 | Session timeout | Your session has timed out. | -| 4011 | Server not found | We can't find the server you're trying to connect to. | -| 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. | -| 4014 | Disconnected | Disconnect individual client (you were kicked, the main gateway session was dropped, etc.). Should not reconnect. | -| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). | -| 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). | -| 4020 | Bad request | You sent a malformed request | -| 4021 | Disconnected | Disconnect due to rate limit exceeded. Should not reconnect. | -| 4022 | Disconnected | Disconnect all clients (channel deleted, voice server changed, etc.). Should not reconnect. | +| Code | Description | Explanation | +|------|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| +| 4001 | Unknown opcode | You sent an invalid [opcode](/docs/topics/opcodes-and-status-codes#voice-voice-opcodes). | +| 4002 | Failed to decode payload | You sent an invalid payload in your [identifying](/docs/events/gateway-events#identify) to the Gateway. | +| 4003 | Not authenticated | You sent a payload before [identifying](/docs/events/gateway-events#identify) with the Gateway. | +| 4004 | Authentication failed | The token you sent in your [identify](/docs/events/gateway-events#identify) payload is incorrect. | +| 4005 | Already authenticated | You sent more than one [identify](/docs/events/gateway-events#identify) payload. Stahp. | +| 4006 | Session no longer valid | Your session is no longer valid. | +| 4009 | Session timeout | Your session has timed out. | +| 4011 | Server not found | We can't find the server you're trying to connect to. | +| 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. | +| 4014 | Disconnected | Disconnect individual client (you were kicked, the main gateway session was dropped, etc.). Should not reconnect. | +| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). | +| 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). | +| 4020 | Bad request | You sent a malformed request | +| 4021 | Disconnected: Rate Limited | Disconnect due to rate limit exceeded. Should not reconnect. | +| 4022 | Disconnected: Call Terminated | Disconnect all clients due to call terminatedc (channel deleted, voice server changed, etc.). Should not reconnect. | ## HTTP From 07a31f2c022beb91791802e5c00ee95b0db4158a Mon Sep 17 00:00:00 2001 From: Jozsef Vass Date: Thu, 5 Jun 2025 15:34:24 -0700 Subject: [PATCH 5/5] typo --- docs/topics/opcodes-and-status-codes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/opcodes-and-status-codes.md b/docs/topics/opcodes-and-status-codes.md index 29ddeeabb4..764861e33a 100644 --- a/docs/topics/opcodes-and-status-codes.md +++ b/docs/topics/opcodes-and-status-codes.md @@ -93,7 +93,7 @@ Our voice gateways have their own set of opcodes and close codes. | 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). | | 4020 | Bad request | You sent a malformed request | | 4021 | Disconnected: Rate Limited | Disconnect due to rate limit exceeded. Should not reconnect. | -| 4022 | Disconnected: Call Terminated | Disconnect all clients due to call terminatedc (channel deleted, voice server changed, etc.). Should not reconnect. | +| 4022 | Disconnected: Call Terminated | Disconnect all clients due to call terminated (channel deleted, voice server changed, etc.). Should not reconnect. | ## HTTP