Hi @Mohammed Suhail ,
Thank you for sharing the detailed investigation results, including the Log Analytics queries and the RecognizeFailed event payload. That information is very helpful and does clarify what you are observing. I see the timeout (code 408, subcode 8565) is pointing to a Cognitive Services request timing out during the Recognize action, which explains the intermittent silence and failures you're hitting.
Why isn't this error showing up in the call diagnostics?
The ACSCallAutomationIncomingOperations logs capture the initial API request handling, so they show "Succeeded" when the Recognize operation is accepted and started by ACS. However, the actual failure happens later in the process, during the async integration with Cognitive Services. These control-plane events (like RecognizeFailed) are delivered separately via webhooks or Event Grid to your app, rather than in the media-focused diagnostics logs (e.g., ACSCallDiagnostics), which track things like stream quality and endpoints but not these action outcomes.
Relevant tables/logs for further debugging:
Stick with Azure Monitor Log Analytics and use your CallConnectionId, CorrelationId, or ServerCallId to query these tables for patterns:
- ACSCallAutomationIncomingOperations: Expand your query to check surrounding operations and durations for context.
- ACSCallDiagnostics (or ACSCallDiagnosticsUpdates for fresher data): Look for media metrics like jitter, packet loss, or RTT that might contribute to timeouts.
- ACSCallSummary (or ACSCallSummaryUpdates): Gives a high-level view of call duration and any summary diagnostics to spot trends across affected calls.
If you haven't already, enable diagnostic settings in the Azure portal to route these to Log Analytics for easier querying.
Mitigating the Cognitive Services timeout:
This is often tied to transient issues like network latency or service load, but here's how to handle it:
- Add retry logic in your app, catch RecognizeFailed events and retry the action with a short backoff (e.g., 2-5 seconds, up to 3 attempts).
- Ensure your ACS and Cognitive Services resources are in the same region to cut down on latency, and confirm the "Cognitive Services User" role is assigned to your ACS identity.
- Tweak Recognize options: Bump up InitialSilenceTimeout (max 300s for DTMF, 20s for speech) or EndSilenceTimeout to give more buffer without failing prematurely.
- Monitor Cognitive Services health in the Azure portal for any quotas or outages, if you're on a free tier, consider upgrading.
Reference:
https://learn.microsoft.com/en-us/azure/communication-services/resources/troubleshooting/voice-video-calling/troubleshooting-codes?pivots=calling
https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/logs/call-automation-logs
https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/acscallautomationincomingoperations
https://learn.microsoft.com/en-us/azure/communication-services/how-tos/call-automation/recognize-action?pivots=programming-language-javascript
Kindly let us know if the above helps or you need further assistance on this issue.
Please "upvote" if the information helped you. This will help us and others in the community as well.