开发者

Launch Office Communicator from asp.net

On an intranet I am building there is a need to have instant messaging. The client already uses the Office Communicator application so I would like to use that if possible.

The Intranet will have an employee directory and I would like to have a "call" button next to each employee which will launch the Communicator application. I 开发者_StackOverflowdo not know if the client has the Communicator Web Access component and we may not be able to get it installed at all. How should I go about this integration?


There shouldn't be any need to install Web Access. You can do everything client-side using the existing NameCtrl persona menu - this is the pop-up menu that gets displayed in SharePoint (and other web-based apps like Dynamics CRM) when hovering over a users presence icon. This menu allows you to call the user, start a new conversation etc. You'd need Office installed on the machine you are running on in order for it to work.

As an example, try this on any client machine running Office 2007/2010 and IE. Hover over the "Your Contact" text to see the persona menu (your site will need to be added to the Trusted Sites or Intranet zone):

<script>

var sipUri = "your.contact@your.domain.com";

var nameCtrl = new ActiveXObject('Name.NameCtrl.1');
if (nameCtrl.PresenceEnabled)
{
  nameCtrl.OnStatusChange = onStatusChange;
  nameCtrl.GetStatus(sipUri, "1");
}


function onStatusChange(name, status, id)
{
  // This function is fired when the contacts presence status changes.
  // In a real world solution, you would want to update an image to reflect the users presence
  alert(name + ", " + status + ", " + id);
}

function ShowOOUI()
{
  nameCtrl.ShowOOUI(sipUri, 0, 15, 15);
}

function HideOOUI()
{
  nameCtrl.HideOOUI();
}

</script>

<span onmouseover="ShowOOUI()" onmouseout="HideOOUI()" style="border-style:solid">Your Contact</span>


A server based web application is ill-suited for launching a client side executable. There may be some round about way using ActiveX controls but this in IE itself has to be enabled explicitly.


In this scenario, You may have to use the UCM API (Unified Communication Managed API) that Microsoft Office Communicator Server provides for organizations that need to extend the functionality and collaboration tools. There are a set of tools for ASP.NET Web Application, take a look at : http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23780 with examples provided

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜