From 7a85de36b3e82ec9f9cb65ff6a7927664eab4e24 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 3 Jul 2012 15:40:10 +0000 Subject: [PATCH] Add preferences for driving outbound caller CLI. --- db_scripts/diff/9312.down | 4 +++ db_scripts/diff/9312.up | 56 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 db_scripts/diff/9312.down create mode 100644 db_scripts/diff/9312.up diff --git a/db_scripts/diff/9312.down b/db_scripts/diff/9312.down new file mode 100644 index 00000000..c028f2ae --- /dev/null +++ b/db_scripts/diff/9312.down @@ -0,0 +1,4 @@ +USE provisioning; + +DELETE FROM voip_preferences WHERE attribute IN ('outbound_from_user', 'outbound_from_display', 'outbound_pai_user', 'outbound_ppi_user'); + diff --git a/db_scripts/diff/9312.up b/db_scripts/diff/9312.up new file mode 100644 index 00000000..f6ff6060 --- /dev/null +++ b/db_scripts/diff/9312.up @@ -0,0 +1,56 @@ +USE provisioning; + +INSERT INTO voip_preferences +(attribute, type, max_occur, usr_pref, dom_pref, peer_pref, modify_timestamp, internal, data_type, read_only, description) +VALUES +('outbound_from_user', 0, 1, 1, 1, 1, now(), 0, 'enum', 0, 'The content to put into the From username for outbound calls'); +SELECT last_insert_id() INTO @pref_id; +INSERT INTO voip_preferences_enum +(preference_id, label, value, usr_pref, dom_pref, peer_pref, default_val) +VALUES +(@pref_id, 'Network-Provided-Number', NULL, 1, 1, 1, 1), +(@pref_id, 'User-Provided-Number', 'upn', 1, 1, 1, 0), +(@pref_id, 'Authentication-User', 'auth_user', 1, 1, 1, 0), +(@pref_id, 'Received Display-name', 'rcv_display', 1, 1, 1, 0); + +INSERT INTO voip_preferences +(attribute, type, max_occur, usr_pref, dom_pref, peer_pref, modify_timestamp, internal, data_type, read_only, description) +VALUES +('outbound_from_display', 0, 1, 1, 1, 1, now(), 0, 'enum', 0, 'The content to put into the From display-name for outbound calls'); +SELECT last_insert_id() INTO @pref_id; +INSERT INTO voip_preferences_enum +(preference_id, label, value, usr_pref, dom_pref, peer_pref, default_val) +VALUES +(@pref_id, 'None', NULL, 1, 1, 1, 1), +(@pref_id, 'Network-Provided-Number', 'npn', 1, 1, 1, 0), +(@pref_id, 'User-Provided-Number', 'upn', 1, 1, 1, 0), +(@pref_id, 'Authentication-User', 'auth_user', 1, 1, 1, 0), +(@pref_id, 'Received Display-name', 'rcv_display', 1, 1, 1, 0); + +INSERT INTO voip_preferences +(attribute, type, max_occur, usr_pref, dom_pref, peer_pref, modify_timestamp, internal, data_type, read_only, description) +VALUES +('outbound_pai_user', 0, 1, 1, 1, 1, now(), 0, 'enum', 0, 'The content to put into the P-Asserted-Identity username for outbound calls (use "None" to not set header at all)'); +SELECT last_insert_id() INTO @pref_id; +INSERT INTO voip_preferences_enum +(preference_id, label, value, usr_pref, dom_pref, peer_pref, default_val) +VALUES +(@pref_id, 'None', NULL, 1, 1, 1, 1), +(@pref_id, 'Network-Provided-Number', 'npn', 1, 1, 1, 0), +(@pref_id, 'User-Provided-Number', 'upn', 1, 1, 1, 0), +(@pref_id, 'Authentication-User', 'auth_user', 1, 1, 1, 0), +(@pref_id, 'Received Display-name', 'rcv_display', 1, 1, 1, 0); + +INSERT INTO voip_preferences +(attribute, type, max_occur, usr_pref, dom_pref, peer_pref, modify_timestamp, internal, data_type, read_only, description) +VALUES +('outbound_ppi_user', 0, 1, 1, 1, 1, now(), 0, 'enum', 0, 'The content to put into the P-Preferred-Identity username for outbound calls (use "None" to not set header at all)'); +SELECT last_insert_id() INTO @pref_id; +INSERT INTO voip_preferences_enum +(preference_id, label, value, usr_pref, dom_pref, peer_pref, default_val) +VALUES +(@pref_id, 'None', NULL, 1, 1, 1, 1), +(@pref_id, 'Network-Provided-Number', 'npn', 1, 1, 1, 0), +(@pref_id, 'User-Provided-Number', 'upn', 1, 1, 1, 0), +(@pref_id, 'Authentication-User', 'auth_user', 1, 1, 1, 0), +(@pref_id, 'Received Display-name', 'rcv_display', 1, 1, 1, 0);