Skip to content

NethVoice Proxy: configurable SIP and SIPS ports #8287

Closed

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
    nethvoice
    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
  7. edospadoni commented on Nov 10, 2026

    @edospadoni
    MemberAuthor

    Testing builds

    The PRs are updated and aligned with main. These builds replace the ones in the previous comment:

    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.237-1.edf36f8","instances":["nethvoice-proxy1"],"force":true}'
    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice:pr-1159.1656-1.b9039eb","instances":["nethvoice1"],"force":true}'

    Changes since the previous builds:

    • The SIP and SIPS ports must be between 1024 and 9999, below the RTP range 10000-20000. The settings page and configure-module refuse other values.
    • The Advanced section of the settings page keeps the standard dividers.

    The checks in the previous comment still apply. Also check that a port outside 1024-9999 is refused.

  8. added
    testing
    on Nov 10, 2026
  9. moved this from In Progress to Testing in NethVoiceon Nov 10, 2026
  10. added 2 commits that reference this issue on Nov 19, 2026
  11. edospadoni commented on Nov 19, 2026

    @edospadoni
    MemberAuthor

    Testing releases

    nethesis/ns8-nethvoice-proxy#242 and nethesis/ns8-nethvoice#1159 are merged. Test with the testing releases, which replace the PR builds in the previous comments:

    The changes of nethesis/nethcti-server#378 and nethesis/tancredi#399 are part of the NethVoice release, since both components are now in the ns8-nethvoice repository. Phones of every brand follow the configured ports, not only Snom and Gigaset. The mobile app gets the port from ctiapp-authproxy (nethesis/ctiapp-authproxy#27).

    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:1.8.1-testing.7","instances":["nethvoice-proxy1"],"force":true}'
    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice:1.8.5-testing.21","instances":["nethvoice1"],"force":true}'

    Checks

    1. Update with the default ports
      • Phones, trunks and the mobile app keep working on 5060/5061.
      • 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 in the Advanced section of the proxy settings page (for example 5070 and 5071):
      • The proxy listens on 5070/5071 and the firewall opens them. 5060/5061 are closed from outside, and the service network toward NethVoice keeps 5060.
      • NethVoice receives the new ports and restarts freepbx, tancredi, janus and nethcti-server.
      • Provisioned phones get the new ports at their next provisioning (reboot them to force it) and register again.
      • The manual configuration hints of the NethVoice wizard show the new ports.
      • The mobile app gets <proxy>…:5071</proxy> after scanning a new QR code and registers.
    3. Behind NAT: with a public address and local networks, the port forwarding rules of the local networks follow the new ports, and the rules with the old ports are removed (firewall-cmd --list-rich-rules).
    4. Validation: these values are refused:
      • ports outside 1024-9999;
      • the same port for SIP and SIPS;
      • ports 6060 and 6061;
      • a port already used by another service on the proxy address, for example 4190.
    5. Swap the ports: setting SIP and SIPS to each other's current value is accepted.
    6. 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.

  12. added
    verified
    on Nov 23, 2026
  13. removed their assignment
    on Nov 23, 2026
  14. removed
    testing
    on Nov 23, 2026
  15. moved this from Testing to Verified in NethVoiceon Nov 23, 2026
  16. edospadoni commented on Nov 23, 2026

    @edospadoni
    MemberAuthor

    Release nethesis/ns8-nethvoice-proxy 1.8.1

  17. edospadoni commented on Nov 23, 2026

    @edospadoni
    MemberAuthor

    Release nethesis/ns8-nethvoice 1.8.5

  18. removed
    verified
    on Nov 23, 2026
  19. moved this from Verified to Done in NethVoiceon Nov 23, 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

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions