简体   繁体   English

无法使用 Microsoft Graph 和 Teams 创建 VoIP 呼叫

[英]Cannot create a VoIP call using Microsoft Graph and Teams

I'm trying to replace an existing click to dial functionality in a .NET application that currently uses "Skype For Business/Lync" and switch it to "Microsoft Teams".我正在尝试替换当前使用“Skype For Business/Lync”的 .NET 应用程序中的现有点击拨号功能,并将其切换到“Microsoft Teams”。 It does not look as though there is many examples of this online.看起来好像网上没有很多这样的例子。 The examples I have found do not seem to work for me.我发现的例子似乎对我不起作用。 The example to shows up in multiple sources is below:在多个来源中显示的示例如下:

IConfidentialClientApplication confidentialClientApplication = ConfidentialClientApplicationBuilder
                                                                                .Create(clientId)
                                                                                .WithTenantId(tenantID)
                                                                                .WithClientSecret(clientSecret)
                                                                                .Build();

            ClientCredentialProvider authProvider = new ClientCredentialProvider(confidentialClientApplication);

            GraphServiceClient graphClient = new GraphServiceClient(authProvider);

            var call = new Call
            {
                CallbackUri = redirectUri,
                Targets = new List<InvitationParticipantInfo>()
            {
                new InvitationParticipantInfo
                {
                    Identity = new IdentitySet
                    {
                        User = new Identity
                        {
                            DisplayName = "John",
                            Id = userId
                        }
                    }
                }
            },
                RequestedModalities = new List<Modality>()
            {
                Modality.Audio
            },
                MediaConfig = new ServiceHostedMediaConfig
                {
                }
            };

            var response = graphClient.Communications.Calls
                .Request()
                .AddAsync(call).GetAwaiter().GetResult();

This code ultimately returns an error此代码最终返回错误

Message: {"errorCode":"7503","message":"Application is not registered in our store.","instanceAnnotations":[]}

There is not much documentation on this error.关于此错误的文档并不多。 I have registered a bot in Azure Active Directory and plugged in all the necessary values into the variables in the snippen above.我已经在 Azure Active Directory 中注册了一个机器人,并将所有必要的值插入到上面 snippen 中的变量中。

I have also attempted to run this code in Postman using the example in this link which also contains the C# example.我还尝试使用此链接中的示例在 Postman 中运行此代码,其中还包含 C# 示例。 Postman returns the exact same error.邮递员返回完全相同的错误。

I can also confirm I have the Calls.Initialte API permissions granted with Admin consent.我还可以确认我已获得管理员同意授予的 Calls.Initialte API 权限。

在此处输入图片说明 Has anyone made a successful outgoing call in C# via Microsoft Graph/Teams?有没有人通过 Microsoft Graph/Teams 在 C# 中成功拨出电话?

Create call enables your Bot to create peer to peer or group call, You need to register your calling Bot and assign the following Application permissions: 创建呼叫使您的机器人能够创建点对点或群组呼叫,您需要注册您的呼叫机器人并分配以下应用程序权限:

Calls.JoinGroupCallsasGuest.All, Calls.JoinGroupCalls.All, 
Calls.Initiate.All, Calls.InitiateGroupCalls.All 

1. To Create peer-to-peer VoIP call with service hosted media 1. 使用服务托管媒体创建点对点 VoIP 呼叫

Note: This call needs the Calls.Initiate.All Application permission.

while registering your Bot you need enable the calling feature for your Bot and to make your bot to participate in audio and video call You need to set supportsCalling and supportsVideo to true within your app manifest.在注册您的机器人时,您需要为您的机器人启用呼叫功能并使您的机器人参与音频和视频通话您需要在您的应用清单中将supportsCallingsupportsVideo设置为true

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft Teams:使用 Graph API 跟踪/列出通话中的参与者 - Microsoft Teams: Tracking / listing the participants in a call using Graph API 如何使用用户凭据调用 Microsoft Graph APIs for Teams - How to call Microsoft Graph APIs for Teams using user credentials 使用 Microsoft 图形 API 时创建团队团队错误 - Create a teams team error when using Microsoft graph api 使用图形 api 以编程方式创建 Microsoft Teams 会议邀请 - Create Microsoft Teams Meeting invite programatically using graph api 如何使用控制台应用程序通过 Microsoft Graph API 调用 Microsoft Teams OnlineMeeting 端点? - How do I Call Microsoft Teams OnlineMeeting endpoints via Microsoft Graph API using a console app? 使用 Microsoft Graph 通过 Microsoft Teams 在线会议创建活动 Java SDK - Create event with Microsoft Teams online meeting using Microsoft Graph Java SDK 在 Microsoft Teams 中调用从 MS Graph API 中读取报告 API 但使用此 Api - call Read Reports API from MS Graph API in Microsoft Teams but using this Api 使用 Microsoft Graph API 从守护程序应用程序在团队频道日历上创建事件 - Create Event on Teams Channel Calendar from Daemon application using Microsoft Graph API 如何使用 Graph API 在 Microsoft Teams --&gt; Channel 下创建空文件夹? - How to Create Empty folders under Microsoft Teams --> Channel using Graph API? 我可以使用 Graph API 代表来宾用户创建 Microsoft Teams 在线会议吗? - Can I create Microsoft Teams online meetings on behalf of guest users using Graph API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM