callback event is not triggering in azure communication service

Nagane, Shahadatt 45 Reputation points
2024-05-09T13:50:20.08+00:00

I made an outbound calling app using Azure Communication Service. It calls mobile phones and is hosted on a public server. The problem is, I can't hear any audio when I get a call. However, everything works fine when I run it using Azure Dev Tunnel on my computer.

Here's what happens:

  1. I make an outbound call.
  2. My phone rings, I answer it.
  3. I should hear audio on the call, but I don't.

Both scenarios use audio files stored on the same public server.

What's interesting is that we can log entries in the controller constructor when the callback event (when the user picks up the call) happens. But it doesn't go inside the callback event method where we handle events like call connection or playing audio. This only happens on the hosted server; it works fine on Azure Dev Tunnel.

Audio file (hosted on public server) and we are accessing this file in both scenario (azure dev tunnel, hosted app)

Please let me know if you need more information. Thank you

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
917 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,676 Reputation points Microsoft Employee
    2024-05-10T01:37:16.5466667+00:00

    @Nagane, Shahadatt It sounds like you’re experiencing an issue with the callback event not being triggered in your Azure Communication Service application when hosted on a public server. This can be a complex issue. I have put together a list of 6 items I would check first.

    1. Check the Webhook URL: Ensure that the webhook URL is correctly formatted and accessible from the public server. The format should be https://<site-name>.azurewebsites.net/api/updates where <site-name> is the name of your Web App Service.
    2. Verify Network Configuration: On your public server, check if there are any network configurations or firewalls that might be blocking incoming requests to your application.
    3. Inspect Event Handling: Review the code that handles the callback event. Ensure that it’s correctly set up to handle events and that there are no errors in the logic that would prevent the event from being processed.
    4. Use EventProcessor: Consider using the Call Automation’s EventProcessor to help with processing the Webhook Callback events. EvenProcesser can help associate each event to its respective call and handle events that could happen anytime during the call.
    5. Logging and Diagnostics: Increase the logging level to capture more detailed information about the call flow and events. This might provide insights into why the callback event isn’t being triggered.
    6. Review Call Automation Guides: Microsoft provides detailed guides on managing calls with Call Automation, including how to control and steer calls with actions and events. Review these guides to ensure your implementation aligns with the recommended practices.

    Let me know the outcome of the six above suggestions. If you require further assistance, please reply here so we can assist you further.


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.