How can I configure Azure Communication Services and Event Grid to reliably determine whether a receiver manually picks up a call, as I’m receiving events like CallConnected and CallParticipantAdded but missing critical events, which prevents me from dist

rosasb 0 Reputation points
2025-02-21T07:37:17.4133333+00:00

Problem Summary:

I am using Azure Communication Services (ACS) to manage voice calls, specifically initiating calls to a few PSTN number (+17146792739, +17146792739,+19096811571)) via the Call Automation feature, and I’m integrating these events with Azure Event Grid to send them to my google cloud callback url webhook endpoint (https://us-central1-drc-surgeryform1.cloudfunctions.net/acs-callbackurl). My goal is to reliably determine whether the receiver manually picks up the call, but I’m facing challenges due to incomplete event data and configuration issues. I want to be able to play a prerecorded audio message when the receiver answers the phone.

Currently, I receive events such as Microsoft.Communication.CallStarted, Microsoft.Communication.CallConnected, Microsoft.Communication.CallParticipantAdded, and Microsoft.Communication.ParticipantsUpdated for my calls, as evidenced in logs from recent calls on February 21, 2025. However, I am not receiving any events that indicate whether or not the receiver answered the call. When I have the receiver pick up the calls or ignore the calls, the logs look very similar- there are no events that are specific to one or the other.

My ACS resource (gh-glasses-ordering-system) is configured to publish events to an Event Grid Topic (acs-events-topic), located in the gh-glasses-ordering resource group in West US, but the topic’s metrics show 0 published or delivered events over 30 days, despite my webhook receiving some events. This discrepancy suggests a configuration issue, such as:

The ACS resource might not be publishing to acs-events-topic correctly.

The Event Grid subscription to my webhook might be filtered, inactive, or misconfigured, potentially excluding termination events.

The webhook endpoint validation or authentication could be failing, causing Event Grid to not recognize deliveries.

I need guidance on:

How to ensure ACS publishes all call lifecycle events (including status about whether or not the receiver picked up the call) to acs-events-topic.

How to properly configure the Event Grid subscription to send all ACS call events to my webhook without missing critical data.

Whether there’s an event or property in ACS that explicitly indicates a manual receiver pickup, as CallConnected alone appears in both manual and automated scenarios.

Resolving the discrepancy between my webhook receiving events and acs-events-topic showing no activity in metrics.

This issue prevents me from reliably distinguishing manual call pickups from automated responses and prevents me from being able to know when to play the audio file at the appropriate time.


Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,013 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva Nair 395 Reputation points Microsoft Vendor
    2025-02-21T10:14:37.6166667+00:00

    Hi rosasb,

    Based on points mentioned above, please refer the below points.

    1. To ensure that Azure Communication Services (ACS) publishes all relevant call lifecycle events to the acs-events-topic, follow these steps:
    • Configure Event Grid Integration in ACS: Go to the Azure Portal → ACS Resource (gh-glasses-ordering-system) → Events. Ensure you have enabled all the necessary event types, including: Microsoft.Communication.CallConnected, icrosoft.Communication.CallDisconnected, Microsoft.Communication.CallParticipantAdded, Microsoft.Communication.CallParticipantRemoved, Microsoft.Communication.CallTransferAccepted, Microsoft.Communication.CallTransferFailed
    • Verify Event Grid Topic Settings: Confirm that the acs-events-topic is correctly linked with the ACS resource. Check if the topic is active and configured without filters that may exclude certain events.
    • Use Diagnostic Logging: Enable diagnostics in the Event Grid Topic under Monitor → Diagnostics settings. This helps in tracking published events and detecting potential configuration issues.

    Please refer to the ACS Event Grid Integration Documentation

    2. To configure the Event Grid subscription to ensure all ACS call events are sent to your webhook:

    • Create or Update Event Grid Subscription: In the Azure Portal, go to Event Grid Topic (acs-events-topic) → Event Subscriptions. Ensure the subscription is set up with the following:
      • Endpoint Type: Webhook
        • Endpoint URL: https://us-central1-drc-surgeryform1.cloudfunctions.net/acs-callbackurl
          • Event Type Filter: Make sure no filters are applied, or include all relevant event types manually.
          • Enable Advanced Filtering (Optional): If you need to filter specific events, use advanced filtering options to include only the events required by your logic.
          • Webhook Validation and Retry Settings: Confirm the webhook endpoint passes the validation handshake from Event Grid. Set the retry policy to handle temporary failures, ensuring no events are missed.
          • Test and Monitor the Subscription: After configuration, use Test Event from Event Grid to check webhook delivery. Monitor the subscription under Event Grid Topic → Metrics and look for delivery status and failures.

    Refer to Event Grid Webhook Subscription Documentation for detailed steps. 

    1. Azure Communication Services currently does not provide a dedicated event that explicitly indicates a manual receiver pickup.
    • Recommended Solution - DTMF Detection: The most reliable method is to implement DTMF (Dual-Tone Multi-Frequency) Detection:
      • After receiving the 'CallConnected' event, play a prompt asking the receiver to press a key (e.g., “Press 1 to continue”).
        • If a digit is pressed, it confirms a manual pickup, as voicemail systems typically won’t respond to DTMF inputs.
          • If no input is detected within a set timeout, assume the call was routed to voicemail or an automated system.
          • Additional Option - Audio Analysis: Record the first few seconds of the call and use Azure Cognitive Services - Speech to Text to analyze for voicemail-specific phrases like “Leave a message” or long silences.

     please refer DTMF Recognition in the ACS Call Automation Documentation

    4. If your webhook is receiving events but the Event Grid Topic shows no activity, consider the following:

    • Check Diagnostic Settings: Ensure diagnostics are enabled for the acs-events-topic under Monitor → Diagnostics settings. This logs the events and helps trace if events are published but not reflected in metrics.
    • Examine Event Grid Dead-Lettering: If Event Grid fails to deliver events to the webhook, they may be moved to a dead-letter queue. Check if the dead-letter destination (e.g., a storage account) has pending events.
    • Verify Event Subscription Status: Confirm the Event Subscription is active and not in a disabled state due to delivery failures. This can be checked under Event Grid Topic → Event Subscriptions.
    • Webhook Authentication and Response Codes: Verify that the webhook endpoint correctly responds to validation requests and event deliveries with HTTP status codes in the 2xx range. Event Grid considers 4xx or 5xx responses as failed deliveries, affecting metrics.

    please Refer to Event Grid Diagnostics and Troubleshooting for more information.

    If you have any further assistant, do let me know.

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.