Skip to main content

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.