You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NethVoice Proxy: trunk Rejected after DNS errors or slow REGISTER #8356
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
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
api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice-proxy:pr-251.261-1.ff0bec2","instances":["nethvoice-proxyX"],"force":true}'
Activity
edospadoni commentedon Nov 23, 2026
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
Temporal response '503'and retries afterretry_interval, instead ofFatal response '478' ... stopping outbound registrationTest Case 2 - Slow provider on REGISTER
Temporal response '408' ... retrying in '60'in the Asterisk logTest Case 3 - Trunk OPTIONS
kamcmd htable.dump nvtrunkopt)Test Case 4 - Regression
Testing image: PR build of nethesis/ns8-nethvoice-proxy#251