From f3804fe133de33f5b14136cbf6198e8a1802a713 Mon Sep 17 00:00:00 2001 From: Andrew Pogrebennyk Date: Thu, 3 Jul 2014 14:26:14 +0200 Subject: [PATCH] MT#7905 add new preference force_strict_number_match --- db_scripts/diff/15081.down | 9 +++++++++ db_scripts/diff/15081.up | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 db_scripts/diff/15081.down create mode 100644 db_scripts/diff/15081.up diff --git a/db_scripts/diff/15081.down b/db_scripts/diff/15081.down new file mode 100644 index 00000000..76599947 --- /dev/null +++ b/db_scripts/diff/15081.down @@ -0,0 +1,9 @@ +USE provisioning; + +DELETE FROM voip_preferences WHERE attribute = 'force_strict_number_match'; + +SELECT id INTO @vpgid FROM voip_preference_groups WHERE name = 'Number Manipulations'; +SELECT id INTO @new_vpgid FROM voip_preference_groups WHERE name = 'Call Blockings'; + +UPDATE voip_preferences SET voip_preference_groups_id=@new_vpgid WHERE attribute='clir_intrapbx' + AND voip_preference_groups_id=@vpgid; diff --git a/db_scripts/diff/15081.up b/db_scripts/diff/15081.up new file mode 100644 index 00000000..dbe059ef --- /dev/null +++ b/db_scripts/diff/15081.up @@ -0,0 +1,18 @@ +USE provisioning; +set autocommit = 0; + +SELECT id INTO @vpgid FROM voip_preference_groups WHERE name = 'Number Manipulations'; + +INSERT INTO voip_preferences VALUES + (NULL, @vpgid, 'force_strict_number_match', 'Strict Number Matching', 1, 1, 1, 1, 0, 0, now(), 0, 1, + 'boolean', 0, '"Strict Number Matching" - if set to true the dialed number must match subscriber exactly. Dialing arbitrary extension behind subscriber number is not allowed.' + ); + +-- move clir_intrapbx from the Call Blockings to Number Manipulations group + +SELECT id INTO @old_vpgid FROM voip_preference_groups WHERE name = 'Call Blockings'; + +UPDATE voip_preferences SET voip_preference_groups_id=@vpgid WHERE attribute='clir_intrapbx' + AND voip_preference_groups_id=@old_vpgid; + +commit;