Even though LCSKid already posted a blog entry on Technet about this, I thought I would talk about it in general a little bit.
I was very exited to help a development group with the basics of embedding links in HTML that when clicked would pull up Lync and automatically make a call or start an IM. They had looked at integrating Lync into their application, but had tabled it for a bit because they thought it meant going to Silverlight or developing web services on with UCMA when the application as it is today for the most part is basic HTML and some JavaScript.
I told them we would get the *best* integration and all the really cool stuff if we do that, but we can use basic HTML tags to get the ball rolling and get a quick win. I, like a lot of people, use this stuff in my e-mail signature but in searching in general it’s not real well documented out there on the internet. Some basic knowledge of good old HTML 1.0 has served me well for the last 15 or so years
Dialing a number in Lync-
Best way is to use the E.164 Telephone URI:
tel: <phonenumber> , ie:
<a href=”tel:+18173520742″>Click to dial (817) 352-0742</a>
One thing to note Lync auto-magically recognizes numbers and makes them then through an add-in in internet explorer. This functionality can be turned off, and it doesn’t exist in OCS (or *gasp* you don’t use IE) so it’s still helpful to know.
Starting an IM session -
It’s just your sip:< SIPURI>, ie:
<a href=sip:jack@hill.com>Click to IM Jack</a>
Multiple party IM Session -
They stumped on this one, so I reached out on twitter and got an answer from @paulnearney:
“im:<sip:user1@here.com><sip:user2@here.com>” , ie:
<a href=”im:<sip:jack@hill.com><sip:jill@hill.com>”>Click Here to IM Jack and Jill </a>
So it is easy to add basic HTML tags to your Web application, e-mail signature, or whatever else and do some basic integration to Lync and OCS.
Many thanks to Tom Laciano, Randy Wintle, and Paul Nearney on the multi-party syntax.
Thanks,
Tom
I’ve posted a follow up that explains what else is available for HTML in regards to questions to PC to PC and video here: http://thelync.net/2011/11/23/lync-2010-html-url-protocols-for-href-tags/


very helpful! thanks.
do you know if there is any way of showing a user’s status (online, away) ?
Via regular HTML, no. However, there are pretty easy ways to accomplish this – using Sharepoint as the foundation for your website is perhaps the easiest. Using UCMA another way, and in that case can be made web plaform indepenent.
This doens’t seem to work very well if you also have the skype plugin.
The markup is messed up (easily fixable trough css) but worse: clicking a phone number activates both plug-ins.
Because Skype is banned at my company, I don’t have this problem. Because both plugins do the same thing, I imagine this is an issue. I also imagine MS will fix this once the acquisition is complete by giving the option of which one takes residence for web apps.
Tom, what would the tag syntax for launching a LYNC video session be?
is there a way to start an OCS computer to computer call or video call from a single click hyperlink?
I’ve poked around a little bit and I’m not sure how to do video (or if you can). I’ll see if I can find out.
I posted a followup that explains the PC to PC and video:
http://thelync.net/2011/11/23/lync-2010-html-url-protocols-for-href-tags/
I am using the multiple sip code <a href=”im:”>Click Here to IM Jack and Jill in my website and it works great. If i set the webpage to be an “active desktop” it still works but it opens a blank internet explorer page along with the conversation window. Any way to prevent this from happening?
I didin’t know that happened, so I don’t for sure know the answer, however, off the top of my head perhaps adding “Target=_self” to the URL might fix it?