Cisco 7941 phones and PJSIP - Solution

A little background: I have had Cisco 7941/7941G and other Cisco phones working for the past 5-10 years with no issues using Chan_SIP. This year, I’ve moved to PJSIP. The other Cisco phones worked fine but the 7941 would not register. After 2 days of research and testing, analyzing cnf.xml configuration files and SIP registration headers, and googling, I found that in order to work with PJSIP, the FreePBX extension has to have “Rewrite Contact” and “Force rport” both set to “No” in the FreePBX’s Extensions - Advanced Settings. “Rewrite Contact” allows it to register and “Force rport” allows RTP to be configured to communicate.

Here’s a working SEP-MAC-address.cnf.xml configuration:

This config allows the webGUI interface on the phone which is very nice for viewing the logs and status. Supposedly you can ssh into the phone using the ssh user and password but it wouldn’t allow me to login. The password for the phone interface was chosen for simple login (1adgjm corresponds to 123456 on the key presses). To unlock the phone, go to Settings button then press **#, type in the password 1adgjm and submit.

Replace:

NTPSERVER-IP-ADDRESS with your time server’s IP address
FREEPBX-IP-ADDRESS with your PBX’s IP address
PHONE-EXTENSION with the FreePBX extension number
PHONE-EXTENSION-SECRET with the FreePBX extension secret
Set the timezone for your area
Set the locale settings for your area

<?xml version="1.0" encoding="UTF-8"?>
<device>
<fullConfig>true</fullConfig>
<deviceProtocol>SIP</deviceProtocol>

<sshUserId>admin</sshUserId>
<sshPassword>1adgjm</sshPassword>

<devicePool>
	<dateTimeSetting>
		<dateTemplate>D-M-YA</dateTemplate>
		<timeZone>Mountain Standard/Daylight Time</timeZone>
		<ntps>
			<ntp>
				<name>192.168.203.254</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>192.168.204.108</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>4005</phoneLabel>
	<stutterMsgWaiting>0</stutterMsgWaiting>
	<callStats>true</callStats>
	<offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
	<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
	<disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>

	<startMediaPort>16384</startMediaPort>
	<stopMediaPort>20000</stopMediaPort>

	<sipLines>
  		<line button="1" lineindex="1">
			<featureID>9</featureID>
			<featureLabel>4005</featureLabel>
			<proxy>USECALLMANAGER</proxy>
			<port>5060</port>
			<name>4005</name>
			<displayName>4005</displayName>
			<autoAnswer>
	  			<autoAnswerEnabled>0</autoAnswerEnabled>
			</autoAnswer>
			<callWaiting>1</callWaiting>
			<authName>4005</authName>
			<authPassword>123456</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>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>

Hi blanchae,
I have a bunch of Cisco 7942 and 62 that I would like to register with my copy of FreePBX. I am using the commercial endpoint manager and have generated my pjSIP extension with the “Rewrite Contact” and “Force rport” both set to “No” in the extension’s advanced tab.
I have compared my sip"MAC".cnf.xml file to yours and other than the NAT entry they are identical, my phones are on the same subnet as the server.everything goes according to plan, I have a chsnSip and a pjSip extension on the same phone. both lines seem to register, my phone options persist for about 30 seconds. In that time I can initiate a call on the chanSIP extension but the pjSIP extension doesn’t appear to be registered. the phone then restarts!
I have tried the same setup on a Sangoma 705 and all is well. I have tried changing the order of the extensions and only the pjSIP extension without progress.
I have run out of ideas. Can you point me in a useful direction?

You could also use Chan-SCCP-B instead and leave the phone in Skinny mode.

The config files that come with the driver are pretty good.
The FreePBX Manager for it also works very well.

With the recent addition of the IP Address settings for Option 66 and 150 in Sysadmin Pro, it’s a rock-solid configuration.

Hello I have done everything you did and works almost fine … the only problem I have is with incoming calls … if I call the extension from another extension it seems busy. Any ideas?

Thank in advance

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.