Skip to content

Commit 12c95cb

Browse files
authored
Merge pull request #288324 from enricohuang/patch-31
Update ACS troubleshooting guide - call setup
2 parents b697b2a + 873e5c9 commit 12c95cb

9 files changed

+135
-0
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
title: Call setup issues - The call ends due to network issues
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to troubleshoot when the call ends with 410/3112
5+
author: sloanster
6+
ms.author: micahvivion
7+
8+
services: azure-communication-services
9+
ms.date: 09/22/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# The call ends with 410/3112
16+
The reason why call ends with 410/3112 error is the client isn't able to reach out to the other endpoint and no relay candidates are gathered.
17+
This 410/3112 error code can happen when the media path can't be established due to network issues, firewall restrictions, or incorrect configuration settings.
18+
Therefore, the peers were unable to establish a direct or relay connection.
19+
20+
The relay candidates aren't necessary if the client is able to establish a direct connection to the other peer.
21+
However, when WebRTC fails to gather relay candidates, it often indicates an issue with TURN (Traversal Using Relays around NAT) server configuration or network restrictions.
22+
Relay candidates are crucial for establishing connections in restrictive network environments.
23+
24+
## How to detect using the SDK
25+
You can learn the reason for the call ending using the following code snippet.
26+
```javascript
27+
call.on('stateChanged', () => {
28+
if (call.state === 'Disconnected') {
29+
if (call.callEndReason.code === 410 && call.callEndReason.subCode === 3112) {
30+
// show error message
31+
}
32+
}
33+
});
34+
35+
```
36+
To understand the codes and subcodes, see [Understanding calling codes and subcodes errors](../general-troubleshooting-strategies/understanding-error-codes.md).
37+
38+
When the media path can't be established, the call terminates with code 410 and subcode 3112.
39+
The SDK also triggers [networkRelaysNotReachable UFD](../references/ufd/network-relays-not-reachable.md) event.
40+
Here's a code snippet showing how to capture the `networkRelaysNotReachable UFD` event.
41+
42+
```javascript
43+
call.feature(Features.UserFacingDiagnostics).network.on('diagnosticChanged', (diagnosticInfo) => {
44+
if (diagnosticInfo.diagnostic === 'networkRelaysNotReachable') {
45+
if (diagnosticInfo.value === true) {
46+
// show a warning message on UI
47+
} else {
48+
// The networkRelaysNotReachable UFD recovered, notify the user
49+
}
50+
}
51+
});
52+
```
53+
## How to analyze the issue with Log Analytics or Call Diagnostics tool
54+
When a user reports that they're unable to make a call, you can use the [Call Diagnostics](../../../../concepts/voice-video-calling/call-diagnostics.md) tool to analyze the reason for the failure.
55+
To debug user calls, you need the [call ID](../references/how-to-collect-call-info.md).
56+
If the user's call failed because the firewall blocked the relay connection, you can find the end code and subcode to be 410 and 3112 on the overview page of the call.
57+
58+
:::image type="content" source="./media/call-diagnostics-call-overview-subcode-3112.png" alt-text="Screenshot of call diagnostics which has subcode 3112 on the overview page of the call." lightbox="./media/call-diagnostics-call-overview-subcode-3112.png":::
59+
60+
Additionally, you can also find [networkRelaysNotReachable UFD](../references/ufd/network-relays-not-reachable.md) event on the call issues page.
61+
62+
:::image type="content" source="./media/call-diagnostics-call-issues-network-relay-not-reachable-ufd.png" alt-text="Screenshot of call diagnostics which has networkRelaysNotReachable UFD on call issues page." lightbox="./media/call-diagnostics-call-issues-network-relay-not-reachable-ufd.png":::
63+
64+
To understand the timing of user actions or events, you can check the details on the timeline page.
65+
In this example, the user got `networkRelaysNotReachable UFD` event at 16:41:47 and call state change event at 16:41:49.
66+
67+
:::image type="content" source="./media/call-diagnostics-call-timeline-events.png" alt-text="Screenshot of call diagnostics which shows the timing of events call timeline page." lightbox="./media/call-diagnostics-call-timeline-events.png":::
68+
69+
The [Call Diagnostics](../../../../concepts/voice-video-calling/call-diagnostics.md) tool gives you an overview and the necessary information for debugging a single call.
70+
If you want to understand how many users encounter this issue, or how often users experience the problem, you can use the [Log Analytics](../../../../concepts/analytics/logs/voice-and-video-logs.md) tool to gain the insights on this issue.
71+
72+
For example, if you want to get the call ID that were disconnected with subcode 3112 in the last seven days, you can execute this query:
73+
```kusto
74+
ACSCallSummary
75+
| where ParticipantEndSubCode == 3112
76+
| project TimeGenerated, CorrelationId, ParticipantId, Identifier, CallType
77+
```
78+
:::image type="content" source="./media/log-query-result-for-calls-with-subcode-3112.png" alt-text="Screenshot of log query result for calls with subcode 3112." lightbox="./media/log-query-result-for-calls-with-subcode-3112.png":::
79+
80+
You can also render a timechart to understand the daily number of calls ending with subcode 3112
81+
```kusto
82+
ACSCallSummary
83+
| where ParticipantEndSubCode == 3112
84+
| summarize count() by bin(TimeGenerated, 1d)
85+
| render timechart
86+
```
87+
88+
:::image type="content" source="./media/timechart-displaying-the-calls-ending-with-subcode-3112.png" alt-text="Screenshot of a timechart displaying the daily number of calls ending with subcode 3112." lightbox="./media/timechart-displaying-the-calls-ending-with-subcode-3112.png":::
89+
90+
The time chart only provides an overview of the users under the same ACS resource ID.
91+
By running more specific queries, you can identify patterns or anomalies that aren't immediately apparent from the time chart alone, helping you pinpoint the root cause of any issues more accurately.
92+
93+
For example, if you see a spike in the number of calls ending with subcode 3112, it could be due to the high volume of calls while the occurrence ratio of the problem remained the same. Alternatively, the spike might be attributed to a particular user who retried many times and all attempts were failed with subcode 3112.
94+
95+
In this query, we analyze the data based on the user identifiers, assuming that the app maintains the same user identifier for each individual.
96+
```kusto
97+
ACSCallSummary
98+
| summarize Total = count(), SuccessCount = countif(ParticipantEndSubCode == 0), SubCode3112Count = countif(ParticipantEndSubCode == 3112) by Identifier
99+
| where SubCode3112Count > 0
100+
| order by SubCode3112Count desc
101+
```
102+
103+
:::image type="content" source="./media/log-query-results-3112-for-each-user-identifer.png" alt-text="Screenshot of log query results showing the number of calls ending with subcode 3112 for each user identifier." lightbox="./media/log-query-results-3112-for-each-user-identifer.png":::
104+
105+
In this example, one user had a total of 180 calls, of which 160 calls were successful and only two calls failed with subcode 3112.
106+
This pattern suggests a transient network issue, which may be resolved by retrying.
107+
On the other hand, another user had a total of six calls, all of which failed with subcode 3112.
108+
This consistency in subcode value indicates a likely network configuration issue for that user, where retrying is unlikely to help.
109+
110+
## How to mitigate or resolve
111+
If you find a user consistently experiences 410/3112 error, you should recommend that they check their firewall settings.
112+
Users should follow the *Firewall Configuration* guideline mentioned in the [Network recommendations](../../../../concepts/voice-video-calling/network-requirements.md) document.
113+
Ensure that the user or administrator checks their Network Address Translation (NAT) settings and verifies whether their firewall policy blocks User Datagram Protocol (UDP) packets.
114+
The firewall settings aren't limited to the user's computer; if the user is in a corporate environment, the company's firewall may also need to be configured.
115+
116+
Furthermore, if the application uses [custom TURN servers](../../../../tutorials/proxy-calling-support-tutorial.md),
117+
ensure that specified IP, port, and protocol aren't blocked by any firewall.
118+
119+
For application, it's important to handle events from the [User Facing Diagnostics Feature](../../../../concepts/voice-video-calling/user-facing-diagnostics.md) and notify the users accordingly.
120+
By doing so, the user is aware of the issue and can troubleshoot their network environment.
121+
122+
In rare cases, this error code appears randomly even if the user's firewall settings are correct.
123+
If the same user was previously able to connect and call successfully, this problem could be due to changes in network conditions.
124+
It may be a temporary issue. Try to start or join the call again.
125+
126+
## References
127+
* [Network recommendations](../../../../concepts/voice-video-calling/network-requirements.md)
128+
* [networkRelaysNotReachable UFD](../references/ufd/network-relays-not-reachable.md)
129+
* [Force calling traffic to be proxied across your own server](../../../../tutorials/proxy-calling-support-tutorial.md)
130+
Loading
Loading
Loading
Loading

articles/communication-services/resources/troubleshooting/voice-video-calling/call-setup-issues/overview.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ Here we list several common call setup issues, along with potential causes for e
3838
### The call setup takes too long
3939
* The user is experiencing network issues.
4040
* The browser takes a long time to acquire the stream.
41+
42+
### The call ends with specific codes/sub codes
43+
* The call ends with 410/3112 error due to network issues

articles/communication-services/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,8 @@ items:
11591159
href: resources/troubleshooting/voice-video-calling/call-setup-issues/no-incoming-call-notifications.md
11601160
- name: The call setup takes too long
11611161
href: resources/troubleshooting/voice-video-calling/call-setup-issues/call-setup-takes-too-long.md
1162+
- name: The call ends with 410/3112
1163+
href: resources/troubleshooting/voice-video-calling/call-setup-issues/call-ends-with-410-3112.md
11621164
- name: Device and permission issues
11631165
items:
11641166
- name: Overview

0 commit comments

Comments
 (0)