Is Answering Incoming call from real phone Available in Azure Communication Service?

Ulises Ruiz 0 Reputation points
2024-10-18T17:41:23.7866667+00:00

I'm trying to answer a call from my frontend, but it never gets there.

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
914 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
397 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,671 Reputation points Microsoft Employee
    2024-10-18T23:42:42.03+00:00

    @Ulises Ruiz Yes, Azure Communication Services does support answering incoming calls from a real phone. You can use the Azure Communication Services Calling SDK to build voice and video calling capabilities into your applications.

    To answer an incoming call, you can use the CallAgent and CallClient objects provided by the SDK. Here is an example of how to answer an incoming call:

    const callAgent = new CallAgent();
    const callClient = callAgent.createCallClient();
    
    // Register event handlers for incoming calls
    callClient.on('incomingCall', async (incomingCall) => {
      // Answer the incoming call
      await incomingCall.answer();
    });
    
    

    This code creates a CallAgent and CallClient object, and registers an event handler for incoming calls. When an incoming call is received, the answer() method is called to answer the call.

    Note that you will need to have a phone number associated with your Azure Communication Services resource in order to receive incoming calls from a real phone. You can purchase phone numbers through the Azure portal or programmatically using the Azure Communication Services Phone Numbers API.

    Further information can be found here.


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.