From bfca2e8019ad38d34e1c36b770198e0e5a89fbc1 Mon Sep 17 00:00:00 2001 From: Killsudo Date: Thu, 6 Dec 2018 22:15:19 -0600 Subject: [PATCH] Fanvil x6 template (#3936) * Allow Fanvil x6 template to dynamically provision DSS memory and expansion keys * Expand Fanvil X6 template options to match latest firmware. Use more FusionPBX default settings. * Remove TR069 CPE serial number from template * Have template use the 'admin_name' and 'admin_pass' default settings for admin webui login --- .../templates/provision/fanvil/x6/{$mac}.cfg | 1100 ++++------------- 1 file changed, 238 insertions(+), 862 deletions(-) diff --git a/resources/templates/provision/fanvil/x6/{$mac}.cfg b/resources/templates/provision/fanvil/x6/{$mac}.cfg index e718bb60e2..25d240fbf3 100644 --- a/resources/templates/provision/fanvil/x6/{$mac}.cfg +++ b/resources/templates/provision/fanvil/x6/{$mac}.cfg @@ -2,20 +2,34 @@ 2.0000000000 + 0 255.255.255.0 - {$dns_server_primary} - {$dns_server_secondary} + {if isset($dns_server_primary)}{$dns_server_primary}{else}8.8.8.8{/if} + {if isset($dns_server_secondary)}{$dns_server_secondary}{else}202.96.134.133{/if} 1 1 - 0 + 1 + 1 0 Fanvil X6 0 user123 password + 2 + + + + + + + 1 + 1 + 0 + 0 + Fanvil X6 {$fanvil_wifi_enable} @@ -26,6 +40,10 @@ 20 108 109 + 103 + 104 + 102 + 105 101 107 0 @@ -57,10 +75,11 @@ PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,opus,G722 - H264 + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}H264{/if} 25 2000000 4 + 2 @@ -88,9 +107,11 @@ {$account.1.auth_id} {$account.1.password} {$account.1.register_expires} - + + 5060 + 0 + 3600 {if isset($account.1.password)}1{else}0{/if} - {$account.1.outbound_proxy_primary} {$account.1.sip_port} {$account.1.auth_id} @@ -98,6 +119,9 @@ {$account.1.outbound_proxy_secondary} {$account.1.sip_port} {if isset($account.1.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -186,7 +210,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + 0 @@ -231,9 +255,11 @@ {$account.2.auth_id} {$account.2.password} {$account.2.register_expires} - + + 5060 + 0 + 3600 {if isset($account.2.password)}1{else}0{/if} - {$account.2.outbound_proxy_primary} {$account.2.sip_port} {$account.2.auth_id} @@ -241,6 +267,9 @@ {$account.2.outbound_proxy_secondary} {$account.1.sip_port} {if isset($account.2.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -328,7 +357,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -373,9 +402,11 @@ {$account.3.auth_id} {$account.3.password} {$account.3.register_expires} - + + 5060 + 0 + 3600 {if isset($account.3.password)}1{else}0{/if} - {$account.3.outbound_proxy_primary} {$account.3.sip_port} {$account.3.auth_id} @@ -383,6 +414,9 @@ {$account.3.outbound_proxy_secondary} {$account.3.sip_port} {if isset($account.3.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -472,7 +506,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -517,9 +551,11 @@ {$account.4.auth_id} {$account.4.password} {$account.1.register_expires} - + + 5060 + 0 + 3600 {if isset($account.4.password)}1{else}0{/if} - {$account.4.outbound_proxy_primary} {$account.4.sip_port} {$account.4.auth_id} @@ -527,6 +563,9 @@ {$account.4.outbound_proxy_secondary} {$account.4.sip_port} {if isset($account.4.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -612,7 +651,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -657,9 +696,11 @@ {$account.5.auth_id} {$account.5.password} {$account.5.register_expires} - + + 5060 + 0 + 3600 {if isset($account.5.password)}1{else}0{/if} - {$account.5.outbound_proxy_primary} {$account.5.sip_port} {$account.5.auth_id} @@ -667,6 +708,9 @@ {$account.5.outbound_proxy_secondary} {$account.5.sip_port} {if isset($account.5.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -754,7 +798,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -799,9 +843,11 @@ {$aaccount.6.uth_id} {$account.6.password} {$account.6.register_expires} - + + 5060 + 0 + 3600 {if isset($account.6.password)}1{else}0{/if} - {$account.6.outbound_proxy_primary} {$account.6.sip_port} {$account.6.auth_id} @@ -809,6 +855,9 @@ {$account.6.outbound_proxy_secondary} {$account.6.sip_port} {if isset($account.6.outbound_proxy_secondary)}1{else}0{/if} + 1800 + 0 + 3 0 0 @@ -896,7 +945,7 @@ opus,PCMU,PCMA,G726-32,G729,G723,iLBC,AMR,G722,AMR-WB - + {if isset($fanvil_video_codec)}{$fanvil_video_codec}{else}{/if} 0 @@ -982,8 +1031,8 @@ 0 0 0 - 2 - 2 + {$fanvil_default_answer_mode} + {$fanvil_default_dial_mode} 0 1 1 @@ -1058,11 +1107,12 @@ - 123 + {if isset($fanvil_menu_password)}{$fanvil_menu_password}{else}123{/if} 123 0 0 + 0 110 0 @@ -1074,6 +1124,10 @@ 1 $name 0 + 0 + 1 + 1 + 0 {$fanvil_greeting} 5 @@ -1101,28 +1155,25 @@ 5 3 5 - 5 + 8 3 4 Type 2 - 1 {$ntp_server_primary} {$ntp_server_secondary} - {$fanvil_time_zone} - {$fanvil_location} {$fanvil_time_zone_name} + 60 {$fanvil_enable_dst} 2 - 60 1 - 4 + {if isset($fanvil_location)}{$fanvil_location}{else}4{/if} 0 - 60 + {if isset($fanvil_dst_minute_offset)}{$fanvil_dst_minute_offset}{else}60{/if} 3 5 0 @@ -1131,27 +1182,15 @@ 5 0 2 + 1 + 2 0 - {if isset($fanvil_time_display)}1{else}0{/if} - 6 1 - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - 0 - 0 - history;contact;dnd;menu; hold;xfer;conf;end; @@ -1393,6 +1432,18 @@ 0 + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + 0 + 0 + 120 @@ -1505,8 +1556,8 @@ 30 - {$admin_name} - {$admin_password} + {if isset($admin_name)}{$admin_name}{else}admin{/if} + {if isset($admin_password)}{$admin_password}{else}admin{/if} 10 @@ -1577,6 +1628,7 @@ 0 + 0 {$http_auth_username} @@ -1593,6 +1645,7 @@ 1 1 720 + 0 1 224.0.1.75 @@ -1602,33 +1655,37 @@ 66 + 0 0 + + - 0 - - - 24 + {if isset($fanvil_enable_auto_upgrade)}{$fanvil_enable_auto_upgrade}{else}0{/if} + {if isset($fanvil_firmware_upgrade_server_1)}{$fanvil_firmware_upgrade_server_1}{else}{/if} + {if isset($fanvil_firmware_upgrade_server_2)}{$fanvil_firmware_upgrade_server_2}{else}{/if} + {if isset($fanvil_firmware_upgrade_interval)}{$fanvil_firmware_upgrade_interval}{else}24{/if} - 0 - 256 - 0 - 254 - 0 - 0 - 0 - 0 - 46 - 46 - 46 - 0 - 60 - 0 - 0 + {if isset($fanvil_enable_vlan)}{$fanvil_enable_vlan}{else}0{/if} + {if isset($fanvil_lan_port_vlan)}{$fanvil_lan_port_vlan}{else}256{/if} + {if isset($fanvil_pc_port_vlan)}2{else}0{/if} + {if isset($fanvil_pc_port_vlan)}{$fanvil_pc_port_vlan}{else}254{/if} + {if isset($fanvil_qos_sip)}{$fanvil_qos_sip}{else}0{/if} + {if isset($fanvil_qos_rtp_voice)}{$fanvil_qos_rtp_voice}{else}0{/if} + {if isset($fanvil_qos_rtp_video)}{$fanvil_qos_rtp_video}{else}0{/if} + 0 + {if isset($fanvil_enable_diffserv)}{$fanvil_enable_diffserv}{else}0{/if} + {if isset($fanvil_dscp_sip)}{$fanvil_dscp_sip}{else}46{/if} + {if isset($fanvil_dscp_rtp_voice)}{$fanvil_dscp_rtp_voice}{else}46{/if} + {if isset($fanvil_dscp_rtp_video)}{$fanvil_dscp_rtp_video}{else}34{/if} + {if isset($fanvil_lldp_tx_enable)}{$fanvil_lldp_tx_enable}{else}0{/if} + {if isset($fanvil_lldp_refresh)}{$fanvil_lldp_refresh}{else}60{/if} + {if isset($fanvil_lldp_learn)}{$fanvil_lldp_learn}{else}0{/if} + 1 0 60 0 @@ -1636,12 +1693,12 @@ INFO - stdout + stdout{if $fanvil_syslog_enable == '1'},syslog{else}{/if} platform.log 512KB platform - 0.0.0.0 - 514 + {if isset($fanvil_syslog_server)}{$fanvil_syslog_server}{else}0.0.0.0{/if} + {if isset($fanvil_syslog_server_port)}{$fanvil_syslog_server_port}{else}514{/if} 1 @@ -1667,15 +1724,17 @@ 0 0 0 + 0 + 1 G729 0 8 - - 0 + 0.0.0.0 + 10000 0000000000000000 @@ -1684,328 +1743,99 @@ + + + + + + + + + + + 0 3 5 0 - 0 0 0 0 0 0 + + + + + + + + + + + {strip}{*-- Each Internal Index contains 12 keys --*}{/strip} - - 2 - SIP1 - - - - 2 - SIP2 - - - - 2 - SIP3 - - - - 2 - SIP4 - - - - 2 - SIP5 - - - - 2 - SIP6 - - - - 3 - F_MWI - - - - 3 - F_HEADSET - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id <= 12} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + Blue +{/if} +{/foreach} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id > 12 && $row.device_key_id < 24} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + Green +{/if} +{/foreach} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id > 24 && $row.device_key_id < 36} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + Red +{/if} +{/foreach} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id > 35 && $row.device_key_id < 48} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + Purple +{/if} +{/foreach} - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - +{foreach $keys["memory"] as $row} +{if $row.device_key_id > 47 && $row.device_key_id < 61} + + 1 + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} + Yellow +{/if} +{/foreach} 0 @@ -2057,515 +1887,61 @@ - - +{strip}{*-- Each External Index contains 20 keys --*}{/strip} + +{foreach $keys["expansion"] as $row} +{if $row.device_key_id < 20} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} - - + +{foreach $keys["expansion"] as $row} +{if $row.device_key_id > 19 && $row.device_key_id < 40} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} - +{foreach $keys["expansion"] as $row} +{if $row.device_key_id > 39 && $row.device_key_id < 60} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} - - + +{foreach $keys["expansion"] as $row} +{if $row.device_key_id > 59 && $row.device_key_id < 80} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach} - - + +{foreach $keys["expansion"] as $row} +{if $row.device_key_id > 79 && $row.device_key_id < 100} + 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - - - - 0 - - + {$row.device_key_value}@{$row.device_key_line}/{$row.device_key_type} + {$row.device_key_label} +{/if} +{/foreach}