mkdir / etc / asterisk / keys2. create a set of certificates
. / ast_tls_cert -C pbx.mycompany.com -O "My Super Company" -d / etc / asterisk / keysIt remains only to add the settings in sip.conf (Enable TCP and TLS)
[ general ]
tcpenable = yes
transport = udp, tcp
tlsenable = yes
tlsbindaddr = 0.0.0.0
tlscertfile = / etc / asterisk / keys / asterisk. pem
tlscafile = / etc / asterisk / keys / ca. crt
tlscipher = ALL
tlsclientmethod = tlsv1 ; none of the others seem to work with the client
<? xml version = "1.0" encoding = "UTF-8" ?>
<device >
<deviceProtocol > SIP </ deviceProtocol >
')
<sshUserId > admin </ sshUserId >
<sshPassword > cisco </ sshPassword >
<devicePool >
<dateTimeSetting >
<dateTemplate > D / M / Ya </ dateTemplate >
<timeZone > Ekaterinburg Standard Time </ timeZone >
<ntps >
<ntp >
<name > 10.0.3.1 </ name >
<ntpMode > Unicast </ ntpMode >
</ ntp >
</ ntps >
</ dateTimeSetting >
<callManagerGroup >
<members >
<member priority = "0" >
<callManager >
<ports >
<ethernetPhonePort > 2000 </ ethernetPhonePort >
<sipPort > 5060 </ sipPort >
<securedSipPort > 5061 </ securedSipPort >
<voipControlPort > 5060 </ voipControlPort >
</ ports >
<processNodeName > ASTERISK_IP </ processNodeName >
</ callManager >
</ member >
</ members >
</ callManagerGroup >
</ devicePool >
<commonProfile >
<phonePassword > </ phonePassword >
<backgroundImageAccess > true </ backgroundImageAccess >
<callLogBlfEnabled > 3 </ callLogBlfEnabled >
</ commonProfile >
<loadInformation > SIP69xx.9-3-3-2 </ loadInformation >
<vendorConfig >
<disableSpeaker > false </ disableSpeaker >
<disableSpeakerAndHeadset > false </ disableSpeakerAndHeadset >
<pcPort > 0 </ pcPort >
<settingsAccess > 1 </ settingsAccess >
<garp > 0 </ garp >
<voiceVlanAccess > 0 </ voiceVlanAccess >
<ciscoCamera > 1 </ ciscoCamera >
<videoCapability > 1 </ videoCapability >
<usbClasses > 0,1,2 </ usbClasses >
<sdio > 1 </ sdio >
<wifi > 0 </ wifi >
<bluetoothProfile > 0.1 </ bluetoothProfile >
<powerNegotiation > 0 </ powerNegotiation >
<autoSelectLineEnable > 0 </ autoSelectLineEnable >
<webAccess > 0 </ webAccess >
<sshAccess > 0 </ sshAccess >
<g722CodecSupport > </ g722CodecSupport >
<daysDisplayNotActive > 1,2,3,4,5,6,7 </ daysDisplayNotActive >
<displayOnTime > 08:30 </ displayOnTime >
<displayOnDuration > 09:30 </ displayOnDuration >
<displayIdleTimeout > 01:00 </ displayIdleTimeout >
<displayOnWhenIncomingCall > 1 </ displayOnWhenIncomingCall >
<spanToPCPort > 1 </ spanToPCPort >
<loggingDisplay > 1 </ loggingDisplay >
<loadServer > </ loadServer >
</ vendorConfig >
<enterpriseConfig >
<usb1 > 1 </ usb1 >
<usb2 > 1 </ usb2 >
<ciscoCamera > 1 </ ciscoCamera >
<usbClasses > 0,1,2 </ usbClasses >
<sdio > 1 </ sdio >
<bluetooth > 1 </ bluetooth >
<wifi > 1 </ wifi >
<bluetoothProfile > 0.1 </ bluetoothProfile >
<joinAndDirectTransferPolicy > 0 </ joinAndDirectTransferPolicy >
<videoCapability > 1 </ videoCapability >
<webAccess > 0 </ webAccess >
<eapAuthentication > 2 </ eapAuthentication >
<webProtocol > 0 </ webProtocol >
</ enterpriseConfig >
<advertiseG722Codec > </ advertiseG722Codec >
<networkLocale > United_States </ networkLocale >
<networkLocaleInfo >
<name > United_States </ name >
<uid > 64 </ uid >
<version > 8.5.0.0 (1) </ version >
</ networkLocaleInfo >
<deviceSecurityMode > 1 </ deviceSecurityMode >
<idleTimeout > 0 </ idleTimeout >
<authenticationURL > </ authenticationURL >
<directoryURL > </ directoryURL >
<idleURL > </ idleURL >
<informationURL > </ informationURL >
<messagesNumber > </ messagesNumber >
<messagesURL > </ messagesURL >
<proxyServerURL > </ proxyServerURL >
<servicesURL > </ servicesURL >
<dscpForSCCPPhoneConfig > 96 </ dscpForSCCPPhoneConfig >
<dscpForSCCPPhoneServices > 0 </ dscpForSCCPPhoneServices >
<dscpForCm2Dvce > 96 </ dscpForCm2Dvce >
<transportLayerProtocol > 4 </ transportLayerProtocol >
<dndCallAlert > 5 </ dndCallAlert >
<phonePersonalization > 1 </ phonePersonalization >
<rollover > 0 </ rollover >
<singleButtonBarge > 0 </ singleButtonBarge >
<joinAcrossLines > 1 </ joinAcrossLines >
<autoCallPickupEnable > false </ autoCallPickupEnable >
<blfAudibleAlertSettingOfIdleStation > 0 </ blfAudibleAlertSettingOfIdleStation >
<blfAudibleAlertSettingOfBusyStation > 0 </ blfAudibleAlertSettingOfBusyStation >
<capfAuthMode > 0 </ capfAuthMode >
<capfList >
<capf >
<phonePort > 3804 </ phonePort >
</ capf >
</ capfList >
<certHash > </ certHash >
<encrConfig > false </ encrConfig >
<sipProfile >
<sipProxies >
<backupProxy > USECALLMANAGER </ backupProxy >
<backupProxyPort > 5060 </ backupProxyPort >
<emergencyProxy > USECALLMANAGER </ emergencyProxy >
<emergencyProxyPort > 5060 </ emergencyProxyPort >
<outboundProxy > </ outboundProxy >
<outboundProxyPort > </ outboundProxyPort >
<registerWithProxy > true </ registerWithProxy >
</ sipProxies >
<sipCallFeatures >
<cnfJoinEnabled > true </ cnfJoinEnabled >
<callForwardURI > x-cisco-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 >
<retainForwardInformation > true </ retainForwardInformation >
</ 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 >
<autoAnswerTimer > 0 </ autoAnswerTimer >
<autoAnswerAltBehavior > false </ autoAnswerAltBehavior >
<autoAnswerOverride > true </ autoAnswerOverride >
<transferOnhookEnabled > false </ transferOnhookEnabled >
<enableVad > false </ enableVad >
<preferredCodec > none </ preferredCodec >
<dtmfAvtPayload > 101 </ dtmfAvtPayload >
<dtmfDbLevel > 3 </ dtmfDbLevel >
<dtmfOutofBand > avt </ dtmfOutofBand >
<alwaysUsePrimeLine > true </ alwaysUsePrimeLine >
<alwaysUsePrimeLineVoiceMail > true </ alwaysUsePrimeLineVoiceMail >
<kpml > 3 </ kpml >
<natEnabled > false </ natEnabled >
<natAddress > ASTERISK_IP </ natAddress >
<stutterMsgWaiting > 2 </ stutterMsgWaiting >
<callStats > false </ callStats >
<silentPeriodBetweenCallWaitingBursts > 10 </ silentPeriodBetweenCallWaitingBursts >
<disableLocalSpeedDialConfig > false </ disableLocalSpeedDialConfig >
<startMediaPort > 10,000 </ startMediaPort >
<stopMediaPort > 20000 </ stopMediaPort >
<voipControlPort > 5060 </ voipControlPort >
<dscpForAudio > 184 </ dscpForAudio >
<dscpVideo > 136 </ dscpVideo >
<dscpForTelepresence > 128 </ dscpForTelepresence >
<ringSettingBusyStationPolicy > 0 </ ringSettingBusyStationPolicy >
<dialTemplate > dialplan.xml </ dialTemplate >
<voipControlPort > 5060 </ voipControlPort >
<phoneLabel > SIP_NUMBER </ phoneLabel >
<sipLines >
<line button = "1" lineIndex = "1" >
<featureID > 9 </ featureID >
<featureLabel > SIP_NUMBER </ featureLabel >
< SIP_NUMBER </ name >
<displayName > SIP_NUMBER </ displayName >
<contact > </ contact >
<proxy > USECALLMANAGER </ proxy >
<port > 5060 </ port >
<autoAnswer >
<autoAnswerEnabled > 0 </ autoAnswerEnabled >
</ autoAnswer >
<callWaiting > 4 </ callWaiting >
<authName > SIP_NUMBER </ authName >
<authPassword > SIPPASS </ authPassword >
<sharedLine > false </ sharedLine >
<messageWaitingLampPolicy > 3 </ messageWaitingLampPolicy >
<messageWaitingAMWI > 1 </ messageWaitingAMWI >
<messagesNumber > 1000 </ messagesNumber >
<ringSettingIdle > 4 </ ringSettingIdle >
<ringSettingActive > 5 </ ringSettingActive >
<forwardCallInfoDisplay >
<callerName > true </ callerName >
<callerNumber > false </ callerNumber >
<redirectedNumber > false </ redirectedNumber >
<dialedNumber > true </ dialedNumber >
</ forwardCallInfoDisplay >
<maxNumCalls > 4 </ maxNumCalls >
<busyTrigger > 2 </ busyTrigger >
</ line >
</ sipLines >
</ sipProfile >
<phoneServices >
<provisioning > 0 </ provisioning >
<phoneService type = "1" category = "0" >
<name > Missed Calls </ name >
<url > Application: Cisco / MissedCalls </ url >
<vendor > </ vendor >
<version > </ version >
</ phoneService >
<phoneService type = "2" category = "0" >
<name > voicemail </ name >
<url > Application: Cisco / Voicemail </ url >
<vendor > </ vendor >
<version > </ version >
</ phoneService >
<phoneService type = "1" category = "0" >
<name > Received Calls </ name >
<url > Application: Cisco / ReceivedCalls </ url >
<vendor > </ vendor >
<version > </ version >
</ phoneService >
<phoneService type = "1" category = "0" >
<name > Placed Calls </ name >
<url > Application: Cisco / PlacedCalls </ url >
<vendor > </ vendor >
<version > </ version >
</ phoneService >
</ phoneServices >
</ device >
You can run on <transportLayerProtocol> 2 </ transportLayerProtocol> different transport4 — Use default transport protocol (in old firmwares — udp, in latest — tcp), may be this also a TLS selection 2 — Prefer use UDP 1 — Prefer use TCP
Add 2 line to your phone is very simple, you need to create another section of the line in sipLines<sipLines >
<line button = "1" lineIndex = "1" >
<DIALTEMPLATE >
<TEMPLATE MATCH = "*" Timeout = "6" />
</ DIALTEMPLATE >
<loadInformation > SIP69xx.9-3-3-2 </ loadInformation >
<webAccess > 0 </ webAccess >
Source: https://habr.com/ru/post/177947/
All Articles