From f9037be641ece49631c1910fe7e799a6cf6a82c5 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 3 Jul 2012 12:26:37 +0000 Subject: [PATCH] Add preferences for inbound NPN/UPN selection. --- db_scripts/diff/9303.down | 3 +++ db_scripts/diff/9303.up | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 db_scripts/diff/9303.down create mode 100644 db_scripts/diff/9303.up diff --git a/db_scripts/diff/9303.down b/db_scripts/diff/9303.down new file mode 100644 index 00000000..f1e60aab --- /dev/null +++ b/db_scripts/diff/9303.down @@ -0,0 +1,3 @@ +USE provisioning; + +DELETE FROM voip_preferences WHERE attribute IN ('inbound_upn', 'inbound_npn'); diff --git a/db_scripts/diff/9303.up b/db_scripts/diff/9303.up new file mode 100644 index 00000000..3bc96d8e --- /dev/null +++ b/db_scripts/diff/9303.up @@ -0,0 +1,31 @@ +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 +('inbound_upn', 0, 1, 1, 1, 1, now(), 0, 'enum', 0, 'The SIP header field to fetch the user-provided-number from for inbound calls'); +SELECT last_insert_id() INTO @upn_pref_id; +INSERT INTO voip_preferences_enum +(preference_id, label, value, usr_pref, dom_pref, peer_pref, default_val) +VALUES +(@upn_pref_id, 'From-Username', NULL, 1, 1, 1, 1), +(@upn_pref_id, 'From-Displayname', 'from_display', 1, 1, 1, 0), +(@upn_pref_id, 'P-Asserted-Identity', 'pai_user', 1, 1, 1, 0), +(@upn_pref_id, 'P-Preferred-Identity', 'ppi_user', 1, 1, 1, 0), +(@upn_pref_id, 'Remote-Party-ID', 'rpid_user', 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 +('inbound_npn', 0, 1, 0, 0, 1, now(), 0, 'enum', 0, 'The SIP header field to fetch the network-provided-number from for inbound calls'); +SELECT last_insert_id() INTO @npn_pref_id; +INSERT INTO voip_preferences_enum +(preference_id, label, value, usr_pref, dom_pref, peer_pref, default_val) +VALUES +(@npn_pref_id, 'From-Username', NULL, 0, 0, 1, 1), +(@npn_pref_id, 'From-Displayname', 'from_display', 0, 0, 1, 0), +(@npn_pref_id, 'P-Asserted-Identity', 'pai_user', 0, 0, 1, 0), +(@npn_pref_id, 'P-Preferred-Identity', 'ppi_user', 0, 0, 1, 0), +(@npn_pref_id, 'Remote-Party-ID', 'rpid_user', 0, 0, 1, 0); + +