-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathamiws.annotated.yaml
142 lines (133 loc) · 4.55 KB
/
amiws.annotated.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#
# amiws -- Library with functions for read/create AMI packets
# Copyright (C) 2017, Stas Kobzar <staskobzar@modulis.ca>
#
# This file is part of amiws.
#
# amiws is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# amiws is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with amiws. If not, see <http://www.gnu.org/licenses/>.
#
# Log facility id. Numeric value of the syslog (See sys/syslog.h)
# Other examples:
# LOG_KERNEL 0
# LOG_LOCAL0 128
# LOG_LOCAL1 136
# LOG_LOCAL2 144 etc...
#
# [OPTIONAL] DEFAULT value is 40 (LOG_SYSLOG).
#--------------------------------------------------
log_facility : 40
# Log level priority. From syslog:
# LOG_EMERG 0 /* system is unusable */
# LOG_ALERT 1 /* action must be taken immediately */
# LOG_CRIT 2 /* critical conditions */
# LOG_ERR 3 /* error conditions */
# LOG_WARNING 4 /* warning conditions */
# LOG_NOTICE 5 /* normal but significant condition */
# LOG_INFO 6 /* informational */
# LOG_DEBUG 7 /* debug-level messages */
#
# [OPTIONAL] DEFAULT value is LOG_INFO
#--------------------------------------------------
log_level : 6
# Web-Socket and HTTP port to listening.
#
# [OPTIONAL] DEFAULT value is 8000
#--------------------------------------------------
ws_port : 8000
# Path to directory with static HTML content.
# See example of the content in "web_root" directory
# of this repository.
#
# [OPTIONAL] DEFAULT value is relative path: "./web_root"
#--------------------------------------------------
web_root : /var/www/amiws/web_root
# Authorization domain for HTTP Digest authentication
# with username and password to web content.
# When auth_domain parameter is set, then auth_file
# parameter must be set too.
#
# Note: Digest authentication does not protect web-socket.
#
# [OPTIONAL] DEFAULT: none
#--------------------------------------------------
auth_domain : example.com
# User file for HTTP Digest authentication
# with username, domain and password. Used to restrict
# access to web content. When auth_file parameter is set,
# then auth_domain parameter must be set too.
# The authentication file can be generated with utility
# "htdigest" which is a part of Apache project.
# For example:
#
# $ htdigest -c /var/www/.htaccess example.com admin
#
# Note: Digest authentication does not protect web-socket.
#
# [OPTIONAL] DEFAULT: none
#--------------------------------------------------
auth_file : /var/www/.htaccess
# SSL certificate for HTTP and web-socket connection
# encryption. To enable SSL parameter --with-ssl must be
# used:
# $ ./configure --with-ssl
#
# Self-signed certificate and key can be generated by openssl.
# For example:
# $ openssl req -nodes -x509 -newkey rsa:4096 -keyout /tmp/server.key -out /tmp/server.pem
#
# To enable SSL both parameters "ssl_cert" and "ssl_key" must
# be set.
#
# Note: both HTTP and web-socket are protecte.
#
# [OPTIONAL] DEFAULT: none
#--------------------------------------------------
ssl_cert : /tmp/server.pem
ssl_key : /tmp/server.key
#**************************************************
# List of AMI servers #
#**************************************************
# At least one server must be defined.
# Parameters name, host, username and secret are
# mandatory. Parameter port is optional with default
# value 5038.
amihosts:
- name: ast01.example.com
port: 5038
host: 10.1.0.100
username: admin
secret: secret
- name: ast02.example.com
host: 10.1.0.200
username: admin
secret: secret
# SSL connection with Asterisk Manager Interface is
# also supported. Parameter tlsenble must be enabled
# in Asterisk manager.conf configuration file.
# Asterisk SSL certificate and key files can be
# generated by Asterisk utility ast_tls_cert. The
# same way it is described in documentation of
# SSL for SIP:
# https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial
#
# To enable SSL parameter --with-ssl must be used when
# configuring amiws:
# $ ./configure --with-ssl
- name: tlsami.example.com
port: 5039
host: 10.0.0.5
username: admin
secret: secret
ssl_cert: /etc/ssl/asterisk.pem
ssl_key: /etc/ssl/asterisk.key