Author Topic: UCA Command-line Dial  (Read 15517 times)

Offline bluewhite4

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1041
  • Country: us
  • Karma: +20/-0
    • View Profile
UCA Command-line Dial
« on: March 06, 2012, 05:40:55 PM »
Does anyone know if UCA can dial a number triggered through a command line command?


Offline martyn

  • Hero Member
  • *****
  • Posts: 688
  • Country: au
  • Karma: +10/-0
    • View Profile
Re: UCA Command-line Dial
« Reply #1 on: March 06, 2012, 10:47:29 PM »
Not through UCA, but you can use the TAPI driver with UCE to initiate a call.

Offline bluewhite4

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1041
  • Country: us
  • Karma: +20/-0
    • View Profile
Re: UCA Command-line Dial
« Reply #2 on: March 07, 2012, 08:26:36 AM »
Problem is that this would be for a customer running Windows 7 x64, and I was told there was no TAPI driver for x64.....unless someone can tell me otherwise and point me to it...

Offline martyn

  • Hero Member
  • *****
  • Posts: 688
  • Country: au
  • Karma: +10/-0
    • View Profile
Re: UCA Command-line Dial
« Reply #3 on: March 07, 2012, 05:43:45 PM »
According to this document Windows 7 64 bit is supported, and if you go to the ingenious software web site any references to help, support, etc all point you back to the help pages on the UC express web site, so I would say that if it wasn't supported it would appear on there somewhere.

Offline acraig00

  • Contributer
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
Re: UCA Command-line Dial
« Reply #4 on: April 03, 2012, 05:45:43 PM »
i use the command line dialer with UCA on Windows 7 x64 for our entire environment. It works great.

Syntax is:

C:\Program Files (x86)\Mitel\Unified Communicator Advanced 4.1\ucadialer.exe +<phonenumber>

A great trick to is to set UCA as the default program for "callto" links (skype dial links) with the registry. You can then make an extension in Google Chrome that uses a RegEx to find all phone numbers on webpages and convert them to callto: links.

i deploy the registry key with GPO.

[HKEY_CURRENT_USER\Software\Classes\callto\shell\open\command]
@="\"C:\\Program Files (x86)\\Mitel\\Unified Communicator Advanced 4.1\\ucadialer.exe\" \"%1\""

Paste this code into Notepad and save as a *.js . Right-click on the file, and choose Open With->Google Chrome. This will install it as an extension.

Code: [Select]
//  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();
        }
    }

})();

Hope this helps!

Offline Lexis200

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: UCA Command-line Dial
« Reply #5 on: April 13, 2012, 05:42:54 AM »
Hi

I tried the solution above but couldn't get either the .reg import or the extension to work.

I'm on Win7 32 bit so I amended the registry key by taking out the "(x86)" bit, but manually copying the key in seems to do nothing, and making a .reg key and double clicking comes up with an error "The specified file is not a registry script. You can only import binary registry keys from within the registry editor"

I made a .js file and copied the contents as suggested, but when I  Open With->Google Chrome, it just opens it as a text page.

I've upgraded Chrome to the Dev channel version (20.0.1096.1 dev-m) but that hasn't made any difference.

Any ideas on what I'm missing?

Cheers

Offline acraig00

  • Contributer
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
Re: UCA Command-line Dial
« Reply #6 on: April 16, 2012, 01:02:25 PM »
i attached my reg key, maybe it will work for you.

Change UCA_Dialer.txt extenstion to .reg (i took the "x86" out of the path for you. If your UCA is a different version than 4.1, you will need to update that part.)

If that doesnt work, you can try adding it manually:

open regedit.exe. Navigate to "HKEY_CURRENT_USER\Software\Classes\callto\shell\open\command" (create the folders if you need to).

Create a new String Value within the Command folder. "<PATH TO YOUR UCA\ucadialer.exe" "%1"
you need the quotes.

Ive attached a screenshot of what mine looks like for you.

Solved the .js problem with Chrome. Change the file extension to ".user.js". Chrome needs that now to recognize the script. That is new since i first set this up.

Offline martyn

  • Hero Member
  • *****
  • Posts: 688
  • Country: au
  • Karma: +10/-0
    • View Profile
Re: UCA Command-line Dial
« Reply #7 on: April 16, 2012, 08:09:00 PM »
Seems to be a bit better, but I get an error when I run the user.js script on line 13, character 1.

Offline acraig00

  • Contributer
  • *
  • Posts: 29
  • Karma: +3/-0
    • View Profile
Re: UCA Command-line Dial
« Reply #8 on: April 18, 2012, 10:36:45 AM »
here are some premade extensions for this. have not tried either.

FIREFOX: http://infoathand.com/iah_pbx.html

CHROME: https://chrome.google.com/webstore/detail/epbmllnadbdnppblcebkkmapkinkdchd?hl=en-US

anything that will format phone numbers into skype links should do it.


 

Sitemap 1 2 3 4 5 6 7 8 9 10