Skip to main content

Automatic SIP users provisioning

Enable auto provision

PBX → Settings → Server:
  • Turn on Auto create PBX users to create/delete PBX users when Odoo users are added/removed from the PBX User group.
  • Turn on Generate SIP peers to let Asterisk fetch SIP peers from Odoo (uses a SIP peer template and a security token).

How it works

  • New Odoo account in PBX User group → gets next free extension; PBX user created.
  • Odoo account removed/deleted → PBX user deleted.
  • SIP peers are generated from the template; protect access with the security token.

Asterisk side

  1. Download get_odoo_conf.sh (from https://gist.github.com/asteriskauto/698b78e34eb44a2b43367223886e57c3) to /etc/asterisk/ and chmod +x get_odoo_conf.sh.
  2. In pjsip_wizard.conf:
#exec /etc/asterisk/get_odoo_conf.sh
  1. In asterisk.conf [options] ensure:
execincludes = yes
  1. Reload Asterisk; SIP peers should appear. If Odoo is down during reload, the previous SIP accounts remain.