Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
with:
node-version: 20
cache: yarn
- uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install dependencies
run: yarn install
Expand Down
47 changes: 0 additions & 47 deletions .github/workflows/migration-status.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ This command starts a local development server and opens up a browser window. Mo
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
This command generates static content into the `build` directory and can be served using any static contents hosting service. It also refreshes the migration-status data through the Docusaurus plugin before the site is built.

### Deployment

Deployment is automated via GitHub Actions: every time changes are merged into the `main` branch, the site is rebuilt and deployed to [https://docs.nethvoice.com/](https://docs.nethvoice.com/).
Deployment is automated via GitHub Actions: every time changes are merged into the `main` branch, the site is rebuilt and deployed to [https://docs.nethvoice.com/](https://docs.nethvoice.com/).
1 change: 1 addition & 0 deletions docs/administrator-manual/provisioning/supported_trunks.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sidebar_position: 5
- `Active Network`
- `Cheapnet`
- `Clouditalia`
- `Enegan`
- `MessageNet`
- `MyNet (cloud1b.voicer.it)`
- `Neomedia`
Expand Down
5 changes: 4 additions & 1 deletion docs/tutorial/api/cti.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ The CTI API provides programmatic access to the NethVoice CTI (Computer Telephon
Legacy methods are also documented for reference, but migrating to the new methods is strongly recommended.
New features and improvements are only available in the new API.

Full API specification is available at: [NethCTI Server full reference](https://documenter.getpostman.com/view/15699632/TzRRC88p#41f9b8cc-bea8-4917-a293-84eaedcaed08) · [NethCTI Middleware reference](https://bump.sh/nethesis/doc/nethcti-middleware/)
Full API specification is available at:
- [NethCTI Server full reference](https://documenter.getpostman.com/view/15699632/TzRRC88p#41f9b8cc-bea8-4917-a293-84eaedcaed08)
- [NethCTI Middleware reference](https://bump.sh/nethesis/doc/nethcti-middleware/)
- see also [API Migration Status dashboard](/migration-status) for an overview of which endpoints have already been migrated and which are still proxied to the legacy server.

---

Expand Down
2 changes: 2 additions & 0 deletions docs/tutorial/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Tutorials and guides for using these APIs can be found in the following sections
API references and documentation for NethVoice-related services:

- [CTI APIs full reference](https://documenter.getpostman.com/view/15699632/TzRRC88p#41f9b8cc-bea8-4917-a293-84eaedcaed08) interaction with the NethCTI Server that manages web-based telephony features.
- [NethCTI Middleware reference](https://bump.sh/nethesis/doc/nethcti-middleware/) for the NethCTI Middleware, which provides a simplified interface to the CTI Server and additional features.
- [API Migration Status dashboard](/migration-status) for an overview of which endpoints have already been migrated and which are still proxied to the legacy server.
- [Tancredi provisioning](https://nethesis.github.io/tancredi/API)
- Tancredi server is available for all NethVoice installations, the URL is:
- `https://netvoice.your-domain.tld/tancredi/api/v1` for the APIs
Expand Down
1 change: 1 addition & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const config: Config = {

plugins: [
'./plugins/docusaurus-plugin-generate-trunks',
'./plugins/docusaurus-plugin-generate-migration-status',
],

scripts: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ title: Trunk VoIP supportati
- `Active Network`
- `Cheapnet`
- `Clouditalia`
- `Enegan`
- `MessageNet`
- `MyNet (cloud1b.voicer.it)`
- `Neomedia`
Expand All @@ -28,4 +29,4 @@ title: Trunk VoIP supportati
- `Xera`
- `XSTREAM`

Questo documento è stato generato automaticamente dal [codice sorgente](https://raw.githubusercontent.com/nethesis/ns8-nethvoice/main/mariadb/docker-entrypoint-initdb.d/50_asterisk.providers.sql).
Questo documento è stato generato automaticamente dal [codice sorgente](https://raw.githubusercontent.com/nethesis/ns8-nethvoice/main/mariadb/docker-entrypoint-initdb.d/50_asterisk.providers.sql).
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ L'API CTI fornisce accesso programmatico alle funzionalità CTI (Computer Teleph
I metodi legacy sono documentati per riferimento, ma è fortemente consigliato eseguire la migrazione ai nuovi metodi.
Le nuove funzionalità e i miglioramenti sono disponibili solo nella nuova API.

Le specifiche complete sono disponibili qui: [NethCTI Server full reference](https://documenter.getpostman.com/view/15699632/TzRRC88p#41f9b8cc-bea8-4917-a293-84eaedcaed08)
La specifica completa dell'API è disponibile su:
- [NethCTI Server full reference](https://documenter.getpostman.com/view/15699632/TzRRC88p#41f9b8cc-bea8-4917-a293-84eaedcaed08)
- [NethCTI Middleware reference](https://bump.sh/nethesis/doc/nethcti-middleware/)
- consulta anche [API Migration Status dashboard](/migration-status) per una panoramica degli endpoint già migrati e di quelli ancora inoltrati al server legacy.

---

Expand Down Expand Up @@ -297,5 +300,4 @@ Per eseguire la migrazione dall'autenticazione legacy al nuovo metodo basato su
2. **Aggiornare il formato del token**: Sostituire `username:token_hex` con `Bearer <jwt-token>`
3. **Aggiornare il percorso WebSocket**: Cambiare da `/socket.io/` a `/api/ws/`
4. **Adattare gli header**: Utilizzare `Authorization: Bearer <jwt-token>` invece di `Authorization: username:token`
5. **Gestire la scadenza JWT**: Monitorare il campo `expire` del token e aggiornare secondo necessità

5. **Gestire la scadenza JWT**: Monitorare il campo `expire` del token e aggiornare secondo necessità
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ I tutorial e le guide per l'utilizzo di queste API sono disponibili nelle seguen
Riferimenti e documentazione delle API per i servizi correlati a NethVoice:

- [Riferimento completo API CTI](https://documenter.getpostman.com/view/15699632/TzRRC88p#41f9b8cc-bea8-4917-a293-84eaedcaed08) interazione con il server NethCTI che gestisce le funzionalità di telefonia web.
- [Riferimento NethCTI Middleware](https://bump.sh/nethesis/doc/nethcti-middleware/) per il NethCTI Middleware, che fornisce un'interfaccia semplificata al server CTI e funzionalità aggiuntive.
- [Dashboard dello stato di migrazione delle API](/migration-status) per una panoramica degli endpoint già migrati e di quelli ancora reindirizzati al server legacy.
- [Provisioning Tancredi](https://nethesis.github.io/tancredi/API)
- Il server Tancredi è disponibile per tutte le installazioni NethVoice, l'URL è:
- `https://netvoice.tuo-dominio.tld/tancredi/api/v1` per le API
- `https://netvoice.tuo-dominio.tld/privisioning/<token>/<filename>` per i file di configurazione utilizzati dai dispositivi
- [Configurazione (wizard)](https://bump.sh/nethvoice/hub/nethvoice/doc/wizard/)

- [Configurazione (wizard)](https://bump.sh/nethvoice/hub/nethvoice/doc/wizard/)
43 changes: 43 additions & 0 deletions plugins/docusaurus-plugin-generate-migration-status/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const fs = require('fs');
const path = require('path');
const { spawnSync } = require('child_process');

let migrationStatusGenerated = false;

function runMigrationStatusExtractor(siteDir) {
const scriptPath = path.join(siteDir, 'scripts', 'extract-migration-status.py');

if (!fs.existsSync(scriptPath)) {
throw new Error(`Migration status extractor not found: ${scriptPath}`);
}

console.log('[generate-migration-status] Running scripts/extract-migration-status.py');
const result = spawnSync('python3', [scriptPath], {
cwd: siteDir,
stdio: 'inherit',
});

if (result.error) {
throw result.error;
}

if (result.status !== 0) {
throw new Error(
`[generate-migration-status] scripts/extract-migration-status.py exited with code ${result.status ?? 'unknown'}`
);
}
}

module.exports = function generateMigrationStatusPlugin(context) {
return {
name: 'docusaurus-plugin-generate-migration-status',
async loadContent() {
if (migrationStatusGenerated) {
return null;
}
migrationStatusGenerated = true;
runMigrationStatusExtractor(context.siteDir);
return null;
},
};
};
2 changes: 2 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This directory contains utility scripts for managing the NethVoice documentation

The script fetches `nethcti-server` and `nethcti-middleware` from GitHub (shallow clone)
and produces `static/migration-data.json`, read by the migration status dashboard page.
The Docusaurus build runs this extractor automatically through a plugin, so manual
invocation is only needed when refreshing the file outside a site build.

Default usage — always fetches the production reference branches (`ns8` for
`nethcti-server`, `main` for `nethcti-middleware`):
Expand Down
Loading