Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nethcti-server): added new ENV to handle privacy numbers #344

Merged
merged 3 commits into from
Dec 10, 2024
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
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 @@ -381,6 +381,7 @@ export default {
rebranding_login_logo_dark_url: "",
rebranding_login_people: false,
nethvoice_adm: {},
nethcti_privacy_numbers,
},
isDarkMode: false,
config: {},
Expand Down Expand Up @@ -548,6 +549,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 @@ -789,6 +791,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
Loading