Introduction

Asterisk can be configured to use the PJSIP channel driver instead of the default chan_sip. PJSIP is newer replacement for chan_sip.

Configuring Asterisk and Enswitch

  • Make sure you have /etc/asterisk/pjsip.conf installed as described in the Asterisk configuration page.
  • In the Enswitch web interface, update the Asterisk machines' "Asterisk SIP port" setting to use the new PJSIP port 5062.
  • Set global configuration setting "Default SIP protocol driver" to PJSIP.
  • Change the peers' protocol to PJSIP as desired.
  • Update the asterisk config file /etc/asterisk/extconfig.conf, and add the following lines if not already present:
    		ps_endpoints => mysql,enswitch,ps_endpoints
    		ps_auths => mysql,enswitch,ps_auths
    		ps_aors => mysql,enswitch,ps_aors
    		ps_endpoint_id_ips => mysql,enswitch,ps_endpoint_id_ips
    		
  • If the tables 'ps_endpoints', 'ps_auths', 'ps_aors' and 'ps_endpoint_id_ips' exist in the 'enswitch' database, take a backup of its contents.
  • Run "enswitch pjsip_tables --upgrade".
  • If took a backup and if needed, restore the contents of the tables 'ps_endpoints', 'ps_auths', 'ps_aors' and 'ps_endpoint_id_ips'. If in doubt please contact support.
  • Update asterisk config file /etc/asterisk/extensions.conf:
    Change line:
    #include /opt/enswitch/current/etc/asterisk/extensions_phone.conf

    to
    #include /opt/enswitch/current/etc/asterisk/extensions_phone_pjsip.conf
  • Run "asterisk restart".
  • Run "enswitch restart" to make the changes take effect.