问题
a customer wants enable a chat/instant messenger for his application webside. He is using Lync Server internally to Chat in-house. Now, he requires the following: A external user (which will not be an AD user) logs into the webside is able to chat with a person inside the company. The internal user will receive those messages via his lync client.
What's the best way to achieve this? i thought about bot that delegates messages from the webside to the lync server that does the rest. But how can i send a message as an external user?
回答1:
The usual way to approach this is with the following components:
- A bot that connects to the internal Lync infrastructure as an ApplicationEndpoint, and manages conversations with external/internal users
- A Web or WCF service that exposes methods over http to external users - this could be built into the bot, or could be a separate service that communicates with the bot in some way
- The web UI for presenting a users presence, allowing click-to-call, initiating and displaying a conversation etc
As an example, the WCF service could expose a few methods:
GetPresence(targetSipUri)
- returns a presence value for the given uriSendIM(targetSipUri, message)
- sends an IM to the given uriGetReplies()
- polls for any responses
When you get into the detail you might need more methods - e.g. it may be an idea to generate a conversation token and pass this around
The web UI could present a list of contacts with a presence status (GetPresence
), then allow the user to click a presence contact to initiate a new conversation window and send the inital message (SendIM
), then poll the service for any replies from the contact (GetReplies
) - note, the bot will have to queue replies internally until GetReplies is called.
There are commercial products that might meet your needs - a quick search for Lync webchat
should turn up a few. Also, it may be worth looking into the Lync Web App, to see if this works for your customer
Edit: In answer to the comment below - yes, your internal users will see a conversation from "Our Lync Bot". If you don't know who your users are (e.g. random potential customers browsing a shopping site), you can grab some info from them (name, product to discuss etc) and have the bot display this to the internal user, either as part of the IM conversation, or as conversation context displayed in a Conversation Window Extension.
If your external users are known in advance (e.g. registered customers), and the internal user MUST see the conversation as being from them, then you will need to create a UserEndpoint for each conversation - but this would rely on having the user in AD.
来源:https://stackoverflow.com/questions/5909410/ucma-chat-with-users-not-in-ad