Skip to main content
Asterisk Plus Phone

Module installation and Configuration

Max Li avatar
Written by Max Li
Updated over 4 months ago

This module uses WebRTC and requires Google Chrome browser to operate smoothly. Other browsers currently are not supported.

The asterisk_plus_phone module is a WebRTC SIP phone for Odoo.

The phone icon is visible only if Phone is properly setup and user has a WebRTC channel configured. Otherwise the phone icon is not visible. Read below on how to configure it.

System Settings

You should configure your Asterisk PBX SIP URI, WebSocket address, STUN server.

In the above example default SIP and built-in HTTPS server ports are changed, the default values are:

  • SIP: 5060

  • HTTPS: 8089

See your Asterisk configuration for your settings.

Other options

  • Transfer contact search: when transfer button is clicked it's possible to search in all contacts, in PBX users or both (all).

  • Attended Transfer Sequence: This sequence is used to initiate the attended transfer using DTMF and must have the same value as set in your Asterisk PBX features.conf.

  • Disconnect Call Sequence: This sequence is used to disconnect the call during a transfer attempt and must have the same value as set in your Asterisk PBX features.conf.

Enable SIP users provisioning

Enable Generate SIP peers option in order to be able to specify SIP account password in user channels. You can automatically deliver SIP accounts to your Asterisk or create them manually in Odoo and in PBX.

User settings

Phone is automatically setup when the logged in user has a PBX User mapping with a channel of WebRTC type. After you create such a record refresh UI to load it and activate the phone icon.

Do not forget to set the Auto Answer Header (for better UX) to Answer-Mode: Auto.

Asterisk configuration for Odoo SIP users

It's possible to configure Asterisk so that it will load automatically SIP users from Odoo. To activate this option you have to:

  • Enable Generate SIP peers in PBX -> Settings -> Server SIP Users tab.

  • Set execincludes = yes in asterisk.conf [options] section.

  • Add #exec and #include directive to pjsip_wizard.conf to fetch SIP peers and include them as show below.

pjsip_wizard.conf

#exec /etc/asterisk/get_odoo_conf.sh
#tryinclude sip_odoo_auto_users.conf

/etc/asterisk/get_odoo_conf.sh

#!/bin/bash

curl -H "x-security-token: put-server-security-token-here" http://localhost:8069/asterisk_plus/sip_peers > /tmp/sip_users.conf 2>/dev/null
if [ "$?" = "0" ]; then mv /tmp/sip_users.conf /etc/asterisk/sip_odoo_auto_users.conf ; fi
sleep 1


โ€‹

Did this answer your question?