172 lines
6.6 KiB
Nix
172 lines
6.6 KiB
Nix
{ mac, label, displayName, password, serverAddress, ntpServer, sipPort ? 5060, directoryPort ? 8080, intercomEnabled ? false, intercomPassword ? "" }:
|
|
''
|
|
<device>
|
|
<deviceProtocol>SIP</deviceProtocol>
|
|
<sshUserId>admin</sshUserId>
|
|
<sshPassword>password</sshPassword>
|
|
<devicePool>
|
|
<dateTimeSetting>
|
|
<dateTemplate>D.M.YA</dateTemplate>
|
|
<timeZone>Central Europe Standard/Daylight Time</timeZone>
|
|
<ntps>
|
|
<ntp>
|
|
<name>${ntpServer}</name>
|
|
</ntp>
|
|
</ntps>
|
|
</dateTimeSetting>
|
|
<callManagerGroup>
|
|
<members>
|
|
<member priority="0">
|
|
<callManager>
|
|
<ports>
|
|
<sipPort>${toString sipPort}</sipPort>
|
|
</ports>
|
|
<processNodeName>${serverAddress}</processNodeName>
|
|
</callManager>
|
|
</member>
|
|
</members>
|
|
</callManagerGroup>
|
|
</devicePool>
|
|
<sipProfile>
|
|
<sipProxies>
|
|
<backupProxy></backupProxy>
|
|
<backupProxyPort>5060</backupProxyPort>
|
|
<emergencyProxy></emergencyProxy>
|
|
<emergencyProxyPort></emergencyProxyPort>
|
|
<outboundProxy></outboundProxy>
|
|
<outboundProxyPort></outboundProxyPort>
|
|
<registerWithProxy>true</registerWithProxy>
|
|
</sipProxies>
|
|
<sipCallFeatures>
|
|
<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>
|
|
<callHoldRingback>2</callHoldRingback>
|
|
<anonymousCallBlock>2</anonymousCallBlock>
|
|
<callerIdBlocking>2</callerIdBlocking>
|
|
<dndControl>0</dndControl>
|
|
<remoteCcEnable>true</remoteCcEnable>
|
|
</sipCallFeatures>
|
|
<sipStack>
|
|
<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>false</remotePartyID>
|
|
<userInfo>None</userInfo>
|
|
</sipStack>
|
|
<transferOnhookEnabled>false</transferOnhookEnabled>
|
|
<kpml>3</kpml>
|
|
<phoneLabel>${builtins.substring 0 12 label}</phoneLabel>
|
|
<stutterMsgWaiting>1</stutterMsgWaiting>
|
|
<callStats>false</callStats>
|
|
<sipLines>
|
|
<line button="1" lineIndex="1">
|
|
<featureID>9</featureID>
|
|
<featureLabel>${displayName}</featureLabel>
|
|
<proxy>USECALLMANAGER</proxy>
|
|
<port>${toString sipPort}</port>
|
|
<name>${mac}</name>
|
|
<displayName>${displayName}</displayName>
|
|
<autoAnswer>
|
|
<autoAnswerEnabled>2</autoAnswerEnabled>
|
|
</autoAnswer>
|
|
<callWaiting>3</callWaiting>
|
|
<authName>${mac}</authName>
|
|
<authPassword>${password}</authPassword>
|
|
<messageWaitingLampPolicy>1</messageWaitingLampPolicy>
|
|
<messagesNumber>*97</messagesNumber>
|
|
<contact>${mac}</contact>
|
|
<forwardCallInfoDisplay>
|
|
<callerName>true</callerName>
|
|
<callerNumber>true</callerNumber>
|
|
<redirectedNumber>true</redirectedNumber>
|
|
<dialedNumber>true</dialedNumber>
|
|
</forwardCallInfoDisplay>
|
|
</line>
|
|
${if intercomEnabled then ''
|
|
<line button="2" lineIndex="2">
|
|
<featureID>23</featureID>
|
|
<featureLabel>Intercom</featureLabel>
|
|
<proxy>USECALLMANAGER</proxy>
|
|
<port>${toString sipPort}</port>
|
|
<name>${mac}-intercom</name>
|
|
<displayName>Intercom</displayName>
|
|
<autoAnswer>
|
|
<autoAnswerEnabled>3</autoAnswerEnabled>
|
|
<autoAnswerMode>Auto Answer with Speakerphone</autoAnswerMode>
|
|
</autoAnswer>
|
|
<callWaiting>3</callWaiting>
|
|
<authName>${mac}-intercom</authName>
|
|
<authPassword>${intercomPassword}</authPassword>
|
|
<maxNumCalls>1</maxNumCalls>
|
|
<busyTrigger>1</busyTrigger>
|
|
<contact>${mac}-intercom</contact>
|
|
</line>
|
|
'' else ""} </sipLines>
|
|
<voipControlPort>${toString sipPort}</voipControlPort>
|
|
<startMediaPort>16348</startMediaPort>
|
|
<stopMediaPort>20134</stopMediaPort>
|
|
<dscpForAudio>184</dscpForAudio>
|
|
<dialTemplate>dialplan.xml</dialTemplate>
|
|
</sipProfile>
|
|
<commonProfile>
|
|
<phonePassword></phonePassword>
|
|
<backgroundImageAccess>true</backgroundImageAccess>
|
|
<callLogBlfEnabled>2</callLogBlfEnabled>
|
|
</commonProfile>
|
|
<loadInformation>sip8961.9-4-2ES-14</loadInformation>
|
|
<vendorConfig>
|
|
<webAccess>0</webAccess>
|
|
<settingsAccess>1</settingsAccess>
|
|
<autoSelectLineEnable>0</autoSelectLineEnable>
|
|
<loggingDisplay>1</loggingDisplay>
|
|
<daysDisplayNotActive>1,2,3,4,5,6,7</daysDisplayNotActive>
|
|
<sshAccess>0</sshAccess>
|
|
<displayOnTime>00:00</displayOnTime>
|
|
<displayOnDuration>00:00</displayOnDuration>
|
|
<displayIdleTimeout>00:05</displayIdleTimeout>
|
|
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
|
|
</vendorConfig>
|
|
<userLocale>
|
|
<langCode>en_US</langCode>
|
|
<winCharSet>utf-8</winCharSet>
|
|
</userLocale>
|
|
<deviceSecurityMode>1</deviceSecurityMode>
|
|
<authenticationURL></authenticationURL>
|
|
<directoryURL>http://${serverAddress}:${toString directoryPort}/directory.xml</directoryURL>
|
|
<messagesURL />
|
|
<servicesURL></servicesURL>
|
|
<idleURL></idleURL>
|
|
<informationURL></informationURL>
|
|
<phoneServices useHTTPS="false">
|
|
<provisioning>2</provisioning>
|
|
<phoneService type="2" category="0">
|
|
<name>Voicemail</name>
|
|
<url>Application:Cisco/Voicemail</url>
|
|
<vendor></vendor>
|
|
<version></version>
|
|
</phoneService>
|
|
</phoneServices>
|
|
<proxyServerURL></proxyServerURL>
|
|
<transportLayerProtocol>1</transportLayerProtocol>
|
|
<capfAuthMode>0</capfAuthMode>
|
|
<capfList>
|
|
<capf>
|
|
<phonePort>3804</phonePort>
|
|
</capf>
|
|
</capfList>
|
|
<encrConfig>false</encrConfig>
|
|
</device>
|
|
''
|