Skip to main content

Setting up WB VoIP

This guide covers the setup of wb_voip, wb_voip_crm and the PBX adapters (wb_voip_anlagen, plus wb_voip_ansitel for Ansitel PBXs) in Odoo 19; section 9a covers the call lists (wb_voip_kampagne). It is written for the person who runs Odoo (access to the server and to system administration). The German version is Einrichtung. Features and status: README (German).

User interface: English and German (the labels in this guide are the English ones).

Example addresses in this guide (pbx.example.com, numbers in the range 030 23125 xxx) are fictitious.

1. Requirements​

Odoo19.0, Community or Enterprise. On Enterprise the Odoo module voip must not be installed (wb_voip excludes it).
Odoo modulesmail, phone_validation, bus, web (standard), wb_license_client (license client); wb_voip_crm also needs crm
Pythoncryptography (included in the official Odoo image); phonenumbers (required: phone number validation and the toll-fraud check; without it every target number is refused, the manifests require it)
Odoo addressHTTPS with a valid certificate. Browsers only grant microphone and WebRTC access in a secure context.
PBXSIP over WebSocket with TLS (wss://, RFC 7118) and WebRTC-capable extensions, one extension per user
NetworkEvery user's browser can reach the PBX wss:// address and its media ports.
ICEOptional: your own STUN servers (stun:) and your own TURN server with time-limited credentials (section 5, "TURN"). With no entry the browser does not query a third-party STUN or TURN server.
Browsercurrent Chrome, Edge or Firefox
Licensea valid license key for product code VOIP, package for all active internal Odoo users

2. Installation​

  1. Put wb_voip and wb_license_client into the addons path. Add wb_voip_crm for the CRM integration, wb_voip_anlagen for quick keys and call-list sync and, for an Ansitel PBX, also wb_voip_ansitel (it pulls in wb_voip_anlagen).
  2. Update the app list (developer mode) and install WB VoIP. wb_license_client is installed as a dependency.
  3. wb_voip_crm installs itself as soon as crm and wb_voip are installed (auto_install). It needs no setup of its own.
  4. wb_voip_anlagen and wb_voip_ansitel do not install themselves. wb_voip_anlagen (free) brings quick keys and the "Feature codes" adapter for PBXs without an interface; wb_voip_ansitel (free) is only needed if your PBX is from Ansitel (section 10). Both require wb_voip 19.0.9.2.0 or later; Odoo does not check module versions, so update wb_voip together with them.

The menus under Settings › Technical only show in developer mode (Settings › "Activate the developer mode").

When wb_voip is installed, the users base.user_root and base.user_admin are added once to the group "WB VoIP: Administrator". You assign everyone else yourself (section 6).

3. Activate the license​

wb_voip checks the license for product code VOIP through wb_license_client. To activate (system administrators only):

  1. Settings › WB Lizenzen (license) › Activate license.
  2. Enter product code VOIP, the license key (format WB-XXXX-…) and the activation code (25 characters in groups of five, from the portal download). The API secret (WBS-…) is optional and comes with the key if one was issued. Tick the required confirmations (EULA, terms, privacy notice) and confirm.
  3. Check under License status that the license is "active". A daily job syncs it with the license server; if the server is briefly unreachable, the license keeps working at first.

Test systems (a database that is not the licensed production instance) run on a time-limited trial; after that the database needs a DEV license, and a copied database should be neutralized. After moving to another domain or database, request the switch under Request migration. License questions: support@wissen-beratung.de.

Without a valid license the softphone shows "License missing or expired". Calling and registering with the PBX are then blocked; lists, forms and existing call logs stay readable and editable.

User limit. Every active internal Odoo user needs a licence, also users without a phone. Portal and public users, archived users and the system user (__system__/OdooBot) do not count. With more active internal users than the package allows, everything new is blocked as without a licence: starting or answering calls, switching quick keys, starting scripts, fetching leads. Work already begun can be finished: continue and end running calls, save the log and note, assign the caller and set the opportunity (up to 24 hours after the call ended), go forward and back in a running script, book a campaign result or release a held lead. After the last call the softphone logs out and shows "License package too small". Administrators (group Settings) see the figures ("Your package “WB VoIP” allows 5 users, this database has 6 active users. Please upgrade your licence."), all other users "Your WB VoIP licence package is too small. Please inform your administrator." This exception does not apply to a missing or expired licence. The same applies to the add-on licences VSKR (call scripts) and VKMP (call lists). Creating users is never blocked; if a new, reactivated or portal-to-internal user (also through the group form) exceeds an installed WB VoIP licence, a notification appears. It uses the last stored licence status and does not contact the licence server. Settings › WB VoIP › Licensed users shows the figures. Remedy: upgrade the licence or archive users that are no longer needed.

4. Server key WB_VOIP_FERNET_KEY​

WB VoIP stores SIP passwords (and, for Ansitel, API tokens) only as Fernet ciphertext. The key is not kept in Odoo, only in the environment of the Odoo process.

  1. Generate a key:

    python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
  2. Set the result as environment variable WB_VOIP_FERNET_KEY for the Odoo process (systemd unit, container environment or however you manage environment variables) and restart Odoo. With several Odoo workers or servers on the same database, every one needs the same key.

  3. Keep the key secret: never in the database, system parameters, logs, tickets or a repository. Keep a copy in the operator's password store.

If the key is missing, no password can be saved and the softphone reports that it is not configured on the server.

Changing or losing the key: stored ciphertext cannot be read with a new key. All SIP passwords must then be entered again (each user under My Preferences › Telephony, or a VoIP administrator on the user); for Ansitel also the central token and all personal tokens. Only change the key deliberately.

5. Create the PBX​

Settings › Technical › WB VoIP › PBXs. Only system administrators may create a PBX or change its connection data: the browser logs in at the stored address, so a wrong address would hand every user's credentials to a third party.

FieldMeaning
Namefree text
WebSocket URLmust start with wss://, e.g. wss://pbx.example.com/ws
SIP domaine.g. pbx.example.com
Countrycounts as "domestic" when forwarding targets are checked (PBX integration) and for number normalization
ICE servers (STUN)optional, one URL per line, stun: only, e.g. stun:stun.example.org:3478, at most 10 lines. Empty is enough if the PBX relays media itself.
ModeTest simulates the far end without a real PBX (for trying out); Production registers with the PBX
Pick-up prefixoptional dial prefix of the PBX for picking up a colleague's ringing call (e.g. ** on Asterisk-based PBXs), at most 8 characters from 0-9, *, #; empty = pick-up off
TURN serversoptional, one URL per line (at most 5), turn: or turns:, e.g. turn:turn.example.com:3478?transport=udp or turns:turn.example.com:5349?transport=tcp; turns: over TCP only. Empty = no TURN.
TURN shared secretshared secret of the TURN server (coturn: static-auth-secret). Write-only, stored encrypted (Fernet), never shown again; "TURN secret saved" shows that one is stored. An empty value changes nothing; remove it only with the button "Remove TURN secret" (system administrators).
Dial formathow the softphone dials international numbers: + as 00 (default, +49 30 … → 0049 30 …), E.164 with + (the + is kept) or National with trunk prefix (numbers in the PBX country nationally with 0, other countries with 00, both after the trunk prefix). Internal extensions (no leading 0) and codes with * or # are always dialled unchanged, without a trunk prefix in front. Limit of "National": the country code is replaced by 0. Countries that keep the leading 0 in international format (e.g. Italy +39 06 …) or use another national prefix (e.g. North America/NANP +1) need "+ as 00" or "E.164 with +".
Trunk prefixonly with the dial format "National with trunk prefix": digit(s) the PBX expects before an outside number, e.g. 0, at most 4 digits; empty = none
Reject codeSIP status sent when rejecting an incoming call: 603 Decline (default) or 486 Busy Here (some PBXs only forward 486 to the caller or to voicemail). Either way the call shows as "Rejected" in the call list (not "Busy").
Answered-elsewhere detectionOn by default: a CANCEL with Reason: SIP;cause=200;text="Call completed elsewhere" (RFC 3326) counts as "answered elsewhere", e.g. with ring groups. Switch off if the PBX sends this header wrongly; the call then counts as missed.
Attended transfer (REFER with Replaces)On by default. Off hides "With consult call" and "Connect" (for PBXs without REFER with Replaces, RFC 3891); the blind transfer and the conference mixed in the browser stay.
DTMF methodRTP (RFC 4733) first (default), falls back to SIP INFO; or SIP INFO first, falls back to RTP
Test numbernumber the self-test "Check PBX" calls (below). At most 16 characters from 0-9, *, #, not starting with 0 or +; the check only rejects external formats. The test call bypasses the server's target check and the call log: choosing an internal test number (e.g. an echo or announcement extension) is the administrator's responsibility; never use emergency or short numbers or */# codes that forward outside; empty = no test call

A VoIP administrator may also change name, mode, pick-up prefix, dial format, trunk prefix, the switches under "PBX behaviour" and the test number; STUN, TURN servers and TURN shared secret only system administrators. New PBXs start in "Test"; switch to "Production" only after the users are set up.

The settings take effect when the phone reconnects: reload Odoo or press "Reconnect" in the softphone. Until then an open tab keeps working with the old values. Which values suit which PBX: Kompatibilität (compatibility list).

TURN (coturn with use-auth-secret)​

You only need TURN if browser and PBX find no direct media path (e.g. symmetric NAT, blocked UDP ports) and the PBX does not relay media itself. WB VoIP uses the TURN REST API scheme: Odoo issues per-user credentials valid for 12 hours. The user name is <expiry>:<id>, the password base64(HMAC-SHA1(secret, user name)). The secret never leaves the server; an open tab fetches new credentials before they expire (without the SIP password). Credentials are issued only to users with a PBX and SIP user at a PBX in mode "prod"; otherwise the browser gets the STUN servers only.

Example for coturn (/etc/turnserver.conf, adjust the values):

listening-port=3478
tls-listening-port=5349
realm=turn.example.com
use-auth-secret
static-auth-secret=<secret, e.g. from: openssl rand -hex 32>
cert=/etc/ssl/turn.example.com.crt
pkey=/etc/ssl/turn.example.com.key
fingerprint
no-cli
# no relaying into internal networks; allow the PBX address with allowed-peer-ip if needed
denied-peer-ip=10.0.0.0-10.255.255.255
denied-peer-ip=172.16.0.0-172.31.255.255
denied-peer-ip=192.168.0.0-192.168.255.255

On the PBX in Odoo: TURN servers turn:turn.example.com:3478?transport=udp (and if needed turns:turn.example.com:5349?transport=tcp), TURN shared secret = static-auth-secret. Then reload Odoo.

  • Privacy: the TURN server sees the browsers' IP addresses and a pseudonymous ID per user (16 hex digits, derived from the secret, the database UUID and the user id), never names or the Odoo id. The ID appears in its logs. If a third party runs the TURN server, you need a data processing agreement (Art. 28 GDPR).
  • Revoking: issued credentials stay valid for up to 12 hours. Deactivating a user or removing the extension therefore blocks TURN for that user only after at most 12 hours. In an emergency, change the secret on the TURN server and in Odoo at the same time: all issued credentials become invalid at once, the other users get new ones when they reload Odoo.
  • Audit log: modules that record writes (e.g. OCA auditlog) may store the secret in plain text from the written values. Exclude the fields turn_geheimnis (PBX) and wb_voip_sip_passwort (user) from logging there.

Check PBX (self-test)​

The button Check PBX in the PBX form tests the connection from the browser. It only shows for VoIP administrators who have an extension at this PBX themselves, and it must run in the tab that holds the phone. Press "Start check" on the page; the check takes about 15 seconds and shows four items:

  1. registered on the PBX;
  2. test call to the test number answered within 10 s;
  3. audio received within 5 s;
  4. DTMF "1" sent.
  • Test number: an announcement (playback) number of the PBX is recommended: it sends audio without anyone speaking. With an echo test, please say something once the call is answered.
  • Item 3 is a heuristic: it only measures whether the level of the received track exceeds a threshold (about −46 dBFS), not the speech quality.
  • Item 4 only confirms sending at SIP level (RTP tone accepted by the browser or SIP INFO answered with 2xx), not that the PBX recognised the digit.
  • Incoming calls during the check are rejected (480) and appear as missed calls.
  • The result is stored at the PBX in the tab "Checks": user, time, the four items, message and the browser identifier (user agent, at most 200 characters). VoIP administrators can read it; only system administrators can delete it.

6. Set up users​

  1. Assign the group: user form › access rights: "WB VoIP: User" for everyone who phones, "WB VoIP: Administrator" for managing PBXs, extensions and settings. The administrator group includes the user group. System administrators do not get the VoIP groups automatically: for the VoIP menus and settings they need the group "WB VoIP: Administrator" as well.
  2. Extension: user form, tab "Telephony" (only VoIP administrators may change it; everyone else sees the fields read-only): choose the PBX and the SIP user (the extension on the PBX). Each extension belongs to exactly one user and one PBX.
  3. SIP password: the user sets it under My Preferences › Telephony ("SIP password"), or a VoIP administrator on the user form. The field is write-only, never readable; "Saved – enter again to change" shows that one exists. It is decrypted only when the user logs in to the PBX.
  4. The user reloads Odoo. The phone icon in the top bar shows the state: green connected, grey off, yellow in another tab, red disconnected, without license or not set up. On the first incoming call the browser asks for notification and microphone permission.

Favourites, window and contact card​

  • Window: The user drags the softphone window by its header to a corner (it snaps at 48 px distance) or to any free position, and resizes it with the handles or the arrow keys. The "Window position" menu in the header offers the four corners and "Reset position". It is stored per user and needs no setup. Below 576 px width the full-screen sheet stays.
  • Own favourites: Every user maintains them under My Preferences › Telephony › "My favourites" and "My favourite groups" (contact, colleague or phone number; at most 100 favourites and 20 groups). The "Transfer" setting (blind or with consultation, default with consultation; the update to 19.0.9.2.1 switches "direct" to "with consultation" for all users) that a click on a favourite triggers during a call is there as well.
  • Global favourites and groups (Settings › Technical › WB VoIP › Favourites or Favourite groups, VoIP administrators only): global favourites are visible to every VoIP user unless they sit in a global group; such a favourite follows the group. A global group is visible only to the user groups chosen under "Visible for" (empty: everyone), and a favourite that sits only in groups hidden from a user is hidden from that user too.
  • Dynamic global groups are filled when loaded, always with the reader's rights and at most the configured number (1 to 200, default 50): VoIP colleagues, contacts with chosen tags, a filter on contacts or users (administrators only, literals only). wb_voip_hr adds departments, wb_voip_project the customers of projects and tasks; both install themselves once Employees or Project and wb_voip are present. "Take over" turns an entry into an own favourite.
  • Favourites window: The star in the softphone header opens it, docked (right, left, top, bottom) or floating. In the default corner it opens on the left of the softphone. While the caller window is open the softphone moves aside, the docked favourites window follows it and stays above the caller window. During a call the star in the call view offers the favourites at every width, so a transfer by favourite never depends on the window. Below 576 px it is a tab in the softphone.
  • Privacy for colleagues: A status dot (free, on a call, ringing) appears only if the company's team overview is switched on, so the requirements in section 8 apply to favourites too. Without it a colleague favourite shows only name and extension; it can still be called and used for transfer, but not picked up.
  • Contact card: The card icon in the lists Calls, Missed and Contacts, and on contacts in the favourites, opens the contact with contact header, contact fields, last logs and open tasks (no note, since no call is running). Its layout is the "Contact card" window in the layout designer (Settings › Technical › WB VoIP › Layout designer); with wb_voip_crm there is also the "Opportunities" block. Whoever may not read the contact sees "No access". The contact card has no maintainable server buttons: they belong to a call.

Keyboard shortcuts, transfer on answer and headset​

  • Keyboard shortcuts: My Preferences › Telephony › "Keyboard shortcuts". Defaults: answer Alt+Shift+Y, hang up Alt+Shift+E, hold Alt+Shift+H, mute Alt+Shift+S, transfer Alt+Shift+R, open softphone Alt+Shift+P, favourites 1 to 9 Ctrl+Shift+1 to 9. "Assign" records the next key combination (Escape cancels), "Reset" restores one row, "Reset all" restores all. Reserved shortcuts (browser and Odoo), duplicates and Ctrl+Alt (AltGr) are rejected. In input fields only answer and hang up work, and in the phone tab only while a call is ringing or the line is busy; otherwise the key goes to the field. A secondary tab does not know the call state, so there the two shortcuts catch the key even without a call (on a Mac Option+Shift+Y/E are lost while typing there; choose other shortcuts if needed). A shortcut works in every Odoo tab; a secondary tab forwards it to the phone tab, except "transfer": the input for the target number appears in the phone tab, so a secondary tab only says that the transfer is available there. Limits: Windows may use Alt+Shift or Ctrl+Shift to switch the keyboard layout (turn that off in the system settings or choose another shortcut); on a Mac with a German keyboard Alt+Shift+Y may hit Z; shortcuts of Odoo Enterprise or third-party modules are not known to WB VoIP.
  • Transfer: The same page chooses what a click on a favourite does during a call: "direct", "with consultation" or "on answer". For "on answer" the wait time applies (5 to 120 s, default 20 s): the caller stays on hold with the transferring user until the third party answers; if they do not answer (timeout, busy, rejected), the caller is back with the transferring user. The third party's voicemail counts as answered. "Talk first" lets the transferring user speak to the third party beforehand, "Cancel transfer" brings the caller back. It needs "Transfer with consultation" on the PBX (section 5). Note on "direct": what happens if nobody answers is decided by the PBX dial plan, not by WB VoIP (on an Asterisk test installation the caller was disconnected after the timeout, with no call back to the transferring user). Use "on answer" to get the caller back.
  • Headset (module wb_voip_headset, optional): install the module and reload Odoo. Under My Preferences › Telephony › Headset click "Connect headset" and choose the headset in the browser dialog (the browser asks only after a click). Requirements: Chrome or Edge (WebHID; Firefox and Safari do not offer it), Odoo over HTTPS, a headset of the HID class "Telephony"; Bluetooth headsets only with their USB dongle. The self-test below the button shows every recognised key press. After that the phone connects by itself; only the browser remembers the permission ("Disconnect" revokes it), device data never goes to Odoo. It works in the phone tab only; a second tab says so. Without matching keys or LEDs the phone works as before.

7. Rights​

Checked against the access rights (ir.model.access.csv), record rules and the checks in code. "VoIP administrator" is the group "WB VoIP: Administrator". System administrators (group "Administration: Settings") do not include the VoIP groups. Whoever needs both belongs to both groups; only admin and the system user are added to the VoIP group on installation.

ActionUserVoIP administratorSystem administrators
Use the softphone, place and take callsyes (with license)yesonly with a VoIP group
See, create, edit own calls and call logsyesyesonly with a VoIP group
See other users' calls and call logsnoyes, allonly with a VoIP group
Delete calls and call logsnoyesonly with a VoIP group
Set own SIP passwordyesyesonly with a VoIP group
Set another user's SIP passwordnoyesonly with a VoIP group
Read a SIP passwordnevernevernever (only ciphertext in the database)
Read PBX and extension on a useryes (VoIP users)yesyes
Set PBX and extension on a usernoyesonly with a VoIP group
Read and change personal settings (window, favourites, shortcuts, wait time)own onlyown onlyfor every user
Read a PBXyesyesyes
PBX: change name, mode, pick-up prefixnoyesyes
PBX: create, delete; change WebSocket URL, SIP domain, ICE servers, countrynono (without system right)yes
View call buttons and wizard buttonsyes (read only)yes, create, edit, deleteonly with a VoIP group
Create or change buttons with Python code (wizard)nono (without system right)yes (with VoIP administrator)
Window layouts and layout designernoyes (menu needs access to Settings)only with a VoIP group
Set retention period, team overview, call durationnoyes (the settings page needs access to Settings)only with a VoIP group
Activate license, request migrationnonoyes
PBX integration: interface (type, active, feature codes), Ansitel URL, central token, time zonenono (without system right)yes
PBX integration: read the extension on a user (block on the user form)noyesyes (with VoIP administrator)
PBX integration: set extension, personal token, voicemail releasenono (without system right)yes (with VoIP administrator)
PBX integration: read devices (menu)noyesyes (menu only with VoIP administrator)
PBX integration: change devices, "Load devices from PBX", additional internal targetsnono (without system right)yes
PBX integration: view keysyes (read only)yes, maintain label, kind, orderonly with a VoIP group
PBX integration: set fixed and internal key targetsnono (without system right)yes (with VoIP administrator)
Ansitel: "Test connection" (not available for "Feature codes")noyesyes (with VoIP administrator)
PBX integration: switch keysyes, for themselves onlyyesonly with a VoIP group
PBX integration: set "My mobile phone"yes, for themselves onlyyesyes
CRM: see calls and call logs on the opportunityownallonly with a VoIP group
CRM: read the technical field call → opportunitynonoyes (with a VoIP group, otherwise no access to calls)

Note on menus: the "WB VoIP" menu under Settings › Technical is visible to VoIP administrators, but only in developer mode.

8. Team overview, privacy and works council​

The "Team" tab in the softphone shows colleagues as free, on a call, ringing or logged out. This is processing of employees' personal data (presence and phone status).

  • Default: on. Since version 19.0.4.5.0 the overview is on for all companies; the update switches it on for existing companies. Call duration is off by default.
  • The operator is responsible. Privacy-friendly defaults (Art. 25 GDPR) are the operator's duty: switch the overview off until employees have been informed (information duty, Art. 13 GDPR), and check whether a data protection impact assessment (Art. 35 GDPR) is needed.
  • Works council. Where a works council exists, introducing a technical system that can monitor behavior or performance requires its co-determination (§ 87 (1) no. 6 BetrVG, German Works Constitution Act). Use the overview only after its consent (usually a works agreement); switch it off until then. The same applies to the call-list sync of the PBX (section 10).
  • Switches per company: Settings › WB VoIP › "Show team overview" and "Show call duration in the team". The company the person is currently working in (active company) decides. Switching off deletes the stored heartbeats of all users of that company.
  • What colleagues see: only name, extension, status and, for "on a call" (if enabled), the duration; never the other number, contact or note. As presence, Odoo stores only the time of the phone tab's last heartbeat; after 150 seconds without one the colleague counts as "logged out", and it is deleted on logout.
  • Missed calls: colleagues in the same company see name, duration and note of the person who took a call. The note field of incoming calls says so.

Retention period. Settings › WB VoIP › "Retention period for call data" (system parameter wb_voip.aufbewahrung_monate): default 12 months, 0 = never delete. A daily job removes finished calls older than that; call logs are kept. Set the period to match your deletion policy and record it in your record of processing activities (Art. 30 GDPR).

Buttons of type "Web address" pass the phone number and contact ID to the operator of that address: for external services conclude a data processing agreement (Art. 28 GDPR) and, for providers outside the EU/EEA, check the transfer to third countries.

Privacy on the user (since 19.0.9.0.0)​

Only VoIP users and system administrators can see the extension and PBX on a user; someone who only has the "Access Rights" permission gets an access error when reading or writing them by RPC. Personal settings (window, favourites, shortcuts, wait time) are read and changed by the user; besides them only system administrators (group "Administration: Settings"), for every user. Setting extension and PBX remains limited to VoIP administrators.

Limits of reported calls (since 19.0.9.0.0)​

The server cannot check calls reported by the browser against the PBX (without a call-list sync, section 10). Therefore:

  • at most 30 reported calls per user and minute (constant ANRUFE_JE_MINUTE in wb_voip/models/wb_voip_anruf.py; reconciliation with the PBX is not counted). Every incoming call that rings in the browser counts: a ring-all group with more than 30 calls per minute per agent can reach the limit, and calls reported beyond it are not logged;
  • numbers may only contain dial characters (0-9 + * # ( ) / -, space), letters and . _ ~ for SIP users such as TelB (unreserved characters of RFC 3261), or anonymous; values with letters are never matched to a contact;
  • If a call closes colleagues' "missed" entries, this is recorded on the entry and as a note naming the user. If the call lasted under 5 seconds (measured by the server), the entries reopen with a new callback activity and a note. Exceptions (since 19.0.9.1.0): the call ended with a successful transfer (blind, attended or on answer; the softphone reports it when the call ends), or the same number was answered again afterwards in the same company (then the end of that call decides). The cleanup job for orphaned calls reopens nothing, because there the end is only estimated from the last heartbeat. If the answer was only reported at the end, colleagues' entries stay open; reconciliation with the PBX can close them later in ring-group situations. A manually set result "reached" without such a call closes only own entries; if "reached" is withdrawn, the entries reopen, with a note for colleagues;
  • 5 seconds and the transfer marker are hurdles, not proof. Only reconciliation with the PBX call list (section 10) confirms reliably.

9. CRM integration (wb_voip_crm)​

No setup of its own; rights and PBX follow wb_voip.

  • When a call starts it is assigned to the open opportunity: active, probability below 100 %, in the current company or without a company, on the contact or on its company. The search runs with the user's rights.
  • Assignment rule: an opportunity the call was started from takes precedence. Otherwise, with several candidates, the most recently changed one among those assigned to the caller wins; if there is none of their own, none is assigned (better none than a wrong one). Assign and unlink manually in the "Opportunities" block of the caller window.
  • On the opportunity: smart button "Calls" and tab "Call logs", each limited to the user's rights.
  • Callback activity for missed calls on the open opportunity (otherwise on the contact).
  • Call button "Create opportunity" (Settings › Technical › WB VoIP › Call buttons) with a title template ({kontakt}, {nummer}, {datum}) and optionally a sales team; created with the user's rights.
  • Known limit: opportunities on employees of a company contact are not found when the company itself calls.

9a. Call lists (wb_voip_kampagne)​

Call lists with a power and a preview dialer: leads from a CRM filter or a webhook are called agent by agent. The module needs wb_voip_skript (call scripts, which in turn needs wb_voip_crm), the licence products VOIP, VSKR and VKMP, and is not installed automatically. There is no predictive dialer: an agent only ever has one call. Without a valid licence no lead is lost: the webhook and the filter sync keep running; only fetching, dialling, booking and the workplace are blocked ("License expired."). The same applies if the package allows too few users (section 3, user limit).

Creating and editing call scripts and objections: script guide.

Rights. Group "WB VoIP Campaigns: Agent" fetches and dials leads (and implies the VoIP user group and "Sales › User: Own Documents Only"). Group "WB VoIP Campaigns: Manager" maintains lists, assignment groups, closing codes and the do-not-call list, reads the statistics and implies "Sales › User: All Documents"; with sale installed managers therefore see all quotations and orders. Agents read all entries of their lists including the phone numbers; they see an opportunity only while they are working on it (edit lock) or are responsible for its callback, plus whatever the CRM rules allow anyway (e.g. opportunities without a salesperson). Lists are separated per company; an opportunity without a company that appears in the lists of several companies is protected only by the per-number lock.

Create a list​

  1. Menu Call lists › Configuration › Call lists › New. Name, company, optionally a call script and managers.
  2. Mode: Preview shows the lead and waits for "Call". Power starts a countdown after each result (wrap-up time, default 15 s) and then dials the next lead itself.
  3. Tab Source: a filter on opportunities (domain editor). Matching opportunities are taken over as entries on a regular basis; "Sync filter now" triggers it. Entries can also be added and removed by hand.
  4. Tab Agents: users and/or sales teams.
  5. Tab Calling rules: call days and hours in the time zone of the company (default Mon-Fri, 09:00-20:00), maximum attempts (default 5), the list's waiting time (default 3 days, overridable per result, e.g. busy 30 minutes) and the consent types that allow dialling (default: only "Explicit consent"). "When exhausted" sets a stage and tags once all attempts are used.
  6. Tab Closing codes: per code a base result (reached, not reached, voicemail, busy, wrong number) and a follow-up: back to the pool, callback, next stage (triggers the seller assignment), mark as lost, do not call again or remove from the list. Callbacks stay with the agent (with an activity that is marked done when the callback is booked); one that is a working day (Mon-Fri) overdue goes back to the pool and its activity is deleted.
  7. A lead is given to one agent only and is locked when fetched (10 minutes without action; while the card is open the workplace renews the lock every 4 minutes). Right before dialling the workplace asks the server whether the agent still holds the lead and may call it; otherwise, and while another call is running, it does not dial. If the licence expires during a call, the result cannot be booked; the lock then ends with the cron after at most 10 minutes.

Power and skipping. Power fetches the next lead at the start of the countdown so that the card and "Skip" are available. Pause, a hidden tab, an incoming call or leaving the workplace release the lead at once. "Skip" in preview asks for no reason (free text would end up on the opportunity). A released or skipped entry rests for 10 minutes so that it does not come back immediately. The phone runs in the softphone tab only; other tabs point to it.

Workplace variants. A: full screen (menu "Call lists"), B: tab "Lists" in the softphone (preview collapsed), C: bar on the opportunity form (the bar may move on to the next lead by itself). Every user chooses in "My Preferences › Telephony"; the company default can be set by administrators only in Settings › WB VoIP › "Call lists" (default: full screen). A change takes effect after reloading the page.

Consent is a hard check in power and preview mode: a lead without a consent type the list accepts is never fetched and "Call" is blocked. The type "None" cannot be selected for a list; "verbally on the call" does not exist.

  • UWG. Advertising calls to consumers need prior express consent (§ 7 (2) no. 1 UWG, Germany); the evidence must be kept (§ 7a UWG). "Existing customer" and "Presumed B2B interest" apply to companies (or contacts of a company) only and cannot be chosen otherwise. Type, time, wording and source are on the opportunity (tracked). Before a consent is overwritten (by hand or by a new webhook submission) and when the opportunity is deleted, a minimal evidence (number only as a keyed hash, type, time, wording, source) is kept for five years after the consent or its last use, whichever is later; every booking and call of the number extends it. A daily job deletes it afterwards. A new consent type without a date gets the time of the change; "None" has no date.
  • Never suppress the caller number. Advertising calls with a suppressed number are prohibited and can be fined. Make sure the trunk sends the number; the module does not check it.
  • Do-not-call list (Call lists › Configuration › Do-not-call list): normalised numbers per company. "Do not call again" adds to it; listed numbers are never fetched, not even in preview mode.
  • This section is not legal advice; the operator is responsible for lawful calling.

Webhook (example: Meta Lead Ads via Zapier or Make)​

In the tab Webhook press "Generate webhook URL", copy the URL at once (it is shown only once, Odoo stores a hash only) and tick "Webhook active". The URL looks like https://<your-odoo>/wb_voip/kampagne/eingang/<secret>.

  • The URL contains the secret: treat it like a password. Odoo's own access log masks it (/wb_voip/kampagne/eingang/***); logs of the sender or of a proxy in front of Odoo do not. If it shows up anywhere, generate a new one with "Generate new webhook URL"; the old one stops working.
  • Only POST with JSON (application/json) or a form (application/x-www-form-urlencoded) is accepted; multipart/form-data is refused with 400. The reply is always {"ok": true} or {"ok": false} with status 200, 400, 404, 413, 429 or 500, never with details. Limits: 64 KiB per request, 200 fields, 60 requests per minute per list and 20 per minute per IP. Control characters (except tab and line breaks) and lone UTF-16 surrogates are removed from field names and values.
  • A phone number or an email address is required, otherwise 400.

Set up in Zapier ("Webhooks by Zapier › POST") or Make ("HTTP › Make a request"), trigger "New Lead" of Facebook Lead Ads, payload type JSON:

Webhook fieldContent from the lead
idMeta lead id (idempotency key)
namefull name
telefonphone number
emailemail address
firmacompany name (if the form asks for it)
einwilligung_textthe form's consent text, word for word
einwilligung_artausdruecklich if the form asks for explicit consent
einwilligung_zeittime of the submission (ISO 8601 or Unix seconds)
utm_source, utm_campaigne.g. meta and the campaign name

Field mapping. Without a mapping an incoming field is used if it carries the name of the target (vorname, nachname, name, telefon, email, firma, einwilligung_art, einwilligung_text, einwilligung_zeit, utm_source, utm_campaign, notiz). If your fields have other names (e.g. full_name, phone_number), enter one row per field under "Webhook field mapping": incoming field and target. The note and fields without a target go to "Webhook details" on the opportunity: readable by managers only and shown on the card to the agent who holds the lead; when a closing code hands the lead to a seller they are appended to the description (they may contain special-category data, and opportunities without a seller are visible to all agents). For an opportunity that already has a seller they go to the description directly.

Send the consent. Send the consent text of the form with every lead: it is your evidence. einwilligung_art takes only ausdruecklich, bestandskunde or b2b_mutmasslich; if it is missing or invalid, the list's "Consent without information" applies (default "None", and the lead is then not called).

Idempotency and duplicates.

  • Send the header Idempotency-Key or the field id (at most 128 characters): a repeated key creates nothing new. Keys are remembered for 30 days, the retention of the intake log (Call lists › Configuration › Webhook intake).
  • Contacts are never modified. A contact is found by phone number or email address and only linked. If the email address matches but the number does not, the opportunity is created without a contact and carries the hint "Possible duplicate contact."; a manager links it by hand.
  • If someone submits again whose opportunity is still on the list, only a note is added (plus a new valid consent). If the entry is exhausted and the submission brings a valid consent other than "None", the entry is reopened (open, attempts reset, without the waiting time of the number). An opportunity whose entry was removed from the list is not reopened: only a note is added, and the manager decides.
  • Parallel submissions of the same person without an idempotency key: while one is being processed (per list and number or email), Odoo retries the other one automatically (whole request, up to five attempts with growing pauses); the retry finds the first opportunity. A small gap remains: a submission that started just before the first one finished can still create a second opportunity. Send an idempotency key (header Idempotency-Key or field id) where the tool repeats submissions.

Assignment groups (seller assignment)​

When a closing code moves the stage on, the lead goes to a seller; the agent is not automatically the seller. Tab Assignment of the list: Agent himself (the agent becomes the seller), Dynamic (one group without agents hands out at random), 1:1 (one group per agent with one seller) or n:m (groups of agents and sellers). Each group distributes Random, Round robin or Workload (open opportunities of the seller, optionally weighted); "Takes leads" takes a seller out temporarily. An agent is in at most one group per list; agents without a group use the standard group (a group without agents). If no seller is available, the agent becomes the seller and the managers get a hint. The seller receives an activity "New lead from …" with a fixed text; the agent's note stays in the call log only.

The filter of a list is validated with the rights of the editor when saved, but the periodic sync runs with elevated rights: a filter can later match more opportunities than at save time. Check filters carefully and keep the group of managers small.

Statistics, works council and retention​

Call lists › Configuration › Statistics (pivot and graph, managers only): open entries, reached, closings, attempts and the average duration of reached calls. The duration comes from the call log; with wb_voip_ansitel it comes from the PBX call list, but that source applies only after an update (-u wb_voip_kampagne). The objection frequency is counted per script of the list, not per list: lists with the same script share it.

  • Per-agent analysis exists only with the company switch "Statistics per agent" in Settings › WB VoIP › "Call lists" (administrators only, off by default). Without it the statistics contain no agent; once switched on, the per-agent data of the whole retention period of the bookings becomes visible, not only new data. A list with a single agent is attributable to one person even without the switch.
  • A performance evaluation of individual employees is a technical means of monitoring behaviour and performance and requires co-determination where a works council exists (§ 87 (1) no. 6 BetrVG, Germany); under the GDPR you also need a legal basis and must inform the employees (Art. 6, 13 GDPR). Involve the works council before you set the switch or build lists for single agents.
  • Retention. A daily job deletes the booking rows of the statistics (one per booked result) after wb_voip_kampagne.buchung_tage days (system parameter, default 365; invalid values count as 365). The webhook intake log is deleted after 30 days, consent evidence after five years.

10. PBX integration (wb_voip_anlagen, adapters)​

wb_voip_anlagen provides quick keys (call forwarding, Do not disturb, voicemail), devices and the call-list sync independent of the PBX type. An adapter (contract wb.voip.adapter) decides how the PBX is addressed. On the PBX (Settings › Technical › WB VoIP › PBXs, group "PBX interface") a system administrator picks the type:

TypeModuleQuick keysRead stateCall list (sync)
empty (no interface)nono
Feature codes (no interface)wb_voip_anlagenyes, the softphone dials codesno, only what was last switched through Odoono
Ansitelwb_voip_ansitelyes, via the REST interfaceyesyes
Asterisk / FreePBXwb_voip_asteriskforwarding and Do not disturb via AMI (AstDB), no voicemailyesyes, from the CDR database

System administrators do all steps except the test. The target checks (toll fraud protection) below apply to every type.

"Feature codes" adapter (PBX without an interface)​

For PBXs that switch forwarding, Do not disturb or voicemail through feature codes (star codes) but offer no interface. Odoo does not call the PBX; the user's own softphone dials the code as a short call without a call record or call-log entry and hangs up after the announcement or after 10 seconds.

  1. Type: on the PBX set "PBX interface" to "Feature codes (no interface)" and tick "Interface active".

  2. Codes: pick a feature code template (fills the fields; adjust in the form, then save) or enter the codes. Each key has "Code: … on" and "Code: … off". {ziel} stands for the forwarding target (exactly once in the code). Only digits, * and # are allowed and the code starts with * or #. A key exists only if both its on and off code are set.

  3. Templates (each with a manufacturer source; checked against the documentation, not tried on a real PBX, so test on your own PBX before relying on them):

    TemplateForwarding on / offDo not disturb on / offVoicemail
    Asterisk / FreePBX*72{ziel} / *73*78 / *79no codes
    Auerswald COMpact*21*{ziel}# / #21###8*211# / ##8*210#no codes
    AVM FRITZ!Box*21*{ziel}*# / *21**#no codesno codes

    Without a confirmed code the field stays empty and that key does not exist on this PBX. The PBX often requires a permission of the extension for external targets (Auerswald), and with IP phones the FRITZ!Box accepts only a few keypad codes (see its manual).

  4. Extensions, "My mobile phone", keys: as for Ansitel (below, steps 2 and 5); no Ansitel extension or token is needed. For each switch the server checks rights, target and toll protection as with an interface and hands the code to the user's own softphone. This protects switching through the keys only: feature codes dialled by hand (dial field, desk phone) are not checked by Odoo, so also restrict forwarding targets and feature codes per extension at the PBX.

Limits:

  • The state is not readable from the PBX. The keys show the state last switched through Odoo, marked "Not confirmed by the PBX". A change made on a desk phone, by another system or by the PBX itself is not seen. A code counts as switched when the PBX answers the call; otherwise the key reports that the call did not connect.
  • The codes carry no ring time: a voicemail key "after ring time" dials the same code as "immediately".
  • Internal forwarding targets (extensions, ring groups) and the call list (sync, "answered elsewhere" with device) are not available without an interface.
  • While a code is dialled (at most 10 s per code) the softphone is busy: incoming calls get 480.

Ansitel adapter (wb_voip_ansitel)​

For Ansitel PBXs through their REST interface: quick keys with the real state and sync with the call list. Does not install itself, depends on wb_voip_anlagen.

  1. Interface: on the PBX set "PBX interface" to "Ansitel", tick "Interface active", enter the REST URL (https only, e.g. https://pbx.example.com/awi/api/rest) and the central token (stored only as ciphertext, never shown). Check the call-list time zone (default Europe/Berlin). Then "Test connection" (reads the device list).
  2. Extensions: on the user (tab "Telephony") set the extension; unique per PBX. Anyone who is to switch voicemail through their own access gets a personal token. Changing a user's PBX deletes their extension and personal token; if someone without system rights changes a PBX's URL, its tokens are deleted.
  3. Voicemail token: order: personal token; otherwise the central token if system administrators ticked "Switch voicemail through the central token" on the user and the extension belongs to the central token; otherwise the central token if it has exactly one extension and it is the user's. Otherwise the voicemail key stays grey with a hint.
  4. Devices: on the PBX "Load devices from PBX" (creates missing devices from the device list) and check the assignment to users (Settings › Technical › WB VoIP › Devices). Never enter the trunk line as a device.
  5. Keys: Settings › Technical › WB VoIP › Softphone keys. Delivered are "→ Mobile", "Do not disturb" and "VM" (German: "AB"). Each user enters "My mobile phone" under My Preferences › Telephony. Display per user (setting "Quick keys"): in the softphone, as a slim bar at the edge, or both; the change takes effect after reloading. Voicemail, forwarding and Do not disturb exclude each other.

Update of wb_voip_ansitel 19.0.2.x to 19.0.3.0.0​

With 19.0.3.0.0 the neutral part moves to wb_voip_anlagen. When wb_voip_ansitel is updated, wb_voip_anlagen is installed first as a new dependency; its pre_init_hook takes over the data (keys, devices, extensions, key bar, "My mobile phone", reconciliation state, calls, parameters), sets the PBX type to "Ansitel" and restores keys and cron. No data is lost.

before (up to 19.0.2.x)now
ansitel_aktiv (PBX)adapter_aktiv
ansitel_cdr_stand, ansitel_cdr_ababgleich_stand, abgleich_ab
ansitel_geraet_idsgeraet_ids
ansitel_interne_zieleinterne_ziele
wb_voip_ansitel_nebenstelle (user)wb_voip_nebenstelle
wb_voip_ansitel_tastenleiste (user)wb_voip_tastenleiste
wb_voip_cdr_linkedid (call)wb_voip_abgleich_gruppe
system parameter wb_voip_ansitel.ausland_erlaubtwb_voip_anlagen.ausland_erlaubt
cron "WB VoIP Ansitel: Abgleich mit der Anrufliste""WB VoIP: Abgleich mit der Anrufliste"

The old field names (ansitel_aktiv, ansitel_cdr_stand, ansitel_cdr_ab, ansitel_geraet_ids, ansitel_interne_ziele, wb_voip_ansitel_nebenstelle, wb_voip_ansitel_tastenleiste, wb_voip_cdr_linkedid on the call) were removed in wb_voip_ansitel 19.0.4.0.0 (they had forwarded to the new ones before). The update switches saved filters, export templates, window actions and record rules to the new names; customer views (without XML ID) are rewritten too; defaults (ir.default), "update record" actions (field and path), automation trigger fields and filter domains and related/depends of manual fields are re-pointed to the new names; Python code (server actions, compute) is not rewritten and only named in the log (ids); whatever cannot be matched is logged, not dropped silently (wb_voip_ansitel 19.0.4.0.0 ... server actions with code), so adapt them and your own scripts by hand. To switch the interface on, set the PBX type "Ansitel" and adapter_aktiv.

How to update: stop the Odoo server and its crons before -u, run the update without a pause and restart the server immediately afterwards (otherwise old code runs against renamed columns; a running cron can abort the installation with a serialization error, in which case nothing is written and the run is repeated). Back up first (database, code, filestore); update wb_voip and wb_voip_ansitel together and add other installed wb_voip_* modules to the -u list. The way back is restoring the backup with the old code; a -u with old code does not undo the renames.

Forwarding targets (toll fraud protection)​

Forwarding makes the PBX dial out at the line owner's expense. WB VoIP therefore checks every target when saving and each time a key is switched:

  • digits 0–9 only, at least 6 digits, a valid phone number; the normalized form (+49…) is stored;
  • no emergency, short-code or directory numbers (110, 112, 115, 116xxx, 118xx);
  • no special-rate and premium numbers (Germany among others 0137, 0138, 0180–0194, 0700, 0900; Austria 0900, 0901, 0930, 0939; Switzerland 0900, 0901, 0906); satellite services (+881, +882, +883) are always blocked;
  • targets with a country code other than the PBX's country only if the system parameter wb_voip_anlagen.ausland_erlaubt is 1 (default: blocked). The premium and emergency blocks still apply, but foreign premium numbers are not excluded by that.

Limit: Odoo secures switching through its keys, not the PBX. Feature codes dialled by hand (dial field, desk phone) and forwardings configured at the PBX itself are not checked by Odoo. Also restrict forwarding targets and feature codes per extension at the PBX (block premium and foreign destinations).

Internal extension or ring group (target kind "Internal extension"): 2 to 6 digits, no leading 0, no emergency/short numbers. Valid only if the target is listed under "Additional internal targets" on the PBX (ring groups, queues; one number per line) or the PBX knows a peer with exactly that internal number. The device list is cached for up to 10 minutes. The user's own extension is blocked as a target. A ring group the user is a member of is not detected as a loop.

Only system administrators set fixed and internal key targets; VoIP administrators maintain label, kind and order. Dialing uses digits only; a leading "+" becomes "00".

Call list sync (Ansitel adapter)​

The cron "WB VoIP: Abgleich mit der Anrufliste" (call list sync) runs every 5 minutes for each active PBX whose adapter delivers a call list (Ansitel: with a token; Asterisk/FreePBX: see below) and reads the call list (getcdr, at most 1000 rows per request). Calls Odoo did not see (Odoo was closed) and calls answered on a desk phone or through forwarding appear as "answered elsewhere" with device and duration.

The call list is authoritative: a call that only the browser reported as "answered elsewhere" (CANCEL with Reason header, without device and without colleague) but that nobody answered according to the call list becomes "missed" (log "not reached", callback activity, entry in "Missed"). If the call list names a device or a colleague, it stays "answered elsewhere".

Queues (from wb_voip_ansitel 19.0.2.0.4, Ansitel): if a member answers, the other members see the call as "answered elsewhere" with device (no "missed", no callback activity). If no member answered (caller hung up, voicemail), it stays "missed".

  • Window: from = state − 4 hours, to = now − 60 seconds, at most 6 hours per run; the first run reads the last 30 minutes.
  • The sync also runs without a valid license (it only reads and never switches anything on the PBX).
  • Limits: if the PBX returns more than 50 pages per request, the window is halved; if that is not enough, that piece is skipped (error in the log; those calls are then missing). The doubled hour in autumn is only considered when matching softphone calls. A mobile voicemail behind a forwarding counts as forwarding. The team status of desk phones does not come from the PBX and is therefore missing.
  • Privacy: time, duration, device and the other number are imported (also for unknown numbers, unassigned). The retention period from section 8 applies. Inform employees (Art. 13 GDPR) and respect co-determination (§ 87 (1) no. 6 BetrVG).
  • After setup, watch the first runs; errors are in the Odoo log (identifiers and error types only, never token or URL).

Asterisk/FreePBX adapter (wb_voip_asterisk)​

For Asterisk and FreePBX PBXs: forwarding and Do not disturb with the real state through the Asterisk Manager Interface (AMI), devices from the PJSIP endpoints and the sync with the call list from the CDR database (MySQL/MariaDB or PostgreSQL). Free of charge, the WB VoIP license applies. Does not install itself, depends on wb_voip_anlagen.

Odoo writes the states to the AstDB under the keys of the FreePBX feature codes: DND/<extension> = YES (Do not disturb) and CF/<extension> = target (immediate forwarding); switching off deletes the key. Key, feature code on the desk phone (*72/*73, *78/*79) and dial plan therefore show the same state. FreePBX evaluates these keys itself. With plain Asterisk (profile "Asterisk") your own dial plan must evaluate the same keys (e.g. DB_EXISTS(DND/${EXTEN})); Odoo only sets the keys.

1. AMI user on the PBX. Plain Asterisk: in manager.conf; FreePBX: in manager_custom.conf (not in the manager.conf generated by FreePBX, which FreePBX rewrites when it applies the configuration):

[wbvoip]
secret = <long, random>
deny = 0.0.0.0/0.0.0.0
permit = <IP of the Odoo server>/255.255.255.255
read =
write = system ; only with lamps switched on: write = system,call
  • Residual risk: with write = system Asterisk also allows actions such as GetConfig (reads configuration files, including SIP passwords) and ModuleLoad; Asterisk cannot block single actions. Odoo only sends DBGet, DBPut, DBDel, PJSIPShowEndpoints and Ping (plus Challenge, Login, Logoff), with lamps switched on also Setvar, and never any other action (allow list in the code).
  • Treat the account like an administrator password: permit only for the IP of the Odoo server (if Odoo runs in Docker behind NAT, the PBX sees the host's address), switch on TLS ([general]: tlsenable = yes, usually port 5039, certificate of the PBX). In Odoo TLS is therefore the default (port 5039); without TLS the form shows a warning. In Odoo the secret is stored encrypted and only for system administrators.
  • The lamps on the desk phone (switch "Device state lamps" on the PBX, profile FreePBX only, default off) set Custom:DND<extension> and Custom:CF<extension> and additionally need write = call. They only work for purely numeric extensions with at most 20 digits. If setting them fails, the log shows a warning; the AstDB stays authoritative.

2. Read-only user for the CDR database. Only SELECT on the one table:

  • MySQL/MariaDB (FreePBX: database asteriskcdrdb, table cdr):

    CREATE USER 'wbvoip_cdr'@'<Odoo IP>' IDENTIFIED BY '<long, random>';
    GRANT SELECT ON asteriskcdrdb.cdr TO 'wbvoip_cdr'@'<Odoo IP>';

    With TLS also ALTER USER 'wbvoip_cdr'@'<Odoo IP>' REQUIRE SSL;.

  • PostgreSQL (cdr_pgsql):

    CREATE ROLE wbvoip_cdr LOGIN PASSWORD '<long, random>';
    GRANT CONNECT ON DATABASE <cdr database> TO wbvoip_cdr;
    GRANT USAGE ON SCHEMA public TO wbvoip_cdr;
    GRANT SELECT ON public.cdr TO wbvoip_cdr;

    In pg_hba.conf only one line hostssl <cdr database> wbvoip_cdr <Odoo IP>/32 scram-sha-256.

Odoo itself sets the session to read-only and limits every query: PostgreSQL 15 seconds (statement_timeout), MariaDB/MySQL 12 seconds (max_statement_time or max_execution_time), i.e. before Odoo's own read timeout of 15 seconds. If the server aborts, the sync shrinks the time window. For a CDR table you created yourself, add an index on calldate if it is missing (the query filters and sorts by it), e.g. CREATE INDEX cdr_calldate ON cdr (calldate);. Without the index the server reads the whole table on every run and hits the time limit on large tables.

3. Firewall: make AMI (5038/5039) and the database (3306/5432) reachable only from the IP of the Odoo server, never from the internet.

4. In Odoo (system administrators, PBX › "PBX interface" = "Asterisk / FreePBX", "Interface active"):

  1. Asterisk profile: "FreePBX" or "Asterisk" (plain Asterisk with your own dial plan).
  2. AMI: host (name or IP, without scheme and port), port, "AMI with TLS" (on by default, port 5039; certificate and host name are checked, for your own CA enter its CA certificate in PEM format), AMI user and AMI secret. Switching TLS off proposes port 5038 in the form (only while 5039 is still entered) and shows a warning: without TLS the AMI login and all forwarding targets travel unprotected.
  3. Trunks: the names of the PJSIP endpoints of the trunks, one per line (FreePBX: Connectivity › Trunks). Channels of the technologies DAHDI and IAX2 always count as trunk. Without an entry there is no call-list sync, because Asterisk CDR rows carry no direction.
  4. CDR database: type (MySQL/MariaDB or PostgreSQL), host, port, database, table (optionally with schema, e.g. public.cdr), user, password, TLS (on by default) with an optional CA certificate and the CDR time zone (below).
  5. "Test connection" (VoIP administrators too): logs in to the AMI, counts the endpoints and then reads the CDR table. Odoo checks the CDR part even if the AMI is not set up or fails; the message then names both parts, e.g. "AMI: Asterisk rejects the AMI login. Call list readable." If only the CDR database is set up (no AMI), "AMI: Asterisk is not set up. Call list readable." counts as success; if the AMI fields are only partly filled (e.g. host without secret), the same message shows as a warning.
  6. "Load devices from PBX" (system administrators only): creates a device for every PJSIP endpoint except the trunks and assigns it to a user via SIP user or extension.
  7. Extensions and keys as for Ansitel (above, steps 2 and 5). The extension on the user must be the name of the PJSIP endpoint.
  8. PyMySQL (MySQL/MariaDB only): the Python package must be installed on the Odoo server (pip install PyMySQL, Debian/Ubuntu python3-pymysql, in your own Docker image via the Dockerfile). Without it the module installs and the keys work; only the sync is missing, and "Test connection" reports "Python package PyMySQL is missing on the server.". PostgreSQL uses psycopg2, which ships with Odoo.

Limits and notes:

  • No voicemail: FreePBX has neither an AstDB key nor a feature code for "voicemail on/off". The voicemail key is not shown for Asterisk PBXs (hidden, not grey).
  • Identifier = endpoint name = extension. This is how FreePBX works in "Extensions" mode. Named endpoints without a matching extension (e.g. FreePBX "Device and User") give no identifier; the keys then stay grey, and Odoo never writes a guessed key.
  • Immediate forwarding only (CF). Forwarding on busy (CFB) and on unavailable (CFU) are left untouched.
  • Time zone: "CDR time zone" must match the PBX's /etc/localtime, because Asterisk takes the time zone from there and not from the environment variable TZ. Asterisk reads it only at start-up: after changing the PBX's time zone, restart Asterisk. If Asterisk writes UTC (usegmtime = yes in cdr_adaptive_odbc.conf or timezone = UTC in cdr_pgsql.conf), choose "UTC" in Odoo. A wrong zone shifts the calls by hours, and the sync then finds nothing.
  • Hosts: ASCII names only (internationalized domains as xn--…), no IPv6 zone IDs. Private networks (RFC 1918, ULA) are allowed. Loopback, link-local (including 169.254.169.254), multicast and reserved addresses are blocked. Only the system parameter wb_voip_asterisk.loopback_erlaubt = 1 allows loopback. Known limit: NAT64 and 6to4 addresses are not unpacked and checked against their IPv4 target.
  • TLS to the CDR database:
    • MySQL/MariaDB: with TLS, Odoo refuses a server that does not offer TLS ("TLS to the CDR database failed (not offered or certificate not valid)."). Without TLS, Odoo connects to the checked IP (no DNS rebinding). With TLS, PyMySQL verifies the host name and therefore connects by name; a small rebinding window remains between check and connection.
    • PostgreSQL: with TLS sslmode=verify-full against the entered CA certificate (otherwise the system CAs). A certificate error currently only shows as "The CDR database is unreachable.". PostgreSQL with TLS is not lab-tested.
    • Without TLS the CDR password can be intercepted on the network; with MySQL caching_sha2_password the client even fetches the server key unprotected. The form therefore warns as soon as a CDR host is entered and TLS is off. Switch TLS off only in a sealed-off network (own VLAN, firewall).
  • Sync: as for Ansitel (section above: window, quiet time, matching, privacy). Plain Asterisk rings queue members directly, FreePBX through Local channels; both are recognized. A mobile voicemail behind a forwarding counts as forwarding (as with Ansitel). Dial plan shapes that differ result in "missed" instead of "answered elsewhere" when in doubt, not in an error.
  • Credentials protect themselves: if someone without system rights changes a connection field (host, port, TLS, CA certificate, for the CDR database also type and database) through other code (superuser rights), Odoo deliberately discards the stored secret or password. Enter it again.
  • Messages and log never name host, user, secret or password, only the action name and the kind of error.

Tested in our own test setup against plain Asterisk 22.10.1 (Debian package; CDR in MariaDB 11.4 and PostgreSQL 17) and FreePBX 17 with Asterisk 22.12.0 (MariaDB), see Kompatibilität.

11. Troubleshooting​

SymptomCause and remedy
Icon yellow, "Phone is running in another tab"The PBX accepts only one registration per extension, so only one Odoo tab holds the phone. Other tabs hand dialing over to it. If that tab closes, the next one takes over. The browser must support navigator.locks and BroadcastChannel.
Icon red, "Not connected", registration rejectedWrong SIP password or extension, the extension is registered elsewhere, or the PBX refuses the registration. Re-enter the password and check the PBX log. WB VoIP retries after 3, 10, 30 seconds and then every minute; "Reconnect" in the softphone retries at once.
Immediately "Not connected" with no PBX messagewss:// address wrong or unreachable, PBX certificate invalid (see below), firewall or proxy blocks WebSocket. Look at the WebSocket error in the browser console (network tab).
"Telephony is not set up yet." or "The softphone is not configured on the server."Second message: WB_VOIP_FERNET_KEY is missing from the Odoo process (section 4). First message: telephony is not fully set up for the user (section 6).
"The phone is not set up for this user."Enter PBX and SIP user on the user; check the group "WB VoIP: User".
No audio or one-way audioMedia is not getting through (ICE). Check: microphone allowed in the browser; the PBX relays media itself or a reachable stun: server is entered on the PBX; the firewall allows the media ports (UDP, the PBX's range). Behind symmetric NAT with no media relay on the PBX, enter a TURN server (section 5). "Check PBX" shows whether audio arrives.
Call shows as "missed" although a colleague answered (ring group)The PBX sends no Reason header "Call completed elsewhere" when it cancels, or the detection is switched off at the PBX. The other way round (everything "answered elsewhere"): switch the detection off. Then reconnect.
Keypad tones (DTMF) do not arriveChange the DTMF method at the PBX (RTP first or SIP INFO first), then reconnect.
"Connect" (attended transfer) failsThe PBX does not support REFER with Replaces. Switch off "Attended transfer" at the PBX; the blind transfer stays.
Outside numbers are dialled wronglyCheck dial format and trunk prefix at the PBX (section 5); settings take effect after reconnecting.
Certificate error on wss://The browser checks the PBX TLS certificate like any website: valid, not expired, name matches the URL host, complete chain. Self-signed certificates are rejected. Renew the certificate on the PBX; to test, open the https:// address of the same host in the browser.
No microphone prompt, or "browser does not support the softphone"Odoo is not served over HTTPS (no secure context) or the browser is too old.
"License package too small"The database has more active internal users than the package allows (section 3, user limit). Upgrade the licence or archive users.
"License missing or expired"License not activated, expired, or the database does not match the licensed instance (section 3). Calling and registering are blocked, call logs stay readable and editable. quick keys stay grey. License status under Settings › WB Lizenzen shows the license server's message.
Feature codes: key reports that the call did not connectThe PBX did not accept the code: check the code against the PBX manual, that the extension may dial it (permission for external targets), that the softphone is connected and idle (otherwise 480). Keys marked "Not confirmed by the PBX" show the state last switched through Odoo, which can differ from the real one; check on the desk phone when in doubt.
Feature codes: a key is missingA key needs both an on and an off code; the template has no code for that key (e.g. voicemail).
Ansitel: keys grey, hint that the PBX is unreachableCheck URL and token on the PBX, "Test connection". https only with a valid certificate; 10 s timeout, no redirects, no proxies. After PBX errors no further calls are made until the PBX answers.
Ansitel: key grey with "Please enter your mobile phone under My Preferences › Telephony.""My mobile phone" is missing or fails the target check (premium, emergency, foreign number; section 10).
Ansitel: voicemail key greyNo personal token and no release for the central token (section 10, step 3).
Ansitel: calls missing from the syncIs the cron active? Check extension and device assignment on the user, the call-list time zone, and search the log for skipped windows.
Asterisk: "Asterisk rejects the AMI login." or "Asterisk is unreachable."Check AMI user, secret and permit (the IP the PBX sees for Odoo); firewall for 5038/5039; with TLS the certificate, host name and CA certificate. "The PBX address is not allowed." or "The CDR database address is not allowed.": loopback or a blocked address range (section 10).
Asterisk: "TLS to Asterisk failed (certificate not valid or TLS not offered on this port).""AMI with TLS" is on, but the port does not speak TLS (5038 instead of 5039, tlsenable missing), the certificate is expired or from an unknown CA (enter the CA certificate in PEM format), or the host name in the field does not match the certificate. Retrying does not help; change the setup.
Asterisk: "Asterisk refused the action (check the permissions of the AMI user: class system, and call for lamps)."The AMI user lacks write = system (lamps: system,call), or the PBX refuses the action for another reason (module not loaded, e.g. res_pjsip for PJSIPShowEndpoints). After changing manager.conf or manager_custom.conf run manager reload.
Asterisk: "Asterisk sent an unintelligible response."No AMI answers on the entered port (another service, e.g. SSH or HTTP), or a proxy alters the answer. Check host and port (AMI: 5038, with TLS 5039).
Asterisk: "The call forwarding target is not valid for Asterisk."The target of the key or of "My mobile phone" has, in dialling form, more than 32 characters or characters other than digits, *, # and +. Correct the target on the key or on the user.
Asterisk: "The CDR time zone is unknown on the server."The chosen time zone is missing on the Odoo server (system package tzdata or Python package tzdata). Install it or choose another zone.
Asterisk: "TLS to the CDR database failed (not offered or certificate not valid)."MySQL/MariaDB offers no TLS (have_ssl, certificate in the server configuration), the certificate is expired or from an unknown CA, or the host name does not match. Odoo then sends no login data. PostgreSQL currently reports certificate errors as "unreachable".
Asterisk: keys greyThe user's extension matches no PJSIP endpoint (identifier = endpoint name), or the AMI is unreachable. There is no voicemail key for Asterisk.
Asterisk: calls missing from the syncTrunks entered? Does "Test connection" report "Call list readable"? Check the CDR time zone against the PBX's /etc/localtime (restart Asterisk after changing it); for MySQL/MariaDB PyMySQL on the server.
Team shows "The team overview is switched off."Switch per company under Settings › WB VoIP (mind the active company).
A call rang but nothing under "Missed"If no Odoo tab with the phone is open, Odoo does not learn of the call (except through the call-list sync of an adapter, e.g. Ansitel or Asterisk/FreePBX). If the tab is closed while ringing, the cleanup job ends the call after 4 hours as "failed".

For license or product problems: support@wissen-beratung.de. The Odoo log never contains credentials; for a bug report the time, user and the softphone message are enough.