Using UCWA API for chatbot?

房东的猫 提交于 2019-12-12 23:26:28

问题


Can UCWA be used for enterprise chatbot application on Skype For Business on premise server? I couldn't find much documentation regarding this.


回答1:


It is definitively possible to implement a chat bot using UCWA, but you'll have to go through some challenges. This is mainly about keeping the UCWA impersonated App always online, and keeping a reliable communication with the Event Channel. There isn't either an SDK provided by Microsoft, or a sample available that implements these UCWA important concepts.

Extending this example for implementing messaging should be possible, but you'll also have to make sure the concepts I explained before are implemented correctly (that, for what I know, they aren't in that example)

For your case, being on-premises, is probably more appropriate to look at UCMA, which despite is much 'heavier' in requirements and infrastructure; it doesn't require you to take care of the mentioned 'always on' and 'event channel' handling.
This example uses UCMA 4.0, and should be part of the SDK samples of UCMA
Creating a Lync bot

EDIT: Trying to add more information or pointers to some topics, as per comment's request

Impersonation:

  • Bot: you need to have a registered and active endpoint to receive and send instant messages. If you choose for UCWA, this must be a User endpoint, so you need to create a dedicated user (e.g. chatbot@contoso.com), in Skype for Business, and use its credentials to instantiate a UCWA App

  • Web users: you aren't detailing your scenario fully, so there can be different solutions. If your is a web application where only authenticated users do access, and these users should be impersonated by UCWA using their identity (so users are also SfB registered SIP users), then you can enable Windows Authentication.
    If web users aren't in SfB (for instance you have a public web site where everyone can start conversation with the bot), then you need to create one or more extra dedicated users (webagent1@contoso.com, webagent2@contoso.com, ...), instantiate UCWA apps on the server by using these service accounts, proxy the requests a user could make to start a new conversation with the bot, send or receive messages via your web application, so you don't risk to expose sensible information to the client.

Events Channel:

It is a fundamental concept for UCWA, so make sure you understand and get it work confidently for your purposes

Events in UCWA

Keeping a UCWA App always online:

If you need to achieve that, you need to understand and implement correctly the concepts explained here me Dashboard, especially at Reporting activity section:

  • call reportMyActivity every 4 minutes max.
  • maintain an active P-GET with the Events Channel
  • handle possible timeouts on the Events Channel
  • handle possible DELETE events (on the Events Channel) the server can send for the application, for which you'll have to regenerate your app Application dashboard
  • get a new OAuth access token, and regenerate the App every 8 hours, as it will expire and UCWA doesn't give refresh tokens



回答2:


Skype for Business does not support bot framework as of yet. I think you might be confused between Skype Bots and Skype for Business bots here.



来源:https://stackoverflow.com/questions/42511143/using-ucwa-api-for-chatbot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!