diff --git a/resources/templates/provision/yealink/w56p/{$mac}.cfg b/resources/templates/provision/yealink/w56p/{$mac}.cfg index ed7a4b9510..51417ce7a6 100644 --- a/resources/templates/provision/yealink/w56p/{$mac}.cfg +++ b/resources/templates/provision/yealink/w56p/{$mac}.cfg @@ -8,7 +8,11 @@ ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.1.password) } account.1.enable = 1 +{else} +account.1.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. account.1.label = {$account.1.display_name} @@ -17,11 +21,15 @@ account.1.label = {$account.1.display_name} account.1.display_name = {$account.1.display_name} #Configure the username and password for register authentication. -account.1.auth_name = {$account.1.user_id} -account.1.password = {$account.1.user_password} +account.1.auth_name = {$account.1.auth_id} +account.1.password = {$account.1.password} #Configure the register user name. +{if isset($account.1.server.1.address)} +account.1.user_name = {$account.1.user_id}@{$account.1.server_address} +{else} account.1.user_name = {$account.1.user_id} +{/if} #Configure the SIP server address. account.1.sip_server_host = {$account.1.server_address} @@ -33,10 +41,11 @@ account.1.sip_server_port = {$account.1.sip_port} #Specify the IP address or domain name of the outbound proxy server. -account.1.outbound_host = {$account.1.outbound_proxy} +account.1.outbound_host = {$account.1.outbound_proxy_primary} #Specify the server port, the default value is 5060. account.1.outbound_port = {$account.1.sip_port} +{if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; {if $account.1.sip_transport == 'udp'}account.1.transport = 0{/if} @@ -268,7 +277,11 @@ account.1.sip_trust_ctrl = 1 ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.2.password) } account.2.enable = 1 +{else} +account.2.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. account.2.label = {$account.2.display_name} @@ -281,7 +294,11 @@ account.2.auth_name = {$account.2.user_id} account.2.password = {$account.2.password} #Configure the register user name. +{if isset($account.2.server.1.address)} +account.2.user_name = {$account.2.user_id}@{$account.2.server_address} +{else} account.2.user_name = {$account.2.user_id} +{/if} #Configure the SIP server address. account.2.sip_server_host = {$account.2.server_address} @@ -293,10 +310,11 @@ account.2.sip_server_port = {$account.2.sip_port} #Specify the IP address or domain name of the outbound proxy server. -account.2.outbound_host = +account.2.outbound_host = {$account.2.outbound_proxy_primary} #Specify the server port, the default value is 5060. account.2.outbound_port = {$account.2.sip_port} +{if isset($yealink_sip_listen_port)}account.2.sip_listen_port = {$yealink_sip_listen_port}{else}account.2.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; {if $account.2.sip_transport == 'udp'}account.2.transport = 0{/if} @@ -517,7 +535,11 @@ account.2.sip_trust_ctrl = 1 ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; +{if isset($account.3.password) } account.3.enable = 1 +{else} +account.3.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. account.3.label = {$account.3.display_name} @@ -530,7 +552,11 @@ account.3.auth_name = {$account.3.user_id} account.3.password = {$account.3.password} #Configure the register user name. +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} +{else} account.3.user_name = {$account.3.user_id} +{/if} #Configure the SIP server address. account.3.sip_server_host = {$account.3.server_address} @@ -542,10 +568,11 @@ account.3.sip_server_port = {$account.3.sip_port} #Specify the IP address or domain name of the outbound proxy server. -account.3.outbound_host = {$account.3.outbound_proxy} +account.3.outbound_host = {$account.3.outbound_proxy_primary} #Specify the server port, the default value is 5060. account.3.outbound_port = {$account.3.sip_port} +{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; {if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if} @@ -766,23 +793,31 @@ account.3.sip_trust_ctrl = 1 ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -account.4.enable = +{if isset($account.4.password) } +account.4.enable = 1 +{else} +account.4.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.4.label = +account.4.label = {$account.4.display_name} #Configure the display name of account 1. -account.4.display_name = +account.4.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.4.auth_name = -account.4.password = +account.4.auth_name = {$account.4.auth_id} +account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = +{if isset($account.4.server.1.address)} +account.4.user_name = {$account.4.user_id}@{$account.4.server_address} +{else} +account.4.user_name = {$account.4.user_id} +{/if} #Configure the SIP server address. -account.4.sip_server_host = +account.4.sip_server_host = {$account.4.server_address} #Specify the port for the SIP server. The default value is 5060. account.4.sip_server_port = {$account.4.sip_port} @@ -791,10 +826,11 @@ account.4.sip_server_port = {$account.4.sip_port} #Specify the IP address or domain name of the outbound proxy server. -account.4.outbound_host = +account.4.outbound_host = {$account.4.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.4.outbound_port = +account.4.outbound_port = {$account.4.sip_port} +{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; {if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if} @@ -1017,23 +1053,30 @@ account.4.sip_trust_ctrl = 1 ####################################################################################### #Enable or disable the account 1; 0-Disabled (default), 1-Enabled; -account.5.enable = +{if isset($account.5.password) } +account.5.enable = 1 +{else} +account.5.enable = 0 +{/if} #Configure the label displayed on the LCD screen for account 1. -account.5.label = +account.5.label = {$account.4.display_name} #Configure the display name of account 1. -account.5.display_name = +account.5.display_name = {$account.4.display_name} #Configure the username and password for register authentication. -account.5.auth_name = -account.5.password = +account.5.auth_name = {$account.4.auth_id} +account.5.password = {$account.4.password} #Configure the register user name. -account.5.user_name = - +{if isset($account.5.server.1.address)} +account.5.user_name = {$account.5.user_id}@{$account.5.server_address} +{else} +account.5.user_name = {$account.5.user_id} +{/if} #Configure the SIP server address. -account.5.sip_server_host = +account.5.sip_server_host = {$account.5.server_address} #Specify the port for the SIP server. The default value is 5060. account.5.sip_server_port = {$account.5.sip_port} @@ -1042,10 +1085,11 @@ account.5.sip_server_port = {$account.5.sip_port} #Specify the IP address or domain name of the outbound proxy server. -account.5.outbound_host = +account.5.outbound_host = {$account.5.outbound_proxy_primary} #Specify the server port, the default value is 5060. -account.5.outbound_port = +account.5.outbound_port ={$account.5.sip_port} +{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if} #Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV; {if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if}