Update All Mitel Templates to use variables (#5190)

* Mitel phones require the exact model in the template. A 5320 and 5320e phones take an identical template. The "e" model has a gigabit ethernet port.

* 1. Added variable {$domain_name} in a few places that need it.
2. Set the NTP server to use dns name instead of IP address.
3. Set dns for NTP to use pool address (0.pool.ntp.org)
4. Removed Admin account to set back to defaults. Will look at setting that as variable.
5. Hardcoded user account password to be more simple. Will look at setting that as a variable.
6. Set host_ip and video_ip to be {$domain_name} as these were pointed to an AT&T old dns server
7. Set hostname of phone to be SIP ID
8. Remove hardcoded IP for NTP and added the DNS pool.
9. Removed boot version and image version from template as wasn't in other provision systems.

* 1. Set admin password to use provisioning variable.
2. Set user password to use provisioning variable.

* Updating  Mitel templates
This commit is contained in:
Trick Solutions
2020-03-23 17:29:17 -06:00
committed by GitHub
parent e70bfeaf73
commit 3854716bb3
3 changed files with 26 additions and 32 deletions
@@ -3,17 +3,15 @@
{if isset($mitel_tftp_config)}<tftp_config>{$mitel_tftp_config}</tftp_config>{else}<tftp_config>2</tftp_config> {if isset($mitel_tftp_config)}<tftp_config>{$mitel_tftp_config}</tftp_config>{else}<tftp_config>2</tftp_config>
{/if}<pppoe_enable>0</pppoe_enable> {/if}<pppoe_enable>0</pppoe_enable>
<tftp_task_enable>1</tftp_task_enable> <tftp_task_enable>1</tftp_task_enable>
<boot_version>02.00.00.24</boot_version> <tftp_upgrade>2</tftp_upgrade>
<image_version>R7.2.02.00.00.24</image_version>
<tftp_upgrade>0</tftp_upgrade>
<http_upgrade>0</http_upgrade> <http_upgrade>0</http_upgrade>
<outbound_state>0</outbound_state> <outbound_state>0</outbound_state>
<local_sip_port>5060</local_sip_port> <local_sip_port>5060</local_sip_port>
<tos>0</tos> <tos>0</tos>
<e802_priority>-1</e802_priority> <e802_priority>-1</e802_priority>
{if isset($mitel_vlan_id)}<vlan_id>{$mitel_vlan_id}</vlan_id>{else}<vlan_id>-1</vlan_id> {if isset($mitel_vlan_id)}<vlan_id>{$mitel_vlan_id}</vlan_id>{else}<vlan_id>-1</vlan_id>
{/if}<host_name>sip1</host_name> {/if}<host_name>{$account.1.user_id}</host_name>
<domain>-example.com</domain> <domain>{$domain_name}</domain>
<addr_type>0</addr_type> <addr_type>0</addr_type>
<hot_line>0</hot_line> <hot_line>0</hot_line>
<hot_address>operator@example.com</hot_address> <hot_address>operator@example.com</hot_address>
@@ -32,9 +30,9 @@
<checkpeercert>0</checkpeercert> <checkpeercert>0</checkpeercert>
<sipkeepalive>1</sipkeepalive> <sipkeepalive>1</sipkeepalive>
<rss_feed></rss_feed> <rss_feed></rss_feed>
<host_ip>135.199.77.12</host_ip> <host_ip>{$domain_name}</host_ip>
<video_ip>135.199.77.12</video_ip> <video_ip>{$domain_name}</video_ip>
<sntp>128.138.141.172</sntp> <sntp>0.us.pool.ntp.org</sntp>
<time_zone>{$mitel_time_zone}</time_zone> <time_zone>{$mitel_time_zone}</time_zone>
<auth_method>2</auth_method> <auth_method>2</auth_method>
<register_expire>120</register_expire> <register_expire>120</register_expire>
@@ -64,7 +62,7 @@
<pbIndex>0</pbIndex> <pbIndex>0</pbIndex>
<adminId>admin</adminId> <adminId>admin</adminId>
<admin_dispname>Administrator</admin_dispname> <admin_dispname>Administrator</admin_dispname>
<admin_passwd>510731ac096ebcb3989fb1ed5b7075bb</admin_passwd> <admin_passwd>{$admin_password}</admin_passwd>
<busy_fwd_mode>0</busy_fwd_mode> <busy_fwd_mode>0</busy_fwd_mode>
<busy_fwd_addr></busy_fwd_addr> <busy_fwd_addr></busy_fwd_addr>
<always_fwd_mode>0</always_fwd_mode> <always_fwd_mode>0</always_fwd_mode>
@@ -298,7 +296,7 @@
<firmware_abs_timer_min>59</firmware_abs_timer_min> <firmware_abs_timer_min>59</firmware_abs_timer_min>
<firmware_abs_enable>1</firmware_abs_enable> <firmware_abs_enable>1</firmware_abs_enable>
<installer_passcode></installer_passcode> <installer_passcode></installer_passcode>
<user_passwd>5d41402abc4b2a76b9719d911017c592</user_passwd> <user_passwd>{$user_password}</user_passwd>
<web_logo1></web_logo1> <web_logo1></web_logo1>
<!--<web_logo1>&lt;img src="http://sipdnld.mitel.com/mitel.gif" alt="Mitel" width="143" height="43" hspace="0" align="left" /&gt;</web_logo1>--> <!--<web_logo1>&lt;img src="http://sipdnld.mitel.com/mitel.gif" alt="Mitel" width="143" height="43" hspace="0" align="left" /&gt;</web_logo1>-->
<sip_mode>sip</sip_mode> <sip_mode>sip</sip_mode>
@@ -1,19 +1,17 @@
<Parameter Model="5340"> <Parameter Model="5330">
<dhcpenable>1</dhcpenable> <dhcpenable>1</dhcpenable>
{if isset($mitel_tftp_config)}<tftp_config>{$mitel_tftp_config}</tftp_config>{else}<tftp_config>2</tftp_config> {if isset($mitel_tftp_config)}<tftp_config>{$mitel_tftp_config}</tftp_config>{else}<tftp_config>2</tftp_config>
{/if}<pppoe_enable>0</pppoe_enable> {/if}<pppoe_enable>0</pppoe_enable>
<tftp_task_enable>1</tftp_task_enable> <tftp_task_enable>1</tftp_task_enable>
<boot_version>02.00.00.24</boot_version> <tftp_upgrade>2</tftp_upgrade>
<image_version>R7.2.02.00.00.24</image_version>
<tftp_upgrade>0</tftp_upgrade>
<http_upgrade>0</http_upgrade> <http_upgrade>0</http_upgrade>
<outbound_state>0</outbound_state> <outbound_state>0</outbound_state>
<local_sip_port>5060</local_sip_port> <local_sip_port>5060</local_sip_port>
<tos>0</tos> <tos>0</tos>
<e802_priority>-1</e802_priority> <e802_priority>-1</e802_priority>
{if isset($mitel_vlan_id)}<vlan_id>{$mitel_vlan_id}</vlan_id>{else}<vlan_id>-1</vlan_id> {if isset($mitel_vlan_id)}<vlan_id>{$mitel_vlan_id}</vlan_id>{else}<vlan_id>-1</vlan_id>
{/if}<host_name>sip1</host_name> {/if}<host_name>{$account.1.user_id}</host_name>
<domain>-example.com</domain> <domain>{$domain_name}</domain>
<addr_type>0</addr_type> <addr_type>0</addr_type>
<hot_line>0</hot_line> <hot_line>0</hot_line>
<hot_address>operator@example.com</hot_address> <hot_address>operator@example.com</hot_address>
@@ -32,9 +30,9 @@
<checkpeercert>0</checkpeercert> <checkpeercert>0</checkpeercert>
<sipkeepalive>1</sipkeepalive> <sipkeepalive>1</sipkeepalive>
<rss_feed></rss_feed> <rss_feed></rss_feed>
<host_ip>135.199.77.12</host_ip> <host_ip>{$domain_name}</host_ip>
<video_ip>135.199.77.12</video_ip> <video_ip>{$domain_name}</video_ip>
<sntp>128.138.141.172</sntp> <sntp>0.us.pool.ntp.org</sntp>
<time_zone>{$mitel_time_zone}</time_zone> <time_zone>{$mitel_time_zone}</time_zone>
<auth_method>2</auth_method> <auth_method>2</auth_method>
<register_expire>120</register_expire> <register_expire>120</register_expire>
@@ -64,7 +62,7 @@
<pbIndex>0</pbIndex> <pbIndex>0</pbIndex>
<adminId>admin</adminId> <adminId>admin</adminId>
<admin_dispname>Administrator</admin_dispname> <admin_dispname>Administrator</admin_dispname>
<admin_passwd>510731ac096ebcb3989fb1ed5b7075bb</admin_passwd> <admin_passwd>{$admin_password}</admin_passwd>
<busy_fwd_mode>0</busy_fwd_mode> <busy_fwd_mode>0</busy_fwd_mode>
<busy_fwd_addr></busy_fwd_addr> <busy_fwd_addr></busy_fwd_addr>
<always_fwd_mode>0</always_fwd_mode> <always_fwd_mode>0</always_fwd_mode>
@@ -298,7 +296,7 @@
<firmware_abs_timer_min>59</firmware_abs_timer_min> <firmware_abs_timer_min>59</firmware_abs_timer_min>
<firmware_abs_enable>1</firmware_abs_enable> <firmware_abs_enable>1</firmware_abs_enable>
<installer_passcode></installer_passcode> <installer_passcode></installer_passcode>
<user_passwd>5d41402abc4b2a76b9719d911017c592</user_passwd> <user_passwd>{$user_password}</user_passwd>
<web_logo1></web_logo1> <web_logo1></web_logo1>
<!--<web_logo1>&lt;img src="http://sipdnld.mitel.com/mitel.gif" alt="Mitel" width="143" height="43" hspace="0" align="left" /&gt;</web_logo1>--> <!--<web_logo1>&lt;img src="http://sipdnld.mitel.com/mitel.gif" alt="Mitel" width="143" height="43" hspace="0" align="left" /&gt;</web_logo1>-->
<sip_mode>sip</sip_mode> <sip_mode>sip</sip_mode>
@@ -1,19 +1,17 @@
<Parameter Model="5324"> <Parameter Model="5340">
<dhcpenable>1</dhcpenable> <dhcpenable>1</dhcpenable>
{if isset($mitel_tftp_config)}<tftp_config>{$mitel_tftp_config}</tftp_config>{else}<tftp_config>2</tftp_config> {if isset($mitel_tftp_config)}<tftp_config>{$mitel_tftp_config}</tftp_config>{else}<tftp_config>2</tftp_config>
{/if}<pppoe_enable>0</pppoe_enable> {/if}<pppoe_enable>0</pppoe_enable>
<tftp_task_enable>1</tftp_task_enable> <tftp_task_enable>1</tftp_task_enable>
<boot_version>02.00.00.24</boot_version> <tftp_upgrade>2</tftp_upgrade>
<image_version>R7.2.02.00.00.24</image_version>
<tftp_upgrade>0</tftp_upgrade>
<http_upgrade>0</http_upgrade> <http_upgrade>0</http_upgrade>
<outbound_state>0</outbound_state> <outbound_state>0</outbound_state>
<local_sip_port>5060</local_sip_port> <local_sip_port>5060</local_sip_port>
<tos>0</tos> <tos>0</tos>
<e802_priority>-1</e802_priority> <e802_priority>-1</e802_priority>
{if isset($mitel_vlan_id)}<vlan_id>{$mitel_vlan_id}</vlan_id>{else}<vlan_id>-1</vlan_id> {if isset($mitel_vlan_id)}<vlan_id>{$mitel_vlan_id}</vlan_id>{else}<vlan_id>-1</vlan_id>
{/if}<host_name>sip1</host_name> {/if}<host_name>{$account.1.user_id}</host_name>
<domain>-example.com</domain> <domain>{$domain_name}</domain>
<addr_type>0</addr_type> <addr_type>0</addr_type>
<hot_line>0</hot_line> <hot_line>0</hot_line>
<hot_address>operator@example.com</hot_address> <hot_address>operator@example.com</hot_address>
@@ -32,9 +30,9 @@
<checkpeercert>0</checkpeercert> <checkpeercert>0</checkpeercert>
<sipkeepalive>1</sipkeepalive> <sipkeepalive>1</sipkeepalive>
<rss_feed></rss_feed> <rss_feed></rss_feed>
<host_ip>135.199.77.12</host_ip> <host_ip>{$domain_name}</host_ip>
<video_ip>135.199.77.12</video_ip> <video_ip>{$domain_name}</video_ip>
<sntp>128.138.141.172</sntp> <sntp>0.us.pool.ntp.org</sntp>
<time_zone>{$mitel_time_zone}</time_zone> <time_zone>{$mitel_time_zone}</time_zone>
<auth_method>2</auth_method> <auth_method>2</auth_method>
<register_expire>120</register_expire> <register_expire>120</register_expire>
@@ -64,7 +62,7 @@
<pbIndex>0</pbIndex> <pbIndex>0</pbIndex>
<adminId>admin</adminId> <adminId>admin</adminId>
<admin_dispname>Administrator</admin_dispname> <admin_dispname>Administrator</admin_dispname>
<admin_passwd>510731ac096ebcb3989fb1ed5b7075bb</admin_passwd> <admin_passwd>{$admin_password}</admin_passwd>
<busy_fwd_mode>0</busy_fwd_mode> <busy_fwd_mode>0</busy_fwd_mode>
<busy_fwd_addr></busy_fwd_addr> <busy_fwd_addr></busy_fwd_addr>
<always_fwd_mode>0</always_fwd_mode> <always_fwd_mode>0</always_fwd_mode>
@@ -298,7 +296,7 @@
<firmware_abs_timer_min>59</firmware_abs_timer_min> <firmware_abs_timer_min>59</firmware_abs_timer_min>
<firmware_abs_enable>1</firmware_abs_enable> <firmware_abs_enable>1</firmware_abs_enable>
<installer_passcode></installer_passcode> <installer_passcode></installer_passcode>
<user_passwd>5d41402abc4b2a76b9719d911017c592</user_passwd> <user_passwd>{$user_password}</user_passwd>
<web_logo1></web_logo1> <web_logo1></web_logo1>
<!--<web_logo1>&lt;img src="http://sipdnld.mitel.com/mitel.gif" alt="Mitel" width="143" height="43" hspace="0" align="left" /&gt;</web_logo1>--> <!--<web_logo1>&lt;img src="http://sipdnld.mitel.com/mitel.gif" alt="Mitel" width="143" height="43" hspace="0" align="left" /&gt;</web_logo1>-->
<sip_mode>sip</sip_mode> <sip_mode>sip</sip_mode>