res_websocket_client: Websocket Client Configuration¶
This configuration documentation is for functionality provided by res_websocket_client.
Configuration File: websocket_client.conf¶
[websocket_client]: Websocket Client Configuration¶
Since¶
20.15.0, 21.10.0, 22.5.0
These config objects are currently shared by the following Asterisk capabilities:
-
chan_websocket
- The WebSocket channel driver. -
res_ari
- ARI Outbound WebSockets.
They may have more specific information or restrictions on the parameters below.
;
; A connection for use by chan_websocket
[media_connection1]
type = websocket_client
uri = ws://localhost:8787
protocols = media
username = media_username
password = media_password
connection_type = per_call_config
connection_timeout = 500
reconnect_interval = 500
reconnect_attempts = 5
tls_enabled = no
;
; A TLS connection for use by ARI Outbound Websocket
[ari_connection1]
type = websocket_client
uri = wss://localhost:8765
protocols = ari
username = some_username
password = some_password
connection_type = persistent
connection_timeout = 500
reconnect_interval = 500
reconnect_attempts = 5
tls_enabled = yes
ca_list_file = /etc/pki/tls/cert.pem
verify_server_cert = no
verify_server_hostname = no
Configuration Option Reference¶
Option Name | Type | Default Value | Regular Expression | Description | Since |
---|---|---|---|---|---|
ca_list_file | String | false | File containing the server's CA certificate. (optional) | 20.15.0, 21.10.0, 22.5.0 | |
ca_list_path | String | false | Path to a directory containing one or more hashed CA certificates. (optional) | 20.15.0, 21.10.0, 22.5.0 | |
cert_file | String | false | File containing a client certificate. (optional) | 20.15.0, 21.10.0, 22.5.0 | |
connection_timeout | Integer | 500 | false | Connection timeout (ms). | 20.15.0, 21.10.0, 22.5.0 |
connection_type | Custom | false | Single persistent connection or per-call configuration. | 20.15.0, 21.10.0, 22.5.0 | |
password | String | false | Server authentication password if required. | 20.15.0, 21.10.0, 22.5.0 | |
priv_key_file | String | false | File containing the client's private key. (optional) | 20.15.0, 21.10.0, 22.5.0 | |
protocols | String | false | Comma separated list of protocols acceptable to the server. | 20.15.0, 21.10.0, 22.5.0 | |
reconnect_attempts | Integer | 4 | false | On failure, how many times should reconnection be attempted? | 20.15.0, 21.10.0, 22.5.0 |
reconnect_interval | Integer | 500 | false | How often should reconnection be attempted (ms)? | 20.15.0, 21.10.0, 22.5.0 |
tls_enabled | Boolean | no | false | Enable TLS | 20.15.0, 21.10.0, 22.5.0 |
type | None | false | Must be "websocket_client". | 20.15.0, 21.10.0, 22.5.0 | |
uri | String | false | Full URI to remote server. | 20.15.0, 21.10.0, 22.5.0 | |
username | String | false | Server authentication username if required. | 20.15.0, 21.10.0, 22.5.0 | |
verify_server_cert | Boolean | yes | false | If set to true, verify the server's certificate. (optional) | 20.15.0, 21.10.0, 22.5.0 |
verify_server_hostname | Boolean | yes | false | If set to true, verify that the server's hostname matches the common name in it's certificate. (optional) | 20.15.0, 21.10.0, 22.5.0 |
Configuration Option Descriptions¶
connection_type¶
Since: 20.15.0, 21.10.0, 22.5.0
-
persistent
- Single persistent connection for all calls. -
per_call_config
- New connection for each call to the Stasis() dialplan app.
reconnect_attempts¶
Since: 20.15.0, 21.10.0, 22.5.0
For per_call connections, this is the number of (re)connection attempts to make before returning an and terminating the call. Persistent connections always retry forever but this setting will control how often failure messages are logged.
Generated Version¶
This documentation was generated from Asterisk branch 20 using version GIT