#!version:1.0.0.1

##File header "#!version:1.0.0.1" can not be edited or deleted, and must be placed in the first line.##

{foreach $lines as $row}

#######################################################################################
##                           Account Basic Settings                                  ##
#######################################################################################

{if isset({$row.password})}
account.{$row.line_number}.enable = 1
{else}
account.{$row.line_number}.enable = 0
{/if}
account.{$row.line_number}.label = {$row.label}
account.{$row.line_number}.display_name = {$row.display_name}
account.{$row.line_number}.auth_name = {$row.auth_id}
account.{$row.line_number}.user_name = {$row.user_id}
account.{$row.line_number}.password = {$row.password}
{if isset($account.{$row.line_number}.outbound_proxy_primary)}
account.{$row.line_number}.outbound_proxy_enable = 1
{else}
account.{$row.line_number}.outbound_proxy_enable = 0
{/if}
account.{$row.line_number}.outbound_proxy.1.address = {$row.outbound_proxy_primary}
{if isset($outbound_proxy_1_port)}
account.{$row.line_number}.outbound_proxy.1.port = {$outbound_proxy_1_port}
{else}
account.{$row.line_number}.outbound_proxy.1.port = {$row.sip_port}
{/if}
account.{$row.line_number}.dial_tone =
account.{$row.line_number}.outbound_proxy.2.address = {$row.outbound_proxy_secondary}
{if isset($outbound_proxy_2_port)}
account.{$row.line_number}.outbound_proxy.2.port = {$outbound_proxy_2_port}
{else}
account.{$row.line_number}.outbound_proxy.2.port = {$row.sip_port}
{/if}
account.{$row.line_number}.outbound_proxy_fallback_interval =

##It configures the transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR
##The default value is 0.
{if $row.sip_transport == 'udp'}account.{$row.line_number}.sip_server.1.transport_type = 0{/if}
{if $row.sip_transport == 'tcp'}account.{$row.line_number}.sip_server.1.transport_type = 1{/if}
{if $row.sip_transport == 'tls'}account.{$row.line_number}.sip_server.1.transport_type = 2{/if}
{if $row.sip_transport == 'dns srv'}account.{$row.line_number}.sip_server.1.transport_type = 3{/if}

##It configures the backup server transport type for account 1. 0-UDP,1-TCP,2-TLS,3-DNS-NAPTR
##The default value is 0. 
{if $row.sip_transport == 'udp'}account.{$row.line_number}.sip_server.2.transport_type = 0{/if}
{if $row.sip_transport == 'tcp'}account.{$row.line_number}.sip_server.2.transport_type = 1{/if}
{if $row.sip_transport == 'tls'}account.{$row.line_number}.sip_server.2.transport_type = 2{/if}
{if $row.sip_transport == 'dns srv'}account.{$row.line_number}.sip_server.2.transport_type = 3{/if}


#######################################################################################
##                          Failback                                                 ##
#######################################################################################

account.{$row.line_number}.naptr_build = 0
account.{$row.line_number}.fallback.redundancy_type = 0
account.{$row.line_number}.fallback.timeout = {$yealink_outbound_proxy_fallback_interval}
{if isset($row.server_address_primary)}
account.{$row.line_number}.sip_server.1.address = {$row.server_address_primary}
{else}
account.{$row.line_number}.sip_server.1.address = {$row.server_address}
{/if}
account.{$row.line_number}.sip_server.1.port = {$row.sip_port}
account.{$row.line_number}.sip_server.1.expires = {$row.register_expires}
account.{$row.line_number}.sip_server.1.retry_counts = 3
account.{$row.line_number}.sip_server.1.failback_mode = 0
account.{$row.line_number}.sip_server.1.failback_timeout = 3600
account.{$row.line_number}.sip_server.1.register_on_enable = 0
{if isset($row.server_address_secondary)}
account.{$row.line_number}.sip_server.2.address = {$row.server_address_secondary}
{/if}
account.{$row.line_number}.sip_server.2.port = {$row.sip_port}
account.{$row.line_number}.sip_server.2.expires = {$row.register_expires}
account.{$row.line_number}.sip_server.2.retry_counts = 3
account.{$row.line_number}.sip_server.2.failback_mode = 0
account.{$row.line_number}.sip_server.2.failback_timeout = 3600
account.{$row.line_number}.sip_server.2.register_on_enable = 0

account.{$row.line_number}.dns_cache_type = 1
account.{$row.line_number}.static_cache_pri = 0
account.{$row.line_number}.register_expires_overlap = 
account.{$row.line_number}.subscribe_expires_overlap =

#######################################################################################
##                           Register Advanced                                       ##
#######################################################################################
##It configures the SIP server type for account X.0-Default,2-BroadSoft,4-Cosmocom,6-UCAP
##The default value is 0.

account.{$row.line_number}.sip_server_type = 

account.{$row.line_number}.unregister_on_reboot = 
account.{$row.line_number}.register_mac = 
account.{$row.line_number}.register_line = 
account.{$row.line_number}.reg_fail_retry_interval = 
account.{$row.line_number}.srtp_encryption =

######################################################################################
##                     NAT Settings                                                 ##
######################################################################################
##It enables or disables the NAT traversal for account X.0-Disabled,1-Enabled
##The default value is 0.
account.{$row.line_number}.nat.nat_traversal = {if isset($stun_server)}1{else}0{/if}

##It configures the type of keep-alive packets sent by the phone to the NAT static to keep the communication port open so that NAT can continue to function for account X.
##0-Disabled,1-Default: the phone sends UDP packets to the server,2-Option: the phone sends SIP OPTION packets to the server,3-Notify: the phone sends SIP NOTIFY packets to the server.
##The default value is 1.
account.{$row.line_number}.nat.udp_update_enable = 3

##It configures the keep-alive interval (in seconds) for account X.
##The default value is 30.Integer from 15 to 2147483647
account.{$row.line_number}.nat.udp_update_time = 30

##It enables or disables NAT Rport feature for account X.0-Disabled,1-Enabled
##The default value is 0.
account.{$row.line_number}.nat.rport = {$yealink_rport}


#######################################################################################
##                            Account Advance Settings                               ##
#######################################################################################


##It configures the voice mail number for account X.
##The default value is blank.
voice_mail.number.{$row.line_number} = {$voicemail_number}

##Except T19P/T21P Models
account.{$row.line_number}.auto_dial_enable =
account.{$row.line_number}.auto_dial_num =

account.{$row.line_number}.call_id_mode =
account.{$row.line_number}.call_info =

account.{$row.line_number}.invite_with_pani_header.enable =

#######################################################################################
##                            Subscribe                                              ##
#######################################################################################
##It enables or disables the phone to subscribe the message waiting indicator for account X.0-Disabled,1-Enabled.
##The default value is 0.
account.{$row.line_number}.subscribe_mwi = 


##It is configuration MWI is NOTIFY messages, whether in Terminated status attributes.
##The default value is 0(Don't handle terminated values)
account.{$row.line_number}.mwi_parse_terminated =

##It configures the interval (in seconds) of MWI subscription for account X.
##The default value is 3600.
account.{$row.line_number}.subscribe_mwi_expires = 


##It enables or disables the phone to subscribe to the voice mail number for the message waiting indicator for account X.0-Disabled,1-Enabled.
##The default value is 0.
account.{$row.line_number}.subscribe_mwi_to_vm = 

##It configures the period (in seconds) of ACD subscription for account X.
##The default value is 1800.Except T19P/T21P Models
account.{$row.line_number}.subscribe_acd_expires = 


account.{$row.line_number}.display_mwi.enable =
account.{$row.line_number}.subscribe_register =
#######################################################################################
##                                    Broadsoft ACD                                  ##
#######################################################################################
account.{$row.line_number}.acd.enable =
account.{$row.line_number}.acd.unavailable_reason_enable =
account.{$row.line_number}.acd.initial_state =

##account.X.reason_code.Y=
##account.X.reason_code_name.Y=
##The value Y must be continuous.
account.{$row.line_number}.reason_code.1 =
account.{$row.line_number}.reason_code_name.1 =

#######################################################################################
##                            BLF List(Except T19D Model)                            ##
#######################################################################################
##It configures the BLF List URI to monitor a list of users for account X.
##The default value is blank.
account.{$row.line_number}.blf.blf_list_uri = 

##It configures the feature access code for directed call pickup (default: {$voicemail_number}) for account X.
##The default value is blank.
account.{$row.line_number}.blf_list_code = 

##It configures the feature access code for directed call pickup with barge-in (default: *33) for account X.
##The default value is blank.
account.{$row.line_number}.blf_list_barge_in_code = 

##It configures the period (in seconds) of the BLF subscription for account X.
##The default value is 1800.Integer from 30 to 2147483647.
account.{$row.line_number}.blf.subscribe_period = 

##It configures the event of the BLF subscription for account X.0-Dialog,1-Presence.
##The default value is 0.
account.{$row.line_number}.blf.subscribe_event =

##It enables or disables the phone to handle NOTIFY messages out of the BLF dialog for account X.0-Disabled,1-Enabled.
##The default value is 0.
account.{$row.line_number}.out_dialog_blf_enable = 

##It configures the BLF List Retrieve call parked code for account X.
##The default value is blank
account.{$row.line_number}.blf_list_retrieve_call_parked_code = 

account.{$row.line_number}.blf.match_host.enable = 

#######################################################################################
##                            BLA/SCA                                                ##
#######################################################################################
##It enables or disables Broadsoft SCA feature for account X.0-Disabled,1-Broadsoft SCA.
##The default value is 0.
account.{$row.line_number}.shared_line = 

##It configures the Call Pull Feature access code for account X.
##The default value is blank.
account.{$row.line_number}.shared_line_callpull_code =
##It configures number of linekey for line.
##The default value is 1,you should enable auto line keys first.
account.{$row.line_number}.number_of_linekey = 
##It config whether you can retrieve the remote hold call through line key
##The default value is 1
account.{$row.line_number}.shared_line_one_touch_retrieve.enable =
##It config whether you can barge in the active call through line key
##The default value is 1
account.{$row.line_number}.shared_line_one_touch_bargein.enable =

account.{$row.line_number}.share_line.barge_in.enable =
#######################################################################################
##                            Brosoft Callpark                                       ##
#######################################################################################
##It enables or disables Broadsoft Callpark for account X.0-Disabled,1-Broadsoft SCA.
##The default value is 0.
account.{$row.line_number}.callpark_enable =

#######################################################################################
##                            Audio Codec                                            ##
#######################################################################################

account.{$row.line_number}.codec.g722.enable =
account.{$row.line_number}.codec.g722.priority = 

account.{$row.line_number}.codec.g729.enable = 
account.{$row.line_number}.codec.g729.priority = 

account.{$row.line_number}.codec.g723_53.enable = 
account.{$row.line_number}.codec.g723_53.priority = 

account.{$row.line_number}.codec.g723_63.enable = 
account.{$row.line_number}.codec.g723_63.priority = 

account.{$row.line_number}.codec.g726_16.enable = 
account.{$row.line_number}.codec.g726_16.priority = 

account.{$row.line_number}.codec.g726_24.enable = 
account.{$row.line_number}.codec.g726_24.priority = 

account.{$row.line_number}.codec.g726_32.enable = 
account.{$row.line_number}.codec.g726_32.priority = 

account.{$row.line_number}.codec.g726_40.enable = 
account.{$row.line_number}.codec.g726_40.priority = 

account.{$row.line_number}.codec.ilbc.enable = 
account.{$row.line_number}.codec.ilbc.priority = 

account.{$row.line_number}.codec.opus.enable = 
account.{$row.line_number}.codec.opus.priority = 
account.{$row.line_number}.codec.opus.para =

account.{$row.line_number}.codec.pcmu.enable = 
account.{$row.line_number}.codec.pcmu.priority = 

account.{$row.line_number}.codec.pcma.enable =  
account.{$row.line_number}.codec.pcma.priority = 

account.{$row.line_number}.codec.g722_1_24kpbs.enable =
account.{$row.line_number}.codec.g722_1_24kpbs.priority =

account.{$row.line_number}.codec.g722_1c_24kpbs.enable =
account.{$row.line_number}.codec.g722_1c_24kpbs.priority =

account.{$row.line_number}.codec.g722_1c_32kpbs.enable =
account.{$row.line_number}.codec.g722_1c_32kpbs.priority =

account.{$row.line_number}.codec.g722_1c_48kpbs.enable =
account.{$row.line_number}.codec.g722_1c_48kpbs.priority =

#######################################################################################
##                            Video Codec                                            ##
#######################################################################################

account.{$row.line_number}.video.h264.enable =
account.{$row.line_number}.video.h264.priority =

account.{$row.line_number}.video.h264hp.enable =
account.{$row.line_number}.video.h264hp.priority =

account.{$row.line_number}.video.vp8.enable =
account.{$row.line_number}.video.vp8.priority =

account.{$row.line_number}.video.h263.enable =
account.{$row.line_number}.video.h263.priority =

#######################################################################################
##                            Audio Advanced                                         ##
#######################################################################################
##It configures the RTP packet time for account X.0 (Disabled), 10, 20, 30, 40, 50 or 60.
##The default value is 20.
account.{$row.line_number}.ptime = 
#######################################################################################
##                            Anonymous Call                                         ##
#######################################################################################
account.{$row.line_number}.send_anonymous_code = 
account.{$row.line_number}.anonymous_call = 
account.{$row.line_number}.anonymous_call_oncode = 
account.{$row.line_number}.anonymous_call_offcode = 
account.{$row.line_number}.reject_anonymous_call = 
account.{$row.line_number}.anonymous_reject_oncode = 
account.{$row.line_number}.anonymous_reject_offcode = 
account.{$row.line_number}.send_anonymous_rejection_code =


#######################################################################################
##                            Pickup Code                                            ##
#######################################################################################
##It enables or disables the phone to pick up a call according to the SIP header of dialog-info for account X.0-Disabled,1-Enabled.
##The default value is 0.
account.{$row.line_number}.dialoginfo_callpickup = 

##It configures the group pickup code for account X.
##The default value is blank.
account.{$row.line_number}.group_pickup_code = 

##It configures the directed pickup code for account X.
##The default value is blank.
account.{$row.line_number}.direct_pickup_code = 

account.{$row.line_number}.refresh_remote_id.enable =

#######################################################################################
##                            DTMF                                                   ##
#######################################################################################
account.{$row.line_number}.dtmf.type = 
account.{$row.line_number}.dtmf.info_type = 
account.{$row.line_number}.dtmf.dtmf_payload = 

#######################################################################################
##                            Alert info                                             ##
#######################################################################################
##It enables or disables the distinctive ringtones by the Alert-Info SIP header for account X.0-Disabled,1-Enabled.
##The default value is 0.
account.{$row.line_number}.alert_info_url_enable = 

##Except T19P/T21P Models
##The default value is blank.Values range 256 characters in length
account.{$row.line_number}.alert_info =
account.{$row.line_number}.ringtone.ring_type = 

###Only for T46G Model
##It enables or disables the phone to download the picture information for account X when receiving an incoming call or during a call.0-Disabled,1-Enabled.
##The default value is 0.
account.{$row.line_number}.picture_info_enable = 

#######################################################################################
##                            Conference                                             ##
#######################################################################################
##It configures the conference type for account X.0-Local Conference,2-Network Conference.
##The default value is 0.
account.{$row.line_number}.conf_type = 

##It configures the network conference URI for account X.
##The default value is blank.
account.{$row.line_number}.conf_uri = 

#######################################################################################
##                            CID Source                                             ##
#######################################################################################
account.{$row.line_number}.cid_source = {$yealink_cid_source}
account.{$row.line_number}.cid_source_privacy = 
account.{$row.line_number}.cid_source_ppi = 
account.{$row.line_number}.cp_source = 

#######################################################################################
##                            Session Timer                                          ##
#######################################################################################
account.{$row.line_number}.session_timer.enable = {$yealink_session_timer}
account.{$row.line_number}.session_timer.expires = 
account.{$row.line_number}.session_timer.refresher = 

#######################################################################################
##                            Music on Hold                                          ##
#######################################################################################
##It configures the way on how the phone processes Music On Hold when placing an active call on hold for account X.
##0-Calling the music server before holding
##1-Calling the music server after holding
##The default value is 0.
account.{$row.line_number}.music_on_hold_type = 

##It configures the URI of the Music On Hold server for account X.
##The default value is blank.
account.{$row.line_number}.music_server_uri = 

#######################################################################################
##                            Advanced                                               ##
#######################################################################################
account.{$row.line_number}.auto_answer = 
account.{$row.line_number}.missed_calllog = 
account.{$row.line_number}.100rel_enable = {$yealink_retransmission}
account.{$row.line_number}.enable_user_equal_phone = 
account.{$row.line_number}.compact_header_enable = 
account.{$row.line_number}.custom_ua =

#######################################################################################
##                                   DND(Except T19 Model)                           ##
#######################################################################################
account.{$row.line_number}.dnd.enable =
account.{$row.line_number}.dnd.on_code = 
account.{$row.line_number}.dnd.off_code =

#######################################################################################
##                                 Call Forward(Except T19 Model)                    ##
#######################################################################################
account.{$row.line_number}.always_fwd.enable = 
account.{$row.line_number}.always_fwd.target = 
account.{$row.line_number}.always_fwd.off_code =
account.{$row.line_number}.always_fwd.on_code =
account.{$row.line_number}.busy_fwd.enable =          
account.{$row.line_number}.busy_fwd.target =         
account.{$row.line_number}.busy_fwd.off_code =
account.{$row.line_number}.busy_fwd.on_code =
account.{$row.line_number}.timeout_fwd.enable = 
account.{$row.line_number}.timeout_fwd.target =
account.{$row.line_number}.timeout_fwd.timeout =  
account.{$row.line_number}.timeout_fwd.off_code =
account.{$row.line_number}.timeout_fwd.on_code = 

#######################################################################################
##                                   Voice Monitoring  (Except T19P/T21P Models)     ##
#######################################################################################
account.{$row.line_number}.vq_rtcpxr.collector_name =
account.{$row.line_number}.vq_rtcpxr.collector_server_host =
account.{$row.line_number}.vq_rtcpxr.collector_server_port =


#######################################################################################
##         Broadsoft XSI                                                             ##
#######################################################################################
##It configures the user name for XSI authentication for account X.Example:account.{$row.line_number}.xsi.user = 3502@as.iop1.broadworks.net.
##The default value is blank.
account.{$row.line_number}.xsi.user =  

##It configures the password for XSI authentication for account X.Example:account.{$row.line_number}.xsi.password = 123456.
##The default value is blank.
account.{$row.line_number}.xsi.password = 

##It configures the access URL of the Xtended Services Platform server for account X.Example:account.{$row.line_number}.xsi.host = xsp1.iop1.broadworks.net.
##The default value is blank.
account.{$row.line_number}.xsi.host = 

##It configures the server type of the Xtended Services Platform server for account X.Example:account.{$row.line_number}.xsi.server_type = http.
##The default value is http.
account.{$row.line_number}.xsi.server_type = 

##It configures the server port of the Xtended Services Platform server for account X.Example:account.{$row.line_number}.xsi.port = 80.
##The default value is 80.Integer from 1 to 65535
account.{$row.line_number}.xsi.port = 

#######################################################################################
##                           V80 Add                                                 ##
#######################################################################################
## Add Time 2015.6.26
account.X.callerid_in_support_header.enable = 
account.x.transfer_refer_to_contact_header.enable =
account.x.sub_fail_retry_interval = 
account.X.update_ack_while_dialing = 
account.x.end_call_when_transferred.enable = 
account.x.contact_take_line_param =
#######################################################################################
##                           V80-SP2 Add                                             ##
#######################################################################################

account.x.instance_id.enable =
account.{$row.line_number}.reg_with_pani_header.enable =

#######################################################################################
##                           V81 Add                                                 ##
#######################################################################################
account.{$row.line_number}.dialplan.digitmap.active.on_hook_dialing =
account.{$row.line_number}.dialplan.digitmap.apply_to.directory_dial =
account.{$row.line_number}.dialplan.digitmap.apply_to.forward =
account.{$row.line_number}.dialplan.digitmap.apply_to.on_hook_dial =
account.{$row.line_number}.dialplan.digitmap.apply_to.press_send =
account.{$row.line_number}.dialplan.digitmap.enable =
account.{$row.line_number}.dialplan.digitmap.interdigit_long_timer =
account.{$row.line_number}.dialplan.digitmap.interdigit_short_timer =
account.{$row.line_number}.dialplan.digitmap.no_match_action =
account.{$row.line_number}.dialplan.digitmap.string =
account.{$row.line_number}.dialplan.digitmap.apply_to.history_dial =
#######################################################################################
##                               V40 Add                                             ##
#######################################################################################
account.{$row.line_number}.hold_use_inactive =
account.{$row.line_number}.call_recording.enable =
account.{$row.line_number}.features.call_decline.enable =
account.{$row.line_number}.line_seize.expires =
account.{$row.line_number}.security_classification.enable =

#######################################################################################
##                         Features Sync                                             ##
#######################################################################################
account.{$row.line_number}.features.forward.feature_key_sync.local_processing.enable =
account.{$row.line_number}.features.dnd.feature_key_sync.local_processing.enable =

#######################################################################################
##                        Broadsoft Flexible Seating                                 ##
#######################################################################################
##V40 Add
account.{$row.line_number}.flexible_seating.enable =
account.{$row.line_number}.hoteling.pin =
account.{$row.line_number}.hoteling.mode =

#######################################################################################
##                         Broadsoft Hoteling                                        ##
#######################################################################################
##V40 Add
account.{$row.line_number}.hoteling.enable =
account.{$row.line_number}.hoteling.user_id =
account.{$row.line_number}.hoteling.password =
account.{$row.line_number}.hoteling.expires =
account.{$row.line_number}.hoteling.auto_login_enable =

{/foreach}
