<!-- This file must be ANSI encoded -->
<device>
   <deviceProtocol>SIP</deviceProtocol>
   <sshUserId>root</sshUserId><!-- Username for SSH access -->
   <sshPassword>root</sshPassword><!-- Password for SSH access -->
   <devicePool>
      <dateTimeSetting>
         <dateTemplate>Y-M-D</dateTemplate><!-- ^(M-D-Y|M/D/Y|M.D.Y|D-M-Y|D/M/Y|D.M.Y|Y-M-D|Y/M/D|Y.M.D)A?$, Template to be used to display date on an IP Phone. If the last character is 'a' then it is 24 hour time --> 
         <timeZone>Eastern Standard/Daylight Time</timeZone>
         <ntps>
              <ntp><!-- Phone never seems to use this, instead relies on SIP header value during registration -->
                  <name>pool.ntp.org</name>
                  <ntpMode>Unicast</ntpMode>
              </ntp>
         </ntps>
      </dateTimeSetting>

      <callManagerGroup>
         <members>
            <member priority="0">
               <callManager>
                  <ports>
                     <ethernetPhonePort>2000</ethernetPhonePort><!-- SCCP phones use this, not sure whether SIP phones use/need it -->
                     <sipPort>5060</sipPort><!-- Suspect that this does not have any effect, voipControlPort sets where phone listens for SIP messages -->
                     <securedSipPort>5061</securedSipPort><!-- Not sure what this does, maybe SSL/TLS secured SIP? -->
                  </ports>
                  <processNodeName>www.yahoo.com</processNodeName><!-- Must resolve using DNS or phone will be 'Unprovisioned' -->
               </callManager>
            </member>
         </members>
      </callManagerGroup>
   </devicePool>
   <sipProfile>
      <sipProxies>
	 <backupProxy/><!-- Alternate outgoing SIP proxy -->
         <backupProxyPort/>
         <emergencyProxy/><!-- Not sure what this is for, or how one indicates an emergency call in phone. Maybe works with some specific dialplan setting? -->
         <emergencyProxyPort/>
         <outboundProxy/><!-- Primary outgoing SIP proxy, if set, all SIP messages will be sent to this server instead of doing a DNS lookup and connecting directly -->
         <outboundProxyPort/>
         <registerWithProxy>true</registerWithProxy><!-- Should be 'true' or phone won't register -->
      </sipProxies>
      <sipCallFeatures><!-- These are pretty obscure, values like '0' have special meaning, will leave defaults -->
         <cnfJoinEnabled>true</cnfJoinEnabled>
         <callForwardURI>x--serviceuri-cfwdall</callForwardURI>
         <callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
         <callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
         <callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
         <meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
         <abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
         <rfc2543Hold>false</rfc2543Hold>
         <callHoldRingback>2</callHoldRingback>
         <localCfwdEnable>true</localCfwdEnable>
         <semiAttendedTransfer>true</semiAttendedTransfer>
         <anonymousCallBlock>2</anonymousCallBlock>
         <callerIdBlocking>2</callerIdBlocking>
         <dndControl>0</dndControl>
         <remoteCcEnable>true</remoteCcEnable>
      </sipCallFeatures>
      <sipStack><!-- Most of these are same as 79x0 -->
         <sipInviteRetx>6</sipInviteRetx>
         <sipRetx>10</sipRetx>
         <timerInviteExpires>180</timerInviteExpires>
         <timerRegisterExpires>3600</timerRegisterExpires>
         <timerRegisterDelta>5</timerRegisterDelta>
         <timerKeepAliveExpires>120</timerKeepAliveExpires>
         <timerSubscribeExpires>120</timerSubscribeExpires>
         <timerSubscribeDelta>5</timerSubscribeDelta>
         <timerT1>500</timerT1>
         <timerT2>4000</timerT2>
         <maxRedirects>70</maxRedirects>
         <remotePartyID>true</remotePartyID>
         <userInfo>None</userInfo>
      </sipStack>
      <autoAnswerTimer>1</autoAnswerTimer>
      <autoAnswerAltBehavior>false</autoAnswerAltBehavior>
      <autoAnswerOverride>true</autoAnswerOverride>
      <transferOnhookEnabled>false</transferOnhookEnabled>
      <enableVad>false</enableVad><!-- When 'true', phone does voice activity detection and sends outgoing RTP packets only when sound detected. Causes clipping -->
      <preferredCodec>g711ulaw</preferredCodec><!-- Can use [g711ulaw, g711alaw, g729a] codecs, will select non-preferred codecs if required by other SIP device/proxy  -->
      <dtmfAvtPayload>101</dtmfAvtPayload>
      <dtmfDbLevel>3</dtmfDbLevel>
      <dtmfOutofBand>avt</dtmfOutofBand>
      <alwaysUsePrimeLine>false</alwaysUsePrimeLine>
      <alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
      <kpml>3</kpml>
      <natReceivedProcessing>false</natReceivedProcessing><!-- Should cause device to parse 'Received' portion of SIP registration response, does not work for me -->
      <natEnabled>true</natEnabled><!-- Cause phone to masquerade RTP streams, SIP registrations, and invitations using a different IP/DNS name. Same as 7960, well documented behavior on Cisco's site -->
      <natAddress>%INTERNET_HOSTNAME_OR_IP%</natAddress><!-- Address to use in masquerading -->
      <phoneLabel>My 79x1</phoneLabel><!-- appears in upper right of phone display -->
      <stutterMsgWaiting>2</stutterMsgWaiting>
      <callStats>true</callStats>
      <silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
      <disableLocalSpeedDialConfig>0</disableLocalSpeedDialConfig>
      <startMediaPort>16384</startMediaPort><!-- First port to use for RTP streams -->
      <stopMediaPort>16393</stopMediaPort><!-- Last port for RTP streams -->
      <sipLines>

         <line button="1">
            <featureID>9</featureID><!-- Magic number tells phone that this is a SIP line, '21' indicates a speed dial -->
            <featureLabel>%SHORTNAME%</featureLabel><!-- 'shortName' on 79x0 and in SSH interface, appears next to line button on display -->
            <proxy>east.callwithus.com</proxy><!-- FQDN or domain to use in SIP registration, use an outbound proxy when this is different from proxy's FQDN -->
            <port>5060</port><!-- UDP port to send SIP messages when not using an outbound proxy --> 
            <name>%CWS_ACCOUNT_NUM%</name><!-- username in SIP registration, well documented by Cisco -->
            <displayName/><!-- Name provided for CallerID in outbound calls, not sure if there's a format for the value -->
            <autoAnswer>
               <autoAnswerEnabled>2</autoAnswerEnabled>
            </autoAnswer>
            <callWaiting>3</callWaiting>
            <authName>%CWS_ACCOUNT_NUM%</authName><!-- Username used in response to 401 Unauthorized SIP challenge, not used for anything else --> 
            <authPassword>%CWS_ACCOUNT_PASSWORD%</authPassword><!-- Used to authenticate in combination with authName --> 
            <sharedLine>false</sharedLine>
            <messageWaitingLampPolicy>1</messageWaitingLampPolicy><!-- Ring and prompt for messages -->
            <messagesNumber>086</messagesNumber><!-- The value for the first line will be dialed when user presses Messages button, not sure what happens when messages are waiting on multiple lines, but maybe it does the right thing... --> 
            <ringSettingIdle>4</ringSettingIdle>
            <ringSettingActive>5</ringSettingActive>
            <contact>%CWS_ACCOUNT_NUM%</contact><!-- Username for SIP 'Contact' field, must match username on incoming SIP invitations to cause phone to ring. Does not need to match value of 'name' setting -->
            <forwardCallInfoDisplay><!-- How to handle forwarded calls, same as 79x0 -->
               <callerName>true</callerName>
               <callerNumber>false</callerNumber>
               <redirectedNumber>false</redirectedNumber>
               <dialedNumber>true</dialedNumber>
            </forwardCallInfoDisplay>
         </line>

      </sipLines>
      <voipControlPort>5060</voipControlPort><!-- UDP port to listen for incoming SIP messages, make sure this is mapped on the border router as phone ignores SIP responses sent to the UDP port it uses to send messages (usually something random and high numbered, i.e. 49000) -->
      <dscpForAudio>184</dscpForAudio>
      <ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
      <dialTemplate>dialplan.xml</dialTemplate><!-- Override default dialplan file name on tftp server -->
   </sipProfile>
   <commonProfile>
      <phonePassword/><!-- If set, this must be entered to 'unlock' phone settings: Settings * * # -->
      <backgroundImageAccess>true</backgroundImageAccess><!-- Allow user to download new backgrounds from tftp server, maybe useful for branding. Broadvoice does this to 79x0s -->
      <callLogBlfEnabled>2</callLogBlfEnabled>
   </commonProfile>
   <loadInformation>SIP41.8-3-1S</loadInformation><!-- Should match [firmware].loads filename. A .cop file is a gzipped tar file -->
   <vendorConfig>
      <disableSpeaker>false</disableSpeaker>
      <disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
      <pcPort>0</pcPort>
      <settingsAccess>1</settingsAccess>
      <garp>0</garp><!-- Enable gratuitous ARP when DHCP fails --> 
      <voiceVlanAccess>0</voiceVlanAccess>
      <videoCapability>0</videoCapability>
      <autoSelectLineEnable>1</autoSelectLineEnable>
      <webAccess>0</webAccess><!-- '0' to enable web server -->
      <spanToPCPort>1</spanToPCPort>
      <loggingDisplay>1</loggingDisplay>
      <loadServer/>
   </vendorConfig>
   <versionStamp>1143565489-a3cbf294-7526-4c29-8791-c4fce4ce4c37</versionStamp><!-- Magic value, not sure what it does, if anything. Maybe a UUID or config file serial number. CallManager produces lots of similiar UUIDs -->
   <networkLocale>United_States</networkLocale><!-- Optional, if set to something other than United_States phone will download additional config files and behave like localized phone (e.g. dialtone, ring, etc.) -->
   
   <networkLocaleInfo><!-- Can remove this section without any problem, will default to US -->
      <name>United_States</name><!-- Locale files to download becomes: United_States/g3-tones.xml rather than /g3-tones.xml -->
      <version>5.0(3)</version><!-- Somehow related to CallManager version of locale file, though this does not appear in the .xml configuration files downloaded. Maybe optional? -->
    </networkLocaleInfo> 
   <deviceSecurityMode>1</deviceSecurityMode>
   <authenticationURL/><!-- Documented to allow access to phone screenshots, etc. -->
   <directoryURL/><!-- Embedded browser opens this URL when directory key pressed -->
   <idleURL/><!-- Maybe something to display when phone is idle? -->
   <informationURL/><!-- Embedded browser opens this URL in specific way when help/info button pressed -->
   <messagesURL/><!-- Maybe causes phone to open browser instead of dialing messagesNumber? -->
   <proxyServerURL/><!-- HTTP proxy server for embedded browser -->
   <servicesURL/><!-- Embedded browser opens this URL when services key pressed -->
   <dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
   <dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
   <dscpForCm2Dvce>96</dscpForCm2Dvce>
   <transportLayerProtocol>4</transportLayerProtocol>
   <capfAuthMode>0</capfAuthMode>
   <capfList>
      <capf>
         <phonePort>3804</phonePort>
      </capf>
   </capfList>
   <certHash/>
   <encrConfig>false</encrConfig><!-- Mysterious and interesting? -->
</device>
