Agent Parameters

OdooPBX Agent consists of three Saltstack daemons:

  • API: provides the salt API at TCP port 48000 by default.

  • Master: provides Pub/Sub message bus based on ZeroMQ. More on Salt architecture

  • Minion: boosted with custom engines Minion serves as an agent between Asterisk and Odoo.

OdooPBX Agent is designed to be as much auto-provisioned as possible. Minion reads ODOO_URL environment variable pointing to Odoo server with Asterisk Plus module installed and initializes itself on first startup. New passwords are generated and saved both at Odoo and Agent sides during initialization.

Minion configuration

Minion reads by default it’s configuration from /etc/salt/minion file and /etc/salt/minion.d/*.conf directory.

Default settings for the agent are located in /etc/salt/minion.d/odoopbx.conf.

Use `odoopbx config set command in order to change defaults. Your settings will be saved into /etc/salt/odoopbx/minion.conf file. This file overrides defaults and is kept untouched during agent upgrade.

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

Below is the list of default parameters and their meanings.

odoo_url

Substitutes used earlier odoo_db, odoo_host, odoo_port, odoo_use_ssl parameters when defined. Not defined by default. Example: https://odoo.example.com/?db=demo. Env ODOO_URL.

odoo_db

Odoo database name, default value is not defined. Env ODOO_DB.

odoo_host

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

odoo_port

Odoo port to connect, default 8069.

odoo_use_ssl

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

odoo_user

Odoo account login for Asterisk server, default asterisk1. Env ODOO_USER.

odoo_password

Odoo account password for odoo_user, default is not defined. If not defined Agent will generate a new one and try to initialize itself connecting to odoo_url. Odoo must have Initialize Mode Open checked in PBX -> Settings -> Server to allow initialization. Env ODOO_PASSWORD.

odoo_trace_rpc

Trace Odoo RPC calls, default False.

ami_login

Asterisk Manager Interface login name. Default is odoo. Env AMI_LOGIN.

ami_secret

Asterisk Manager Interface secret. Default is odoo. Env AMI_SECRET.

ami_host

Hostname or IP address of Asterisk server. Default is 127.0.0.1. Env AMI_HOST.

ami_port

Asterisk manager interface port, default 5038. Env AMI_PORT.

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 daemons use settings defined in /etc/salt/master.

It’s better to create *.conf files inside /etc/salt/master.d/ directory in case you want to modify Salt Master settings. It will keep your settings when you upgrade the agent.

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.