Asterisk & SIP

Asterisk default SIP channel driver is since XiVO Izar PJSIP.

PJSIP Configuration


This applies to >=Jabbah.07, >= Kuma.03 and forward

Where the configuration is stored ?

The pjsip configuration is stored in /etc/asterisk/pjsip.d/01-pjsip.conf.

When the configuration is generated ?


Since Jabbah.07 the conf is only re-generated after an edition in the Webi.

Launching manually a module reload in asterisk CLI will not reload the current conf from the db, it will only re-load the current generated conf (see How to reload the configuration ?).

When you save an object in the Admin Web interface (a User, or a Line or …) the Web Interface calls xivo-sysconfd service which will reload the configuration.

How the configuration is generated ?

  1. Admin changes some configuration in Webi
  2. Webi calls xivo-sysconfd service to ask for a pjsip reload
  3. Then xivo-sysconfd:
    1. Calls a script (/usr/sbin/xivo-generate-pjsip-conf) which itself calls xivo-confgen to generate pjsip conf
    2. Calls xivo-fix-paths-rights script to ensure correct rights
    3. Then puts the genertated conf in /etc/asterisk/pjsip.d/01-pjsip.conf
    4. When it’s done, launch a module reload: module reload
  4. And finally asterisk re-reads its pjsip conf

How to customize the configuration ?

If you want to customize the configuration:

  1. add your own configuration file in the directory /etc/asterisk/pjsip.d/

  2. then see How to reload the configuration ?

How to reload the configuration ?

Two cases:

  1. Reload the generated configuration (it will also reload what you might have changed in pjsip.d dir - see How to customize the configuration ?), run:

    asterisk -rx 'module reload'
  2. Reload the current configuration (from the db and from pjsip.d dir) - otherly said, regenerate & reload the whole configuration:

    curl --insecure -XPOST -H 'Content-Type: application/json' 'http://localhost:8668/exec_request_handlers' -d '{"ipbx": ["module reload"]}'

Fallback to chan_sip SIP channel driver


If you chose to fallback to chan_sip you will need to redo it for each bugfix upgrade.

For Izar LTS a fallback mechanism has been implemented to be able to fallback to deprecated chan_sip SIP channel driver.

On your XiVO, run the following command to switch your XiVO from res_pjsip to chan_sip:

xivo-switch-sip-driver SIP

And follow the instructions displayed.


If you’re running an XDS installation you MUST switch all the XiVO and MDS of the installation to the same SIP channel driver.