Skip to content

NethVoice Proxy: trunk Rejected after DNS errors or slow REGISTER #8356

Open

Description

@edospadoni

When the NethVoice proxy cannot send a trunk request to the provider, or the provider answers a bit slowly, the proxy sends Asterisk an answer that makes the trunk look broken. This was found while analysing #8352.

  • When the proxy cannot resolve the provider's host name (for example during a short DNS outage), it replies 478 Unresolvable destination (478/TM) to the registration. Asterisk treats 478 as a fatal answer and, with fatal_retry_interval=0, stops the registration for good. The proxy trunk alert stores a 408 instead, which expires after 15 minutes, so the alert goes away while the trunk is still down.
  • The proxy waits only 1 second for the provider's answer to a REGISTER (FR_TIMEOUT_100). When the provider takes longer, the proxy replies with a fake 408 and the trunk stays unregistered (shown as Rejected) for 60 seconds.
  • Trunk qualify OPTIONS also wait only 1 second, so a provider that answers in 1-2 seconds is recorded as unreachable in the proxy trunk alerts.

Steps to reproduce

  • Register a trunk through the proxy
  • Make the provider's host name unresolvable for the node while the trunk refreshes its registration, or make the provider answer the REGISTER after about 1.5 seconds

Expected behavior

  • A DNS failure gets a temporary answer (5xx), so Asterisk retries after retry_interval and the trunk registers again by itself
  • The proxy waits for a slow provider's answer to REGISTER, like Asterisk does

Actual behavior

  • Fatal response '478' ... stopping outbound registration, the trunk stays Rejected
  • Temporal response '408' ... retrying in '60' when the provider answers after more than 1 second

Components

  • NethVoice proxy 1.8.0

See also

Activity

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

    @edospadoni
    MemberAuthor

    Test

    PRs: nethesis/ns8-nethvoice-proxy#251

    Setup: a NethVoice instance behind the proxy with at least one trunk with registration enabled. Run the Asterisk commands inside the freepbx container (runagent -m nethvoiceX podman exec freepbx asterisk -rx "...") and the Kamailio commands inside the proxy (runagent -m nethvoice-proxyX podman exec kamailio kamcmd ...).

    Test Case 1 - DNS failure gives a temporary answer

    • Point a registered trunk at a host name that does not resolve (or block DNS for the proxy) and wait for the registration refresh
    • Asterisk logs Temporal response '503' and retries after retry_interval, instead of Fatal response '478' ... stopping outbound registration
    • Fix the host name/DNS: the trunk goes back to Registered by itself, without saving it again

    Test Case 2 - Slow provider on REGISTER

    • With a provider that answers the REGISTER after more than 1 second (e.g. 1.5 s), the trunk is Registered
    • No Temporal response '408' ... retrying in '60' in the Asterisk log

    Test Case 3 - Trunk OPTIONS

    • A provider that answers OPTIONS in 1-2 seconds is not reported as unreachable in the proxy trunk alerts (kamcmd htable.dump nvtrunkopt)
    • A provider that never answers OPTIONS still gets a 408 (after about 2 seconds) and the alert is raised

    Test Case 4 - Regression

    • Trunks that register normally stay Registered
    • Incoming and outgoing calls through trunks work, with audio in both directions
    • Phones registered through the proxy keep working

    Testing image: PR build of nethesis/ns8-nethvoice-proxy#251

    ghcr.io/nethesis/nethvoice-proxy:pr-251.261-1.ff0bec2
    
    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice-proxy:pr-251.261-1.ff0bec2","instances":["nethvoice-proxyX"],"force":true}'
    
  7. added
    testing
    on Nov 23, 2026
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