diff --git a/resources/templates/provision/cisco/spa504g/{$mac}.xml b/resources/templates/provision/cisco/spa504g/{$mac}.xml
index 0212580349..fadd6c351c 100644
--- a/resources/templates/provision/cisco/spa504g/{$mac}.xml
+++ b/resources/templates/provision/cisco/spa504g/{$mac}.xml
@@ -268,7 +268,7 @@
No
Yes
-{if $shared_line_1 == "shared"}shared{else}private{/if}
+{if $account.1.shared_line == "shared"}shared{else}private{/if}
3600
No
@@ -281,8 +281,8 @@
6
high
up and down
-{$sip_transport_1|upper}
-{$sip_port_1}
+{$account.1.sip_transport|upper}
+{$account.1.sip_port}
No
Yes
@@ -311,26 +311,26 @@
No
-{$server_address_1}
-{if isset($outbound_proxy_primary_1)}Yes{else}No{/if}
-{$outbound_proxy_primary_1}
-{$server_address_1}
-{$outbound_proxy_secondary_1}
+{$account.1.server_address}
+{if isset($account.1.outbound_proxy_primary)}Yes{else}No{/if}
+{$account.1.outbound_proxy_primary}
+{$account.1.server_address}
+{$account.1.outbound_proxy_secondary}
Yes
Yes
No
-{$register_expires_1}
+{$account.1.register_expires}
No
-{if $sip_transport_1 == 'dns srv'}Yes{/if}
-{if $sip_transport_1 != 'dns srv'}No{/if}
+{if $account.1.sip_transport == 'dns srv'}Yes{/if}
+{if $account.1.sip_transport != 'dns srv'}No{/if}
No
600
Normal
{if isset($spa_dual_registration)}Yes{else}No{/if}
{if isset($spa_register_when_failover)}Yes{else}No{/if}
-{$display_name_1}
-{$user_id_1}
-{$user_password_1}
+{$account.1.display_name}
+{$account.1.user_id}
+{$account.1.password}
No
@@ -354,7 +354,7 @@
Yes
Yes
-{if $shared_line_2 == "shared"}shared{else}private{/if}
+{if $account.2.shared_line == "shared"}shared{else}private{/if}
3600
No
@@ -397,26 +397,26 @@
No
-{$server_address_2}
-{if isset($outbound_proxy_primary_2)}Yes{else}No{/if}
-{$outbound_proxy_primary_2}
-{$server_address_2}
-{$outbound_proxy_secondary_2}
+{$account.2.server_address}
+{if isset($account.2.outbound_proxy_primary)}Yes{else}No{/if}
+{$account.2.outbound_proxy_primary}
+{$account.2.server_address}
+{$account.2.outbound_proxy_secondary}
Yes
Yes
No
-{$register_expires_2}
+{$account.2.register_expires}
No
-{if $sip_transport_2 == 'dns srv'}Yes{/if}
-{if $sip_transport_2 != 'dns srv'}No{/if}
+{if $account.2.sip_transport == 'dns srv'}Yes{/if}
+{if $account.2.sip_transport != 'dns srv'}No{/if}
No
600
Normal
{if isset($spa_dual_registration)}Yes{else}No{/if}
{if isset($spa_register_when_failover)}Yes{else}No{/if}
-{$display_name_2}
-{$user_id_2}
-{$user_password_2}
+{account.2.$display_name}
+{$account.2.user_id}
+{$account.2.password}
No
@@ -440,7 +440,7 @@
Yes
Yes
-{if $shared_line_3 == "shared"}shared{else}private{/if}
+{if $account.3.shared_line == "shared"}shared{else}private{/if}
3600
No
@@ -483,26 +483,26 @@
No
-{$server_address_3}
-{if isset($outbound_proxy_primary_3)}Yes{else}No{/if}
-{$outbound_proxy_primary_3}
-{$server_address_3}
-{$outbound_proxy_secondary_3}
+{$account.3.server_address}
+{if isset($account.3.outbound_proxy_primary)}Yes{else}No{/if}
+{$account.3.outbound_proxy_primary}
+{$account.3.server_address}
+{$account.3.outbound_proxy_secondary}
Yes
Yes
No
-{$register_expires_3}
+{$account.3.register_expires}
No
-{if $sip_transport_3 == 'dns srv'}Yes{/if}
-{if $sip_transport_3 != 'dns srv'}No{/if}
+{if $account.3.sip_transport == 'dns srv'}Yes{/if}
+{if $account.3.sip_transport != 'dns srv'}No{/if}
No
600
Normal
{if isset($spa_dual_registration)}Yes{else}No{/if}
{if isset($spa_register_when_failover)}Yes{else}No{/if}
-{$display_name_3}
-{$user_id_3}
-{$user_password_3}
+{$account.3.display_name}
+{$account.3.user_id}
+{$account.3.password}
No
@@ -526,7 +526,7 @@
Yes
Yes
-{if $shared_line_4 == "shared"}shared{else}private{/if}
+{if $account.4.shared_line == "shared"}shared{else}private{/if}
3600
No
@@ -569,26 +569,26 @@
No
-{$server_address_4}
-{if isset($outbound_proxy_primary_4)}Yes{else}No{/if}
-{$outbound_proxy_primary_4}
-{$server_address_4}
-{$outbound_proxy_secondary_4}
+{$account.4.server_address}
+{if isset($account.4.outbound_proxy_primary)}Yes{else}No{/if}
+{$account.4.outbound_proxy_primary}
+{$account.4.server_address}
+{$account.4.outbound_proxy_secondary}
Yes
Yes
No
-{$register_expires_4}
+{$account.4.register_expires}
No
-{if $sip_transport_4 == 'dns srv'}Yes{/if}
-{if $sip_transport_4 != 'dns srv'}No{/if}
+{if $account.4.sip_transport == 'dns srv'}Yes{/if}
+{if $account.4.sip_transport != 'dns srv'}No{/if}
No
600
Normal
{if isset($spa_dual_registration)}Yes{else}No{/if}
{if isset($spa_register_when_failover)}Yes{else}No{/if}
-{$display_name_4}
-{$user_id_4}
-{$user_password_4}
+{$account.4.display_name}
+{$account.4.user_id}
+{$account.4.password}
No