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
NethCTI Middleware: sessions are lost after restart #7724
When the nethcti-middleware service is restarted, either by pressing Save in the Settings page inside module on NethServer 8 or by manually restarting the service, all user sessions on CTI and NethLink stop working.
After the restart, API requests from NethLink fail with the following error:
10:45:52.993+01:00 [NethLink************] ERROR during fetch GET AxiosError ERR_BAD_REQUEST Request failed with status code 403 https://cti.nethesis.it/api/astproxy/parkings {“headers”:{“Content-Type”:“application/json”,“Authorization”:“Bearer eyJ...”}}
This indicates that the JWT tokens used by clients become invalid or are lost when the middleware restarts.
A persistent token storage mechanism should be implemented so that valid JWT tokens survive service restarts until they naturally expire.
Steps to reproduce
Log in to CTI and NethLink with valid sessions
Restart the nethcti-middleware service by:
pressing Save in the NethCTI module on NethServer 8, or
manually restarting the service/container
Try to use NethLink or CTI again
Observe that API requests fail with HTTP 403 errors
Expected behavior
User sessions and JWT tokens remain valid after the middleware restart, until token expiration.
Actual behavior
After restarting the middleware, existing JWT tokens become invalid and all CTI/NethLink sessions fail with 403 errors.
Activity
[-]NethCTI Middleware: persist sessions if still valid[/-][+]NethCTI Middleware: sessions are lost after restart[/+]tommaso-ascani commentedon Nov 14, 2025
Testing release:
1 remaining item
tommaso-ascani commentedon Nov 14, 2025
Test Cases
Ensure JWT sessions (CTI, Phone Island integration, NethLink) are not invalidated by service restarts, configuration saves, or upgrade.
Scenarios (run full set in both)
❗ $PATH:
/home/nethvoiceXX/.local/share/containers/storage/volumes/nethcti-middleware-secrets/_data1. Core Login Validation (both scenarios)
$PATH/user/phone_island_api_key_web.json$PATH/user/phone_island_api_key_nethlink.json2. Restart / Reload Actions (with sessions active)
nethcti-middlewarenethcti-serverExpected for each action:
3. Persistence & Files
Check:
$PATH/sessions.jsonupdates on each login/logout.$PATH/user/phone_island_api_key_web.json(phone island) token file created on login, removed on logout/revocation.$PATH/user/phone_island_api_key_nethlink.jsontoken file created/removed similarly.4. Multiple Users / Corner Cases
$PATH/sessions.jsonentries, missing token files, orphan files after logout.5. Extra
runagent -m nethvoice...)mysql nethcti3to enter databaseselect * from auth;to check cti-server persistent token works properly.Amygos commentedon Nov 17, 2025
Testing release
nethesis/ns8-nethvoice1.5.1-testing.10Stell0 commentedon Nov 21, 2025
1.5.1