We do this with our web based CRM.
I push a registry entry to all our PCs that associates callto links (skype) to UCA via group policy.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\callto\shell\open\command]
@="\"C:\\Program Files (x86)\\Mitel\\Unified Communicator Advanced 4.1\\ucadialer.exe\" \"%1\""
From there, you can alter the webapp to format phone number links to look like "callto:+18005555555" (we do this in our CRM)
or
i also use a google chrome extension that uses a regex to change all phone numbers in webpages to callto links.
// Modified from: Skype Linkify (http://www.questar.it/blog/developer/skypelinkify.user.js)
// Match these patterns:
// 800-555-1212
// (800) 555-1212
// (800)555-1212
// 800-555-1212
// 800-555-1212
// 800 555 1212
// 800.555.1212
// 800/555/1212
// 8005551212
// +1 (number)
// + (international number)
//
// Link to "callto:<formatted number>"
//
// ==UserScript==
// @name Make Phone Numbers Callto: Links
// ==/UserScript==
//default prefix
const defaultPrefix= '+';
(function () {
const trackRegex = /(\+\d\d?)?[\-\s\/\.]?[\(]?(\d){2,4}[\)]?[\-\s\/\.]?\d\d\d[\-\s\/\.]?(\d){3,5}\b/ig;
function trackUrl(t) {
if (String(t).charAt(0)!= '+') t= defaultPrefix + String(t);
return "callto:" + (String(t).replace(/[\-\s\/\(\)\.]/g, ""));
}
// tags to scan looking for un-hyperlinked urls
var allowedParents = [
"abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "body",
"caption", "center", "cite", "code", "dd", "del", "div", "dfn", "dt", "em",
"fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "i", "iframe",
"ins", "kdb", "li", "nobr", "object", "pre", "p", "q", "samp", "small", "span", "strike",
"s", "strong", "sub", "sup", "td", "th", "tt", "u", "var"
];
var xpath = "//text()[(parent::" + allowedParents.join(" or parent::") + ")" + "]";
var candidates = document.evaluate(xpath, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var cand = null, i = 0; (cand = candidates.snapshotItem(i)); i++) {
if (trackRegex.test(cand.nodeValue)) {
var span = document.createElement("span");
var source = cand.nodeValue;
cand.parentNode.replaceChild(span, cand);
trackRegex.lastIndex = 0;
for (var match = null, lastLastIndex = 0; (match = trackRegex.exec(source)); ) {
span.appendChild(document.createTextNode(source.substring(lastLastIndex, match.index)));
var a = document.createElement("a");
a.setAttribute("href", trackUrl(match[0]));
a.appendChild(document.createTextNode(match[0]));
span.appendChild(a);
lastLastIndex = trackRegex.lastIndex;
}
span.appendChild(document.createTextNode(source.substring(lastLastIndex)));
span.normalize();
}
}
})();
This works great for us. I know its not exactly what you asked for, but should have the same results. Hope it helps.