> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oduist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Odoo Phone settings

> Configure WebRTC phone, SIP/WebSocket endpoints, and provisioning.

# Odoo Phone settings

⚠️ WebRTC phone is supported in Google Chrome.

## System settings (PBX → Settings)

* Set Asterisk SIP URI, WebSocket address, STUN server; adjust ports if you changed defaults (SIP 5060, HTTPS 8089).
* Transfer contact search: all contacts, PBX users, or both.
* Attended Transfer Sequence / Disconnect Call Sequence: must match your Asterisk `features.conf`.
* Enable **Generate SIP peers** to manage SIP accounts in Odoo and push them to Asterisk.

## User setup

* Create PBX User mapping with a WebRTC channel; refresh UI to show the phone icon.
* Set Auto Answer Header to `Answer-Mode: Auto` for better UX.

## Auto-provision SIP users to Asterisk

1. Enable **Generate SIP peers** in PBX → Settings → Server → SIP Users.
2. In `asterisk.conf` set `execincludes = yes`.
3. Include generated peers in `pjsip_wizard.conf`:

```conf theme={null}
#exec /etc/asterisk/get_odoo_conf.sh
#tryinclude sip_odoo_auto_users.conf
```

4. Script `/etc/asterisk/get_odoo_conf.sh`:

```bash theme={null}
#!/bin/bash
curl -H "x-security-token: <server-security-token>" \
  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
```

Reload Asterisk includes after updating.
