From d7dac86082e74b52d8a4296c38cfef01204383b3 Mon Sep 17 00:00:00 2001 From: Jonatan Garbuyo Date: Wed, 23 Aug 2023 18:18:21 -0300 Subject: [PATCH] Add support for Cisco phones 79xx --- .../version_sql/10_4.0.0-3_4.0.0-4.sql | 71 +++ setup/tftpboot/DialTemplate.xml | 6 + .../class/issabel/vendor/Cisco.py | 140 ++++-- .../endpoint-classes/tpl/Cisco_local_SEP.tpl | 403 ++++++++++++++++++ 4 files changed, 582 insertions(+), 38 deletions(-) create mode 100644 setup/db/update/endpointconfig/version_sql/10_4.0.0-3_4.0.0-4.sql create mode 100644 setup/tftpboot/DialTemplate.xml create mode 100644 setup/usr/share/issabel/endpoint-classes/tpl/Cisco_local_SEP.tpl diff --git a/setup/db/update/endpointconfig/version_sql/10_4.0.0-3_4.0.0-4.sql b/setup/db/update/endpointconfig/version_sql/10_4.0.0-3_4.0.0-4.sql new file mode 100644 index 0000000..0e7b4dd --- /dev/null +++ b/setup/db/update/endpointconfig/version_sql/10_4.0.0-3_4.0.0-4.sql @@ -0,0 +1,71 @@ + +INSERT INTO `mac_prefix` (`mac_prefix`, `description`, `id_manufacturer`) VALUES +("00:07:0E", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:17:0E", "Cisco - 7970", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:17:59", "Cisco - 7970", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:19:30", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:1C:58", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:1E:4A", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:1E:F7", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:1D:70", "Cisco - 7942", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:1D:A2", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:21:A0", "Cisco - 7975G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:22:90", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:23:04", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:24:14", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:26:0B", "Cisco - 79XX", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:27:90", "Cisco - 8865", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:76:86", "Cisco - 7821", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("00:B0:E1", "Cisco - 7821", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("1C:E6:C7", "Cisco - 7945G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("3C:41:0E", "Cisco - 8865", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("40:F4:EC", "Cisco - 7975G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("50:F7:22", "Cisco - 8865", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("58:97:1E", "Cisco - 7945G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("64:A0:E7", "Cisco - 7962", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("64:D9:89", "Cisco - 7942", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("B8:62:1F", "Cisco - 7945G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("C0:62:6B", "Cisco - 7945G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("CC:5A:53", "Cisco - 8865", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("D0:57:4C", "Cisco - 7945G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("D0:C2:82", "Cisco - 7945G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("D4:2C:44", "Cisco - 7821", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("DC:7B:94", "Cisco - 7942", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("E8:04:62", "Cisco - 7975G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("F8:B7:E2", "Cisco - 8865", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +("F8:7B:20", "Cisco - 8851", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")) +; + +INSERT INTO `model` (`max_accounts`, `static_ip_supported`, `dynamic_ip_supported`, `static_prov_supported`, `name`, `description`, `id_manufacturer`) VALUES +(2, 0, 1, 0, "79XX", "Cisco - 79XX", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(2, 0, 1, 0, "7821", "Cisco - 7821", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(2, 0, 1, 0, "7941G", "Cisco - 7941G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(2, 0, 1, 0, "7942", "Cisco - 7942", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(2, 0, 1, 0, "7945G", "Cisco - 7945G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(2, 0, 1, 0, "7962", "Cisco - 7962", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(8, 0, 1, 0, "7970", "Cisco - 7970", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(8, 0, 1, 0, "7975G", "Cisco - 7975G", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(5, 0, 1, 0, "8851", "Cisco - 8851", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")), +(5, 0, 1, 0, "8865", "Cisco - 8865", (SELECT `id` FROM manufacturer WHERE `name` = "Cisco")) +; + +INSERT INTO `model_properties` (`property_key`, `property_value`, `id_model`) VALUES +("max_sip_accounts", "2", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7821")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7821")), +("max_sip_accounts", "2", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7941G")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7941G")), +("max_sip_accounts", "2", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7942")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7942")), +("max_sip_accounts", "2", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7945")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7945")), +("max_sip_accounts", "2", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7962")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7962")), +("max_sip_accounts", "8", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7970")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7970")), +("max_sip_accounts", "8", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7975G")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "7975G")), +("max_sip_accounts", "5", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "8851")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "8851")), +("max_sip_accounts", "5", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "8865")), +("max_iax2_accounts", "0", (SELECT model.id FROM manufacturer, model WHERE manufacturer.id = model.id_manufacturer AND manufacturer.name = "Cisco" AND model.name = "8865")) +; \ No newline at end of file diff --git a/setup/tftpboot/DialTemplate.xml b/setup/tftpboot/DialTemplate.xml new file mode 100644 index 0000000..4104d2e --- /dev/null +++ b/setup/tftpboot/DialTemplate.xml @@ -0,0 +1,6 @@ + + +