diff --git a/resources/templates/provision/yealink/t20p/{$mac}.cfg b/resources/templates/provision/yealink/t20p/{$mac}.cfg index 9874e5d850..48a4043993 100644 --- a/resources/templates/provision/yealink/t20p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t20p/{$mac}.cfg @@ -25,7 +25,11 @@ 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} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.1.sip_trust_ctrl = 1 @@ -357,7 +361,11 @@ account.2.auth_name = {$account.2.auth_id} account.2.password = {$account.2.password} #Configure the register user name. -account.2.user_name = {$account.2.user_id} +{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} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.2.sip_trust_ctrl = 1 @@ -680,7 +688,11 @@ account.3.auth_name = {$account.3.auth_id} account.3.password = {$account.3.password} #Configure the register user name. -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.3.user_name = {$account.3.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.3.sip_trust_ctrl = 1 @@ -1001,7 +1013,11 @@ account.4.auth_name = {$account.4.auth_id} account.4.password = {$account.4.password} #Configure the register user name. -account.4.user_name = {$account.4.user_id} +{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} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.4.sip_trust_ctrl = 1 @@ -1325,7 +1341,11 @@ account.5.auth_name = {$account.5.auth_id} account.5.password = {$account.5.password} #Configure the register 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} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.5.sip_trust_ctrl = 1 @@ -1644,7 +1664,11 @@ account.6.auth_name = {$account.6.auth_id} account.6.password = {$account.6.user_id} #Configure the register user name. +{if isset($account.6.server.1.address)} +account.6.user_name = {$account.6.user_id}@{$account.6.server_address} +{else} account.6.user_name = {$account.6.user_id} +{/if} #Enable or disable the phone to receive the messages from the server only; 0-Disabled (default), 1-Enabled; account.6.sip_trust_ctrl = 1