Skip to content

NethVoice: mobile app loses its connection after a backup restore #8407

Todo

Description

@edospadoni

After a NethVoice backup is restored on another node (for example during a disaster recovery), the NethVoice mobile app loses its connection to the PBX and goes back to the QR code screen, even when all the host names (NethVoice, CTI and proxy) are unchanged. Every user has to scan a new QR code.

Steps to reproduce

  1. Install NethVoice, create a user and connect the NethVoice mobile app by scanning the QR code from the CTI settings.
  2. Back up the NethVoice application.
  3. Restore the backup on another node, keeping the same host names.
  4. Open the mobile app.

Expected behavior

The mobile app keeps working after the restore, as it did before it.

Actual behavior

The app goes back to the QR code screen. The data of the CTI middleware (the nethcti-middleware-secrets volume) is not part of the backup, so after the restore the middleware creates a new signing key (jwt.secret) and starts with no saved sessions (sessions.json). The tokens inside the QR codes are no longer accepted.

The same volume holds the two-factor authentication settings of the users: after the restore they are lost as well, and the users have to set up two-factor authentication again.

Workaround

Before the restore, copy the content of the nethcti-middleware-secrets volume from the old node, and put it back into the same volume on the new node, then restart the nethcti-middleware service.

Components

  • NethVoice 1.8.7 (reported by a partner)
  • The include list is unchanged in the current development branch

See also

Activity

  1. added
    nethvoice
    on Dec 3, 2026
  2. added this to the NethVoice 1.8 milestone on Dec 3, 2026
  3. added theissue type on Dec 3, 2026
  4. self-assigned this
    on Dec 3, 2026
  5. added
    testing
    on Dec 3, 2026
  6. moved this from Todo to Testing in NethVoiceon Dec 3, 2026
  7. edospadoni commented on Dec 3, 2026

    @edospadoni
    MemberAuthor

    Testing release: 1.8.8-testing.37 (nethesis/ns8-nethvoice#1407)

    ghcr.io/nethesis/nethvoice:1.8.8-testing.37
    

    Update command (replace nethvoiceX with the NethVoice instance):

    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice:1.8.8-testing.37","instances":["nethvoiceX"],"force":true}'
    

    Test

    Setup: a NethVoice instance with a backup destination, a second node to restore on, the same host names (NethVoice, CTI, proxy) before and after the restore. Alice has the mobile app connected with the QR code from the CTI (Settings > Mobile App); Bob has two-factor authentication enabled in the CTI. Fingerprint of the signing key, run on the node of the instance:

    runagent -m nethvoiceX podman exec nethcti-middleware sha256sum /var/lib/whale/secrets/jwt.secret
    

    Test Case 1 - Restore on another node

    • Note the fingerprint of the signing key, then run a backup
    • Restore the backup on the second node and point the host names to it
    • The fingerprint on the restored instance is the same as before
    • Alice opens the mobile app: it stays logged in (no QR code screen) and can make and receive a call
    • Bob logs in to the CTI: the one-time code is still requested and the same authenticator app works

    Test Case 2 - Update of an existing instance

    • Update an instance from 1.8.7 with the command above, keeping Alice and Bob as in the setup
    • Run a new backup after the update, then repeat Test Case 1: same results

    Test Case 3 - Backup made before the update (known limitation)

    • Restore a backup made with 1.8.7 or earlier: the signing key is generated again, Alice's app goes back to the QR code screen and Bob's two-factor authentication must be set up again. This is expected: old backups do not contain the volume, so take a new backup after the update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

nethvoicetesting

Type

Projects

  • Status
    Testing

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions