diff --git a/resources/templates/provision/grandstream/wp820/phonebook.xml b/resources/templates/provision/grandstream/wp820/phonebook.xml
new file mode 100644
index 0000000000..62c745db9f
--- /dev/null
+++ b/resources/templates/provision/grandstream/wp820/phonebook.xml
@@ -0,0 +1,49 @@
+
+
+1
+{foreach $contacts as $contact}
+{if $contact.contact_type == "group"}
+
+{$contact.id}
+{$contact.group_description|truncate:10}
+
+{/if}
+{/foreach}
+{$i=0}
+{foreach $contacts as $contact}
+{if $contact.contact_name_given != "" && $contact.contact_type == "contact"}
+
+{$contact.contact_name_given}
+{$contact.contact_name_family}
+{if $contact.contact_role != "" }
+{$contact.contact_role}
+{/if}
+{if $contact.contact_category != "" }
+{$contact.contact_category}
+{/if}
+
+{$contact.contact_work}
+1
+
+{if $contact.contact_home != "" }
+
+{$contact.contact_home}
+1
+
+{/if}
+{if $contact.contact_cell != "" }
+
+{$contact.contact_cell}
+1
+
+{/if}
+{if $contact.contact_organization != "" }
+{$contact.contact_organization}
+{/if}
+{foreach $contact.groups as $group}
+{$group}
+{/foreach}
+
+{/if}
+{/foreach}
+
diff --git a/resources/templates/provision/grandstream/wp820/{mac}.xml b/resources/templates/provision/grandstream/wp820/{mac}.xml
new file mode 100644
index 0000000000..be17e37c86
--- /dev/null
+++ b/resources/templates/provision/grandstream/wp820/{mac}.xml
@@ -0,0 +1,2514 @@
+
+
+
+ {$mac|replace:'-':''}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1
+
+
+
+{$display_name_1}
+
+
+
+{$server_address_1}
+
+
+
+{$secondary_server_address_1}
+
+
+
+{$user_id_1}
+
+
+
+{$auth_id_1}
+
+
+
+{$user_password_1}
+
+
+
+{$display_name_1}
+
+
+
+
+0
+
+
+
+*97
+
+
+
+
+
+{$outbound_proxy_1}
+
+
+
+
+
+
+
+
+{if isset($grandstream_dns_mode)}
+{$grandstream_dns_mode}
+{else}
+0
+{/if}
+
+
+
+
+0
+
+
+
+
+{if isset($grandstream_nat_traversal)}
+{$grandstream_nat_traversal}
+{else}
+0
+{/if}
+
+
+
+
+
+
+
+
+
+
+
+
+
+1
+
+
+
+
+2
+
+
+
+
+{if isset($register_expires_1)}
+{$register_expires_1}
+{else}
+60
+{/if}
+
+
+
+
+0
+
+
+
+
+20
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+30
+
+
+
+
+3
+
+
+
+
+{if isset($subscribe_mwi)}
+1
+{else}
+0
+{/if}
+
+
+
+
+
+0
+
+
+
+
+
+0
+
+
+
+
+{$tp=0}
+{if $sip_transport_1 == 'udp'}{$tp=0}{/if}
+{if $sip_transport_1 == 'tcp'}{$tp=1}{/if}
+{if $sip_transport_1 == 'tls'}{$tp=2}{/if}
+{if $sip_transport_1 == 'dns srv'}{$tp=1}{/if}
+{$tp}
+
+
+
+
+5060
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+1
+
+
+
+
+
+50
+
+
+
+
+
+400
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+1
+
+
+
+
+180
+
+
+
+
+90
+
+
+
+
+0
+
+
+
+
+1
+
+
+
+
+0
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+8
+
+
+
+
+9
+
+
+
+
+9
+
+
+
+
+9
+
+
+
+
+9
+
+
+
+
+9
+
+
+
+
+9
+
+
+
+
+1
+
+
+
+
+0
+
+
+
+
+1
+
+
+
+
+123
+
+
+
+
+0
+
+
+
+
+1
+
+
+
+
+0
+
+
+
+
+101
+
+
+
+
+1
+
+
+
+
+0
+
+
+
+
+121
+
+
+
+
+124
+
+
+
+
+0
+
+
+
+
+2
+
+
+
+
+
+
+{if isset($grandstream_srtp)}
+{$grandstream_srtp}
+{else}
+0
+{/if}
+
+
+
+
+
+0
+
+
+
+
+1
+
+
+
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+4
+
+
+
+
+60
+
+
+
+
+0
+
+
+
+
+1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{$grandstream_dial_plan}
+
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+
+
+
+
+100
+
+
+
+
+
+
+
+
+
+
+
+
+{if isset($user_password_2)}
+1
+{else}
+0
+{/if}
+
+
+
+{$display_name_2}
+
+
+
+{$server_address_2}
+
+
+
+
+
+
+
+{$user_id_2}
+
+
+
+{$auth_id_2}
+
+
+
+{$user_password_2}
+
+
+
+{$display_name_2}
+
+
+
+
+0
+
+
+
+*97
+
+
+
+
+
+{$outbound_proxy_2}
+
+
+
+
+
+
+
+
+{if isset($grandstream_dns_mode)}
+{$grandstream_dns_mode}
+{else}
+0
+{/if}
+
+
+
+
+0
+
+
+
+
+{if isset($grandstream_nat_traversal)}
+{$grandstream_nat_traversal}
+{else}
+0
+{/if}
+
+
+
+
+
+
+
+
+
+
+
+
+
+1
+
+
+
+
+0
+
+
+
+
+{if isset($register_expires_2)}
+{$register_expires_12}
+{else}
+60
+{/if}
+
+
+
+
+0
+
+
+
+
+20
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+30
+
+
+
+
+3
+
+
+
+
+{if isset($subscribe_mwi)}
+1
+{else}
+0
+{/if}
+
+
+
+
+
+0
+
+
+
+
+
+0
+
+
+
+
+{$tp=0}
+{if $sip_transport_2 == 'udp'}{$tp=0}{/if}
+{if $sip_transport_2 == 'tcp'}{$tp=1}{/if}
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+
+
+0
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+
+100
+
+
+
+
+
+
+
+
+
+
+50040
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+20
+
+
+
+stun.ipvideotalk.com
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+1
+
+
+
+
+0
+
+
+
+0
+
+
+
+
+1
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+30
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+2
+
+
+
+[()-]
+
+
+
+
+1
+
+
+
+
+
+
+0
+
+
+
+f
+
+
+
+
+
+
+
+f
+
+
+
+f
+
+
+
+f
+
+
+
+f
+
+
+
+f
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+30
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+8
+
+
+
+channel(*)
+
+
+
+224.0.1.116:5001
+
+
+
+
+1
+
+
+
+
+24
+
+
+
+
+25
+
+
+
+
+1100000000000000000000011
+
+
+
+
+1100000000000000000000011
+
+
+
+
+1111111111111111111111111
+
+
+
+
+1111111111111111111111111
+
+
+
+
+
+
+
+
+
+
+
+
+
+1
+
+
+
+
+0
+
+
+
+
+30
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+channel(*)
+
+
+
+
+26
+
+
+
+
+49
+
+
+
+
+50
+
+
+
+
+
+
+
+
+
+1100000000000000000000011
+
+
+
+
+1100000000000000000000011
+
+
+
+
+1111111111111111111111111
+
+
+
+
+1111111111111111111111111
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+86400
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+
+
+
+{if isset($grandstream_firmware_path)}
+{$grandstream_firmware_path}
+{else}
+{$domain_name}{$project_path}/app/provision
+{/if}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+
+
+
+{if $grandstream_config_server_path=="none"}
+
+{elseif isset($grandstream_config_server_path)}
+{$grandstream_config_server_path}
+{else}
+{$domain_name}{$project_path}/app/provision
+{/if}
+
+
+
+{$http_auth_username}
+
+
+
+{$http_auth_password}
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1
+
+
+
+1440
+
+
+
+1
+
+
+
+
+1
+
+
+
+
+
+
+
+0
+
+
+
+1
+
+
+
+
+
+
+1
+
+
+
+
+
+0
+
+
+
+1
+
+
+
+
+
+
+
+0
+
+
+
+
+0
+
+
+
+
+
+1
+
+
+
+
+
+
+
+0
+
+
+
+
+{$grandstream_syslog_server}
+
+
+
+
+{if isset($grandstream_syslog_level)}
+{$grandstream_syslog_level}
+{else}
+0
+{/if}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{if isset($contact_grandstream)}
+1
+{else}
+0
+{/if}
+
+
+
+
+
+
+{if isset($contact_grandstream)}
+{$grandstream_phonebook_xml_server_path}{$mac}/
+{elseif isset($grandstream_phonebook_xml_server_path)}
+{$grandstream_phonebook_xml_server_path}
+{else}
+
+{/if}
+
+
+
+
+
+
+
+
+
+
+
+
+{if isset($grandstream_phonebook_download_interval)}
+{$grandstream_phonebook_download_interval}
+{else}
+0
+{/if}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file