| 1 |
/* |
|---|
| 2 |
--------------------------------------------------------------------------- |
|---|
| 3 |
VoicePulse Global Provisioning System (VGPS) |
|---|
| 4 |
by Ketan Patel |
|---|
| 5 |
Copyright (C) 2006 VoicePulse Inc. |
|---|
| 6 |
|
|---|
| 7 |
This program is free software, distributed under the terms of the GNU General |
|---|
| 8 |
Public License Version 2. See the LICENSE file at the top of the source tree. |
|---|
| 9 |
--------------------------------------------------------------------------- |
|---|
| 10 |
*/ |
|---|
| 11 |
|
|---|
| 12 |
################################################## |
|---|
| 13 |
# Create/re-create database |
|---|
| 14 |
################################################## |
|---|
| 15 |
|
|---|
| 16 |
DROP DATABASE IF EXISTS `voicepulse_global_provisioning_system`; |
|---|
| 17 |
CREATE DATABASE `voicepulse_global_provisioning_system`; |
|---|
| 18 |
|
|---|
| 19 |
################################################## |
|---|
| 20 |
# Defining system-level tables and default values |
|---|
| 21 |
################################################## |
|---|
| 22 |
|
|---|
| 23 |
USE `voicepulse_global_provisioning_system`; |
|---|
| 24 |
|
|---|
| 25 |
SET FOREIGN_KEY_CHECKS=0; |
|---|
| 26 |
|
|---|
| 27 |
DROP TABLE IF EXISTS `voicepulse_global_provisioning_system`.`models`; |
|---|
| 28 |
CREATE TABLE `voicepulse_global_provisioning_system`.`models` ( `model_id` int(10) unsigned NOT NULL auto_increment, `name` varchar(45) NOT NULL default '', `tag` varchar(45) NOT NULL default '', `format` varchar(45) NOT NULL default '', `regex` text NOT NULL default '', |
|---|
| 29 |
`input_filename` varchar(45) NOT NULL default '', |
|---|
| 30 |
`output_filename` varchar(45) NOT NULL default '', `post_processing` varchar(45) NOT NULL default '', PRIMARY KEY (`model_id`), |
|---|
| 31 |
UNIQUE KEY (`name`), |
|---|
| 32 |
UNIQUE KEY (`tag`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|---|
| 33 |
|
|---|
| 34 |
DROP TABLE IF EXISTS `voicepulse_global_provisioning_system`.`devices`; |
|---|
| 35 |
CREATE TABLE `voicepulse_global_provisioning_system`.`devices` ( `device_id` int(10) unsigned NOT NULL auto_increment, `model_id` int(10) unsigned NOT NULL default '0', `mac_address` varchar(45) NOT NULL default '', |
|---|
| 36 |
`location` varchar(45) NOT NULL default '', `note` text NOT NULL, PRIMARY KEY (`device_id`), |
|---|
| 37 |
UNIQUE KEY (`mac_address`), |
|---|
| 38 |
CONSTRAINT `FK_DEVICES_MODEL_ID` FOREIGN KEY (`model_id`) REFERENCES `models` (`model_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|---|
| 39 |
|
|---|
| 40 |
DROP TABLE IF EXISTS `voicepulse_global_provisioning_system`.`device_settings`; |
|---|
| 41 |
CREATE TABLE `voicepulse_global_provisioning_system`.`device_settings` ( `device_setting_id` int(10) unsigned NOT NULL auto_increment, `device_id` int(10) unsigned NOT NULL default '0', `profile_key` varchar(45) NOT NULL default '', `profile_value` varchar(45) NOT NULL default '', PRIMARY KEY (`device_setting_id`), |
|---|
| 42 |
UNIQUE KEY (`device_id`, `profile_key`), |
|---|
| 43 |
CONSTRAINT `FK_DEVICE_SETTINGS_DEVICE_ID` FOREIGN KEY (`device_id`) REFERENCES `devices` (`device_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|---|
| 44 |
|
|---|
| 45 |
DROP TABLE IF EXISTS `voicepulse_global_provisioning_system`.`generic_settings`; |
|---|
| 46 |
CREATE TABLE `voicepulse_global_provisioning_system`.`generic_settings` ( `generic_setting_id` int(10) unsigned NOT NULL auto_increment, `name` varchar(45) NOT NULL default '', `tag` varchar(45) NOT NULL default '', PRIMARY KEY (`generic_setting_id`), |
|---|
| 47 |
UNIQUE KEY (`tag`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|---|
| 48 |
|
|---|
| 49 |
DROP TABLE IF EXISTS `voicepulse_global_provisioning_system`.`generic_mappings`; |
|---|
| 50 |
CREATE TABLE `voicepulse_global_provisioning_system`.`generic_mappings` ( `generic_mapping_id` int(10) unsigned NOT NULL auto_increment, `model_id` int(10) unsigned NOT NULL default '0', `generic_setting_id` int(10) unsigned NOT NULL default '0', `profile_key` varchar(45) NOT NULL default '', PRIMARY KEY (`generic_mapping_id`), |
|---|
| 51 |
UNIQUE KEY (`model_id`, `generic_setting_id`), |
|---|
| 52 |
CONSTRAINT `FK_GENERIC_MAPPINGS_MODEL_ID` FOREIGN KEY (`model_id`) REFERENCES `models` (`model_id`), |
|---|
| 53 |
CONSTRAINT `FK_GENERIC_MAPPINGS_GENERIC_SETTING_ID` FOREIGN KEY (`generic_setting_id`) REFERENCES `generic_settings` (`generic_setting_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|---|
| 54 |
|
|---|
| 55 |
DROP TABLE IF EXISTS `voicepulse_global_provisioning_system`.`generic_translations`; |
|---|
| 56 |
CREATE TABLE `voicepulse_global_provisioning_system`.`generic_translations` ( `generic_translation_id` int(10) unsigned NOT NULL auto_increment, `model_id` int(10) unsigned NOT NULL default '0', `generic_setting_id` int(10) unsigned NOT NULL default '0', `generic_value` varchar(45) NOT NULL default '', `profile_value` text NOT NULL, PRIMARY KEY (`generic_translation_id`), |
|---|
| 57 |
UNIQUE KEY (`model_id`, `generic_setting_id`, `generic_value`), |
|---|
| 58 |
CONSTRAINT `FK_GENERIC_TRANSLATIONS_MODEL_ID` FOREIGN KEY (`model_id`) REFERENCES `models` (`model_id`), |
|---|
| 59 |
CONSTRAINT `FK_GENERIC_TRANSLATIONS_GENERIC_SETTING_ID` FOREIGN KEY (`generic_setting_id`) REFERENCES `generic_settings` (`generic_setting_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|---|
| 60 |
|
|---|
| 61 |
SET FOREIGN_KEY_CHECKS=1; |
|---|
| 62 |
|
|---|
| 63 |
#------------------------------------------------- |
|---|
| 64 |
# INITIALIZE DEVICE-LEVEL SETTINGS |
|---|
| 65 |
# |
|---|
| 66 |
# Device level settings are any settings which you |
|---|
| 67 |
# may want to set for any device, regardless of |
|---|
| 68 |
# model. Examples include admin password. |
|---|
| 69 |
# |
|---|
| 70 |
# When adding new items, you should select |
|---|
| 71 |
# a meaningful name and a corresponding tag with |
|---|
| 72 |
# no spaces or special characters. |
|---|
| 73 |
# |
|---|
| 74 |
#------------------------------------------------- |
|---|
| 75 |
#INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('', ''); |
|---|
| 76 |
|
|---|
| 77 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Admin Password', 'admin_password'); |
|---|
| 78 |
|
|---|
| 79 |
#------------------------------------------------- |
|---|
| 80 |
# INITIALIZE LINE-LEVEL SETTINGS |
|---|
| 81 |
# |
|---|
| 82 |
# Line level settings are any settings which you |
|---|
| 83 |
# may want to set for any line, regardless of |
|---|
| 84 |
# model. Examples include common settings such as |
|---|
| 85 |
# proxy, SIP username, SIP password, codec, dial |
|---|
| 86 |
# plan, and call waiting settings. In more |
|---|
| 87 |
# complex business situations, you may want to |
|---|
| 88 |
# include items such as labeling for LCD display |
|---|
| 89 |
# buttons, speed dials, etc. |
|---|
| 90 |
# |
|---|
| 91 |
# Only Line 01 and 02 are defined below, as this |
|---|
| 92 |
# is the most commonly used with 2-line SIP |
|---|
| 93 |
# devices. For deployments with 2+ line devices, |
|---|
| 94 |
# cut and paste the sections below and change the |
|---|
| 95 |
# 01 to 03, 04, ... |
|---|
| 96 |
# |
|---|
| 97 |
# When adding new items, you should select |
|---|
| 98 |
# a meaningful name and a corresponding tag with |
|---|
| 99 |
# no spaces or special characters. |
|---|
| 100 |
# |
|---|
| 101 |
#------------------------------------------------- |
|---|
| 102 |
#INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('', ''); |
|---|
| 103 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 01 Proxy', 'line_01_proxy'); |
|---|
| 104 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 01 Username', 'line_01_username'); |
|---|
| 105 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 01 Password', 'line_01_password'); |
|---|
| 106 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 01 Display Name', 'line_01_display_name'); |
|---|
| 107 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 01 Call Waiting', 'line_01_call_waiting');INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 02 Proxy', 'line_02_proxy'); |
|---|
| 108 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 02 Username', 'line_02_username'); |
|---|
| 109 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 02 Password', 'line_02_password'); |
|---|
| 110 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 02 Display Name', 'line_02_display_name'); |
|---|
| 111 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_settings` (`name`, `tag`) VALUES ('Line 02 Call Waiting', 'line_02_call_waiting'); |
|---|
| 112 |
|
|---|
| 113 |
################################################## |
|---|
| 114 |
# Defining the Linksys PAP2T |
|---|
| 115 |
################################################## |
|---|
| 116 |
|
|---|
| 117 |
# Insert model |
|---|
| 118 |
INSERT INTO `voicepulse_global_provisioning_system`.`models` (`name`, `tag`, `format`, `regex`, `input_filename`, `output_filename`, `post_processing`) VALUES ('Linksys PAP2T', 'linksys_pap2t', 'XML', '', 'input/linksys_pap2t.xml', 'output/[MAC].xml', ''); |
|---|
| 119 |
SET @MODEL_ID = (SELECT LAST_INSERT_ID()); |
|---|
| 120 |
|
|---|
| 121 |
# Populate dummy generic mappings |
|---|
| 122 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_mappings` (`model_id`, `generic_setting_id`, `profile_key`) |
|---|
| 123 |
SELECT @MODEL_ID, generic_setting_id, tag FROM `voicepulse_global_provisioning_system`.`generic_settings`; |
|---|
| 124 |
|
|---|
| 125 |
# Customize generic mappings |
|---|
| 126 |
# Set the `profile_key` value to the custom value used by Linksys for the |
|---|
| 127 |
# UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '' WHERE `model_id` = @MODEL_ID AND `profile_key` = ''; |
|---|
| 128 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/Admin_Passwd' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'admin_password'; |
|---|
| 129 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/Proxy_1_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_proxy'; |
|---|
| 130 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/User_ID_1_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_username'; |
|---|
| 131 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/Password_1_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_password'; |
|---|
| 132 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/Display_Name_1_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_display_name'; |
|---|
| 133 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/CW_Setting_1_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_call_waiting'; |
|---|
| 134 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/Proxy_2_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_proxy'; |
|---|
| 135 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/User_ID_2_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_username'; |
|---|
| 136 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/Password_2_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_password'; |
|---|
| 137 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/Display_Name_2_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_display_name'; |
|---|
| 138 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '/flat-profile/CW_Setting_2_' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_call_waiting'; |
|---|
| 139 |
|
|---|
| 140 |
SET @GENERIC_SETTING_ID = (SELECT generic_setting_id FROM `voicepulse_global_provisioning_system`.`generic_settings` WHERE `tag` = 'line_01_call_waiting'); |
|---|
| 141 |
|
|---|
| 142 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_translations` (`model_id`, `generic_setting_id`, `generic_value`, `profile_value`) |
|---|
| 143 |
SELECT @MODEL_ID, @GENERIC_SETTING_ID, '0', 'No'; |
|---|
| 144 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_translations` (`model_id`, `generic_setting_id`, `generic_value`, `profile_value`) |
|---|
| 145 |
SELECT @MODEL_ID, @GENERIC_SETTING_ID, '1', 'Yes'; |
|---|
| 146 |
|
|---|
| 147 |
SET @GENERIC_SETTING_ID = (SELECT generic_setting_id FROM `voicepulse_global_provisioning_system`.`generic_settings` WHERE `tag` = 'line_02_call_waiting'); |
|---|
| 148 |
|
|---|
| 149 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_translations` (`model_id`, `generic_setting_id`, `generic_value`, `profile_value`) |
|---|
| 150 |
SELECT @MODEL_ID, @GENERIC_SETTING_ID, '0', 'No'; |
|---|
| 151 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_translations` (`model_id`, `generic_setting_id`, `generic_value`, `profile_value`) |
|---|
| 152 |
SELECT @MODEL_ID, @GENERIC_SETTING_ID, '1', 'Yes'; |
|---|
| 153 |
|
|---|
| 154 |
INSERT INTO `voicepulse_global_provisioning_system`.`devices` (model_id, mac_address, location, note) VALUES (@MODEL_ID, '000E08000000', '', 'Sample Linksys PAP2'); |
|---|
| 155 |
|
|---|
| 156 |
################################################## |
|---|
| 157 |
# Defining the Aastra 480i |
|---|
| 158 |
################################################## |
|---|
| 159 |
|
|---|
| 160 |
# Insert model |
|---|
| 161 |
INSERT INTO `voicepulse_global_provisioning_system`.`models` (`name`, `tag`, `format`, `regex`, `input_filename`, `output_filename`, `post_processing`) VALUES ('Aastra 480i', 'aastra_480i', 'TEXT', '/^(?P<profile_key>[a-zA-Z1-9 ]+): (?P<profile_value>\\S*)/', 'input/aastra_480i.cfg', 'output/[MAC].cfg', ''); |
|---|
| 162 |
SET @MODEL_ID = (SELECT LAST_INSERT_ID()); |
|---|
| 163 |
|
|---|
| 164 |
# Populate dummy generic mappings |
|---|
| 165 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_mappings` (`model_id`, `generic_setting_id`, `profile_key`) |
|---|
| 166 |
SELECT @MODEL_ID, generic_setting_id, tag FROM `voicepulse_global_provisioning_system`.`generic_settings`; |
|---|
| 167 |
|
|---|
| 168 |
# Customize generic mappings |
|---|
| 169 |
# Set the `profile_key` value to the custom value used by Linksys for the |
|---|
| 170 |
# UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '' WHERE `model_id` = @MODEL_ID AND `profile_key` = ''; |
|---|
| 171 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'admin password' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'admin_password'; |
|---|
| 172 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'sip line1 proxy ip' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_proxy'; |
|---|
| 173 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'sip line1 user name' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_username'; |
|---|
| 174 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'sip line1 password' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_password'; |
|---|
| 175 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'sip line1 screen name' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_display_name'; |
|---|
| 176 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'sip line2 proxy ip' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_proxy'; |
|---|
| 177 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'sip line2 user name' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_username'; |
|---|
| 178 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'sip line2 password' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_password'; |
|---|
| 179 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'sip line2 screen name' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_display_name'; |
|---|
| 180 |
|
|---|
| 181 |
INSERT INTO `voicepulse_global_provisioning_system`.`devices` (model_id, mac_address, location, note) VALUES (@MODEL_ID, '00085D000000', '', 'Sample Aastra 480i'); |
|---|
| 182 |
|
|---|
| 183 |
################################################## |
|---|
| 184 |
# Defining the Grandstream GXP2000 1.1.0.16 |
|---|
| 185 |
################################################## |
|---|
| 186 |
|
|---|
| 187 |
# Insert model |
|---|
| 188 |
INSERT INTO `voicepulse_global_provisioning_system`.`models` (`name`, `tag`, `format`, `regex`, `input_filename`, `output_filename`, `post_processing`) VALUES ('Grandstream GXP2000 1.1.0.16', 'grandstream_gxp2000_1_1_0_16', 'TEXT', '/^(?P<profile_key>P[0-9]+) = (?P<profile_value>\\S*)/', 'input/grandstream_gxp2000_1_1_0_16.cfg', 'output/[MAC].cfg', ''); |
|---|
| 189 |
SET @MODEL_ID = (SELECT LAST_INSERT_ID()); |
|---|
| 190 |
|
|---|
| 191 |
# Populate dummy generic mappings |
|---|
| 192 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_mappings` (`model_id`, `generic_setting_id`, `profile_key`) |
|---|
| 193 |
SELECT @MODEL_ID, generic_setting_id, tag FROM `voicepulse_global_provisioning_system`.`generic_settings`; |
|---|
| 194 |
|
|---|
| 195 |
# Customize generic mappings |
|---|
| 196 |
# Set the `profile_key` value to the custom value used by Linksys for the |
|---|
| 197 |
# UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '' WHERE `model_id` = @MODEL_ID AND `profile_key` = ''; |
|---|
| 198 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P2' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'admin_password'; |
|---|
| 199 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P47' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_proxy'; |
|---|
| 200 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P35' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_username'; |
|---|
| 201 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P34' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_password'; |
|---|
| 202 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P3' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_display_name'; |
|---|
| 203 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P402' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_proxy'; |
|---|
| 204 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P404' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_username'; |
|---|
| 205 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P406' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_password'; |
|---|
| 206 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'P407' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_display_name'; |
|---|
| 207 |
|
|---|
| 208 |
INSERT INTO `voicepulse_global_provisioning_system`.`devices` (model_id, mac_address, location, note) VALUES (@MODEL_ID, '000B82000000', '', 'Sample Grandstream GXP2000 1.1.0.16'); |
|---|
| 209 |
|
|---|
| 210 |
|
|---|
| 211 |
################################################## |
|---|
| 212 |
# Defining the Polycom Soundpoint IP 501 |
|---|
| 213 |
################################################## |
|---|
| 214 |
|
|---|
| 215 |
# Insert model |
|---|
| 216 |
INSERT INTO `voicepulse_global_provisioning_system`.`models` (`name`, `tag`, `format`, `regex`, `input_filename`, `output_filename`, `post_processing`) VALUES ('Polycom Soundpoint IP 501', 'polycom_soundpoint_ip_501', 'XML', '', 'input/polycom_soundpoint_ip_501.xml', 'output/phone[MAC].cfg', ''); |
|---|
| 217 |
SET @MODEL_ID = (SELECT LAST_INSERT_ID()); |
|---|
| 218 |
|
|---|
| 219 |
# Populate dummy generic mappings |
|---|
| 220 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_mappings` (`model_id`, `generic_setting_id`, `profile_key`) |
|---|
| 221 |
SELECT @MODEL_ID, generic_setting_id, tag FROM `voicepulse_global_provisioning_system`.`generic_settings`; |
|---|
| 222 |
|
|---|
| 223 |
# Customize generic mappings |
|---|
| 224 |
# Set the `profile_key` value to the custom value used by Linksys for the |
|---|
| 225 |
# UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '' WHERE `model_id` = @MODEL_ID AND `profile_key` = ''; |
|---|
| 226 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'admin_password'; |
|---|
| 227 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'phone1/reg/@reg.1.server.1.address' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_proxy'; |
|---|
| 228 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'phone1/reg/@reg.1.auth.userId' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_username'; |
|---|
| 229 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'phone1/reg/@reg.1.auth.password' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_password'; |
|---|
| 230 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'phone1/reg/@reg.1.displayName' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_display_name'; |
|---|
| 231 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'phone1/reg/@reg.2.server.1.address' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_proxy'; |
|---|
| 232 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'phone1/reg/@reg.2.auth.userId' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_username'; |
|---|
| 233 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'phone1/reg/@reg.2.auth.password' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_password'; |
|---|
| 234 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'phone1/reg/@reg.2.displayName' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_02_display_name'; |
|---|
| 235 |
|
|---|
| 236 |
INSERT INTO `voicepulse_global_provisioning_system`.`devices` (model_id, mac_address, location, note) VALUES (@MODEL_ID, '0004F2000000', '', 'Sample Polycom Soundpoint IP 501'); |
|---|
| 237 |
|
|---|
| 238 |
|
|---|
| 239 |
################################################## |
|---|
| 240 |
# Defining the Snom 300 |
|---|
| 241 |
################################################## |
|---|
| 242 |
|
|---|
| 243 |
# Insert model |
|---|
| 244 |
INSERT INTO `voicepulse_global_provisioning_system`.`models` (`name`, `tag`, `format`, `regex`, `input_filename`, `output_filename`, `post_processing`) VALUES ('Snom 300', 'snom_300', 'TEXT', '/^(?P<profile_key>[a-zA-Z1-9_]+): (?P<profile_value>\\S*)/', 'input/snom_300.htm', 'output/[MAC].htm', ''); |
|---|
| 245 |
SET @MODEL_ID = (SELECT LAST_INSERT_ID()); |
|---|
| 246 |
|
|---|
| 247 |
# Populate dummy generic mappings |
|---|
| 248 |
INSERT INTO `voicepulse_global_provisioning_system`.`generic_mappings` (`model_id`, `generic_setting_id`, `profile_key`) |
|---|
| 249 |
SELECT @MODEL_ID, generic_setting_id, tag FROM `voicepulse_global_provisioning_system`.`generic_settings`; |
|---|
| 250 |
|
|---|
| 251 |
# Customize generic mappings |
|---|
| 252 |
# Set the `profile_key` value to the custom value used by Linksys for the |
|---|
| 253 |
# UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '' WHERE `model_id` = @MODEL_ID AND `profile_key` = ''; |
|---|
| 254 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = '' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'admin_password'; |
|---|
| 255 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'user_host1' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_proxy'; |
|---|
| 256 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'user_name1' WHERE `model_id` = @MODEL_ID AND `profile_key` = 'line_01_username'; |
|---|
| 257 |
UPDATE `voicepulse_global_provisioning_system`.`generic_mappings` SET `profile_key` = 'user_pass1' WHERE ` |
|---|