From 8cce35d7a9df3642b7f4f4ab1fb8fe48d547b1e4 Mon Sep 17 00:00:00 2001 From: AlexanderDCrane <40072887+AlexanderDCrane@users.noreply.github.com> Date: Mon, 24 Sep 2018 22:09:43 -0600 Subject: [PATCH] Update {$mac}.cfg (#3594) --- .../provision/yealink/w52p/{$mac}.cfg | 65 ++++++++++++++----- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/resources/templates/provision/yealink/w52p/{$mac}.cfg b/resources/templates/provision/yealink/w52p/{$mac}.cfg index 7d5905e2d0..06b2d16dbd 100644 --- a/resources/templates/provision/yealink/w52p/{$mac}.cfg +++ b/resources/templates/provision/yealink/w52p/{$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} @@ -21,19 +25,24 @@ account.1.auth_name = {$account.1.user_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} #Specify the port for the SIP server. The default value is 5060. account.1.sip_server_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} #Enable or disable to use the outbound proxy server; 0-Disabled (default), 1-Enabled; #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} @@ -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} @@ -520,7 +538,7 @@ account.2.sip_trust_ctrl = 1 {if isset($account.3.password) } account.3.enable = 1 {else} -account.1.enable = 0 +account.3.enable = 0 {/if} #Configure the label displayed on the LCD screen for account 1. @@ -534,10 +552,10 @@ account.3.auth_name = {$account.3.user_id} account.3.password = {$account.3.password} #Configure the register user name. -{if isset($account.1.server.1.address)} -account.3.user_name = {$account.3.user_id} +{if isset($account.3.server.1.address)} +account.3.user_name = {$account.3.user_id}@{$account.3.server_address} {else} -account.1.user_name = {$account.3.user_id} +account.3.user_name = {$account.3.user_id} {/if} #Configure the SIP server address. @@ -550,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} @@ -791,7 +810,11 @@ account.4.auth_name = {$account.4.auth_id} account.4.password = {$account.4.password} #Configure the register 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.server_address} @@ -807,6 +830,7 @@ account.4.outbound_host = {$account.4.outbound_proxy_primary} #Specify the server port, the default value is 5060. 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} @@ -1029,23 +1053,31 @@ 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.5.display_name} #Configure the display name of account 1. -account.5.display_name = +account.5.display_name = {$account.5.display_name} #Configure the username and password for register authentication. -account.5.auth_name = -account.5.password = +account.5.auth_name = {$account.5.auth_id} +account.5.password = {$account.5.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} @@ -1054,10 +1086,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}