Skip to content

NethVoice: choppy audio every minute after update to 1.8 #8391

Done

Description

@edospadoni

After the update from NethVoice 1.7 to 1.8, calls have choppy or metallic audio for a few seconds at the start of every minute. On a node that hosts several NethVoice instances the problem is heard on almost every call.

Steps to reproduce

  • Install NethVoice 1.7.14 on a node, better if several instances share the same node
  • Update the instances to NethVoice 1.8.6
  • Do not restart NethVoice after the update
  • Make a call that lasts a few minutes, for example a call answered through a queue
  • Inside the freepbx container run crontab -u asterisk -l

Expected behavior

The audio is clean for the whole call. The asterisk user has no scheduled jobs: NethVoice does not use the FreePBX scheduler, as in 1.7.

Actual behavior

The asterisk user has a list of scheduled jobs that FreePBX added during the first start after the update. One of them runs every minute, and it starts at second 0 on every instance of the node:

*/15 * * * * [ -e /usr/bin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/bin/fwconsole userman --syncall -q
34 1 * * * /usr/bin/fwconsole certificates --updateall -q 2>&1 >/dev/null
* 4 * * * /usr/bin/fwconsole util cleanplaybackcache -q
42 8 * * 6 [ -e /usr/bin/fwconsole ] && /usr/bin/fwconsole ma listonline --sendemail -q > /dev/null 2>&1
* * * * * [ -e /usr/bin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/bin/fwconsole job --run --quiet 2>&1 > /dev/null

The random delay does not work: the container shell always returns 0 for $RANDOM.

On a node with 4 CPUs and 12 instances the processor is fully busy for 4-5 seconds every minute (42 fwconsole processes, 34 processes waiting to run), then goes back to about 90% idle. During those seconds Asterisk cannot keep up with the audio and logs this warning, almost always in the first 10 seconds of a minute:

WARNING[387118][C-000004aa]: channel.c:1118 __ast_queue_frame: Exceptionally long voice queue length (97 voice / 97 total) queuing to Local/224@from-queue-000007b8;2

The cleanplaybackcache job runs every minute for a whole hour of the night, chosen at random between 0 and 5.

The jobs disappear when the freepbx container is created again, for example when NethVoice is restarted or updated once more. An instance that was restarted after the update is not affected.

Components

NethVoice 1.8.6, updated from NethVoice 1.7.14. Reproduced on NethServer 8 nodes with 4 CPUs and 11-12 NethVoice instances each.

See also

Activity

  1. added this to the NethVoice 1.8 milestone on Nov 27, 2026
  2. added
    nethvoice
    on Nov 27, 2026
  3. added theissue type on Nov 27, 2026
  4. self-assigned this
    on Nov 27, 2026
  5. moved this from Todo to In Progress in NethVoiceon Nov 27, 2026
  6. edospadoni commented on Nov 27, 2026

    @edospadoni
    MemberAuthor

    Test

    PRs: nethesis/ns8-nethvoice#1343

    Setup: a NethVoice 1.7.14 instance to update, and (if available) an instance already updated to 1.8.6 whose freepbx container was never restarted after the update. Commands run inside the freepbx container (runagent -m nethvoiceX podman exec freepbx ...).

    Test Case 1 - Update from 1.7.14

    • Update the 1.7.14 instance to the testing release
    • crontab -u asterisk -l prints no crontab for asterisk
    • grep -A1 'function installCrontab' /var/www/html/freepbx/admin/libraries/BMO/Cron.class.php shows a line with only return; (the class that does nothing is in place). Note: the copy under modules/framework/amp_conf/ exists only until FreePBX installs the framework module again, then FreePBX removes that folder: a missing file there is expected
    • After some minutes the journal of the instance has no crontab (asterisk) or fwconsole job --run lines

    Test Case 2 - Instance already affected

    • Before the update, crontab -u asterisk -l lists the FreePBX jobs (fwconsole job --run every minute)
    • Update the instance to the testing release
    • crontab -u asterisk -l prints no crontab for asterisk, and the grep check of Test Case 1 passes

    Test Case 3 - Regression

    • Apply a configuration change from the wizard (reload): no error, and the asterisk crontab is still missing
    • In the FreePBX advanced interface, save a Backup with scheduling enabled: it is saved without errors
    • Calls, queue statistics reset and certificates keep working as before

    Testing release: 1.8.7-testing.28 (nethesis/ns8-nethvoice#1343)

    ghcr.io/nethesis/nethvoice:1.8.7-testing.28
    
    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice:1.8.7-testing.28","instances":["nethvoiceX"],"force":true}'
    
  7. added
    testing
    on Nov 27, 2026
  8. moved this from In Progress to Testing in NethVoiceon Nov 27, 2026
  9. removed their assignment
    on Nov 27, 2026
  10. removed their assignment
    on Nov 27, 2026
  11. added
    verified
    on Nov 27, 2026
  12. removed
    testing
    on Nov 27, 2026
  13. moved this from Testing to Verified in NethVoiceon Nov 27, 2026
  14. edospadoni commented on Nov 27, 2026

    @edospadoni
    MemberAuthor

    A second effect of the same scheduled jobs (ticket 208177): the Queue Manager disappears from NethVoice CTI from time to time, and opening it shows "Reserved page". It affects only instances updated from 1.7 that still have the asterisk crontab.

    The userman --syncall job runs every 15 minutes. When the display name of a user changed, it starts a FreePBX reload. Jobs started by cron do not have the environment variables of the container, so the reload finds no subscription and writes "qmanager": {"value": false} in /etc/nethcti/profiles.json, while the permissions of the single queues stay enabled. The permission comes back at the next configuration apply from the wizard, and is lost again at the next reload started by cron.

    No additional change is needed: without the crontab (nethesis/ns8-nethvoice#1343) the reload is no longer started by cron.

    Test Case 4 - Queue Manager permission

    • On an instance with a subscription, updated from 1.7.14 to the testing release, enable Queue Manager in a CTI profile and apply the configuration
    • Change the display name of a user of that profile in the user domain and wait more than 15 minutes
    • grep -o '"qmanager":{"value":[a-z]*' /etc/nethcti/profiles.json inside the freepbx container still shows true for that profile, and the Queue Manager is still visible in NethVoice CTI
  15. edospadoni commented on Nov 27, 2026

    @edospadoni
    MemberAuthor

    Release nethesis/ns8-nethvoice 1.8.7

  16. moved this from Verified to Done in NethVoiceon Nov 27, 2026
  17. removed
    verified
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    nethvoice

    Type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions