© Enghouse Systems Ltd 2011
Enghouse Interactive Communications Portal
© Enghouse Systems Ltd 2011
Provide an overview of the Enghouse Interactive
Communications Portal components
Detailed description on Communication Servers,
Console and Alarm Center
Studio script development
Troubleshooting techniques
Course Objectives
© Enghouse Systems Ltd 2011
Communications Portal Oveview
© Enghouse Systems Ltd 2011
CP Overview
© Enghouse Systems Ltd 2011
CP Console
© Enghouse Systems Ltd 2011
Console
GUI-Based Administration Interface
Manage Administration, Debug and Monitor:
CP Domains
CP Licenses
CP Communication Servers
CP Domain Servers
Login Password (Optional for Security)
Communicates via TCP/IP
Services CPConsole.exe
© Enghouse Systems Ltd 2011
Users
• Users who can log-in and access the domain configuration for administration and/or monitoring
• Unlimited number of users
• Logged in user is displayed at the top-right of the Domain page
• The “role” determines the access level:– Administrator
– User
– Guest
© Enghouse Systems Ltd 2011
Console View
© Enghouse Systems Ltd 2011
Three primary license modes are available for CP
Communications Servers:
• Demonstration: No license key has been
obtained. Server must be restarted every 2
hours.
• Evaluation: Time-limited mode providing use
of CP license features until the expiration date.
• Permanent: CP Domain is fully licensed.
License Modes
© Enghouse Systems Ltd 2011
Domain License View
© Enghouse Systems Ltd 2011
Domain View
© Enghouse Systems Ltd 2011
• Green - Running script and OK
• Green (Blinking) - Server starting or restarting
• Red - Script error on one or more channels
• Grey - No script running on any channel
Console Indicators
© Enghouse Systems Ltd 2011
Group Display
CP Communication Servers that provide back-up capabilities
for each other
Each ECS in a group should be functionally identical
One active ECS and one standby ECS, or many to many
When redundancy is not used, groups are still needed but
one ECS in each group
Manageable settings include:
Group license information (each ECS uses that number
of licenses)
Group redundancy settings (conditions and actions)
Activate ECS’s important
© Enghouse Systems Ltd 2011
• Displays all servers in the group
• 3 servers shown in this display
• Double-click ECS to display Server information in ECS View tab
Redundancy Display
© Enghouse Systems Ltd 2011
ECS View
Display CP
Communication
Servers and
Engine Settings
Typically
displays each
ECS that is part of
the Domain
© Enghouse Systems Ltd 2011
Channels View
Lists each channel
associated to the
ECS
Displays the status
of each channel
Individual
channels are
managed by right-
clicking to display
menu options
© Enghouse Systems Ltd 2011
• Green - Hardware Channel Active, On-Hook
• Red - Active, Off-Hook
• Blue - Blocked (Digital Channels only)
• Green/Grey(Blinking) - Maintenance Mode
• Grey - Channel Not Started
• Grey ‘X’ - Software Channel Stopped
• Red Up Arrow - Script Running on SW Channel
(Flashing) - Error in Script
Channel Indicators
© Enghouse Systems Ltd 2011
Custom Views
• Combine different channels from one or more servers into one
view
• Several views for different needs in one Console
– Custom View must be created first
– Select and add a group of channels from different ECS’s to one
view
© Enghouse Systems Ltd 2011
Using CP Console:
1. Initialize switch/channels as necessary
2. Load compiled CP script (.seq file), or VoiceXML application (.vxml, .jsp), orCCXML application (.ccxml).
3. Start channel(s)
4. To test a modified script, simply use ‘Reload script’ after recompiling
Deploying a Script
© Enghouse Systems Ltd 2011
File Transfer
Enables administrative tasks such as:
• Upload new scripts and associated files, such
as voice prompts, etc.
• Download log files
• Delete files and folders
• Create folders
© Enghouse Systems Ltd 2011
File Transfers
© Enghouse Systems Ltd 2011
CP Alarm Center
© Enghouse Systems Ltd 2011
Alarm Center
© Enghouse Systems Ltd 2011
Alarm Center Management Tool
© Enghouse Systems Ltd 2011
Alarm Center settings in CP Console
© Enghouse Systems Ltd 2011
Communications Server
© Enghouse Systems Ltd 2011
Installation/Configuration Overview
• System requirements
– Windows Server 2008 R2 (64 bit)
– Windows Server 2012 R1 (R2 support will be released in PRC 3 or 4)
• Antivirus software and ECS runtime engine real-time response
• Dialogic HMP 3.0 / SR 6.0 installation tips and remarks
• Verify Dialogic installed and configured – demo tool
• Enable Dialogic logging – configuration and tools
© Enghouse Systems Ltd 2011
Installation/Configuration Overview
• CP Installation – which components, license type options
• CP Upgrade – apply PRC
• CP Downgrade – remove PRC
• CP Configuration for Server and Engine parameters
© Enghouse Systems Ltd 2011
Installation/Configuration Steps
• Install Dialogic board (if not using IP)
• Install Dialogic software (SR6.0 or HMP 3.0)
• Configure and test
• Install CP
• Configure and test
© Enghouse Systems Ltd 2011
Telephony Overview
• CP only supports Dialogic HMP 3.0 and SR 6.0 cards
• CP does not support NMS cards or Intel DSE cards
• Support for IP PBX – Cisco, ShoreTel, Mitel, Avaya
• Support for TDM PBX – Nortel, Avaya
• Avaya Dev Connect certification ->
https://www.devconnectmarketplace.com/enghouse-interactive
© Enghouse Systems Ltd 2011
Troubleshooting
© Enghouse Systems Ltd 2011
Troubleshooting
• CP Configuration for Server and Engine parameters
– Set Autostart CP engine off during troubleshooting
– Set to new type of system log format
– Pre-enable debug logging on all channels Set each channel log properties
to “All”
– Increase size of CP Backtrace log from 1000 to 10000
© Enghouse Systems Ltd 2011
Troubleshooting
• System and error logs – always present
• Script and script trace logs
• Debug logs
• Backtrace logging is a great option for production troubleshooting
• CP Collector is a tool that automatically finds and packages all relevant
logs on a system (including 3rd party logs)
• Wireshark tool for SIP problems troubleshooting
© Enghouse Systems Ltd 2011
CP Studio Scripting
© Enghouse Systems Ltd 2011
Overview
• CP Studio Scripting
• CP Studio GUI features
• Script Organization
• Script Debugging
• Questions
• Exercises
© Enghouse Systems Ltd 2011
CP Studio Scripting
• Variable types
– Limitations
– Unicode vs. String vs. Binary
– Any type
– Arrays and automatic resize
© Enghouse Systems Ltd 2011
CP Studio Scripting (continued)
• Variable scopes and sharing
– Local and Global
– Subroutine parameters as variables
– Exported variables (from Libraries)
– Sharing
– “content modification”
© Enghouse Systems Ltd 2011
CP Studio Scripting (continued)
• Expression evaluation
– Implicit conversions
– Literal values (time, date, quote character)
– Date/Time manipulations
– “BASIC” like expressions
– Array indexes
– Status function
– Objects
– What survives script change
© Enghouse Systems Ltd 2011
CP Studio Scripting (continued)
• Blocks – inputs, outputs, errors, events
– Block multiple inputs
– Block outputs, errors, and events
– System outputs
– Asynchronous events
• Subroutines, User blocks
– User block specifics
– Subroutines
– Subroutine parameters
• Reference parameters
– Multiple inputs and outputs
– “Main” as a subroutine
© Enghouse Systems Ltd 2011
Event Handling
• On the block
– Must be marked as processed
• In the user block
– Common event handling
• In Event handler
– Event check block
– UnhandledOutput
– “Error handler could not continue” error
• Event handling endings – return, continue, propagate
– Remember to use EndEventProcessing!
– Propagation of events
– Return from the event
• EventProcessed special output
© Enghouse Systems Ltd 2011
Event Handling (continued)
• Event handling and subroutines – propagation
– PropagatedEvent output on subroutine calls
• Default event handling – built-in behavior
– Special termination events
– Disconnect case
– “Next” output on EndEventProcessing block
– Restart after error option
© Enghouse Systems Ltd 2011
Event Handling (continued)
• Special events
– Quitting events
• @ExitMode functionality
– System output events
– Unconditional abort (from Console)
• Event manipulation blocks
– Enable / disable feature
• With EnableFeature block
• Through system variables (@NotifyState, @CIMAgentConnectedEnabled)
– EventSelection block
© Enghouse Systems Ltd 2011
Event Handling (continued)
• Output, error and event system variables and structures
– @CurBlock... and @LastBlock... variables (Input, Name, Location)
– @LastOutput and @LastOutputMessage
– Variables with the current event data (@LastEvent, @LastErrorMessage,
@Event)
© Enghouse Systems Ltd 2011
CP Studio Scripting (continued)
• Libraries
– Importing libraries
– SEQ vs ENS
– Namespaces
• ChangeScript issues
– This is not the CallScript block !
– Channel shared variables
– Automatic source script recompilation
– “Main script” concept
• Using external DLLs
– Two types of interfaces
– Supported parameter types
– Execution and memory protection
© Enghouse Systems Ltd 2011
CP Studio Scripting (continued)
• Software channels and notification
– Software channels usage
– Notifications
• Many channels notification options
• Criteria field specifics
• @NotifyState variable
– Acquiring voice resource – “music on hold example”
© Enghouse Systems Ltd 2011
CP Studio GUI features
• Tabs
– Provide multiple views for the same subroutine
– Initially: only Script and Event handling tabs
– User can add custom tabs from the context menu
– Shortcuts: Ctrl+PageUp / Ctrl+PageDown
© Enghouse Systems Ltd 2011
CP Studio GUI features
• Views navigation history
– Views history can be used to navigate back and forth
– Shortcuts: Ctrl+Backspace / Ctrl+Shift+Backspace
© Enghouse Systems Ltd 2011
CP Studio GUI features
• Auto-completion
– Facilitates entry of expressions
– Drop-down menu lists all available constants, variables, structures and
functions
© Enghouse Systems Ltd 2011
CP Studio GUI features
• Undo/Redo
– Script level – any change in block
– Control level – change in edit controls
– Shortcuts: Alt+Backspace (Ctrl+Z) / Shift+Alt+Backspace (Ctrl+Y)
© Enghouse Systems Ltd 2011
CP Studio GUI features
• User Blocks and Subroutines
– Support for modularity
– Double clicking on block opens corresponding view
– Note: use Synchronize if subroutine has been modified in the meantime
• Import Libraries
– Reuse of existing scripts
– User can import either ENS or SEQ scripts
– Subroutines in imported script must be marked as Export
• DLL Functions
– Use of functions in DLLs
© Enghouse Systems Ltd 2011
CP Studio GUI features
• Find block
– Search for a block by:
• Block name
• Block type
• Block description
• Block parameter
• Note content
• Subroutine name
© Enghouse Systems Ltd 2011
CP Studio GUI features
• Notes
– To annotate scripts
• Bookmarks
– Memos for script development
– Bookmark view shows all bookmarks for the current user
© Enghouse Systems Ltd 2011
CP Studio GUI features
• Building a script
– Check vs. Build
– Errors and Warnings
– Ignore script errors
– Destination directory for SEQ file
© Enghouse Systems Ltd 2011
CP Studio GUI features
• Creating a report
– Reports summarize script features
– Important for deploying resources required to run the script
© Enghouse Systems Ltd 2011
Scripting in CP
• Visual Script Programming – General Guidelines
• Script Organization and Flow
• Version Control
• Best Practices – Examples
• Common Issues
© Enghouse Systems Ltd 2011
General Guidelines (I)
• Scripting in CP Studio
– various available blocks and functionalities
– visual representation of call flows
– efficient implementation of simpler scripts
– possibly complicated for larger projects and scripts
– control flow as opposed to data flow
– asynchronous events
• Good code is achievable
• General software engineering guidelines apply
© Enghouse Systems Ltd 2011
General Guidelines (II)
• Tidy code
– easier to maintain and debug
– difficult to achieve in CP Studio
• Applied ubiquitous knowledge
– encapsulation and modularity (user blocks and subroutines)
– planned design of scripts (avoid ad-hoc scripting)
– global variables – good and bad
– comments and notes in scripts
– common sense
© Enghouse Systems Ltd 2011
Script Organization and Flow (I)
• Identify related code segments
– group segments
– encapsulate segments
• Visual layout is important
– minimize number of blocks per user block/subroutine
– use tabs in CP Studio
– keep track of connections
• Define reliable interfaces
© Enghouse Systems Ltd 2011
Script Organization and Flow (II)
• User blocks or subroutines?
– subroutines are reusable
– subroutines support parameters
– user blocks – rudimentary code aggregations
– user blocks simplify event handling
• Hierarchical scripting
– top-down design
– use user blocks to create outlines
• Keep track of external systems
– CIM integration
– business logic
© Enghouse Systems Ltd 2011
Script Organization and Flow (III)
• Performance concerns
– similar efficiency for user blocks and subroutines
– CP scripting is high level
– a couple of blocks per user block → pointless
• Use user DLLs for critical segments
– complex, repetitive operations
– string/text parsing
© Enghouse Systems Ltd 2011
Version Control
• CP Studio scripts in XML format
– changes in scripts usually trigger complete XML rewrites
– limited version control system usefulness
• Notes in scripts
– document major and minor changes
– embed version numbers
• Version numbers in filenames
– incompatible with revision control
• Build numbers in script properties
© Enghouse Systems Ltd 2011
Common Issues (I)
• Issues inherent to visual programming
– cluttered workspaces
– superfluous connections
– block positioning
• Event handling problems
• Missing reusability
© Enghouse Systems Ltd 2011
Script Debugging
• Error and debug logs
– Debug logs
– Error log
– Error backtrace log
• User/application logs
– System log
– Script logs
– User alarm log
• Script logging
– CDR logging (reporting)
– Files logging
– Error and backtrace dump
© Enghouse Systems Ltd 2011
Script Debugging (continued)
• Some common errors and investigations
– Module cannot be loaded
– Error handler could not continue
– Channel stopping too long
– Execution timeout exceeded
– Main thread hangup
© Enghouse Systems Ltd 2011
Script Debugging (continued)
• Visual Debugging
– Script can be debugged interactively starting Console from within Studio
– Insert a breakpoint to interrupt script execution
– Step into, step over, step out
– Watch expressions, modify values
– Trace Log to persist script
execution path
© Enghouse Systems Ltd 2011
Exercises
• Create a “Hello World” script
• Play prompts and receive DTMF tones
• Trigger backtrace in CP logs
• Load CP scripts examples