Azure Communications redirect incoming call goes to busy signal

Matt Teiken 5 Reputation points

I have an Azure toll free number I am using to send SMS messages and when this number receives a phone call I want it to redirect to another number that we own outside of Azure.   I have hooked up an azure function to trigger through the event grid on the incoming call event.  The function is triggering fine but I get a busy signal.  Any ideas?  The phone number I am attempting to dial for the example is a weather forecast number for Minneapolis, MN.  It works fine when I call it directly from my cell. Are there restrictions for redirecting calls in or out from a PTSN, or am I doing something wrong?

            EventGridData data = JsonSerializer.Deserialize<EventGridData>(eventGridEvent.Data.ToString());
            var client = new CallAutomationClient("xxx");
            string incomingCallContext = data.incomingCallContext; 
            var callerIdNumber = new PhoneNumberIdentifier("+XXXXXXXXX"); // This is the Azure Communication Services provisioned phone number for the caller
            var target = new CallInvite(new PhoneNumberIdentifier("+19523616680"), callerIdNumber);
            _ = await client.RedirectCallAsync(incomingCallContext, target);

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

2 answers

Sort by: Most helpful
  1. Matt Teiken 5 Reputation points

    I figured this out. I did not have the number set to make calls.

    1 person found this answer helpful.
    0 comments No comments

  2. SnehaAgrawal-MSFT 17,486 Reputation points Microsoft Employee

    @Matt Teiken -   Glad that you were able to resolve your issue and I appreciate your effort in sharing the solution. Your contribution will undoubtedly assist others facing similar challenges.

    As the Microsoft Q&A community follows a policy where the question author cannot accept their own answer

    I've reposted your solution.  Feel free to consider "Accepting" the answer if you find it suitable.

    Issue- The problem arises when trying to redirect calls from an Azure toll-free number to an external number via an Azure function, resulting in a busy signal despite the external number being functional when dialed directly, prompting concerns about potential restrictions or misconfigurations in call redirection.

    Solution- "I did not have the number set to make calls"

    To elaborate further-

    When utilizing the IncomingCall notification feature in Azure Communication Services, you possess the flexibility to link any specific phone number with any endpoint. For instance, if you acquire a PSTN phone number like +14255551212 and intend to allocate it to a user identified as 375f0e2f-e8db-4449-9bf7-2054b02e42b4 within your application, it's imperative to maintain a mapping of that number to the corresponding identity.

    Upon receiving an IncomingCall notification matching the designated phone number in the 'to' field, you have the capability to trigger the Redirect API and supply the user's identity. Essentially, this enables you to dynamically manage number assignments within your application and handle call routing or responses in real-time.

    Refer to this doc link and best practices-

    0 comments No comments