Mitel Forums - The Unofficial Source

Mitel Forums => Mitel MiVoice Business/MCD/3300 => Topic started by: serop on April 04, 2013, 09:30:03 AM

Title: [MITEL 3300] how to initiate a call from an external application?
Post by: serop on April 04, 2013, 09:30:03 AM
this is completely newb question, have no idea where to start from, google does not answer directly :(

Given:
1. MITEL 5312 IP Phone PBX
2. External (relatively to the PBX) web application (asp.net based).
3. The web app server can access the PBX server via LAN.

Needed:
Allow a user from the external web application to initiate a call to a phone number clicked on the screen, so the PBX would connect user's extension # with the destination # clicked.


Ideally it would be nice to have just an HTTP-like request sent to the PBX server.
And the user should have an indication that it's not an incoming call but a call placed for him by the system...
Some security measures would be nice too to prevent 'savvy' users from easy misuse of the service and compose the request URLs themselves, like authkey/checksum parameter or filter by IP...


Thanks!
Title: Re: [MITEL 5312] how to initiate a call from an external application?
Post by: NTEDave on April 04, 2013, 11:54:27 AM
Have a look at www.xarios.com/us
Title: Re: [MITEL 5312] how to initiate a call from an external application?
Post by: ralph on April 04, 2013, 12:16:23 PM
I thought Xarios was only for recording.

Ralph
Title: Re: [MITEL 5312] how to initiate a call from an external application?
Post by: serop on April 04, 2013, 12:21:48 PM
update: the server seems to be Mitel 3300ICP, 4.2 SP1

can moderator move it to corresponding subforum pls and update it's title replacing [MITEL 5312] with [Mitel 3300ICP]?

thanks
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: serop on April 04, 2013, 12:39:06 PM
I guess I have to look into UCA SDK, which is fine as it is .NET based;
although not sure how much I can do with it.  ::)

To download docs from the official website I have to be in their user base... >:(
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: acejavelin on April 04, 2013, 01:24:47 PM
I believe UCX (Unified Communicator Express) allows for Windows standard TAPI dialing and is free, a license is required but you simply need to request it with the number of users.

http://unifiedcommunicatorexpress.com/
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: NTEDave on April 04, 2013, 04:13:56 PM
Xarios does loads more than recording, it started as a Phone Manager application but quickly developed Call recording, Campaign management etc.

Dependant on licensing it will dial from and pop Outlook and many CRM packages.

It now works on 3300 and MCD so the link is still relevant  ;D
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: serop on April 04, 2013, 04:44:54 PM
so the link is still relevant  ;D


well, this is would be the closest to my use case:
http://www.xarios.com/us/products/phone-client/crm-integration/
and my keywords are "Outbound Dialing"
except, our custom CRM is not desktop based, but web based...

I wonder whether there is a plugin or addon to integrate the functionality into web browser similarly to how Skype works on web pages... - can be one of the solutions.

Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: serop on April 04, 2013, 04:55:07 PM
Xarios does loads more
and, btw, the website is not updated since 2011, early 2012. No prices, nothing to download and try. Only some PDFs and a Demo.
How come?  Back to '80s Web 1.0? :)
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: NTEDave on April 04, 2013, 05:15:46 PM
Yeah website could do with some updating!  :)

The dealer portal is good, all up to date releases and docs but you need a user and pass to see it.

Xarios is purchased through your local friendly Mitel dealer.
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: serop on April 04, 2013, 05:31:17 PM
ok, so here are some blah-blah-blah from Mitel's website about exactly what I need:
http://www.mitel.com/resources/ap_51009460RA-EN.pdf

Quote
MiTAI
The Mitel Telephony Applications Interface (MiTAI) is an API that allows CTI
applications developed by third parties to interface with Mitel's call control.
A programmer's toolkit plus run-time software is also available, which
enables developers to create computer telephony applications.



The three options below explain how integration can be achieved with the
Mitel Contact Center Solutions (6100).

1. CTI integration to deliver CLI and Dialed Number Identification
Service (DNIS) to the CRM application
to screen pop the customer
record and the appropriate CRM screen
This type of integration can be conducted using the Mitel Contact Center
Agent Portal (6140) to integrate to the CRM application. The Contact
Center Agent Portal is a programmable OLE Custom Control (OCX)
program that allows applications to interact with the Contact Center
Agent Portal server. The Contact Center Agent Portal Control is a toolkit
that can be used to customize integration with any application that
supports OCX.


Is this the right direction if I don't want to use third-party wrappers like Xarios ones?


Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: serop on April 04, 2013, 05:37:21 PM
I believe UCX (Unified Communicator Express) allows for Windows standard TAPI dialing and is free, a license is required but you simply need to request it with the number of users.

http://unifiedcommunicatorexpress.com/
so, my server app should call Win TAPI thru the UCX driver to connect two numbers?... Cannot see clearly how to implement my task but I'll try to investigate further; I can imagine how this can work on a desktop PC when the recipient is preconfigured, but placing multiple calls from the server for multiple extensions, hmm...  ::)

thanks for the useful link anyway!
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: johnp on April 04, 2013, 07:52:47 PM
I thought you had to buy the tapi for UCX except from Outlook
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: acejavelin on April 04, 2013, 09:04:24 PM
I thought you had to buy the tapi for UCX except from Outlook
Hmmm... Possible, I could be incorrect. The only UCX installation I have is on a 5000 but I will see if I can find some way to test it tomorrow.
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: johnp on April 05, 2013, 08:00:36 AM
I know they sell a tapi plugin for UCX. It also could be done with UCA. I think there is some info on doing it in previous posts.
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: acraig00 on April 05, 2013, 01:53:32 PM
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.

Code: [Select]
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.
Code: [Select]
// 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.
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: ralph on April 05, 2013, 03:20:42 PM
Wow!  Cool info.   This may be worth setting up a special page just to explain this.
Can you tell us how to set up Chrome with the extension?

Ralph
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: serop on April 05, 2013, 05:06:22 PM
We do this with our web based CRM.
...
This works great for us. I know its not exactly what you asked for, but should have the same results. Hope it helps.
WOW! Looks good!

So, according to this we have to install ucadialer.exe on each user PC, right? And configure it properly for each user's post extension?
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: acraig00 on April 05, 2013, 05:49:46 PM
Wow!  Cool info.   This may be worth setting up a special page just to explain this.
Can you tell us how to set up Chrome with the extension?

Ralph
It looks like Google has changed the process for creating extensions. Previously, i think i only had to change the file extension to .crx on a text file of the script, but that doesnt work now.

This one looks like it can provide the same functionality: https://chrome.google.com/webstore/detail/skype-links/epbmllnadbdnppblcebkkmapkinkdchd
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: acraig00 on April 05, 2013, 05:58:30 PM
WOW! Looks good!

So, according to this we have to install ucadialer.exe on each user PC, right? And configure it properly for each user's post extension?
ucadialer.exe is part of the Unified Communicator Advanced install (at least on our system), so i don't have to do anything except install the UCA software and log the user in.

This has worked for us with all versions from 4.0 to 5.0.

Make sure and put the correct version number in your reg key. I just noticed i pasted the 4.1 version in my previous post.
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: johnp on April 05, 2013, 06:14:46 PM
It looks like UCX uses ipdial.exe with parameters callto:XXXX. I played with it a little at the end of the day.
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: serop on April 05, 2013, 06:38:39 PM
ok, I see where it all is going: it needs special installation/configuration on each user PC :(

Well, in my case there are not many users indeed but the solution does not scale and I cannot get anything extra as I would using API.
Anyway, I guess it's acceptable as a short term limited solution.  ::)
I'll give it a try. Thanks!
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: johnp on April 05, 2013, 08:50:50 PM
If you wan't anything more, you can always spend the money to become an approved Mitel software developer.

Unified Communicator Express is free Unifed Communicator Advanced who be purchased.
Title: Re: [MITEL 3300] how to initiate a call from an external application?
Post by: acraig00 on April 08, 2013, 10:50:25 AM
ok, I see where it all is going: it needs special installation/configuration on each user PC :(

Well, in my case there are not many users indeed but the solution does not scale and I cannot get anything extra as I would using API.
Anyway, I guess it's acceptable as a short term limited solution.  ::)
I'll give it a try. Thanks!

Your setup may be different, but for the sake of clarity, I do not have to touch the PCs. UCA is installed as part of our standard image (MDT/WDS/PXE), the callto links are programmed into our webapp, and the reg key gets pushed via GPO.