Why Azure Communication Service does not redirect my calls?

Anonymous
2024-08-07T17:46:55.66+00:00

I am trying to redirect calls using Azure Communication Service. I am using an Azure number to simulate an IVR, and I have enabled the make/receive calls feature. I have written code using Azure functions to answer calls, handle events, and recognize specific keywords during an ongoing call. However, I am unable to redirect the call after recognizing the keyword.

The code in Call Automation works perfectly fine before answering the call, but it does not work after answering the call, using the speech resource, and receiving the "RecognizeCompleted" event. I don't get any error, busy signal, or call disconnection. While I receive the "redirect" operation on my Azure Communication Service insights, nothing actually happens when it tries to redirect it.

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

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 21,691 Reputation points
    2024-08-12T05:16:21.5266667+00:00

    Thanks for asking question! You may want to know that- redirect is a pre-call action. i.e. an action you can take on the call before the call is established (or answered).

    Use case would be - customer gets a call, sees the caller number or other properties and forwards/redirects the call to another endpoint without answering the call. That is why the redirect action works before answering and not after you have answered. 

    Ref: Call Automation overview - An Azure Communication Services concept document | Microsoft Learn

    Additionally, redirect is a fire and forget action - we can't guarantee or have visibility into the target endpoint. However, product team has taken this as feedback.

    To resolve yours's query:

    If you want to route an answered call to another endpoint, recommend using AddParticipant or Transfer API. Note that when you add participant, Call automation(CA) app can still control and manage the call as its in the call and just adding the second user.

    With transfer, the end user is transfered from CA app to the second user - which by the nature of how transfers work means that CA app will no longer be in the call path and hence can't manage or take actions on the call. 

    Hope this helps, Please let me know if further query or issue remains.

    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.