我们有一个聊天应用程序,它适用于ASP.NET Web应用程序。我们希望通过我们的聊天应用程序允许用户拨打其他用户。提供我们希望利用Microsoft Lync 2010,并使用他们的SDK利用其功能并拨打电话。任何关于如何做到这一点的指针都会有很大帮助。

有帮助吗?

解决方案

You have a couple of options here - you could use the NameCtrl control to integrate presence and a pop-up menu into your aspx pages - see my answer here for more details, and an example.

Assuming you're not using Silverlight, you could create a .NET assembly that uses the SDK to initiate a call (see the walkthrough here), and then expose this to COM using .NET's COM Interop features - example here, if you haven't done this before

Also, Sevki's answer is a great way to get up and running quickly, although you won't be able to get the presence of the user that way.

All of this assumes that the users have Lync running on their machine, i.e. assumes you won't be opening chat up to users outside your organisation who may not have Lync installed.

Edit: Not having Lync installed changes things a lot. If Lync is installed, then Lync will handle setting up the audio call, and will handle the transfer of Audio between the participants in the conversation. Without Lync, you'd have to do that yourself, which won't be straightforward.

Your best bet might be to have your users use the Lync Web App. This is a web based client that allows external users to join conferences. You'd need to build a UCMA 3.0 application which would sit inside your Lync infrastructure. The app would:

  1. Accept a request from your web app to start a new conference, inviting the desired user - see here and here
  2. When the conference is created, get the id and return it to the web user
  3. In the web client, use the returned id to build a URL that opens the Lync Web App.

I can't remember the syntax of the url off the top of my head, but to get it, you could create a new conference using the Lync Client, then select Invite By Email (from the icon of two "pawns") - this will generate an email containing a URL - clicking the URL take you to a page that gives you conference join options, including installing the web app (you'd need to try the URL on a machine that doesn't have Lync installed to get the option to install the web app)

Edit: My bad - the Lync Web App doesn't support Audio. You could actually use the same concept as above, but with the Lync Attendee Client instead. However, this forces the user to install some components client side, so may not be acceptable in your scenario.

Edit: See also the answer here for more details, this refers to getting video to the client, but is relevant for audio too

其他提示

You could create a hyperlink like so

<a href=”tel:{blah phone number}″>{blah phone number}</a>

or

<a href=”sip:{blah sip blah}″>{blah sip blah}</a>

Which will launch lync from the browser, however if you want to do it inside the browser it seems that you will have to go in to Silverlight. You can find Silverlight samples in Lync Client Side API sdk.

There is an hour-long intro to integrating Lync recorded at Tech-Ed Europe at the end of last year. I've not watched it yet, but it looks quite good.

http://channel9.msdn.com/Events/TechEd/Europe/2010/UNC306

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top