From 75cdf38769cb1eb00e6e5eff5cfcfc2fed0304d2 Mon Sep 17 00:00:00 2001 From: Flaviu Mates <fmates@sipwise.com> Date: Wed, 18 Mar 2020 22:45:31 +0200 Subject: [PATCH] TT#74752 - Add new calllist_clir_scope preference * The new preference defines in which scope is CLIR used: all (hide all callers) or external (hide callers except calls from same customer) Change-Id: Ib05a1a8ad7abea2c0eee30928d39478a41e8e169 --- db_scripts/diff/15585.down | 8 ++++++++ db_scripts/diff/15585.up | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 db_scripts/diff/15585.down create mode 100644 db_scripts/diff/15585.up diff --git a/db_scripts/diff/15585.down b/db_scripts/diff/15585.down new file mode 100644 index 00000000..0fae8131 --- /dev/null +++ b/db_scripts/diff/15585.down @@ -0,0 +1,8 @@ +USE provisioning; +set autocommit = 0; + +SELECT id INTO @pref_id FROM voip_preferences WHERE attribute='calllist_clir_scope'; +DELETE FROM voip_preferences_enum WHERE preference_id=@pref_id; +DELETE FROM voip_preferences WHERE id=@pref_id; + +commit; \ No newline at end of file diff --git a/db_scripts/diff/15585.up b/db_scripts/diff/15585.up new file mode 100644 index 00000000..90a27cef --- /dev/null +++ b/db_scripts/diff/15585.up @@ -0,0 +1,35 @@ +use provisioning; +set autocommit=0; + +insert into voip_preferences + set +voip_preference_groups_id = (select id from voip_preference_groups where name="Access Restrictions"), +attribute = "calllist_clir_scope", +label = "Option for defining when CLIR should be used", +type = 1, +max_occur = 1, +usr_pref = 1, +prof_pref = 0, +dom_pref = 1, +peer_pref = 0, +contract_pref = 1, +contract_location_pref = 1, +dev_pref = 0, +devprof_pref = 0, +internal = 0, +expose_to_customer = 0, +data_type = "enum", +read_only = 0, +description = "Contains options for defining the scope in which CLIR is applied in the call lists: External(default; hide caller in clir enabled calls, except calls within the same customer) or All(hide caller for clir enabled calls)"; + +SELECT last_insert_id() INTO @pref_id; +INSERT INTO voip_preferences_enum +(preference_id, label, value, usr_pref, dom_pref, prof_pref, peer_pref, contract_pref, contract_location_pref, default_val) +VALUES +(@pref_id, 'use domain default', NULL, 0, 0, 0, 0, 1, 0, 1), +(@pref_id, 'use customer/domain default', NULL, 1, 0, 0, 0, 0, 0, 1), +(@pref_id, 'External', 'external', 1, 0, 0, 0, 1, 0, 0), +(@pref_id, 'External', 'external', 0, 1, 0, 0, 0, 0, 1), +(@pref_id, 'All', 'all', 1, 1, 0, 0, 0, 1, 0); + +commit; \ No newline at end of file