...
Html |
---|
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.11';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script> |
Html |
---|
<div class="fb-like" data-href="#" data-layout="button_count" data-action="recommend" data-size="large" data-show-faces="true" data-share="true"></div> |
Html |
---|
<div class="lang-box-pdf">
<div>
<div class="lang-switch">
<span class="letters-form"><a title="English" href="#">EN</a> | <a title="Italian" href="#" >IT</a> | <a title="French" href="#" target="_blank">FR</a> | <a title="German" href="#">DE</a></span>
</div>
<div class="google-lang">
<div id="google_translate_element">
</div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'de,es,fr,it,nl', autoDisplay: false}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</div>
<div class="pdf-button">
<a href="#" alt="Convert to .pdf" title="Convert to .pdf"><img src="https://confluence.wildix.com/download/attachments/14549012/pdf-button-download-wildix-documentation.png"></a>
</div>
</div>
</div> |
Info |
---|
Document description Created: March 2019 Permalink: |
Table of Contents |
---|
ESPA Monitor configuration
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.
Section [logger]
- 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’
Section [rule_*]
- 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|skipcall - 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 = lineCallerID parameter to place into call. May contain variables
...
- context = linecontext to place the call into. Default is ‘alarm’
...
- extension = lineextension. Default is ’s’. May contain variables
...
- channel = lineChannel 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.
...
There are special variables %alarm%, %message% and %number% that can be used in the configuration.
Pager 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|asciidefine protocol to use. ESPA 4.4.4 or ASCII messages. Default is espa
- no_check_bcc=yes|nowhether check or not checksums for ESPA messages. For most systems
set to ‘yes’ to skip BCC checking.
...
rules are not going to be validated.
Configuration example:
Let’s review ESPA Televic system at PBX 172.20.15.64
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:
Code Block |
---|
[logger] |
...
log_level=3 |
...
log_type=file |
...
log_file=/var/log/espamonitor.log |
...
[paging_1] |
...
host=10.135.0.254 |
...
port=4001 |
...
protocol=espa |
...
no_check_bcc=yes |
...
spool_dir=/var/spool/callweaver/outgoing/ |
...
default_rule=rule_skip |
...
rules=rule_call_ap:rule_call_rt |
...
selection=bestmatch ;chain|firstmatch |
...
; message processing rules |
...
; patterns are POSIX extended RE |
...
; action: call|none|path where path is command line with arguments for shell script |
...
; for ESPA there is special variable %number% exists |
...
; rules |
...
[rule_call_ap] |
...
pattern=^[ ]*AP[ ]+[^ ]+[ ]+[0-9]+[ ]*$ |
...
action=call |
...
value[room]=^[ ]*[^ ]+[ ]+CHAMBRE[ ]+([0-9]+)[ ]*$ |
...
value[addr]=^[ ]*[^ ]+[ ]+([^ ]{2})[^ ]*[ ]+[0-9]+[ ]* |
...
value[alarm]=^[ ]*([^ ]+)[ ]+.*$ |
...
callerid='"$alarm $addr" <$room>' |
...
extension=$alarm |
...
channel=Local/1234@users |
...
context=alarm |
...
[rule_call_rt] |
...
pattern=^[ ]*(R)|(T)[ ]+[^ ]+[ ]+[^ ]+[ ]+[0-9]+[ ]*$ |
...
action=call |
...
value[num]=^[ ]*[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+([0-9]+)[ ]*$ |
...
value[addr]=^[ ]*[^ ]+[ ]+[^ ]+[ ]+([^ ]{2})[^ ]*[ ]+[0-9]+[ ]* |
...
value[alarm]=^[ ]*([^ ]+[ ]+[^ ]+)[ ]+.*$ |
...
callerid='"$alarm $addr" <$room>' |
...
extension=$alarm |
...
channel=Local/1234@users |
...
context=alarm |
...
[rule_skip] |
...
action=none |
Common configuration for ESPA Televic system. Example for PBX 172.16.35.91:
Code Block |
---|
[logger] |
...
log_level=3 |
...
log_type=file |
...
log_file=/var/log/espamonitor.log |
...
[paging_1] |
...
host=10.135.0.254 |
...
port=4001 |
...
protocol=espa |
...
no_check_bcc=yes |
...
spool_dir=/var/spool/callweaver/outgoing/ |
...
default_rule=rule_makecall |
...
; message processing rules |
...
; patterns are POSIX extended RE |
...
; action: call|none|path where path is command line with arguments for shell script |
...
; for ESPA there are special variables %number% and %message% |
...
; |
...
; rules |
...
[rule_makecall] |
...
action=call |
...
callerid=\"%message%\" <%number%> |
...
value[ext]="^([^ ]{3}).*$/\1 |
...
extension=$ext |
...
channel=Local/1000@users |
...
context=alarm |
Html |
---|
<div class="fb-like" data-href="#" data-layout="button_count" data-action="recommend" data-size="large" data-show-faces="true" data-share="true"></div> |