<?xml version="1.0" ?>
<config>
    <setting id="login_password" value="{$admin_password}" />
    <setting id="send_mac_with_useragent" value="1" />
    <setting id="use_secure_labels" value="0" />
    <setting id="time_zone" value="{if isset($digium_time_zone)}{$digium_time_zone}{else}America/Los_Angeles{/if}" />
    <setting id="time_source" value="ntp" />
    <setting id="ntp_server" value="{if isset($digium_ntp_server)}{$digium_ntp_server}{else}0.digium.pool.ntp.org{/if}" />
    <setting id="ntp_resync" value="86400" />
    <setting id="ntp_prefer_option42" value="1" /> <!-- Not D80 -->
    <setting id="accept_local_calls" value="any" />
    <setting id="transport_udp_enabled" value="1" />
    <setting id="transport_udp_port" value="5060" />
    <setting id="transport_tcp_enabled" value="1" />
    <setting id="transport_tcp_port" value="5060" />
    <setting id="transport_tls_allowed" value="1" /> <!-- D6X Phones Only -->
    <setting id="transport_tls_port" value="5061" /> <!-- D6X Phones Only -->
    <setting id="udp_ka_interval" value="0"/>
    <setting id="logo_file" value="factory" path="/factory_asterisk.png" />
    <setting id="wallpaper_file" value="factory" path="/factory_wallpaper.png" /> <!-- D6X Phones Only -->
    <setting id="display_mc_notification" value="1" />
    <setting id="display_pickup_notification" value="1" />
    <setting id="hide_completed_elsewhere" value="1" />
    <setting id="small_clock" value="0" /> <!-- D6X Phones Only -->
    <setting id="idle_company_text" value="{if isset($digium_idle_company_text)}{$digium_idle_company_text}{else}FusionPBX{/if}" />
    <setting id="brightness" value="5" />
    <setting id="enable_check_sync" value="1"/>
    <setting id="dim_backlight" value="1" />
    <setting id="backlight_timeout" value="30" />
    <setting id="backlight_dim_level" value="2" />
    <setting id="blf_page_return_timeout" value="0" />
    <setting id="locale" value="{if isset($digium_locale)}{$digium_locale}{else}en_US{/if}"/>
    <setting id="ringer_volume" value="5" />
    <setting id="lock_ringing_volume" value="0" /> <!-- Not D80 -->
    <setting id="speaker_volume" value="5" />
    <setting id="handset_volume" value="5" />
    <setting id="headset_volume" value="5" />
    <setting id="reset_call_volume" value="0" />
    <setting id="ehs" value="{if isset($digium_ehs)}{$digium_ehs}{else}auto{/if}" />
    <setting id="call_control_checkx" value="0" />
    <setting id="contacts_max_subscriptions" value="40" />
    <setting id="name_format" value="first_last" />
    <setting id="blf_contact_group" value="Default" />
    <setting id="expansion_enable" value="0" type="EXP100" /> <!-- Only D65 -->
    <setting id="network_enable_dhcp" value="1" />
    <setting id="allow_insecure_ssl" value="1" />
    <setting id="network_ipv6_enabled" value="0"/>
    <setting id="network_ipv6_preferred" value="0"/>
    <setting id="network_vlan_discovery_mode" value="LLDP" />
    <setting id="lan_port_mode" value="auto" />
    <setting id="pc_port_mode" value="auto" />
    <setting id="log_level" value="debug" /> <!-- Not D80 -->
    <setting id="enable_logging" value="0" /> <!-- Not D80 -->
    <setting id="log_server" value="" /> <!-- Not D80 -->
    <setting id="log_port" value="" /> <!-- Not D80 -->
    <setting id="web_ui_enabled" value="1" /> <!-- Not D80 -->
    <setting id="sip_qos" value="3" />
    <setting id="rtp_qos" value="6" />
    <setting id="pc_qos" value="" />
    <setting id="sip_dscp" value="24" />
    <setting id="rtp_dscp" value="46" />
    <setting id="in_switchvox_environment" value="0" />
    <setting id="allow_app_dev" value="0" />
    <setting id="8021x_passthrough" value="0"/>
    <setting id="8021x_eapol_on_disconnect" value="0"/>
    <setting id="8021x_method" value=""/>
    <setting id="8021x_identity" value=""/>
    <setting id="8021x_anonymous_identity" value=""/>
    <setting id="8021x_password" value=""/>
    <setting id="8021x_client_cert" value=""/>
    <setting id="8021x_client_key" value=""/>
    <setting id="8021x_debug" value="" />
    <setting id="network_default_enable_openvpn" value="0" />
    <!-- setting id="openvpn_inline_config" url="https://user:password@server.example.com/vpn/client.ovpn" value="1" md5="abc123" /-->

    <accounts>
        {foreach $lines as $row}
        <account
        server_uuid="{$row.line_number-1}" index="{$row.line_number-1}" status="{if $row.enabled}1{else}0{/if}" register="1"
        account_id="{$row.user_id}" username="{$row.user_id}" authname="{$row.auth_id}" password="{$row.password}" passcode="{$row.password}"
        line_label="{$row.display_name}" caller_id="{$row.display_name}" dial_plan="[0-8]xxxxx|911|9411|9611|9011xxx.T3|91xxxxxxxxxx|9[2-9]xxxxxx|*xx.T3|[0-8]xx.T3"
        visual_voicemail="0" voicemail="{$voicemail_number}" needMwiSubscription="1"
        outbound_proxy="{$row.outbound_proxy}" outbound_port="{$row.sip_port}"
        plar_number="" ring_type="normal" subscription_extension="{$row.user_id}" conflict="replace">
            <host_primary server="{$row.server_address}" port="{$row.sip_port}" transport="{$row.sip_transport}" media_encryption="" reregister="300" retry="25" />
            <!--<host_alternate server="10.1.2.3" port="5060" transport="udp" media_encryption="" reregister="300" retry="25" />-->
            <permission id="use_voicemail" value="1" />
            <permission id="send_to_voicemail" value="1" />
            <permission id="ignore_calls" value="1" />
        </account>{if $row@index eq 5}{break}{/if}
        {/foreach}
    </accounts>

    <contacts url="https://{$domain_name}{$project_path}/app/provision/{$mac}-contacts.cfg" id="internal" />

    <smart_blf>
        <blf_items url="https://{$domain_name}{$project_path}/app/provision/{$mac}-smartblf.cfg" />
    </smart_blf>

    <!--firmwares>
        <firmware model="D40" version="2_8_0" url="http://10.10.4.11/firmware/2_8_0_D40_firmware.eff" />
        <firmware model="D45" version="2_8_0" url="http://10.10.4.11/firmware/2_8_0_D45_firmware.eff" />
        <firmware model="D50" version="2_8_0" url="http://10.10.4.11/firmware/2_8_0_D50_firmware.eff" />
        <firmware model="D60" version="2_8_0" url="http://10.10.4.11/firmware/2_8_0_D60_firmware.eff" />
        <firmware model="D62" version="2_8_0" url="http://10.10.4.11/firmware/2_8_0_D62_firmware.eff" />
        <firmware model="D65" version="2_8_0" url="http://10.10.4.11/firmware/2_8_0_D65_firmware.eff" />
        <firmware model="D70" version="2_8_0" url="http://10.10.4.11/firmware/2_8_0_D70_firmware.eff" />
        <firmware model="D80" version="2_8_0" url="http://10.10.4.11/firmware/2_8_0_D80_firmware.eff" />
        <firmware model="EXP100" version="2.0.5.1" url="http://10.10.4.11/firmware/EXP100-2051.rom" />
    </firmwares-->
</config>
