Sep 21, 2020 07:07
The Document describes how to configure ESPA Monitor.
Created: March 2019
WMS version 4.x
Update to WMS version 4.x: in case you've set up the integration on WMS version 3.88, after the upgrade to WMS 4.x, update the configuration following this guide (otherwise the integration will stop working).
ESPA Monitor configuration
Common problem for healthcare/pager devices is that despite of using the protocol with strict specification (ESPA 4.4.4) there is a lot of possibilities in message formats which sent from the device and can be configured on the device to send any kind of information. This way even same models in different installations may send absolutely different messages and have different requirement for messages screening or transmitting into pager/phone devices. To add more flexibility and get rid of BASH programming when setting up the system this version uses set of rules built over POSIX extended regular expressions that can describe messages formats and transformations.
Configuration file is organized as ini-style key-value sets split into sections.
There are following special sections:
- [logger]: represents logger configuration
- [rule_*]: any section name starts with rule_ is message parse and action rule
- Pager configuration section may have any name which is not conflicting with special sections listed above.
- log_level=<level> where level is a number between 1 and 5 describing verbosity of logs
- log_type = file | syslog
- log_file = <path to log file> must be set for log type ‘file’
- Rule name must start from rule_ and have unique name
- Rules evaluated from top to bottom according to pattern best match
If some rule has most common pattern then it should be placed at the bottom of the configuration file.
- pattern = <regex> pattern for message to match. Pattern is POSIX extended regular expression
- action = call|callscript|skip call - place a call with set parameters into spool_dir configured in pager
- callscript - call the script with command line parameters
- skip - just skip the message
- callerid = line CallerID parameter to place into call. May contain variables
- context = line context to place the call into. Default is ‘alarm’
- extension = line extension. Default is ’s’. May contain variables
- channel = line Channel parameter for call file. May contain variables
- callscript = <comman> script to call for action script. May contain variables
- value[name]=<regex> set up values to use in parameters. Name is variable name that can be used as $name in configuration lines like callerid etc.
- regex is POSIX extended regular expression over incoming message
- Value built as a set of matches enclosed into () in the pattern
in example for message: AP CHAMBRE 11 we can set up value like value[number]=^AP CHAMBRE ([0-9]+)$. In this case resulting variable $number will have value ’11’/
There are special variables %alarm%, %message% and %number% that can be used in the configuration.
Section name may be any but different from special names defined above.
- host=<hostname|ip> IP address or host name to connect
- port=<port> TCP port for connection
- protocol=espa|ascii define protocol to use. ESPA 4.4.4 or ASCII messages. Default is espa
- no_check_bcc=yes|no whether check or not checksums for ESPA messages. For most systems
set to ‘yes’ to skip BCC checking.
spool_dir=path spool directory for call weaver to place call files
default_rule=rule_name use this rule as default
rules=<comma separated> Comma separated list of rule names to use for this pager. Other
rules are not going to be validated.
Let’s review ESPA Televic system.
It may receive messages of following types:
- AP CHAMBRE 12
- AT CHAMBRE 14
- PT CHAMBRE 12
- T AP CHAMBRE 12
- R AP CHAMBRE 12
Messages may have leading or trailing whitespaces. Messages AT and PT should have no action.
The working configuration is as following:
Common configuration for ESPA Televic system: