如何使Skype呼叫与Azure功能bot一起使用?

时间:2018-05-29 18:22:46

标签: azure botframework azure-functions

我正在开发一个机器人,您可以通过Skype发送消息和电话。机器人在Azure功能中运行。我有消息部分工作。我已经在Azure中配置了机器人以具有呼叫功能,我可以调用机器人,但它会返回一条语音消息,即“你还不能与这个机器人交谈,但我们正在研究它”#34 ;

我跟着this github示例制作了一个机器人。我为Azure功能交换了控制器。 Azure calling function 当我按下Skype中的呼叫按钮时,我确实在Azure门户中看到了我的功能,但是我的日志中出现以下错误:

Microsoft.Azure.WebJobs.Host.FunctionInvocationException : 
Exception while executing function: call 
---> Autofac.Core.DependencyResolutionException : An error occurred during the activation of a particular registration. See the inner exception for details. 
Registration: Activator = ICallingBot (DelegateActivator), 
Services = [Microsoft.Bot.Builder.Calling.ICallingBot], 
Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, 
Sharing = Shared, 
Ownership = OwnedByLifetimeScope 
---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: 
Activator = CallingBotService (DelegateActivator), 
Services = [Microsoft.Bot.Builder.Calling.CallingBotService, Microsoft.Bot.Builder.Calling.ICallingBotService], 
Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, 
Sharing = Shared, 
Ownership = OwnedByLifetimeScope 
---> An error occurred during the activation of a particular registration. See the inner exception for details. 
Registration:
Activator = CallingBotServiceSettings (DelegateActivator), 
Services = [Microsoft.Bot.Builder.Calling.CallingBotServiceSettings], 
Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, 
Sharing = Shared, 
Ownership = OwnedByLifetimeScope 
---> Bot calling configuration is invalid, callback url:  is not a valid url! 
(See inner exception for details.) 
(See inner exception for details.) 
(See inner exception for details.) 
---> Autofac.Core.DependencyResolutionException : 
An error occurred during the activation of a particular registration. See the inner exception for details. 
Registration: Activator = CallingBotService (DelegateActivator), 
Services = [Microsoft.Bot.Builder.Calling.CallingBotService, 
Microsoft.Bot.Builder.Calling.ICallingBotService], 
Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, 
Sharing = Shared, 
Ownership = OwnedByLifetimeScope 
---> An error occurred du…

似乎在抱怨一个回调网址,我确实找不到如何设置。我尝试在密钥" Microsoft.Bot.Builder.Calling.CallbackUrl"下的local.settings.json文件中提供它,但这没有帮助。

是否可以使用Azure功能僵尸程序处理Skype呼叫?如果是的话,我做错了什么?

修改1:

在应用程序设置中添加回调删除了我在日志中收到的错误。不幸的是,Skype机器人仍然回复:"你还不能和这个机器人交谈,但我们正在研究它"。我也在this github上发布了此问题。

2 个答案:

答案 0 :(得分:3)

回调网址应设置为应用程序设置。请转到功能应用,然后在概述>下应用程序设置> 应用程序设置部分,添加名为Microsoft.Bot.Builder.Calling.CallbackUrl

的新设置

答案 1 :(得分:1)

对于未来的人:我们最终决定不将Azure Functions用于Calling机器人,因为这似乎是不可能的。

https://github.com/Microsoft/BotBuilder/issues/4677