Hi @PK,
Welcome to the Microsoft Q&A Platform!
It seems like you're facing an issue where your incoming call event listener isn't triggering for inbound calls in Azure Communication Services (ACS), but your outbound calls are working fine, the problem is probably related to permissions, configuration, or the way the event listener is set up.
- Ensure the token you are using to create the 'CallAgent' is properly permitted to process incoming calls. The token must include the 'voip' scope, and you can verify this by decoding it using a utility such as jwt.io.
- Check your Azure Communication Services (ACS) configuration to ensure the phone number is properly set up to receive calls and mapped to the proper resource.
- Ensure the number is enabled for incoming and outgoing calls in the Azure portal and is not in a "pending" or "unassigned" state.
- Ensure that the 'incomingCall' event listener is properly set up and activated before any incoming calls are expected.
- Add logging to ensure the 'CallAgent' is created successfully, and the event listener is activated.
- Network or firewall issues can also be blocking incoming calls, so ensure your environment is accessible to the ACS service.
- Double-check the call routing configuration to make sure the phone number is correctly routed to your ACS resource.
- In debugging mode, include more logging on the 'incomingCall' event to ensure it's being called, and monitor the call state transitions.
- In case the event is not being called, there can be issues with the token, ACS configuration, or network. Test incoming calls using another client, like the ACS UI Library, to rule out implementation issues.
- Use Azure Monitor or Log Analytics to review ACS logs for incoming call errors, like call routing or token validation errors. If the issue persists, regenerate the token to ensure it's fresh and valid.
Overview:
https://learn.microsoft.com/en-us/azure/communication-services/concepts/call-automation/incoming-call-notification#calling-scenarios
Hope the above provided information help in better understanding and help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.
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.