Calling Server Outbound Calls and Direct Routing
See original GitHub issueLibrary name and version
Azure.Communication.CallingServer 1.0.0-beta.3
Query/Question
Hello.
I am working on a telephony bot using the Bot Framework. The bot runs exclusively on SBC connectivity through Direct Routing (no phone numbers in the Communication Service Resource). This works fine as the bot is triggered through inbound calls. But in one particular case, I need to make an outbound call (not a call transfer). So I came across the Azure.Communication.CallingServer library and the CreateCallConnectionAsync method. I was wondering if this library supports Direct Routing. Here is what I did:
var callingServerClient = new CallingServerClient("xxx");
var client = new CommunicationIdentityClient(connectionString);
var userResponse = await client.CreateUserAsync();
var createCallOption = new CreateCallOptions(
new Uri("https://xxx.ngrok.io/api/callingserver?secret=xxxx"),
new[] { MediaType.Audio },
new[]
{
EventSubscriptionType.ParticipantsUpdated,
EventSubscriptionType.DtmfReceived
}
)
//{
// AlternateCallerId = new PhoneNumberIdentifier("+33xxx") // <-- using AlternateCallerId raises error: 403 Forbidden. Not allowed to impersonate.
//}
;
var callConnection = await callingServerClient.CreateCallConnectionAsync(
source: new CommunicationUserIdentifier(userResponse.Value.Id),
//source: new PhoneNumberIdentifier("+33xxx"), // <-- error: 403 Forbidden. Invlalid source identity.
targets: new List<CommunicationIdentifier>() { new PhoneNumberIdentifier("+33xxx") },
options: createCallOption
);
As a result, I see a “callConnectionState”:“connecting” in the first callback request. Immediately followed by second request with “callConnectionState”:“disconnected”
Any assistance would be greatly appreciated Cheers.
Environment
- Azure.Communication.CallingServer 1.0.0-beta.3
- .NET Core 3.1
- Windows 10 Enterprise
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (1 by maintainers)
Top GitHub Comments
@SilvioHuckel We are looking into it and get back to you.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @acsdevx-msft.
Issue Details
Library name and version
Azure.Communication.CallingServer 1.0.0-beta.3
Query/Question
Hello.
I am working on a telephony bot using the Bot Framework. The bot runs exclusively on SBC connectivity through Direct Routing (no phone numbers in the Communication Service Resource). This works fine as the bot is triggered through inbound calls. But in one particular case, I need to make an outbound call (not a call transfer). So I came across the Azure.Communication.CallingServer library and the CreateCallConnectionAsync method. I was wondering if this library supports Direct Routing. Here is what I did:
As a result, I see a “callConnectionState”:“connecting” in the first callback request. Immediately followed by second request with “callConnectionState”:“disconnected”
Any assistance would be greatly appreciated Cheers.
Environment
Service Attention
,Client
,customer-reported
,question
,needs-team-attention
,Communication