Setup in Odoo
In Odoo (system administrators, PBX › "PBX interface" = "Asterisk / FreePBX", "Interface active"):
- Asterisk profile: "FreePBX" or "Asterisk" (plain Asterisk with your own dial plan).
- AMI: host (name or IP, without scheme and port), port, "AMI with TLS" (on by default, port 5039; certificate and host name are checked, for your own CA enter its CA certificate in PEM format), AMI user and AMI secret. Switching TLS off proposes port 5038 in the form (only while 5039 is still entered) and shows a warning: without TLS the AMI login and all forwarding targets travel unprotected.
- Trunks: the names of the PJSIP endpoints of the trunks, one per line (FreePBX: Connectivity › Trunks). Channels
of the technologies
DAHDIandIAX2always count as trunk. Without an entry there is no call-list sync, because Asterisk CDR rows carry no direction. - CDR database: type (MySQL/MariaDB or PostgreSQL), host, port, database, table (optionally with schema, e.g.
public.cdr), user, password, TLS (on by default) with an optional CA certificate and the CDR time zone (Limits and notes). - "Test connection" (VoIP administrators too): logs in to the AMI, counts the endpoints and then reads the CDR table. Odoo checks the CDR part even if the AMI is not set up or fails; the message then names both parts, e.g. "AMI: Asterisk rejects the AMI login. Call list readable." If only the CDR database is set up (no AMI), "AMI: Asterisk is not set up. Call list readable." counts as success; if the AMI fields are only partly filled (e.g. host without secret), the same message shows as a warning.
- "Load devices from PBX" (system administrators only): creates a device for every PJSIP endpoint except the trunks and assigns it to a user via SIP user or extension.
- Extensions and keys as for Ansitel (Set up Ansitel, steps 2 and 5). The extension on the user must be the name of the PJSIP endpoint.
- PyMySQL (MySQL/MariaDB only): the Python package must be installed on the Odoo server (
pip install PyMySQL, Debian/Ubuntupython3-pymysql, in your own Docker image via the Dockerfile). Without it the module installs and the keys work; only the sync is missing, and "Test connection" reports "Python package PyMySQL is missing on the server.". PostgreSQL usespsycopg2, which ships with Odoo.