Skip to content

Commit

Permalink
feat(nethcti-server): added new ENV to handle privacy numbers (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
edospadoni authored Dec 10, 2024
1 parent 3ec80ad commit 667524e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions imageroot/actions/configure-module/20setenvs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ getFromRequest(request, 'nethcti_cdr_script', 'NETHCTI_CDR_SCRIPT', '')
getFromRequest(request, 'nethcti_cdr_script_timeout', 'NETHCTI_CDR_SCRIPT_TIMEOUT', '')
getFromRequest(request, 'nethcti_cdr_script_call_in', 'NETHCTI_CDR_SCRIPT_CALL_IN', '')
getFromRequest(request, 'nethcti_log_level', 'NETHCTI_LOG_LEVEL', 'warn')
getFromRequest(request, 'nethcti_privacy_numbers', 'NETHCTI_PRIVACY_NUMBERS', 'xxx')
getFromRequest(request, 'conference_jitsi_url', 'CONFERENCE_JITSI_URL', 'https://jitsi.nethserver.net')
getFromRequest(request, 'app_brand_id', 'BRAND_APPID', '')
getFromRequest(request, 'timezone', 'TIMEZONE', 'UTC')
Expand Down
5 changes: 5 additions & 0 deletions imageroot/actions/configure-module/validate-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
}
],
"nethcti_log_level": "info",
"nethcti_privacy_numbers": "xxx",
"user_domain": "domain.ns8.local",
"app_brand_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"reports_international_prefix": "0039"
Expand Down Expand Up @@ -136,6 +137,10 @@
"warn"
]
},
"nethcti_privacy_numbers": {
"description": "Privacy number replace strings",
"type": "string"
},
"conference_jitsi_url": {
"description": "Jitsi conference URL",
"type": "string",
Expand Down
1 change: 1 addition & 0 deletions imageroot/actions/get-configuration/20read
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ config = {
'reports_international_prefix': os.getenv('REPORTS_INTERNATIONAL_PREFIX', ''),
'nethvoice_adm_username': os.getenv('NETHVOICE_USER_PORTAL_USERNAME', ''),
'nethvoice_adm_password': agent.read_envfile("passwords.env").get('NETHVOICE_USER_PORTAL_PASSWORD',""),
'nethcti_privacy_numbers': os.getenv('NETHCTI_PRIVACY_NUMBERS', 'xxx'),
}

json.dump(config, fp=sys.stdout)
1 change: 1 addition & 0 deletions imageroot/actions/restore-module/20copyenv
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ restore_envs = [
'NETHCTI_JABBER_DOMAIN',
'NETHCTI_JABBER_URL',
'NETHCTI_LOG_LEVEL',
'NETHCTI_PRIVACY_NUMBERS',
'NETHCTI_PREFIX',
'NETHCTI_TRUNKS_EVENTS',
'NETHCTI_UI_COMPANY_NAME',
Expand Down
1 change: 1 addition & 0 deletions nethcti-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ NethCTI Server container for NethServer 8
- `NETHCTI_JABBER_DOMAIN` domain of the jabber server
- `NETHCTI_JABBER_URL` url of the jabber server
- `NETHCTI_LOG_LEVEL` log level of the server
- `NETHCTI_PRIVACY_NUMBERS` string replacement for server privacy numbers
- `NETHCTI_PREFIX` telephone prefix
- `NETHCTI_SERVER_API_PORT` port of the server api
- `NETHCTI_SERVER_WS_PORT` port of the server websocket
Expand Down
2 changes: 1 addition & 1 deletion nethcti-server/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ cat > $FILE <<EOF
"hostname":"${NETHVOICE_HOST}",
"publichost":"",
"loglevel":"${NETHCTI_LOG_LEVEL}",
"privacy_numbers":"xxx"
"privacy_numbers":"${NETHCTI_PRIVACY_NUMBERS}"
}
EOF

Expand Down
3 changes: 3 additions & 0 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ export default {
rebranding_login_logo_dark_url: "",
rebranding_login_people: false,
nethvoice_adm: {},
nethcti_privacy_numbers,
},
isDarkMode: false,
proxy_installed: false,
Expand Down Expand Up @@ -561,6 +562,7 @@ export default {
this.form.timezone = config.timezone;
this.form.nethvoice_adm.username = config.nethvoice_adm_username;
this.form.nethvoice_adm.password = config.nethvoice_adm_password;
this.form.nethcti_privacy_numbers = config.nethcti_privacy_numbers;

this.focusElement("nethvoice_host");
},
Expand Down Expand Up @@ -802,6 +804,7 @@ export default {
timezone: this.form.timezone,
nethvoice_adm_username: this.form.nethvoice_adm.username,
nethvoice_adm_password: this.form.nethvoice_adm.password,
nethcti_privacy_numbers: this.form.nethcti_privacy_numbers
},
extra: {
title: this.$t("settings.configure_instance", {
Expand Down

0 comments on commit 667524e

Please sign in to comment.