diff --git a/i18n/en-US.json b/i18n/en-US.json index 45edbd5..95b6675 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -200,6 +200,14 @@ "srtp": "SRTP", "zrtp": "ZRTP" }, + "outbound_privacy": { + "type": "Caller-ID privacy ", + "default": "Default", + "none": "None", + "number": "Number", + "name": "Name", + "full": "Full" + }, "__comment": "UI-1119: Adding ignore_complete_elsewhere", "__version": "3.19", "ignoreCompletedElsewhere": { @@ -499,7 +507,15 @@ "languageHelp": "This will change the language of the text displayed in the UI", "timezoneHelp": "This will set the Timezone used for this User's devices and Voicemail Box", "ringingHelp": "This will set the Ringing Timeout for this User and his Devices. For example, if you set it to 20, this user will be rung for 20 seconds before the system moves to his Voicemail Box", - "mainExtensionHelp": "This will define the Caller-ID used for this User for calls inside the system, as well as setting his Presence ID to that number" + "mainExtensionHelp": "This will define the Caller-ID used for this User for calls inside the system, as well as setting his Presence ID to that number", + "outbound_privacy": { + "type": "Caller-ID privacy ", + "default": "Default", + "none": "None", + "number": "Number", + "name": "Name", + "full": "Full" + } }, "delete": "Delete User", "errorCallerId": "Before configuring the Caller-ID of this user, you need to assign them a number", diff --git a/submodules/devices/devices.js b/submodules/devices/devices.js index 35a1c3f..fcc4067 100644 --- a/submodules/devices/devices.js +++ b/submodules/devices/devices.js @@ -719,6 +719,14 @@ define(function(require) { delete mergedData.media.fax.option; } + if (mergedData.hasOwnProperty('caller_id_options') && mergedData.caller_id_options.hasOwnProperty('outbound_privacy') && mergedData.caller_id_options.outbound_privacy === 'default') { + delete mergedData.caller_id_options.outbound_privacy; + + if (_.isEmpty(mergedData.caller_id_options)) { + delete mergedData.caller_id_options; + } + } + if (mergedData.hasOwnProperty('caller_id') && mergedData.caller_id.hasOwnProperty('emergency') && mergedData.caller_id.emergency.hasOwnProperty('number') && mergedData.caller_id.emergency.number === '') { delete mergedData.caller_id.emergency.number; diff --git a/submodules/users/users.js b/submodules/users/users.js index 6a33a51..ec5c74c 100644 --- a/submodules/users/users.js +++ b/submodules/users/users.js @@ -2919,6 +2919,14 @@ define(function(require) { userData.caller_id.internal.number = userData.presence_id + ''; } + if (userData.hasOwnProperty('caller_id_options') && userData.caller_id_options.hasOwnProperty('outbound_privacy') && userData.caller_id_options.outbound_privacy === 'default') { + delete userData.caller_id_options.outbound_privacy; + + if (_.isEmpty(userData.caller_id_options)) { + delete userData.caller_id_options; + } + } + if (userData.timezone === 'inherit') { delete userData.timezone; } diff --git a/views/devices-sip_device.html b/views/devices-sip_device.html index 48dbc35..99c99a4 100644 --- a/views/devices-sip_device.html +++ b/views/devices-sip_device.html @@ -222,6 +222,19 @@ +