question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calling Server Outbound Calls and Direct Routing

See original GitHub issue

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:

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:open
  • Created 2 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
SaurabhSharma-MSFTcommented, Mar 16, 2022

@SilvioHuckel We are looking into it and get back to you.

0reactions
msftbot[bot]commented, Mar 29, 2022

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:

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
Author: SilvioHuckel
Assignees: -
Labels:

Service Attention, Client, customer-reported, question, needs-team-attention, Communication

Milestone: -
Read more comments on GitHub >

github_iconTop Results From Across the Web

Plan Direct Routing - Microsoft Teams
Direct Routing lets you connect a supported, customer-provided Session Border Controller (SBC) to Microsoft Teams Phone.
Read more >
Solved - v18 teams outbound calling using direct routing?
All outgoing calls initiated by the Teams Client and made in a e164 number format (starting with the '+' symbol, then country code,...
Read more >
The Definitive Guide to Microsoft Teams Direct Routing
Direct Routing is a way to provide a PSTN (public switched telephone network) connection to Microsoft Teams users so that they can make...
Read more >
Can not call outbound in Direct Routing to PSTN
Yes teams and phone system licenses are applied. User is set with direct dial. Dial pattern test was successful with tool and showed...
Read more >
Enable resource account for outbound call in Microsoft Teams ...
(calling plans, direct routing, operator connect) the Teams Resource Account must be able to make an outbound call. In case of direct routing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found