locked
Custom Tab using "tel:" hyperlink - not working in OC RRS feed

  • Question

  • Hi,

     

    I'm trying to provide an easy way for my users to call various external suppliers / helpdesks using one click.

     

    I can create a custom tab - and place hyperlinks on that tab using a "tel:<number>" hyperlink.

     

    When this page / tab is viewed in Outlook or IE, it works fine - the number is dialled in the local OC client.  When viewed in OC - it does nothing...   :-(

     

    What's the correct way to make this work?

     

    It seems to be the same issue as this post...but no answer...

    http://forums.microsoft.com/unifiedcommunications/ShowPost.aspx?PostID=2160365&SiteID=57

     

     

    Regards

     

    Paul

     

    Tuesday, July 22, 2008 9:31 PM

Answers

  •  

    Thank you - you posted about 10 mins before I was going to...  :-)

     

    I reached the same solution as you - but avoided IE - so no nasty popups!  The use of "tel:" is recognised by Windows - so you can use it anywhere - not just in IE.

     

    The code below works good for me - you might need to adjust the 500 MS timeout if you have slower machines - but so far - no issues.  I put this webpage on a internal trusted website - and point the tab xml file to it.

     

    This one also press the 'space' key which connects the call...

     

     

    <HTML>
    <HEAD>
    <script language="javascript" type="text/javascript">
    function dialtel(tel)
    {
    var myShell = new ActiveXObject("WScript.Shell");
    myShell.Run(tel);
    setTimeout('sendspace();',500);
    }

    function sendspace() {
    var myShell = new ActiveXObject("WScript.Shell");
    myShell.SendKeys(' ');
    }

    </script>
    </HEAD>
    <BODY>

    <a href="#" onclick="dialtel('tel:1234')">Text about number in here</a>

    </body>

    </html>

     

     

    Regards

     

    Paul Adams

     

    Thursday, July 24, 2008 4:15 PM

All replies

  • Hi

     

    Did you put this option in your tab section: <accessibility>both</accessibility> ?

    option are "inside", "outside" or "both", determines if URL is available for outside, inside or both users.

    Wednesday, July 23, 2008 9:56 PM
  • Paul,

     

    The MOC tabs do have some limitations.  Unfortunately I've never seen a doc that outlines them - we just find them as we work on different projects.  In any case, a friend of mine developed a workaround for this.  Basically you have to launch a browser window with the phone number that in turn runs the tel: command.  It's slightly convoluted but it works.  Here is the base code:

     

    Point your tab to an html file with this code:

     

    Code Snippet
    <html>
    <head>
    <title>Untitled Page</title>
    </head>
    <body>
    <a href="#" onclick="window.open('tabtest2.htm?tel=15551231234',null,'location=0,status=0,scrollbars=0,width=100,height=100');">Test</a>
    </body>
    </html>

     

     

    Note the reference to tabtest2.htm.  Here is the code for that file:

     

    Code Snippet

    <head>
    <title>Untitled Page</title>
    <script language="javascript" type="text/javascript">
    //gup function from http://www.netlobo.com/url_query_string_javascript.html
    function gup( name ){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1];}

    function dial()
    {
    window.location='tel:+'+gup('tel');
    window.setTimeout(closeMe,500);
    }
    function closeMe()
    {
    this.opener=this;this.close();
    }
    </script>
    </head>
    <body onload="dial()">

    </body>
    </html>

     

     



       

    As long as you have the page hosted on a server in a trusted zone for the client it will close automatically.

     

    I know it's not ideal, but so far it seems to be the only way to get around this.  Good luck.

    Thursday, July 24, 2008 3:53 PM
    Moderator
  •  

    Thank you - you posted about 10 mins before I was going to...  :-)

     

    I reached the same solution as you - but avoided IE - so no nasty popups!  The use of "tel:" is recognised by Windows - so you can use it anywhere - not just in IE.

     

    The code below works good for me - you might need to adjust the 500 MS timeout if you have slower machines - but so far - no issues.  I put this webpage on a internal trusted website - and point the tab xml file to it.

     

    This one also press the 'space' key which connects the call...

     

     

    <HTML>
    <HEAD>
    <script language="javascript" type="text/javascript">
    function dialtel(tel)
    {
    var myShell = new ActiveXObject("WScript.Shell");
    myShell.Run(tel);
    setTimeout('sendspace();',500);
    }

    function sendspace() {
    var myShell = new ActiveXObject("WScript.Shell");
    myShell.SendKeys(' ');
    }

    </script>
    </HEAD>
    <BODY>

    <a href="#" onclick="dialtel('tel:1234')">Text about number in here</a>

    </body>

    </html>

     

     

    Regards

     

    Paul Adams

     

    Thursday, July 24, 2008 4:15 PM
  • Even better...thanks for posting.

     

    Thursday, July 24, 2008 4:20 PM
    Moderator