<flat-profile>
	<!-- Reset Never -->
	<Resync_Periodic>{$profile_resync}</Resync_Periodic>
	<Resync_On_Reset>Yes</Resync_On_Reset>
	<Profile_Rule>{$provisioning_type}://{$provisioning_path}/spa$MA.xml</Profile_Rule>
	
	<!-- Phone Information -->
	<Text_Logo group="Phone/General">{$text_logo}</Text_Logo>
	<Logo_Type group="User/Screen">{$logo_type}</Logo_Type>
    <Background_Picture_Type ua="na">{$background_type}</Background_Picture_Type>
	<Select_Logo ua="na">{$logo_type}</Select_Logo>
	<Select_Background_Picture ua="ro">{$background_type}</Select_Background_Picture>
	<BMP_Picture_Download_URL ua="ro">{$picture_url}</BMP_Picture_Download_URL>
	<Station_Name group="Phone/General">{$station_name}</Station_Name>
	<Voice_Mail_Number group="Phone/General">{$voicemail_extension}</Voice_Mail_Number>

	<!-- Line Registration Information -->
	{line_loop}
	<Display_Name_{$line}_ group="SIP/SIP_Parameters" ua="na">{$displaynameline}</Display_Name_{$line}_>
	<!-- If BLF then set this to the BLF -->
	<Short_Name_{$line}_ group="Phone/Line_Key_{$line}" ua="na">{$short_name}</Short_Name_{$line}_> 
	<User_ID_{$line}_ ua="na">{$username}</User_ID_{$line}_>
	<Password_{$line}_ ua="na">{$secret}</Password_{$line}_>
	<!-- Below set to disabled for BLF -->
	<Extension_{$line}_ group="Phone/Line_Key_{$line}">{$blf_ext_type}</Extension_{$line}_>
	<!-- If BLF set to shared -->
	<Share_Call_Appearance_{$line}_ group="Phone/Line_Key_{$line}">{$share_call_appearance|private}</Share_Call_Appearance_{$line}_>
	<!-- this changes how the button works. If it's set when the phone isn't on blf then the button turns orange. so we probably need to remove this normally.-->
	<Extended_Function_{$line}_ group="Phone/Line_Key_{$line}">{$extended_function}</Extended_Function_{$line}_>
	<Dial_Plan_{$line}_ ua="na">{$dial_plan}</Dial_Plan_{$line}_>
	<SIP_Port_{$line}_ group="Ext_{$line}/SIP_Settings">{$server_port}</SIP_Port_{$line}_>
	<Register_Expires_{$line}_ group="Ext_{$line}/Proxy_and_Registration">{$server_expires|3600}</Register_Expires_{$line}_>
	<Ans_Call_Without_Reg_{$line}_ ua="na">{$answer_call_without_reg|No}</Ans_Call_Without_Reg_{$line}_>
	
	<!-- Codec Information -->
	<Preferred_Codec_{$line}_ group="Ext_{$line}/Audio_Configuration">{$first_audio_codec}</Preferred_Codec_{$line}_>
	<Use_Pref_Codec_Only_{$line}_ group="Ext_{$line}/Audio_Configuration">No</Use_Pref_Codec_Only_{$line}_>
	<Second_Preferred_Codec_{$line}_ group="Ext_{$line}/Audio_Configuration">{$second_audio_codec}</Second_Preferred_Codec_{$line}_>
	<Third_Preferred_Codec_{$line}_ group="Ext_{$line}/Audio_Configuration">{$third_audio_codec}</Third_Preferred_Codec_{$line}_>
	
	<!-- Proxy Information -->
	<Proxy_{$line}_ group="Ext_{$line}/Proxy_and_Registration">{$server_host}</Proxy_{$line}_>
	<Use_Outbound_Proxy_{$line}_ ua="na">{$use_outbound_p|No}</Use_Outbound_Proxy_{$line}_>
	<Outbound_Proxy_{$line}_ ua="na">{$outbound_proxy_host}</Outbound_Proxy_{$line}_>
	<Proxy_Fallback_Intvl_{$line}_ ua="ro">{$proxy_fallback_intvl|3600}</Proxy_Fallback_Intvl_{$line}_>
	<Proxy_Redundancy_Method_{$line}_ ua="ro">{$proxy_redundancy_method|Normal}</Proxy_Redundancy_Method_{$line}_>
	
	<!-- DNS SRV Information -->
	<Use_DNS_SRV_{$line}_ ua="rw">{$use_dns_srv|No}</Use_DNS_SRV_{$line}_>
	<DNS_SRV_Auto_Prefix_{$line}_ group="Ext_{$line}/Proxy_and_Registration">{$dns_srv_prefix|Yes}</DNS_SRV_Auto_Prefix_{$line}_>

	<!-- NAT -->
	<NAT_Mapping_Enable_{$line}_ group="Ext_{$line}/NAT_Settings">{$nat_mapping_enabled|Yes}</NAT_Mapping_Enable_{$line}_>
	<NAT_Keep_Alive_Enable_{$line}_ group="Ext_{$line}/NAT_Settings">{$nat_keep_alive_enabled|Yes}</NAT_Keep_Alive_Enable_{$line}_>
	{/line_loop}

	<!-- Registration Settings -->
	<Reg_Min_Expires group="SIP/SIP_Timer_Values__sec_">1</Reg_Min_Expires>
	<Reg_Max_Expires group="SIP/SIP_Timer_Values__sec_">600</Reg_Max_Expires>
	<Reg_Retry_Intvl group="SIP/SIP_Timer_Values__sec_">10</Reg_Retry_Intvl>
	<Reg_Retry_Long_Intvl group="SIP/SIP_Timer_Values__sec_">20</Reg_Retry_Long_Intvl>

	<!-- RTP Settings -->
	<RTP_Packet_Size group="SIP/RTP_Parameters">0.020</RTP_Packet_Size>

	<!-- Codec Names -->
	<G711u_Codec_Name group="SIP/SDP_Payload_Types">PCMU</G711u_Codec_Name>
	<G711a_Codec_Name group="SIP/SDP_Payload_Types">PCMA</G711a_Codec_Name>
	<G726r16_Codec_Name group="SIP/SDP_Payload_Types">G726-16</G726r16_Codec_Name>
	<G726r24_Codec_Name group="SIP/SDP_Payload_Types">G726-24</G726r24_Codec_Name>
	<G726r32_Codec_Name group="SIP/SDP_Payload_Types">G726-32</G726r32_Codec_Name>
	<G726r40_Codec_Name group="SIP/SDP_Payload_Types">G726-40</G726r40_Codec_Name>
	<G729a_Codec_Name group="SIP/SDP_Payload_Types">G729</G729a_Codec_Name>
	<G729b_Codec_Name group="SIP/SDP_Payload_Types">G729</G729b_Codec_Name>
	<G722_Codec_Name group="SIP/SDP_Payload_Types">G722</G722_Codec_Name>
	
	 <!-- Firmware -->
	 <Upgrade_Enable ua="ro">{$enable_upgrade}</Upgrade_Enable>
	 <Upgrade_Rule ua="ro">{$upgrade_path}</Upgrade_Rule>

	<!-- Admin -->
	 <Enable_Web_Server ua="na">{$enable_webserver}</Enable_Web_Server>
	 <Web_Server_Port ua="na">{$webserver_port}</Web_Server_Port>
	 <Enable_Web_Admin_Access ua="na">{$enable_webserver_admin}</Enable_Web_Admin_Access>
	 <Admin_Passwd ua="na">{$administrator_password}</Admin_Passwd>
	 <User_Password ua="na">{$user_password}</User_Password>
	 <Enable_CDP group="System/VLAN_Settings">{$enable_cdp|No}</Enable_CDP>

	 <!-- Timezone Stuff -->
	 <Primary_NTP_Server ua="na">{$ntp}</Primary_NTP_Server>
	 <Time_Zone  ua="na">{$timezone}</Time_Zone>
	 <Daylight_Saving_Time_Rule ua="na">start=3/8/7/02:0:0;end=11/1/7/02:0:0;save=1</Daylight_Saving_Time_Rule>
	 <Daylight_Saving_Time_Enable group="Regional/Miscellaneous">Yes</Daylight_Saving_Time_Enable>
	 <Date_Format>{$dateformat}</Date_Format>
	 <Time_Format>{$timeformat}</Time_Format>

	 <!-- KeyCodes -->
	 <Call_Return_Code ua="na"> </Call_Return_Code>
	 <Blind_Transfer_Code > </Blind_Transfer_Code>
	 <Call_Back_Act_Code> </Call_Back_Act_Code>
	 <Call_Back_Deact_Code> </Call_Back_Deact_Code>
	 <Cfwd_All_Act_Code> </Cfwd_All_Act_Code>
	 <Cfwd_All_Deact_Code> </Cfwd_All_Deact_Code>
	 <Cfwd_Busy_Act_Code> </Cfwd_Busy_Act_Code>
	 <Cfwd_Busy_Deact_Code> </Cfwd_Busy_Deact_Code>
	 <Cfwd_No_Ans_Act_Code> </Cfwd_No_Ans_Act_Code>
	 <Cfwd_No_Ans_Deact_Code> </Cfwd_No_Ans_Deact_Code>
	 <CW_Act_Code> </CW_Act_Code>
	 <CW_Deact_Code> </CW_Deact_Code>
	 <CW_Per_Call_Act_Code> </CW_Per_Call_Act_Code>
	 <CW_Per_Call_Deact_Code> </CW_Per_Call_Deact_Code>
	 <Block_CID_Act_Code> </Block_CID_Act_Code>
	 <Block_CID_Deact_Code> </Block_CID_Deact_Code>
	 <Block_CID_Per_Call_Act_Code> </Block_CID_Per_Call_Act_Code>
	 <Block_CID_Per_Call_Deact_Code> </Block_CID_Per_Call_Deact_Code>
	 <Block_ANC_Act_Code> </Block_ANC_Act_Code>
	 <Block_ANC_Deact_Code> </Block_ANC_Deact_Code>
	 <DND_Act_Code> </DND_Act_Code>
	 <DND_Deact_Code> </DND_Deact_Code>
	 <Secure_All_Call_Act_Code> </Secure_All_Call_Act_Code>
	 <Secure_No_Call_Act_Code> </Secure_No_Call_Act_Code>
	 <Secure_One_Call_Act_Code> </Secure_One_Call_Act_Code>
	 <Secure_One_Call_Deact_Code> </Secure_One_Call_Deact_Code>
	 <Paging_Code ua="na">{$page_code}</Paging_Code>
	 <Call_Park_Code> </Call_Park_Code>
	 <Call_Pickup_Code> </Call_Pickup_Code>
	 <Call_UnPark_Code> </Call_UnPark_Code>
	 <Group_Call_Pickup_Code> </Group_Call_Pickup_Code>
	 <Media_Loopback_Code> </Media_Loopback_Code>
	 <Referral_Services_Codes> </Referral_Services_Codes>

	<!-- Debug Information -->
	<Syslog_Server group="System/Optional_Network_Configuration">{$syslog_server}</Syslog_Server>
	<Debug_Level group="System/Optional_Network_Configuration">3</Debug_Level>
	<Debug_Server group="System/Optional_Network_Configuration">{$syslog_server}</Debug_Server>

	<!-- Speed Dials -->
	<Speed_Dial_2 ua="rw">{$speed_dial_2}</Speed_Dial_2>
	<Speed_Dial_3 ua="rw">{$speed_dial_3}</Speed_Dial_3>
	<Speed_Dial_4 ua="rw">{$speed_dial_4}</Speed_Dial_4>
	<Speed_Dial_5 ua="rw">{$speed_dial_5}</Speed_Dial_5>
	<Speed_Dial_6 ua="rw">{$speed_dial_6}</Speed_Dial_6>
	<Speed_Dial_7 ua="rw">{$speed_dial_7}</Speed_Dial_7>
	<Speed_Dial_8 ua="rw">{$speed_dial_8}</Speed_Dial_8>
	<Speed_Dial_9 ua="rw">{$speed_dial_9}</Speed_Dial_9>
	
	<Subscribe_Expires group="Attendant_Console/General">1800</Subscribe_Expires>
	<Subscribe_Retry_Interval group="Attendant_Console/General">30</Subscribe_Retry_Interval>
	<Subscribe_Delay group="Attendant_Console/General">1</Subscribe_Delay>
	<Server_Type group="Attendant_Console/General">{$ac_server_type}</Server_Type>
	<Programmable_Softkey_Enable group="Phone/Programmable_Softkeys">Yes</Programmable_Softkey_Enable>
	<Test_Mode_Enable group="Attendant_Console/General">No</Test_Mode_Enable>
	<Attendant_Console_Call_Pickup_Code group="Attendant_Console/General">{$ac_call_pickup}</Attendant_Console_Call_Pickup_Code>
	<BLF_List_URI group="Attendant_Console/General"/>
	<Application_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<Serv_Subscribe_Failed_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<Serv_Subscribing_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<SNRM_Day_Mode_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<SNRM_Night_Mode_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<Parking_Lot_Idle_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<Parking_Lot_Busy_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<BLF_Idle_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<BLF_Ringing_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<BLF_Busy_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<BLF_Held_LED group="Attendant_Console/Attendant_Key_LED_Pattern"/>
	<Unit_1_Enable group="Attendant_Console/General">Yes</Unit_1_Enable>
	{loop_unit1}
	<Unit_1_Key_{$number} group="Attendant_Console/Unit_1">{$data}</Unit_1_Key_{$number}>
	{/loop_unit1}
	<Unit_2_Enable group="Attendant_Console/General">Yes</Unit_2_Enable>
	{loop_unit2}
	<Unit_2_Key_{$number} group="Attendant_Console/Unit_2">{$data}</Unit_2_Key_{$number}>
	{/loop_unit2}

	<!-- Ring tones and Cadences -->
	<Ring1 group="Phone/Ring_Tone">{$ring1|n=Classic-1;w=3;c=1}</Ring1>
	<Ring2 group="Phone/Ring_Tone">{$ring2|n=Classic-2;w=3;c=2}</Ring2>
	<Ring3 group="Phone/Ring_Tone">{$ring3|n=Classic-3;w=3;c=3}</Ring3>
	<Ring4 group="Phone/Ring_Tone">{$ring4|n=Classic-4;w=3;c=4}</Ring4>
	<Ring5 group="Phone/Ring_Tone">{$ring5|n=Simple-1;w=2;c=1}</Ring5>
	<Ring6 group="Phone/Ring_Tone">{$ring6|n=Simple-2;w=2;c=2}</Ring6>
	<Ring7 group="Phone/Ring_Tone">{$ring7|n=Simple-3;w=2;c=3}</Ring7>
	<Ring8 group="Phone/Ring_Tone">{$ring8|n=Simple-4;w=2;c=4}</Ring8>
	<Ring9 group="Phone/Ring_Tone">{$ring9|n=Simple-5;w=2;c=5}</Ring9>
	<Ring10 group="Phone/Ring_Tone">{$ring10|n=Office;w=4;c=1}</Ring10>
	
	<!-- IP information -->
	<Connection_Type group="System/Internet_Connection_Type_">{$connection_type}</Connection_Type>
	<Static_IP group="System/_Static_IP_Settings">{$current_ip}</Static_IP>
	<NetMask group="System/_Static_IP_Settings">{$current_netmask}</NetMask>
	<Gateway group="System/_Static_IP_Settings">{$current_gateway}</Gateway>
	<Primary_DNS group="System/Optional_Network_Configuration">{$primary_dns}</Primary_DNS>

	<XML_Directory_Service_Name group="Phone/XML_Service">{$xml_directory_service_name}</XML_Directory_Service_Name>
	<XML_Directory_Service_URL group="Phone/XML_Service">{$xml_directory_service_url}</XML_Directory_Service_URL>
	<XML_Application_Service_Name group="Phone/XML_Service"/>
	<XML_Application_Service_URL group="Phone/XML_Service"/>
	<XML_User_Name group="Phone/XML_Service"/>
	<XML_Password group="Phone/XML_Service"/>
	
	<!-- LDAP Settings for Directory -->
	<LDAP_Dir_Enable group="Phone/LDAP_Corporate_Directory_Search">{$ldap_enabled|No}</LDAP_Dir_Enable>
	<LDAP_Corp_Dir_Name group="Phone/LDAP_Corporate_Directory_Search">{$ldap_name}</LDAP_Corp_Dir_Name>
	<LDAP_Server group="Phone/LDAP_Corporate_Directory_Search">{$ldap_server}</LDAP_Server>
	<LDAP_Auth_Method group="Phone/LDAP_Corporate_Directory_Search">Simple</LDAP_Auth_Method>
	<LDAP_Client_DN group="Phone/LDAP_Corporate_Directory_Search">{$ldap_account}</LDAP_Client_DN>
	<LDAP_Username group="Phone/LDAP_Corporate_Directory_Search">{$ldap_account}</LDAP_Username>
	<LDAP_Password group="Phone/LDAP_Corporate_Directory_Search">{$ldap_password}</LDAP_Password>
	<LDAP_Search_Base group="Phone/LDAP_Corporate_Directory_Search">{$ldap_base}</LDAP_Search_Base>
	<LDAP_Last_Name_Filter group="Phone/LDAP_Corporate_Directory_Search">cn:(cn=*$VALUE*)</LDAP_Last_Name_Filter>
	<LDAP_First_Name_Filter group="Phone/LDAP_Corporate_Directory_Search">cn:(cn=*$VALUE*)</LDAP_First_Name_Filter>
	<LDAP_Search_Item_3 group="Phone/LDAP_Corporate_Directory_Search"/>
	<LDAP_Item_3_Filter group="Phone/LDAP_Corporate_Directory_Search"/>
	<LDAP_Search_Item_4 group="Phone/LDAP_Corporate_Directory_Search"/>
	<LDAP_item_4_Filter group="Phone/LDAP_Corporate_Directory_Search"/>
	<LDAP_Display_Attrs group="Phone/LDAP_Corporate_Directory_Search">{$ldap_attrs|a=cn;a=sn;a=telephoneNumber,n=Phone,t=p;}</LDAP_Display_Attrs>
	<LDAP_Number_Mapping group="Phone/LDAP_Corporate_Directory_Search">{$ldap_mapping}</LDAP_Number_Mapping>

	<!-- Regional configuration. Dialtone, MWI tone -->
	<Dial_Tone group="Regional/Call_Progress_Tones">{$dial_tone|350@-19,440@-19;10(*/0/1+2)}</Dial_Tone> 
	<MWI_Dial_Tone group="Regional/Call_Progress_Tones">{$mwi_tone|350@-19,440@-19;2(.1/.1/1+2);10(*/0/1+2)}</MWI_Dial_Tone>
       <Back_Light_Timer group="User/LCD">{$backlight_time}</Back_Light_Timer> 

</flat-profile>
