Show / Hide Table of Contents

    Web service integration

    This section provides you with instructions on how to configure Desktop Connect Express to receive web service http requests and execute rules based on the http request.

    Introduction

    Desktop Connect Express Web Plugin supports commands being sent to Desktop Connect Express through http requests. The same rule configuration and execution is used as for the APC events. The purpose of the Web Plugin is to be able to execute Desktop Connect Express rules, and perform certain actions, screen-pop initiated by web applications.

    Features

    Rule Execution

    Web applications can use this feature to send request to the Desktop Connect Express Web Plugin. An AJAX request needs to be sent to the Plugin, that acts as a web server. The requests need to be sent to the plugin in the following format:

    http://127.0.0.1:port/GeoPDI/P/?var1=value1&var2=value2

    Where port is the configured plugin port, var1, var2 are the variables being sent to Desktop Connect Express with value1 and value2. The plugin will send these variables and webcommand=C fix variable that can be used in the rules.

    File Retrieval

    You can use Desktop Connect Express Web Plugin to pass javascript or html page to the web application. These can be used to send html file to a frame or javascript for the AJAX processing. This feature may be required in some web implementations.

    The files can be retrieved through the following URL:

    http://127.0.0.1:port/GeoPDI/f/filename.html

    Where filename.html is the file under the folder set in the WebPluginPath parameter.

    CTI Command

    Web service integration “Web Plugin” enables the use of CTI commands over the Avaya Application Enablement Services, CTI commands are supported over the web interface

    Make Call

    Make a new call with users to user information, if there is no other active call on the station

    Interface: http://localhost:8072/GeoPDI/C/

    Parameters:

               method: „call”
    
               destination: number to dial
    
               uui: information to send
    

    Exmaple:

    http://localhost:8072/GeoPDI/C/?method=call&destination=335204&uui=Test

    Conference Call

    Make a conference call, if there is an active call

    Interface: http://localhost:8072/GeoPDI/C/

    Parameters:

               method: „conference”
    
               destination: party to add to the conference
    
               uui: information to send
    

    Exmaple:

    http:/ localhost:8072/GeoPDI/C/?method=conference&destination=335204&uui=Test

    Configuration

    The following configuration entries are available to configure the Web Plugin:

    WebPlugin

    Enables or disables the web plugin. Default value is N.

    WebPlugin={Y,N}

    WebPluginPort

    The number of the Web Plugin listener port. Web Plugin will listen to web requests bound to IP 127.0.0.1 and the configured port. Default value is 8072.

    WebPluginPort=8072

    WebPluginPath

    The path of the html or js files that may be used through the Web Plugin. The default value is ..\h\ (relative to the Desktop Connect Express application path).

    Permission

    The Web Plugin can only be used by users who are logged in as administrators on the machine or users that have been provided the privileges to open a port on the system. If you would like users to continue to works as non-administrators but at the same time allow them to use the Web Plugin then you will need to provide them port privileges. In order to do this Microsoft provides some tools (httpcfg and netsh) to do this. To understand how to use these tools please refer to this MSDN article (http://msdn.microsoft.com/en-us/library/ms733768.aspx ).

    Implementation

    An XMLHTTP object needs to be added to your page that will send a request. Once the Desktop Connect Express software is installed and WebPlugin enabled, the following example page is available at the following URL

    http://127.0.0.1:port/GeoPDI/test

    <!--
    

    Sample html page to demonstrate Web Plugin of Desktop Connect Express Provided for demonstration purposes only on "as it is" basis

    -->
    
    <html>
    
    <head>
    
    <title>GeoPDI Test Page</title>
    
    <script type="text/javascript">
    

    function sendtoGeoPDI(){

            var req = newXMLHttpRequest();
    
            //register the callback handler function
    
           var callbackHandler = getReadyStateHandler(req, updateMsg);
    
           req.onreadystatechange = callbackHandler;
    
            //create request message
    
           var testmsg = document.getElementById("testmsg");
    
           var msg_value = testmsg.value;
    
           req.open("GET", "/geopdi/P/?test=Hardcoded message&"+msg_value, true);
    
           req.send();
    
    }
    
    
    
    // This is the callback functions that gets called
    
    // for the response from the server with the XML data
    

    function updateMsg(testXML) {

            var test = testXML.getElementsByTagName("GeoPDIW3SVC")[0];
    
            var res = testXML.getElementsByTagName("result")[0];
    
            var result_value=res.firstChild.nodeValue;
    
            var message = testXML.getElementsByTagName("message")[0];
    
            var message_value = message.firstChild.nodeValue;
    
            var msg_display = document.getElementById("msg_display");
    
            msg_display.innerHTML = "Result:" + result_value + "<br>" + message_value;
    
    }
    
    
    
    
    
    //the following two functions are helper infrastructure to
    
    //craete a XMLHTTPRequest and register a listner callback function
    

    function newXMLHttpRequest() {

            var xmlreq = false;
    
            if (window.XMLHttpRequest) {
    
                      xmlreq = new XMLHttpRequest();
    
            } else if (window.ActiveXObject) {
    
                     // Try ActiveX
    
                      try {
    
                               xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
    
                      } catch (e1) {
    
                               // first method failed
    
                               try {
    
                                         xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
    
                               } catch (e2) {
    
                                          // both methods failed
    
                               }
    
                      }
    
            }
    
           return xmlreq;
    
    }
    

    function getReadyStateHandler(req, responseXmlHandler) {

            return function () {
    
            if (req.readyState == 4) {
    
                      if (req.status == 200) {
    
                                         responseXmlHandler(req.responseXML);
    
                      } else {
    
                               //var errormsg = document.getElementById("error");
    
                               //errormsg.innerHTML = "ERROR;
    
                     }
    
           }
    
            }
    
    }
    
    </script>
    
    </head>
    
            <body>
    
                      <h1>Desktop Connect Express Test</h1>
    
                      Enter your variables here:
    
                      <input id="testmsg" type="text" value="Variable1=Value1&Var2=Value2" size=50><br>
    
                      <button onclick="sendtoGeoPDI()">Send to Desktop Connect Express</button>
    
                      <br><br>
    
                      <div id="msg_display" style="{ background: red; font-weight: bold; }">The data from the GeoPDI may come here...</div>
    
            </body>
    
    </html>
    
    Sorry, your browser does not support inline SVG. article updatedarticle updated6/23/2020 9:06:57 AM (UTC)6/23/2020 9:06:57 AM (UTC)
    Feedback     Back to top Copyright © Geomant