NethVoice porting to NethServer 8
Instantiate the module with:
add-module ghcr.io/nethesis/nethvoice:latest 1
The output of the command will return the instance name. Output example:
{"module_id": "nethvoice1", "image_name": "nethvoice", "image_url": "ghcr.io/nethserver/nethvoice:latest"}
This module is intended to be used with the ns8-nethvoice-proxy module as SIP proxy
Module can be configured from cluster-admin NethServer 8 interface.
Reports UI rebranding is managed from the cluster-admin Rebranding page. The selected values are propagated through the get-rebranding and set-rebranding tasks into the REPORTS_UI_* environment variables, then exposed to the reports-ui container and finally rendered into runtime configuration by reports/ui/config-gen.sh.
The current report branding fields are:
REPORTS_UI_BRAND_NAMEREPORTS_UI_LOGIN_LOGO_URLREPORTS_UI_FAVICON_URLREPORTS_UI_LOGIN_BACKGROUND_URLREPORTS_UI_LOGIN_BACKGROUND_COLOR
To make also provisioniong RPS work with Falconieri, you need to manualy set SUBSCRIPTION_SECRET and SUBSCRIPTION_SYSTEMID into ~/.config/state/environment
file and restart freepbx container with systemctl --user restart freepbx
Also PUBLIC_IP environment variable should be configured
You can access NethVoice wizard at:
https://makako.nethesis.it/nethvoice/
Asterisk includes res_prometheus and serves metrics on its existing local HTTP
listener at http://127.0.0.1:${ASTERISK_WS_PORT}/metrics. The port is allocated
per instance; read ASTERISK_WS_PORT from the module's environment.
The Basic Auth username is prometheus. Before starting FreePBX, NS8 generates
ASTERISK_PROMETHEUS_PASSWORD in the module's passwords.env if it is missing.
The password survives restarts, updates and backups; cloning generates a new
password. Startup also handles backups made before this credential existed.
The container regenerates /etc/asterisk/prometheus.conf from this secret on
every start. For standalone FreePBX containers, supply
ASTERISK_PROMETHEUS_PASSWORD using letters, digits, underscores or hyphens;
metrics are disabled when it is absent.
Run Prometheus on the same node and configure a scrape job using the instance's allocated port, for example:
scrape_configs:
- job_name: nethvoice1-asterisk
metrics_path: /metrics
basic_auth:
username: prometheus
password_file: /etc/prometheus/nethvoice1.password
static_configs:
- targets: ['127.0.0.1:20030'] # Replace with ASTERISK_WS_PORTSecurely copy the value of ASTERISK_PROMETHEUS_PASSWORD into the password file,
readable only by Prometheus. Its network namespace must be able to reach the
node's loopback listener. From the module shell, this command prompts for the
password and prints the metrics:
curl --user prometheus "http://127.0.0.1:${ASTERISK_WS_PORT}/metrics"Asterisk shares HTTP routes with its existing HTTPS/WSS listener, so /metrics
also requires authentication there. No additional port or Traefik route is
created.
After FreePBX configurations have been applied, some containers should be restarted or reloaded.
The watcher.path units looks for files named <action>_<service> inside the notify directory.
If a container wants to signal a restart, it must mount the file using the volume option. Eg:
--volume=./notify:/notify
Then, create a file named <action>_<service>, like reload_nethcti-server.
The file must be created inside the container. Example:
touch /notify/restart_nethcti-server
The module defines the pbookreader role that allows to call the following API:
get-phonebook-credentials: return the phonebook credentials, including the host, port, username and password
This role can be used by other modules to access the phonebook.
The module is a provider for the <module_id>/srv/tcp/phonebook service.
It raises an event named phonebook-settings-changed with the following payload:
module_id: the module idnode_id: the node idmodule_uuid: the module uuidreason: the reason for the change
Consumers of the events must then run the get-phonebook-credentials action on module_id to get the updated phonebook credentials.
Other modules (e.g. WebTop) can embed the NethVoice chat. They read NETHCTI_UI_HOST and CHAT_ENABLED
from the module environment (module/<module_id>/environment in Redis).
The set-integrations action raises an event named chat-settings-changed with the following payload:
module_id: the module idnode_id: the node idmodule_uuid: the module uuidchat_enabled: whether the chat is enabledreason: the reason for the change
A change of the CTI host raises pbx-settings-changed (configure-module).
The module includes a small CLI helper named ctictl to call administrative middleware endpoints defined under /admin/*.
- List available admin APIs:
ctictl --list- Import a CSV into a user's phonebook:
ctictl /admin/phonebook/import --file contacts.csv -P username=giacomo- Trigger a profiles reload (super-admin required):
ctictl /admin/reload/profilesNotes:
ctictlreads the super-admin token from theNETHVOICE_MIDDLEWARE_SUPER_ADMIN_TOKENenvironment variable, or falls back to apasswords.envfile if present.- Use
-v/--verboseto see request/response details and headers.
The NethVoice chat (NethServer/dev#7648) is switched on from the Integrations page, or with
set-integrations and {"chat_enabled": true}. It adds two units running the nethvoice-ejabberd
image (see ejabberd/README.md): chat-server (ejabberd: XMPP over WebSocket, file uploads) and
chat-gateway (push notifications, mobile app web services). Both listen on loopback only.
-
Ports:
CHAT_C2S_PORT,CHAT_HTTP_PORT,CHAT_COMPONENT_PORT,CHAT_GW_PORT, four TCP ports of the module range. -
Traefik routes on the CTI host:
/xmpp-websocket,/upload,/chat-gw;/chat-gwalso on the PBX host, the domain the mobile app logs in with. Removed when the chat is off. -
Volumes:
chat-data(ejabberd database),chat-upload(attachments),chat-gw(gateway database). The backup takes consistent snapshots of the two databases (state/chat.db,state/chat-gw.db) and the upload volume. -
Secret:
CHAT_COMPONENT_SECRETinpasswords.env. -
Erlang runs without epmd or a distribution port:
ejabberdctlreaches the server through a Unix socket in the container. -
CTI groups: every CTI operator group is a group chat (
cti-<name>room) kept by the gateway every 2 minutes. Its members are the group's operators only: seeing a group in the operators panel (all_groups,grp_) does not make a member. Members join and leave with the CTI; a deleted group's room is destroyed; a renamed group gets a new room. -
Settings, on the Integrations page or in
set-integrations(defaults in brackets):chat_retention_days(365, 3650 means forever) days kept for messages and uploads,chat_upload_quota_mb(200) upload space per user,chat_upload_max_file_mb(25) largest upload.CHAT_DEBUG(unset) turns on verbose logs of the chat programs.api-cli run module/nethvoice1/set-integrations --data '{"chat_enabled": true, "chat_retention_days": 180}'
Video sources (door intercoms, cameras, NethServer/dev#7535) are configured in the wizard (Applications > Video sources). The URL scheme sets the type:
http(s)://: legacy image source, a JPEG polled by nethcti-server;rtsp(s)://: video stream, pulled on demand by themediamtxunit and served to the CTI clients over WebRTC (WHEP). The device is always read over RTSP/TCP: when it sits in a customer LAN, a single TCP port-forward of its RTSP port (allowed only from the PBX public IP, shown in the wizard) or a VPN is enough.
Credentials are stored apart from the URL (pasted credentials are split out) and are write-only in the
REST API. Every source has up to 10 ordered gates (door openers): dtmf (code sent to the source
extension) or url (HTTP GET/POST with optional credentials). The legacy open field is kept in
sync with the first DTMF gate. The wizard "Check" probes the device directly with ffprobe/ffmpeg
(a minimal build in the FreePBX image) and shows a preview frame, the codecs and the specific reason
of a failure; H.265 is reported because most browsers cannot play it.
TLS certificates of https:// and rtsps:// devices are verified (system CA store, host name or IP
address) by the wizard Check (ffprobe -tls_verify 1, curl), by nethcti-server (snapshots of image
sources, URL gates) and by the gateway; an untrusted certificate makes the Check fail with reason
tls_error. For devices with a self-signed certificate a source has the option "Skip TLS certificate
verification" (tls_skip_verify, off by default, shown only when the source URL or a URL gate uses
TLS). It applies to everything the PBX contacts for that source: the Check, the nethcti-server
requests of that source only (tls_skip_verify in streaming.json) and the gateway. MediaMTX cannot
skip the verification, it can only pin the certificate (sourceFingerprint): when an rtsps://
source with the option is saved, FreePBX reads the SHA-256 fingerprint of the certificate the device
presents (column tls_fingerprint, kept when the device is unreachable at save time and it is the
same device) and writes it in the path. If the device certificate changes later (renewal, reset), the
gateway refuses the device until the source is saved again; the Check of the stored source reports it
with the warning tls_certificate_changed. Without a fingerprint MediaMTX verifies the certificate
with the Go defaults (system roots, host name); the CA certificates are added to
the nethvoice-mediamtx image by build-images.sh (the upstream image has none).
The https:// devices of a source with the option (image URL and URL gates, contacted by
nethcti-server) are pinned the same way (tls_fingerprint of the source and of each gate in
streaming.json): nethcti-server checks the certificate before sending the request and its
credentials, and refuses a different one (gate error gate_certificate_changed). A source with the
option is never saved without the certificate of each of its TLS devices: if one cannot be read and
none is stored for that device, the save fails with a validation error. Sources saved by an older
version keep working unpinned and are flagged in the wizard ("certificate not pinned") until they are
saved again.
Device addresses: loopback, link-local and unspecified addresses (the PBX itself, the cloud metadata
service), in any numeric form and after resolving the host name, are refused when a source or a gate
is saved, by the Check (reason address_not_allowed) and by nethcti-server before every request.
The Check returns the content of an image source only when it is a JPEG or PNG image (at most 5 MB);
nethcti-server never follows redirects and limits the responses (5 MB for snapshots, 64 KB for
gates). The Check never puts the device URL with its credentials on a command line: ffprobe reads it
from a file (-/i), ffmpeg from a concat script, both mode 0600 and removed after the check.
-
Unit:
mediamtx.service, imagenethvoice-mediamtx(mirror ofdocker.io/bluenviron/mediamtx), host network, read-only, uid/gid 990:991, no capabilities. Unused listeners (RTMP, SRT, HLS, MoQ, playback, metrics) are disabled. -
Configuration:
/etc/mediamtx/mediamtx.ymlin themediamtxvolume, written atomically by FreePBX (nethcti3retrieve_conf) at every reload and start, together with/etc/nethcti/streaming.json, and hot-reloaded by MediaMTX. It is the only source of truth (changes through the MediaMTX API are lost) and it is never backed up: restore and clone regenerate it from the database. It holds the device passwords: mode 0640, owner asterisk. -
One gateway path per RTSP source,
streaming-gw/<permission>(e.g.streaming-gw/vs_front_door, the CTI permission of the source). Traefik routeshttps://<NETHCTI_UI_HOST>/streaming-gw/to the WHEP listener without stripping the prefix, so the WHEPLocationheader stays valid. CORS is answered by MediaMTX. -
Authorization:
authMethod: httpwithauthHTTPExclude: [], every request (readers, local RTSP readers and the control API included) is checked withPOST http://127.0.0.1:${NETHCTI_INTERNAL_REST_PORT9}/mediamtx/authon nethcti-server. That path is served only on the loopback REST port of the streaming plugin (the nethcti-server HTTP proxy forwards only/streaming). nethcti-server allows only WebRTC readers that present a short-lived, single-use token (POST /streaming/token, sent asAuthorization: Bearer <token>on the WHEP request, never in the query string) of a user with the permission of the source; local RTSP readers are denied. A user has at most 3 sessions per source and 30 in total (429too_many_sessionsfrom/streaming/token), at most 300 tokens per minute (429too_many_requests), and a source at most 100 readers (maxReaders). A catch-all path makes unknown paths answer 401 like the configured ones. nethcti-server records the allowed sessions and kicks them through the control API (mediamtx.api_portin/etc/nethcti/services.json, fromMEDIAMTX_API_PORT) when the user loses the permission or the source is removed. The control API is allowed only to the usernethcti-serverwith the passwordMEDIAMTX_API_PASSWORD(passwords.env, generated bycreate-moduleand, on existing instances, byupdate-module.d/23video_gateway_api_password;mediamtx.api_passwordinservices.json): without it the API is refused. -
Ports (environment):
Variable Protocol Exposure Use MEDIAMTX_WHEP_PORTTCP 127.0.0.1, behind traefik WHEP HTTP MEDIAMTX_API_PORTTCP 127.0.0.1 only, never routed control API (returns the device passwords), only for the nethcti-serveruser, to list and kick sessionsMEDIAMTX_RTSP_PORTTCP 127.0.0.1 only RTSP server for local readers MEDIAMTX_ICE_UDP_PORTUDP public, firewall WebRTC ICE MEDIAMTX_ICE_TCP_PORTTCP public, firewall WebRTC ICE over TCP (fallback) New installs take the TCP ports from the module range (indexes 42-45). The ICE UDP port is always a separate single-port allocation, outside
UDP_PORTS_RANGE, so it never changes the size of the RTP block (a different size makesupdate-module.d/20allocate_portsmove all the RTP/SIP ports). Existing instances get all of them fromupdate-module.d/20allocate_video_gateway_ports; if20allocate_portsever moves the UDP block it also drops the ICE UDP allocation, which is then allocated again. The ICE ports are listed byget-ports-listand opened bycreate-module/90firewall. -
ICE addresses:
MEDIAMTX_ICE_HOSTS(public and, behind NAT, private address of the node) andMEDIAMTX_PUBLIC_IPcome from the nethvoice-proxy service record, likeICEENFORCEfor Janus. When the PBX is behind NAT, the ICE ports must be forwarded too.
These units are silenced to keep the journal small:
nethvoice-calendar-sync.service(every minute)nethvoice-queue-stats-reset.service(every minute)nethvoice-hotel-alarms.service(every minute)satellite-recordings-cleanup.service(every 10 minutes)chat-retention.service(daily)
Each one sets:
StandardOutput=null
StandardError=null
LogLevelMax=warning
StandardOutput and StandardError drop the command output. LogLevelMax drops
the Starting/Finished lines and the podman container events. Unit failures are
still logged.
To restore the logs of one unit, add a drop-in. Example for
nethvoice-calendar-sync.service on instance nethvoice1:
runagent -m nethvoice1
mkdir -p ~/.config/systemd/user/nethvoice-calendar-sync.service.d
cat > ~/.config/systemd/user/nethvoice-calendar-sync.service.d/override.conf <<'EOF'
[Service]
StandardOutput=journal
StandardError=inherit
LogLevelMax=
EOF
systemctl --user daemon-reloadRead them with:
journalctl --user -u nethvoice-calendar-sync.service -fTo silence the unit again, remove the drop-in directory and run systemctl --user daemon-reload.
The drop-in is lost when the module is updated or reinstalled.
Requirements: core 3.24.0 or later, metrics app 1.7.0 or later. With an older metrics app the alert rules are ignored.
Every 5 minutes the node runs export-metrics and passes its output to the
metrics app. The module publishes its alert rules from
imageroot/etc/metrics/alert-rules/ at create and update time.
The alerts are disabled by default: enable them from the "Alerts" card of the
Settings page, or with the set-alerts action:
api-cli run module/nethvoice1/set-alerts --data '{"alerts_enabled": true}'
The switch is stored in NETHVOICE_ALERTS_ENABLED (True/False). When it
is off the alert rules are removed from the metrics app; the metrics are
still exported.
| Alert | Severity | Fires when |
|---|---|---|
ServiceDown |
critical | a service is stopped for 10 minutes (reason="stopped") or restarted at least 3 times in 10 minutes (reason="crash_loop") |
NethVoiceDnsFailure |
warning | for 15 minutes a public name does not resolve on the DNS resolver of the node (reason="not_resolved"), the proxy name does not point to the proxy public or private IP (reason="ip_mismatch"), or the resolver does not answer within 5 seconds (reason="no_answer") |
NethVoiceDnsSlow |
warning | for 15 minutes the DNS resolver of the node takes more than 3 seconds to resolve a public name; never together with NethVoiceDnsFailure for the same name |
NethVoiceAIKeyInvalid |
critical | with transcription on, Deepgram or OpenAI rejects the API key (HTTP 401; for OpenAI only with error code invalid_api_key, so a restricted key without the Models read scope is not reported) for 10 minutes |
NethVoiceAICreditExhausted |
critical | Satellite reports that a provider refused a call for lack of credit; clears after the next successful call |
NethVoiceTrunkUnreachable |
critical | for 10 minutes a trunk that bypasses the proxy is not registered (reason="registration_failed"), the remote side of a receive trunk is not registered (reason="not_registered"), or the provider of an IP trunk that bypasses the proxy does not answer OPTIONS (reason="qualify_failed"; not when Asterisk could not send them) |
NethVoiceTrunkNotMonitored |
warning | for 10 minutes an IP or receive pjsip trunk has a name Asterisk cannot use as SIP user (a space or another character outside letters, digits and _ . + - ! ~ * ' ( )) and no From User: Asterisk sends no OPTIONS to it, so its provider is never checked (reason="name_invalid"); send trunks are watched through their registration |
Notes:
- Services are read from systemd: freepbx (Asterisk), mariadb, janus, mediamtx, nethcti-ui, nethcti-server, nethcti-middleware, phonebook, tancredi, satellite, satellite-mqtt, satellite-pgsql, reports-api, reports-redis, reports-ui, sftp, saml2-proxy, oauth2-proxy. Disabled services and services never started are not watched.
- Trunks that go through the proxy (registrations and IP trunk OPTIONS) are
checked by NethVoice proxy, only over UDP: over TCP and TLS Asterisk sends
from a random port and the proxy cannot tell which NethVoice instance a
trunk belongs to, so those trunks are not checked yet. A registration overridden in
pjsip.registration_custom.confis not checked. NethVoice exportsnethvoice_trunk_proxy_info{trunk,proxy_trunk}so the proxy alerts can show the trunk name next to the address the proxy sees. - A trunk name is also the Asterisk endpoint name and, when the trunk has
no From User, the From user of the OPTIONS checks. With a space in the
name Asterisk logs "Unable to create outbound OPTIONS request" and never
checks the trunk: calls work, but
NethVoiceTrunkUnreachableis not raised for it (for areceivetrunk the offline endpoint state is ignored) andNethVoiceTrunkNotMonitoredis raised instead. Fix: rename the trunk without spaces from FreePBX (Connectivity > Trunks), apply the configuration, then update custom dialplans or custom trunks that dialPJSIP/...@<old name>, and expect the call history and the reports to show the trunk under its new name from then on. The wizard warns while a new name holds a space; the module never renames a trunk. Do not set From User to work around it: it replaces the caller ID in the From header of every call. - The DNS resolver of the node is the one in
/etc/resolv.conf. A resolver that does not answer raisesNethVoiceDnsFailurewithreason="no_answer"for every public name; it has no response time. - When a check cannot run (AI provider unreachable, freepbx
stopped) it is skipped and no alert fires:
nethvoice_exporter_collector_up{collector}is 0. - The
asterisk_*metrics of Asterisk (res_prometheus, passwordASTERISK_PROMETHEUS_PASSWORDinpasswords.env) and thesatellite_*metrics of Satellite are copied as they are and stored by the metrics app.
Check the output by hand:
runagent -m nethvoice1 export-metricsEach instance publishes its own Grafana dashboard, "NethVoice <module_id>"
(uid ns8-<module_id>), also when the alerts are disabled. The template is
imageroot/etc/metrics/dashboards/nethvoice-overview.json: at create, update,
clone and restore time publish-metrics-config replaces __MODULE_ID__ and
stores it in the module/<module_id>/metrics_dashboards hash, then the
metrics app restarts Grafana to load it.
- Health now: services down, trunks failing, checks that could not run, whether the data is fresh, and the active (firing or pending) alerts of the instance and of its proxy. A trunk or service is shown failing with the same checks as the alerts, without their wait time. The alerts table is empty also when the alerts are disabled.
- Trends: calls and channels, calls per hour, trunk and service state over time, phones online, AI calls per hour.
- Resources: CPU, memory, OOM kills and disk of the NethVoice containers and of its NethVoice proxy.
The proxy is the NethVoice proxy of the same node. Data is collected every
5 minutes, so the panels show trends, not live state. The Data tile shows
Stale when the Asterisk uptime has not changed for 15 minutes: the
export-metrics output is no longer updated and the other panels show old
values.
To uninstall the instance:
remove-module --no-preserve nethvoice1
This repository now has two testing paths:
test-module.shfor the full Robot Framework integration suite against a real NS8 nodelocal_testing/run.shfor fast, local REST API validation with Podman
Use the local suite when you need a quick feedback loop for FreePBX and Tancredi REST endpoints without provisioning a full NS8 environment.
Prerequisites:
podmanpython3- network access to pull the published test images, unless you override them with locally built tags
Run the default local REST suite:
./local_testing/run.sh
Useful local commands:
./local_testing/run.sh start
./local_testing/run.sh run-manifest ./local_testing/manifests/default.json
./local_testing/run.sh request GET /freepbx/rest/trunks
./local_testing/run.sh cleanup
The local suite starts MariaDB, FreePBX, and Tancredi in a disposable Podman pod, seeds a known baseline of local REST users, computes the REST auth headers, and executes a declarative manifest of API calls.
For the local suite structure, manifest format, extension workflow, and
debugging tips, see local_testing/LOCAL_TESTING.md.
Test the module using the test-module.sh script:
bash build-images.shTo rebuild only selected images during development, set BUILD_IMAGES to a
comma-separated list of full image names or short names:
BUILD_IMAGES=freepbx,janus REPOBASE=localhost/ns8-nethvoice bash build-images.shThe script writes build timings to build-timings.tsv by default. Override the
path with BUILD_TIMING_FILE when comparing repeated runs.
| Variable | Default | Purpose |
|---|---|---|
REPOBASE |
ghcr.io/nethesis |
Registry/repository prefix used for the built images. Use a local prefix such as localhost/ns8-nethvoice when testing locally. |
IMAGETAG |
latest locally, current ref name in workflows |
Tag applied to the built images. Slashes are normalized to dashes. |
BUILD_IMAGES |
empty | Comma-separated list of image names to build. Both full names (nethvoice-freepbx) and short names (freepbx) are accepted. Empty means build everything. |
BUILD_TIMING_FILE |
build-timings.tsv |
Output file written at the end of the run with one timing row per image. |
REUSE_IMAGES |
empty, 1 in workflows |
Reuse a published image when its sources did not change, instead of building it again (see below). Requires skopeo. |
Package-manager cache mounts are enabled inside the Containerfiles where they already exist. The consolidated branch does not use Buildah registry layer cache in either local builds or GitHub Actions.
Use BUILD_IMAGES to limit a local iteration to the image you are changing:
BUILD_IMAGES=freepbx,janus \
REPOBASE=localhost/ns8-nethvoice \
IMAGETAG=dev-test \
bash build-images.shLocal builds stay serial by default to avoid Buildah containers-storage contention when multiple builds share the same storage root. Fast feedback comes from building only the affected images, from the existing dependency/layer reuse inside each Containerfile, and from the remote matrix workflow described below.
The repository uses one reusable workflow, .github/workflows/build-images.yml,
and two callers:
.github/workflows/publish-images.ymlfor branch pushes and manual dispatches.github/workflows/create-testing-pr-image.ymlfor same-repository pull requests
Both callers build the same ordered matrix groups with max-parallel: 3:
freepbxcti(cti-server,cti-middleware,cti-ui)services(mariadb,tancredi,phonebook,satellite,sftp,saml2-proxy,oauth2-proxy,ejabberd,mediamtx)reports(reports-api,reports-ui)janusmodule(nethvoice)
Component tests run in dedicated workflows, only when the component sources
change: cti-middleware-tests.yml, satellite-tests.yml and
tancredi-tests.yml. cti-middleware-apidoc.yml publishes the NethCTI
Middleware API documentation on Bump.sh.
The reusable workflow accepts:
| Input/secret | Meaning |
|---|---|
imagetag |
Tag to publish, normalized before use |
build-images |
Comma-separated image list for the selected matrix group |
reuse-images |
Reuse the images whose sources did not change, defaults to true |
runner-version |
Runner label, defaults to ubuntu-latest |
secrets.netrcb64 |
Optional Base64-encoded .netrc used for authenticated downloads |
Every image except the module one also gets a source tag (src-<hash>),
computed from the committed build-images.sh and the image build context
directory. With REUSE_IMAGES=1, build-images.sh checks the registry for the
source tag of each selected image: when it exists, the sources did not change
and the workflow copies that image to the new tag instead of building it again.
Only the images whose sources changed are built. Any change to
build-images.sh rebuilds every image.
A reused image does not get the security updates of its base image. To rebuild
every image, run the "Publish images" workflow manually with rebuild enabled:
the source tags then move to the rebuilt images.
.github/workflows/clean-registry.yml deletes the images of a branch when the
branch is deleted, and every week the images left with source tags only for
more than 7 days.
GitHub Actions also keeps ui/node_modules in actions/cache, keyed by
ui/yarn.lock. When a UI dependency changes, commit the updated lockfile so the
workflow cache key changes with it.
The NethVoice components are part of this repository and follow the module version. Change them here, not in the former component repositories, which are no longer updated.
| Directory | Former repository | Branch | Imported commit |
|---|---|---|---|
nethcti-server |
nethesis/nethcti-server | ns8 |
08c8bc3 |
nethcti-server/root/usr/lib/node/nethcti-server/packages/astproxy |
nethesis/astproxy | master |
dc4590e |
nethcti-middleware |
nethesis/nethcti-middleware | main |
de4bff0 |
nethvoice-cti |
nethesis/nethvoice-cti | main |
9dd9486 |
reports |
nethesis/nethvoice-report | ns8 |
b2a14d8 |
satellite |
nethesis/satellite | voice_agents |
b8acbcc |
tancredi/app |
nethesis/tancredi | master |
a27892d |
When a component directory already had a README.md for the module image, the
component one is kept as README.upstream.md.
phone-island and chat-island stay in their own repositories: they are integrated in other products too.
When a build depends on an external resource such as a wrapper image, Git checkout, tarball, or installer:
- Prefer immutable references: a version tag, commit SHA, or checksum-verified URL.
- Avoid committing
latest, branch names, or temporary development tags as the default source. - If the resource is downloaded through a checksum helper, update both the URL and the checksum source together.
- If the resource is a wrapper/base image assembled in
build-images.sh, keep the stable tag change in the script and test only the affected image group. - If the resource affects a specific Containerfile stage, rebuild only that image locally first, then let the GitHub Actions matrix rebuild the matching group.
For system packages, language packages, or tools downloaded during the build:
- Add the dependency in the narrowest relevant Containerfile stage.
- Keep manifest files (
package.json,package-lock.json,yarn.lock, and similar files) copied before the application source when possible, so dependency installation can still reuse unchanged layers. - Use the existing package-manager command style already present in that image
(
npm ci, distro package manager, Composer, and so on). - Rebuild the affected image locally with
BUILD_IMAGES=.... - If the dependency affects the UI workflow cache, update and commit the matching lockfile so the remote cache key changes too.
- After pushing, verify the corresponding GitHub Actions matrix group still succeeds.
If you must test a branch-like or temporary development tag for an external component, keep it out of mergeable defaults:
-
Make the change only in a disposable local checkout or a dedicated temporary branch.
-
For wrapper images, refresh the local source image first so Buildah does not reuse an older local copy:
buildah pull quay.io/oauth2-proxy/oauth2-proxy:v7.15.6
If you need a complete reset, remove the affected local image from containers-storage and rebuild only the impacted image group.
-
Use a temporary
IMAGETAGfor the produced test images. -
Before opening or updating a reviewable PR, replace the temporary reference with a stable version tag or SHA, or revert the change entirely.
-
Remember that GitHub-hosted runners start from clean storage, so stale branch-like image tags are primarily a local-development concern on the consolidated branch.
This module uses the NS8 standard testing infrastructure. For instructions on how to run the test suite locally, refer to the Running tests locally section of the ns8-github-actions repository.
The same procedure applies to the ns8-nethvoice-proxy module.
The release is managed with the gh-ns8 extension for the GitHub CLI:
gh extension install NethServer/gh-ns8Run every command from the repository root. The examples below release version 1.7.10.
gh ns8 module-release checkThe output lists the open issues and the merged PRs since the latest release:
- PRs without a linked issue, merged into
main - Verified issues with all PRs merged into
main: ready to release - Verified issues with PRs still open: ready to release as soon as the PRs are merged
- Issues in progress or testing with PRs merged into
main: release blockers - Issues in progress or testing with PRs still open: they do not block the release
A new version can be released only when there are no release blockers.
gh ns8 module-release create --with-linked-issues 1.7.10gh ns8 module-release clean 1.7.10gh ns8 module-release comment 1.7.10The command adds a comment with the released version to every linked issue. It can be used for testing releases too.
Finally, open the links printed in the terminal, close the issues and remove the verified label.
This project incorporates a number of royalty-free, creative commons licensed music files. These files are distributed under the Creative Commons Attribution-ShareAlike 3.0 license through explicit permission from their authors. The license can be found at: http://creativecommons.org/licenses/by-sa/3.0/
-
[macroform-cold_day] - Paul Shuler (Macroform), [email protected]
-
[macroform-robot_dity] - Paul Shuler (Macroform), [email protected]
-
[macroform-the_simplicity] - Paul Shuler (Macroform), [email protected]
-
[manolo_camp-morning_coffee] - Manolo Camp, [email protected]
-
[reno_project-system] - Reno Project, [email protected]
Enable the preview in Integrations to configure and publish GPT-Live agents. NethVoice builds FreePBX and Satellite together. The runtime accepts v8 and v9 publications, including opt-in attended transfers. See architecture, installation and operations and validation and acceptance gaps.