diff --git a/resources/templates/provision/grandstream/wp826/phonebook.xml b/resources/templates/provision/grandstream/wp826/phonebook.xml new file mode 100644 index 0000000000..deb211d001 --- /dev/null +++ b/resources/templates/provision/grandstream/wp826/phonebook.xml @@ -0,0 +1,151 @@ + + + + + + 1 + Users + default ringtone + + + 2 + Groups + default ringtone + + + 3 + Extensions + system + + + {$start_id=0} + {foreach $contacts as $row} + {if $row.category == "users"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + 0 + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {if $number.phone_label == "work"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "home"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "mobile"} + + {$number.phone_number} + 0 + + {/if} + {/if} + {/foreach} + 1 + 0 + + + + + {elseif $row.category == "groups"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + + 0 + {foreach $row.numbers as $number} + {if $number.phone_number != ""} + {if $number.phone_label == "work"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "home"} + + {$number.phone_number} + 0 + + {/if} + {if $number.phone_label == "mobile"} + + {$number.phone_number} + 0 + + {/if} + {/if} + {/foreach} + 2 + 0 + + + + + {elseif $row.category == "extensions"} + + {$start_id++} + {if $row.contact_name_given != ""} + {if $row.contact_organization != ""} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_name_given} {$row.contact_name_family} + {$row.contact_organization} + {else} + {$row.contact_name_given} + {$row.contact_name_family} + {/if} + {else} + {$row.effective_caller_id_name} + {/if} + + 0 + {if $row.phone_number != ""} + + {$row.phone_number} + 0 + + {else} + + {$row.phone_extension} + 0 + + {/if} + 3 + 0 + + + + + {/if} + {/foreach} + + diff --git a/resources/templates/provision/grandstream/wp826/{$mac}.xml b/resources/templates/provision/grandstream/wp826/{$mac}.xml new file mode 100644 index 0000000000..33ef8d4791 --- /dev/null +++ b/resources/templates/provision/grandstream/wp826/{$mac}.xml @@ -0,0 +1,156 @@ + + + + + {for $line=1 to 3} + {$row=$lines.$line} + + + {if filter_var($row.enabled, FILTER_VALIDATE_BOOLEAN)} + Yes + + + {$row.display_name} + + + {$row.server_address} + + + {$row.user_id} + + + {$row.auth_id} + + + {$row.password} + + {$row.display_name} + + {$voicemail_number} + + + PCMU + PCMA + G.722 + OPUS + OPUS + OPUS + OPUS + OPUS + + + {$grandstream_dial_plan} + {else} + No + {/if} + {/for} + + + + + + {if $grandstream_ipv_mode=='0'} + BothAndPreferIPv4 + {elseif $grandstream_ipv_mode=='1'} + BothAndPreferIPv6 + {elseif $grandstream_ipv_mode=='2'} + IPv4Only + {elseif $grandstream_ipv_mode=='3'} + IPv6Only + {else} + BothAndPreferIPv4 + {/if} + + + {if isset($grandstream_wifi_enable)} + + {if filter_var($grandstream_wifi_enable, FILTER_VALIDATE_BOOLEAN)}Yes{else}No{/if} + + {if isset($grandstream_wifi_essid)} + {$grandstream_wifi_essid} + + {$grandstream_wifi_password} + + + {$grandstream_wifi_hidden_security} + {/if} + + 0 + {/if} + + + {if isset($ntp_server_primary)} + {$ntp_server_primary} + {else} + pool.ntp.org + {/if} + + + + {if isset($ntp_server_secondary)} + {$ntp_server_secondary} + {else} + 2.us.pool.ntp.org + {/if} + + {if isset($grandstream_time_zone) } + {$grandstream_time_zone} + {elseif isset($grandstream_gxp_time_zone) } + {$grandstream_gxp_time_zone} + {/if} + + {if isset($admin_password)} + {$admin_password} + {/if} + + {if isset($device_password)} + {$device_password} + {/if} + + + {$mac|replace:'-':''|upper} + https://acsguestb.gdms.cloud + + + + {if isset($grandstream_firmware_upgrade_protocol) } + {if $grandstream_firmware_upgrade_protocol=="0"}TFTP{/if} + {if $grandstream_firmware_upgrade_protocol=="1"}HTTP{/if} + {if $grandstream_firmware_upgrade_protocol=="2"}HTTPS{/if} + {else} + HTTP + {/if} + + {if isset($grandstream_firmware_path) && isset($firmware_version)} + {$grandstream_firmware_path}/{$firmware_version} + {elseif isset($grandstream_firmware_path)} + {$grandstream_firmware_path} + {else} + {$domain_name}{$project_path}/app/provision/resources/firmware/ + {$http_auth_username} + {$http_auth_password} + {/if} + + HTTPS + + {if $grandstream_config_server_path=="none"} + + {elseif isset($grandstream_config_server_path)} + {$grandstream_config_server_path} + {else} + {$domain_name}{$project_path}/app/provision + {$http_auth_username} + {$http_auth_password} + {/if} + + + {if isset($grandstream_phonebook_download)} + {if $grandstream_phonebook_download=="0"}Disabled{elseif $grandstream_phonebook_download=="1"}Enabled Use TFTP{elseif $grandstream_phonebook_download=="2"}Enabled Use HTTP{elseif $grandstream_phonebook_download=="3"}Enabled Use HTTPS{/if} + {/if} + {$grandstream_phonebook_xml_server_path}{$mac} + {$grandstream_phonebook_download_interval} + {$http_auth_username} + {$http_auth_password} + + +