
Shout out to Delory for helping figure this mess out!
Handler for nonexistent extensions
include => invalid-extension
[invalid-extension]
exten => _.,1,Playback(/var/lib/asterisk/sounds/anruf)
same => n,Hangup()
include here invokes the invalid-extension subroutine when no other dialplan entries match the extension.
_. in invalid-extension is a wildcard that basically matches any extension, making it intercept any extensions that were not matched by other parts of the dialplan.
Making Cisco 7941 work with Asterisk
Please don't, this will cost you what's left of your sanity.
Phone Side
Bring up a TFTP server in your network.
Place the contents of a Cisco 7941 firmware package in the folder served by it (*.sbn and *.loads files). Make sure that the firmware you downloaded supports SIP (there are both SIP and non-SIP versions available).
Create additional configuration files:
dialplan.xml:
<dialTemplate>
<versionStamp>e68d54c1-0354-4b1a-aca4-adffc4b7de2f</versionStamp>
<TEMPLATE match="*" timeout="3" />
</dialTemplate>
SEP(phone's MAC address in uppercase).cnf.xml (e.g. SEP001122C0FFEE.cnf.xml) — create a file for each phone in your network:
(replace %these parts% with your actual data, consult USECALLMANAGER's beautiful reference in case of doubt)
<?xml version="1.0" encoding="UTF-8"?>
<device>
<fullConfig>true</fullConfig>
<deviceProtocol>SIP</deviceProtocol>
<sshUserId>admin</sshUserId>
<sshPassword>admin</sshPassword>
<devicePool>
<dateTimeSetting>
<dateTemplate>D-M-YY</dateTemplate>
<timeZone>%your timezone, e.g. GMT Standard/Daylight Time%</timeZone>
<ntps>
<ntp>
<name>%address of a random NTP server%</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
</ports>
<processNodeName>%your asterisk server's IP or hostname%</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>
<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>1</callHoldRingback>
<localCfwdEnable>true</localCfwdEnable>
<semiAttendedTransfer>true</semiAttendedTransfer>
<anonymousCallBlock>0</anonymousCallBlock>
<callerIdBlocking>0</callerIdBlocking>
<retainForwardInformation>false</retainForwardInformation>
<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>true</remotePartyID>
<userInfo>Phone</userInfo>
</sipStack>
<autoAnswerTimer>1</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>false</alwaysUsePrimeLine>
<alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
<kpml>0</kpml>
<natEnabled>false</natEnabled>
<natReceivedProcessing>false</natReceivedProcessing>
<natAddress></natAddress>
<phoneLabel>%your extension, e.g. 1234%</phoneLabel>
<stutterMsgWaiting>0</stutterMsgWaiting>
<callStats>true</callStats>
<offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
<disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
<startMediaPort>10000</startMediaPort>
<stopMediaPort>20000</stopMediaPort>
<sipLines>
<line button="1" lineindex="1">
<featureID>9</featureID>
<featureLabel>%your extension, e.g. 1234%</featureLabel>
<proxy>USECALLMANAGER</proxy>
<port>5060</port>
<name>%your extension, e.g. 1234%</name>
<displayName>%your extension, e.g. 1234%</displayName>
<autoAnswer>
<autoAnswerEnabled>0</autoAnswerEnabled>
</autoAnswer>
<callWaiting>1</callWaiting>
<authName>%your extension, e.g. 1234%</authName>
<authPassword>%your SIP password%</authPassword>
<sharedLine>false</sharedLine>
<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
<messageWaitingAMWI>0</messageWaitingAMWI>
<messagesNumber>*97</messagesNumber>
<ringSettingIdle>4</ringSettingIdle>
<ringSettingActive>5</ringSettingActive>
<contact></contact>
<forwardCallInfoDisplay>
<callerName>true</callerName>
<callerNumber>false</callerNumber>
<redirectedNumber>false</redirectedNumber>
<dialedNumber>true</dialedNumber>
</forwardCallInfoDisplay>
</line>
</sipLines>
<voipControlPort>5060</voipControlPort>
<dscpForAudio>184</dscpForAudio>
<ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
<dialTemplate>dialplan.xml</dialTemplate>
</sipProfile>
<commonProfile>
<phonePassword>%keypad password for your phone's admin features, e.g. 1adgjm%</phonePassword>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>2</callLogBlfEnabled>
</commonProfile>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<pcPort>0</pcPort>
<settingsAccess>1</settingsAccess>
<garp>0</garp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>0</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<sshAccess>0</sshAccess>
<sshPort>22</sshPort>
<webAccess>0</webAccess>
<daysDisplayNotActive></daysDisplayNotActive>
<displayOnTime>00:00</displayOnTime>
<displayOnDuration>00:00</displayOnDuration>
<displayIdleTimeout>00:00</displayIdleTimeout>
<spanToPCPort>1</spanToPCPort>
<loggingDisplay>1</loggingDisplay>
<loadServer></loadServer>
</vendorConfig>
<userLocale>
<name>English_United_States</name>
<uid>1</uid>
<langCode>en_US</langCode>
<version>1.0.0.0-1</version>
<winCharSet>UTF-8</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<version>5.0(2)</version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<authenticationURL></authenticationURL>
<directoryURL></directoryURL>
<idleURL></idleURL>
<informationURL></informationURL>
<messagesURL></messagesURL>
<proxyServerURL></proxyServerURL>
<servicesURL></servicesURL>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>96</dscpForCm2Dvce>
<transportLayerProtocol>2</transportLayerProtocol>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
</capf>
</capfList>
<certHash></certHash>
<encrConfig>false</encrConfig>
</device>
Turn the phone on in the same network as your TFTP server and pray that it picks up the firmware and configuration set. It may reboot a few times — once it's done, it will show the home screen with your extension next to one of the line toggle buttons on the right.
Asterisk Side
Make sure you have PJSIP module enabled; in pjsip.conf:
; transport configuration:
[transport-udp-nat]
type=transport
protocol=tcp
bind=0.0.0.0
local_net=(local network mask, e.g. 192.168.0.0/24)
[cisco](!)
type=endpoint
context=from-internal
disallow=all
allow=ulaw
allow=g722
direct_media=no
rtp_symmetric=no
force_rport=no
rewrite_contact=no
; -------- (more stuff) --------
; user account configuration:
[1234](cisco)
auth=1234
aors=1234
[1234](auth-userpass)
password=whatever
username=1234
[1234](aor-single-reg)

To post a comment you need to login first.