Tim D'haeyer
Tim D'haeyer

Reputation: 694

Start Teams call from c#

I'm looking for a way to start a Teams call from within my own custom application. Our application has a whole bunch of phone numbers for Customers/Suppliers/... and I want to give my users the option to initiate a call just by clicking a button in the application. Does anybody have a good sample on how to do this?

I know that in the past, this was fairly easy to do with Skype and Lync. They just had an SDK you could call from your own application. But when I try to look for the same thing in Teams I always end up in documentation around bots. And it's a bit confusing if you're new to that part :-)

So main question is, how can I start a phone call with Teams from my own code? Phone calls to an actual phone number, not a Teams account.

Upvotes: 3

Views: 2609

Answers (1)

Hunaid Hanfee-MSFT
Hunaid Hanfee-MSFT

Reputation: 926

There's no such API available to create a call. However you can have deep link to make a call. Follow this doc to understand Deep linking to an audio or audio-video call

To make a call to combination of VoIP and PSTN users https://teams.microsoft.com/l/call/0/0?users=<user1>,4:<phonenumber>

To make an audio call you can do - https://teams.microsoft.com/l/call/0/0?users=<user1>,<user2>

To make a video call you can do - https://teams.microsoft.com/l/call/0/0?users=<user1>,<user2>&withVideo=true

User ID field supports the Azure AD UserPrincipalName, typically an email address, or in case of a PSTN call, it supports a pstn mri 4:.

It will not directly going to start the call. Instead showing a pop-up as below - enter image description here

Upvotes: 2

Related Questions