Skip to content

NethVoice Proxy: configurable SIP and SIPS ports #8287

Description

@edospadoni

Description

NethVoice Proxy accepts SIP from phones, gateways, trunks and the mobile app only on the fixed ports 5060 (UDP/TCP) and 5061 (TLS). The same values are written in several places: the proxy listeners and firewall rules, the gateway provisioning templates, the Tancredi phone templates, the NethVoice wizard and the mobile app provisioning of ctiapp-authproxy.

Some installations need different ports. For example, an on-premise AudioCodes Mediant that must be reached on UDP 5060, while phones keep registering through the proxy. Today the only option is a manual port forward that bypasses the proxy, as described in the proxy bypass guide. The guide also states that 5061 cannot be changed, because phones and the mobile app are provisioned with it.

The SIP and SIPS ports of the proxy become configurable. Every component that provisions devices reads them from the proxy, so devices follow the configured ports.

  • NethVoice Proxy
    • New optional sip_port and sips_port options of configure-module, default 5060 and 5061, in the Advanced section of the settings page.
    • The Kamailio listeners on the public (or private, behind NAT) address, the firewall ports and the local networks port forwarding follow them.
    • The service network toward NethVoice keeps port 5060, and the local networks listeners keep 6060/6061.
    • The ports are published in the service discovery records as sip_port and sips_port.
  • NethVoice
    • Reads the ports from the proxy into NETHVOICE_PROXY_SIP_PORT and NETHVOICE_PROXY_SIPS_PORT (5060 and 5061 when the proxy does not publish them).
    • Gateway templates and the manual device configuration hints of the wizard use them.
    • Tancredi receives them as the sip_udp_port and sip_tls_port defaults.
    • When the proxy settings change, nethcti-server is restarted too, so user/me returns the new proxy FQDN and port.
  • Tancredi: when outbound_proxy_port_N is not set, the phone templates use sip_udp_port and sip_tls_port instead of fixed values.
  • nethcti-server: user/me returns proxy_tls_port next to proxy_fqdn.
  • ctiapp-authproxy: the mobile app gets <proxy>fqdn:proxy_tls_port</proxy>, with 5061 when NethVoice does not send the port.

With the default ports nothing changes for existing installations, and the components can be updated in any order. When the ports are changed, the old ones are closed at once. Provisioned devices get the new ports at their next provisioning. Trunk providers and devices configured by hand must be updated manually.

Alternative solutions

  • Port forward that bypasses the proxy: it works only for UDP 5060 toward one NethVoice instance. It is not visible in the UI and it cannot move the TLS port.
  • A port setting per device type: more flexible, but it duplicates the setting in every provisioning path, with no single source of truth.

References

Activity

  1. self-assigned this
    on Nov 3, 2026
  2. added
    nethvoiceBug or features releted to the NethVoice project
    on Nov 3, 2026
  3. edospadoni commented on Nov 3, 2026

    @edospadoni
    MemberAuthor

    Pull requests:

    After merge, ns8-nethvoice needs the new Tancredi release (TANCREDI_VERSION) and the nethcti-server commit (NETHCTI_SERVER_COMMIT).

  4. added this to the NethVoice 1.8 milestone on Nov 3, 2026
  5. edospadoni commented on Nov 3, 2026

    @edospadoni
    MemberAuthor

    How to test

    Builds

    The Tancredi templates of the NethVoice build are still from Tancredi 1.11.0 (nethesis/tancredi#399 is not released yet). Phone provisioning can be tested with Snom and Gigaset P phones; the other brands follow the ports after the Tancredi release.

    Install

    Run on the cluster leader, replacing the instance names. Update the proxy first, then the NethVoice instances on the same node:

    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice-proxy:pr-242.227-1.c2ee61e","instances":["nethvoice-proxy1"],"force":true}'
    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice:pr-1159.1570-1.fe719fe","instances":["nethvoice1"],"force":true}'

    Checks

    1. Update with the default ports
      • Nothing changes for phones, trunks and the mobile app: the proxy still listens on 5060/5061 and the firewall opens the same ports.
      • api-cli run module/nethvoice-proxy1/get-configuration returns "sip_port": 5060, "sips_port": 5061.
      • The NethVoice environment has NETHVOICE_PROXY_SIP_PORT=5060 and NETHVOICE_PROXY_SIPS_PORT=5061.
    2. Change the ports from the proxy settings page, in the Advanced section (for example 5070 and 5071), or with:
      api-cli run module/nethvoice-proxy1/configure-module --data "$(api-cli run module/nethvoice-proxy1/get-configuration | jq -c '.sip_port = 5070 | .sips_port = 5071')"
      • The proxy listens on 5070/5071 and the firewall opens them. 5060/5061 are closed from outside. The service network toward NethVoice keeps 5060.
      • NethVoice receives the new ports and restarts freepbx, tancredi, janus and nethcti-server.
      • Snom and Gigaset P phones get the new port at their next provisioning (reboot them to force it) and register again.
      • The manual configuration hints of the wizard (device modal) show the new ports.
      • The mobile app gets <proxy>…:5071</proxy> after scanning a new QR code (or at the next provisioning, within one hour) and registers.
    3. Validation: equal ports, or ports 6060/6061, are refused.
    4. Back to the defaults: set 5060/5061 again and reprovision the devices.

    Trunk providers and devices configured by hand must be updated manually when the ports change.

  6. moved this from Todo to In Progress in NethVoiceon Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

nethvoiceBug or features releted to the NethVoice project

Projects

  • Status
    In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions