register custom tel/callto app in Windows RRS feed

  • Question

  • I built this script I share with you here that worked perfectly on my Windows 7 computer to dail a tel:-link in a webpage with my Yealink VOIP phone. With the 'reg-file' you see in the comment I activated the tel-link uasage of my script. But now in Windows 10 I can't get it to work any more! Can anyone help me how I can "link" the "tel link" in a browser to my script again in Windows 10?

    test usage: cscript Z:\tel_link_open\tel.js [phone number]
    create register_me.reg with:
    @="URL:knoop.frl Custom Telephone Protocol for VoIP phone"
    "URL Protocol"=""
    @="cscript \"Z:\\tel_link_open\\tel.js\" -c \"\\%1\"" 
    var call_number = WScript.Arguments(0);
    call_number = call_number.replace(/\|.+/g,'');
    //                                  spatie -.
    call_number = call_number.replace(/(\\tel:|%20|\(|\)|[a-z:\\ -]+)/g,'');
    //                                    +      31       (    0   )
    call_number = call_number.replace(/(\+|%2b)([0-9]+)(\(|%28)0(\)|%29)/ig,'00$2');
    call_number = call_number.replace(/^0031/ig,'0');
    WScript.Echo("\n\nGoing to dail: " + call_number + "\n\n");
    var outgoing_uri = "31"+"513"+"[number]"+"[internal extension]";
    var login_name   = "XXX";
    var login_pass   = "yyy";
    var get_url      = "http://192.168.xx.yy/servlet?number=" + call_number + "&outgoing_uri=" + outgoing_uri;
    // Load the WinHttpRequest object.
    var WinHttpReq = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
    // HttpRequest SetCredentials flags
    // Specify the target resource.
    WinHttpReq.open( "GET", 
                                     false );
    if (login_name.length) { // Set credentials for server.
        WinHttpReq.SetCredentials( login_name, 
    // It might also be necessary to supply credentials 
    // to the proxy if you connect to the Internet 
    // through a proxy that requires authentication.
    // Send a request to the server and wait for 
    // a response.
    WinHttpReq.send( );
    // Display the results of the request.
    WScript.Echo( "Result status: " + WinHttpReq.Status + "   " + WinHttpReq.StatusText + "\n");
    WScript.Echo( WinHttpReq.GetAllResponseHeaders( ) );
    /* To save a binary file use this code instead of previous line
    BinStream = new ActiveXObject("ADODB.Stream");
    BinStream.Type = 1;

    • Moved by Bill_Stewart Friday, October 7, 2016 6:07 PM Unanswerable drive-by question
    Wednesday, July 20, 2016 8:39 AM

All replies

  • What are you trying too ask?  What link in what browser.  I see no browser.   What is the error?

    Have you asked the author of the script for help?


    Wednesday, July 20, 2016 1:07 PM
  • Hi JRV,

    One can make a tel-link in a webpage, like so:

    <a href="tel:0031513999999">linktext</a>

    And in the registry is set what to do with such a link (at least in Windows 7)

    I want that tel link not to be linked to Skype or whatever, but to my script (which I am the author of, and I already asked myself ;)

    The problem is that I can't find any way to alter the registry so that the script is being called. So there isn't an error.. it keeps directing to skype.. not to my script
    • Edited by Eesger Thursday, July 28, 2016 11:48 AM
    Thursday, July 28, 2016 11:44 AM
  • The phone application is registered to that link to "tel:" - That is usually Skype.

    You cannot register a link identifier to a script.  I am not even sure it can call PowerShell.

    What you are asking really doesn't have anything to do with scripting.  YOU are asking how to modify the OS and registry to work differently from normal.


    Thursday, July 28, 2016 3:17 PM
  • Thursday, July 28, 2016 3:19 PM