<device>
	<!--Documentation http://usecallmanager.nz/sepmac-cnf-xml.html-->
	<!--Works with 7941,7961,7942,7962 phones-->
	<deviceProtocol>SIP</deviceProtocol>
	<sshUserId>{$admin_name}</sshUserId>
	<sshPassword>{$admin_password}</sshPassword>
	<devicePool>
		<dateTimeSetting>
			<dateTemplate>D/M/YY</dateTemplate>
			<timeZone>Eastern Standard/Daylight Time</timeZone>
			<ntps> 
				<ntp> 
					<name>{$ntp_server_primary}</name> 
					<ntpMode>Unicast</ntpMode> 
				</ntp> 
			</ntps> 
		</dateTimeSetting>
		<callManagerGroup>
			<members>
				<member priority="0">
					<callManager>
						<ports>
							<sipPort>5060</sipPort>
							<securedSipPort>5061</securedSipPort>
						</ports>
						<processNodeName>{$domain_name}</processNodeName>
					</callManager>
				</member>
			</members>
		</callManagerGroup>
	</devicePool>
	<sipProfile>
		<sipProxies>
			<backupProxy></backupProxy> 
			<backupProxyPort></backupProxyPort> 
			<emergencyProxy></emergencyProxy> 
			<emergencyProxyPort></emergencyProxyPort> 
			<outboundProxy></outboundProxy> 
			<outboundProxyPort></outboundProxyPort> 
			<registerWithProxy>true</registerWithProxy> 
		</sipProxies>
		<sipCallFeatures>
			<cnfJoinEnabled>true</cnfJoinEnabled>
			<localCfwdEnable>true</localCfwdEnable>
			<callForwardURI>service-uri-cfwdall</callForwardURI>
			<callPickupURI>service-uri-pickup</callPickupURI>
			<callPickupGroupURI>service-uri-gpickup</callPickupGroupURI>
			<callHoldRingback>2</callHoldRingback>
			<semiAttendedTransfer>true</semiAttendedTransfer>
			<anonymousCallBlock>2</anonymousCallBlock>
			<callerIdBlocking>2</callerIdBlocking>
			<dndControl>2</dndControl>
			<remoteCcEnable>true</remoteCcEnable>
		</sipCallFeatures>
		<sipStack> 
			<sipInviteRetx>6</sipInviteRetx> 
			<sipRetx>10</sipRetx> 
			<timerInviteExpires>180</timerInviteExpires> 
			<timerRegisterExpires>{$register_expires_1}</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>
		<natEnabled>false</natEnabled> 
		<natAddress></natAddress> 
		<enableVad>false</enableVad>
		<preferredCodec>G722</preferredCodec>
		<autoAnswerTimer>0</autoAnswerTimer>
		<autoAnswerAltBehavior>false</autoAnswerAltBehavior>
		<autoAnswerOverride>true</autoAnswerOverride>
		<phoneLabel>{$device_label}</phoneLabel>
		<sipLines>
{foreach $lines as $row}
			<line button="{$row.line_number}">
				<featureID>9</featureID>
				<featureLabel>{$row.user_id} {$row.display_name}</featureLabel>
				<proxy>{$row.server_address}</proxy>
{if isset($row.sip_port) }
				<port>{$row.sip_port}</port>
{else}
				<port>5060</port>
{/if}
				<name>{$row.user_id}</name>
				<displayName>{$row.display_name}</displayName>
				<authName>{$row.auth_id}</authName>
				<authPassword>{$row.password}</authPassword>
{if isset($row.shared_line) }
				<sharedLine>{$row.shared_line}</sharedLine>
{else}
				<sharedLine>false</sharedLine>
{/if}
				<autoAnswer>
					<autoAnswerEnabled>2</autoAnswerEnabled> 
					<autoAnswerMode>Auto Answer with Speakerphone</autoAnswerMode>
				</autoAnswer>
				<callWaiting>3</callWaiting>
				<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
				<messagesNumber>{$voicemail_number}</messagesNumber>
				<ringSettingIdle>4</ringSettingIdle>
				<ringSettingActive>5</ringSettingActive>
				<forwardCallInfoDisplay>
					<callerName>true</callerName>
					<callerNumber>true</callerNumber>
					<redirectedNumber>true</redirectedNumber>
					<dialedNumber>true</dialedNumber>
				</forwardCallInfoDisplay>
			</line>
{/foreach}

{foreach $keys["line"] as $row}
			<line button="{$row.device_key_id}">
				<featureID>21</featureID>
				<featureLabel>{$row.device_key_label}</featureLabel>
				<speedDialNumber>{$row.device_key_value}</speedDialNumber>
				<featureOptionMask>1</featureOptionMask>
			</line>
{/foreach}

		</sipLines>
		<dialTemplate>dialplan.xml</dialTemplate>
		<dscpForAudio>184</dscpForAudio>
	</sipProfile>
	<loadInformation>SIP41.8-5-4S</loadInformation>

	<vendorConfig> 
		<g722CodecSupport>2</g722CodecSupport>
		<disableSpeaker>false</disableSpeaker> 
		<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset> 
		<pcPort>0</pcPort> 
		<settingsAccess>1</settingsAccess> 
		<garp>0</garp> 
		<voiceVlanAccess>1</voiceVlanAccess> 
		<videoCapability>0</videoCapability> 
		<autoSelectLineEnable>0</autoSelectLineEnable> 
		<webAccess>0</webAccess> 
		<daysDisplayNotActive>1,7</daysDisplayNotActive> 
		<displayOnTime></displayOnTime> 
		<displayOnDuration></displayOnDuration> 
		<displayIdleTimeout></displayIdleTimeout> 
		<spanToPCPort>1</spanToPCPort> 
		<sshAccess>0</sshAccess>
		<sshPort>22</sshPort>
	</vendorConfig> 

	<advertiseG722Codec>1</advertiseG722Codec>			

</device>