Azure comms, multiple calling numbers....

Dylan Olney 0 Reputation points
2025-01-17T11:40:27.37+00:00

I'm developing a web application with integrated telephony. I'm using the voice calling SDK for calling over public switched telephone networks (PSTN). In the front-end of the app (React JS), I'm using the @azure/communication-calling library, and the line of code below initiates an outgoing call:

const call = await callAgent.startCall([{ phoneNumber: <numberToCall> }], { alternateCallerId: { phoneNumber: <callingNumber> } });


As the app is to have users in Ireland and Chicago, I have two numbers in the comms service: One for Ireland and one for Chicago. App users won't be calling each other, just clients ( members of the public ) in their own locality over PSTN. I originally assumed that the API would automatically figure out which of the calling numbers to use based on the country code of the recipient number, but someone in a reply to a previous post said it doesn't. In that case, how does one specify? Would specifying it in the alternateCallerId parameter in the above line of code be enough? Please advise.

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

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.