Configuration parameters

Introduction

As you already know The OdooPBX Asterisk connection middleware is based on the Saltstack pltaform.

  • Odoo connects to the salt-api.

  • The salt-api forwards requests to the salt-master.

  • The salt-master sends requests to the connected salt-minion.

  • The salt-minion is connected to the Asterisk via AMI port.

All configuration is located in /etc/salt folder.

Below we review the options we use in order to configure it all.

Minion configuration

The main minion’s configuration file is /etc/salt/minion.

The defaults are located in /etc/salt/minion.d/odoopbx.conf.

Instead of changing the defaults just add a required option to /etc/salt/minion_local.conf.

You must restat the minion process after making changes to its configuration using.

Below is the list of default parameters and their meanings.

odoo_host

Odoo hostname or IP address to connect to, default odoo.

odoo_port

Odoo port to connect, default 8069.

odoo_user

Odoo account for Asterisk server, default asterisk1.

odoo_password

Odoo account password for Asterisk server, default asterisk1.

odoo_use_ssl

Set to True if your Odoo is behind a proxy with HTTPS enabled. Default is False.

odoo_db

Odoo database, default is odoopbx_15, replace to your value.

ami_login

Asterisk Manager Interface login as configured in /etc/asterisk/manager.conf (usually there). Default is odoo.

ami_secret

Asterisk Manager Interface secret as configured in /etc/asterisk/manager.conf (usually there). Default is odoo.

ami_host

Hostname or IP address of your Asterisk server. Default is asterisk.

ami_port

Asterisk manager interface port, default 5038.

ami_register_events

List of AMI events to subscribe using register_event panoramisk call. Default is ['*'].

ami_trace_actions

True or list of AMI actions to print to console output. Default is [].

asterisk_binary

Path to the Asterisk binary if not common, defaults to /usr/sbin/asterisk.

asterisk_options

Default arguments to pass to the Asterisk binary when connecting to the CLI, default is -vvvvvr.

asterisk_cli_port

Asterisk Web CLI engine listen port, default is 30000.

asterisk_cli_listen_address

Asterisk WEB CLI engine listen address, default is 0.0.0.0.

asterisk_cli_ssl_key

Asterisk CLI SSL key, default /etc/pki/current/privkey.pem.

asterisk_cli_ssl_crt

Asterisk WEB CLI SSL certificate, default /etc/pki/current/fullchain.pem.

asterisk_shell_enabled

Enable ! command from the Asterisk CLI, default False.

security_reactor_enabled

AMI Security reactor, replaces fail2ban. See Documentation for details. Default is False.

security_reactor_events

List of AMI events passed to salt-minion event bus, default is ['ChallengeSent', 'SuccessfulAuth', 'InvalidPassword', 'InvalidAccountID', 'ChallengeResponseFailed'].

security_ports_udp

Security reactor UDP ports, default 5060,65060.

security_ports_tcp

Security reactor TCP ports, default: 5038,5039,5060,5061,65060,8088,8089.

security_banned_timeout

Security reactor ban timeout in seconds, default 3600.

security_expire_short_timeout

Timeout in seconds for registration confirmation SIP messages, default 60.

security_expire_long_timeout

Timeout in seconds for confirmed SIP registrations, default 3600.

fastagi_listen_address

FastAGI engine listen address, default 127.0.0.1.

fastagi_listen_port

FastAGI engine listen port, default 4574.

Master and API configuration

Master and API configuration is defined in /etc/salt/master.

You can override or add your configuration parameters in /etc/salt/master_local.conf.

include

Include master_*.conf in Salt config directory to override defaults or add new params.

interface

Salt master listen address.

log_level

Log level, default info.

log_file

Log file, default /var/log/salt/master

rest_cherrypy

REST CherryPy HTTP(S) Salt API server.

address

API server listen address, default 0.0.0.0.

port

API server listen port, default 48008.

disable_ssl

Disable connection SSL, default False.

ssl_crt

SSL certificate path, default /etc/pki/current/fullchain.pem.

ssl_key

SSL private key path, default /etc/pki/current/privkey.pem.

log_access_file

Access log file path, default /var/log/salt/api_access.

log_error_file

Error log file path, /var/log/salt/api_errors.

debug

Debug mode, default False.

max_request_body_size

Maximum request body size in bytes, default 1048576.

reactor_niceness

Master reactor processes priority, default 9.

reactor_worker_threads

Master reactor threads, default 64.

reactor

List of reactor patterns. See Salt reactor docs for details.