Cisco Finesse Redbox Call Suppression Gadget

  • Login to Redbox API and get authToken
  • List Devices
  • Search list of all Device IDs which match the agent's extension number - and set in DeviceId Array
    • This means that even if there are multiple devices with same extension number - call suppression will still work (by requesting to suppress each and every device ID which matches the agent's extension number)
  • Set keep-alive timer countdown to activate keep-alive (and repeat!)
  • Send Start / Stop Suppression request for each of your Device IDs in your DeviceId Array
  • Send logout when agent logs out of Finesse
  • The Gadget uses a redbox username (setup detailed below). This account is set in the gadget JavaScript File (sample extract below).
  • The Gadget connects to the recorder set in the JavaScript File.
  • If unable to connect - confirm that Recorder is up and running, Redbox Web Service API is running and the Finesse Server is able to connected to the Web Service API port (TCP 1480) (no Firewalls / connectivity issues stopping this).

Set the username, password and hostname in the RedboxCallSuppression.js file - as per example below.

    var _user;
    var _apiusername = 'redboxapi';
    var _apipassword = 'DVgTLKRc9VAt4h2T';
    var _host1 = 'redbox1.mydomain.com';
    var _baseURL = 'http://' + _host1 + ':1480';
    var _loginPath = '/api/v1/sessions/login';
    var _logoutPath = '/api/v1/sessions/logout';
    var _deviceListPath = '/api/v1/config/devices';
    var _suppressStartPath = '/api/v1/suppression/start/device';
    var _suppressStopPath = '/api/v1/suppression/stop/device';
    var _keepalivePath = '/api/v1/sessions/keepAlive';
    var _authToken;
    var _myExtension;
    var _myDeviceId = []; //Array for the Device IDs - as the recorder could have more than one.
    var _myDeviceIdCounter;
    var _connected = false;
    var _connectionStatus = 'not connected';
    var _keepaliveMsg = "";
    var _keepaliveCounter = 0;
    var _keepaliveMaxCounter = 3;
    var _keepaliveInterval = 150000; // defaults to 150000, i.e. 2.5 mins. The Redbox Session timer is 5 mins - so keepalives need to be set before this 5 min timer expires.
    var _userState = "";
    var _version = '1.1';
  • Create API User
  • Install Redbox Web Service API (requires .NET 4.6)
  • Set the correct username, password and server name in the gadget
  • Deploy the gadget onto the finesse server (see Cisco guide on how to deploy 3rd party gadgets)

Setup the api user account rights as per below screen shot

  • Replay Permissions - All
  • Permissions - System Configuration
  • Everything else uncheck / set to off

Configuration of the Web Service API is done via the

C:\LTR\utils\RedBoxInterfaceWebAPI\RedBoxInterfaceWebAPI.exe.config

To create the file take a copy of the sample configuration file from

C:\LTR\Config\SampleConfigFiles\RedBoxInterfaceWebAPI.exe.config

and place in

C:\LTR\utils\RedBoxInterfaceWebAPI\
  • Set the baseAddress host name and port for http and https. The hostname is the name of the server where the Web Service API is running.
  • The default ports are:
    • 1480 (HTTP) and 14443 (HTTPS)

The below Redbox Web Service API config file only has HTTP enabled. HTTPS has been disabled.

RedBoxInterfaceWebAPI.exe.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="RedBoxInterfaceWebAPI.RecorderConfig" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
 
  <log4net>
    <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value=".\Logs\RedBoxInterfaceWebAPI.log" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="2" />
      <maximumFileSize value="15MB" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level - %message%newline" />
      </layout>
    </appender>
 
    <root>
      <level value="WARN" />
      <appender-ref ref="RollingFileAppender" />
    </root>
 
  </log4net>
 
  <!--Web server configuration-->
  <system.serviceModel>
 
    <bindings>
      <webHttpBinding>
        <binding name="webHttpTransportSecurity">
          <security mode="Transport" />
        </binding>
      </webHttpBinding>
    </bindings>
 
    <services>
      <service name="RedBoxInterfaceWebAPI.services.WebRestAPI">
        <host>
          <baseAddresses>
            <!--
			<add baseAddress="https://hostname:14443/api"/>
			-->
            <add baseAddress="http://hostname:1480/api"/>
          </baseAddresses>
        </host>
 
        <!-- http -->
        <endpoint address="v1" binding="webHttpBinding" behaviorConfiguration="webHttpBehavior" bindingNamespace="rbr.interface.uri" contract="RedBoxInterfaceWebAPI.services.IWebRestAPI" />
        <!-- https -->
        <!--
		<endpoint address="v1" binding="webHttpBinding" bindingConfiguration="webHttpTransportSecurity" behaviorConfiguration="webHttpBehavior" bindingNamespace="rbr.interface.uri" contract="RedBoxInterfaceWebAPI.services.IWebRestAPI" />
		-->
 
      </service>
    </services>
 
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
 
      <!--Required default endpoint behavior when using webHttpBinding-->
      <endpointBehaviors>
        <behavior name="webHttpBehavior">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
 
  </system.serviceModel>
 
  <applicationSettings>
    <RedBoxInterfaceWebAPI.RecorderConfig>
      <setting name="IPAddress" serializeAs="String"> <value>127.0.0.1</value> </setting>
    </RedBoxInterfaceWebAPI.RecorderConfig>
  </applicationSettings>  
 
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>  
 
</configuration>

To install the Web Service API as a Windows service open a command prompt and navigate to the C:\LTR\utils\RedBoxInterfaceWebAPI and run the command

RedBoxInterfaceWebAPI.exe –i

To Uninstall run the command:

RedBoxInterfaceWebAPI.exe –u

Below is the config you add to the Finesse Admin to add the Gadget for the Agent. You need to upload to the Finesse Servers into the relevant folder - see Cisco 3rd Party Gadget configuration documentation for more information.

This example has the B side commented out - so only the A side appears for the Agent.

        <tab>
            <id>RedboxA</id>
            <icon>manage-call</icon>
            <label>PCI-A-Side</label>
   			<gadgets>
			    <gadget>/3rdpartygadget/files/RedboxCallSuppressionA_V1.1/RedboxCallSuppression.xml</gadget>
	                </gadgets>
        </tab>
        <!--
        <tab>
            <id>RedboxB</id>
            <icon>manage-call</icon>
            <label>PCI-B-Side</label>
		<gadgets>
			<gadget>/3rdpartygadget/files/RedboxCallSuppressionB_V1.1/RedboxCallSuppression.xml</gadget>
		</gadgets>
         </tab>
         -->