How to Provision Cisco IP Phones 8861, 7861,7821,7811 and 7942G for use with Freeswitch PBX



Introduction

Using soft phones with Freeswitch PBX allows the utilization of existing PCs or smart phones as the communicating devices. But often there are times when the requirements for setting up or deploying a Unified Communication solution necessitate the use of IP phones. Freeswitch has been tested and works well with various IP phones, more details can be found at https://freeswitch.org/confluence/display/FREESWITCH/Phones In this blog post I will explain how I got five different models of Cisco IP phones provisioned for use with Freeswitch.

Cisco IP phones are factory configured or provisioned to work only with Cisco Unified Communication manager which mainly uses SCCP as communication protocol. Freeswitch supports SCCP though, but to enable the IP phones work seamless with Freeswitch, the firmwares on the various phones need to be upgraded to enable them use SIP and subsequently provisioned while doing the upgrade.

Required Tools

Cisco IP phones usually will get their firmware upgrade from a TFTP server residing on the network. Newer models of Cisco phones allow manually inputing IP address of the TFTP server in the phone configuration. But for the old model; 7942G, the DHCP server will have to advertise the address of the TFTP server to it.
On a Windows PC Tftpd32 is an utilitiy app that will make aWindows PC serve as both the DHCP and TFTP server at the same time, it can be downloaded from.
On a Linux PC I did the provisioning 8861, 7861,7821,7811 models on a Debian PC. First install the tftp application running this command on the terminal.

    apt-get install atftpd
Then run vi /etc/default/atftpd to edit the content of atftpd by adding – port 69 to the content of the file to make it look like what is shown below
    USE_INETD=false
    OPTIONS="--port 69 --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftp"
    
Save the file and exit vi. Start the tftp server by running this command
    /etc/init.d/atftpd start
    
To allow connection to be made to the tftp server on port 69 run the command below, while substituting the IP for your network IP
   
 iptables -A INPUT -p udp -s 172.16.20.0/24 -m multiport --dport 69 -m state --state NEW -j ACCEPT
I recommend downloading firmware files for the phones directly from Cisco software download center, you can register an account which will be verified and will allow you to download the SIP upgrade files. After downloading the files, you should extract and copy the contents to the tftp server root folder.

Firmware Upgrade and Provisioning

Before the upgrade can be done, some required xml files need to be created and placed in the tftp server root folder.

Diaplan.xml
 
        <DIALTEMPLATE>
        <TEMPLATE MATCH="*" Timeout="3" User="Phone" />
</DIALTEMPLATE>
The content of the diaplan.xml file is to tell the phone the pattern in which the phone number will take.

XMLDefault.cnf.xml

   
        <Default>
        <callManagerGroup>
        <members>
        <member priority="0">
        <callManager>
        <ports>
        <ethernetPhonePort>2000</ethernetPhonePort>
        <mgcpPorts>
        <listen>2427</listen>
        <keepAlive>2428</keepAlive>
                 </mgcpPorts>
              </ports>
        <processNodeName>172.16.20.15</processNodeName>
           </callManager>
           </member>
        </members>
     </callManagerGroup>
        <loadInformation model="Cisco 8861">sip88xx.10-3-1-20</loadInformation>
        <authenticationURL></authenticationURL>
        <directoryURL></directoryURL>
        <idleURL></idleURL>
        <informationURL></informationURL>
        <messagesURL></messagesURL>
        <servicesURL></servicesURL>
    </Default>
    
This configuration file contains description of the version of the fimware that the phone should request from the TFTP server and the address of the PBX server. Change the value in the bolded elements to match the IP address to your PBX server and the version of the firmware.

SEPxxxxxx.cnf.xml

A copy of this file will be created in the TFTP root folder for each of the IP Phones to be provisioned, the format for naming the file is SEP[MAC of Phone].cnf.xml eg SEP054B443C44.cnf.xml. The content of the usually looks like what is shown below
        
        <device>
        <deviceProtocol>SIP</deviceProtocol>
        <sshUserId>cisco</sshUserId>
        <sshPassword>cisco</sshPassword>
        <devicePool>
        <dateTimeSetting>
        <dateTemplate>D/M/Ya</dateTemplate>
        <timeZone>UTC+01:00 Standard/Daylight Time</timeZone>
        <ntps>
        <ntp>
        <name>172.16.20.15</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>172.16.20.15</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-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>
      </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>None</userInfo>
      </sipStack>
        <autoAnswerTimer>1</autoAnswerTimer>
        <autoAnswerAltBehavior>false</autoAnswerAltBehavior>
        <autoAnswerOverride>true</autoAnswerOverride>
        <transferOnhookEnabled>false</transferOnhookEnabled>
        <enableVad>false</enableVad>
        <preferredCodec>g711ulaw</preferredCodec>
        <dtmfAvtPayload>101</dtmfAvtPayload>
        <dtmfDbLevel>3</dtmfDbLevel>
        <dtmfOutofBand>avt</dtmfOutofBand>
        <alwaysUsePrimeLine>false</alwaysUsePrimeLine>
        <alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
        <kpml>3</kpml>
        <natEnabled>false</natEnabled>
        <natAddress></natAddress>
        <phoneLabel>208</phoneLabel>
        <stutterMsgWaiting>0</stutterMsgWaiting>
        <callStats>false</callStats>
        <silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
        <disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
        <startMediaPort>16384</startMediaPort>
        <stopMediaPort>32766</stopMediaPort>
        <sipLines>
        <line button="1">
        <featureID>9</featureID>
        <featureLabel>Reception</featureLabel>
        <proxy>USECALLMANAGER</proxy>
        <port>5060</port>
        <name>208</name>
        <displayName>208</displayName>
        <autoAnswer>
        <autoAnswerEnabled>2</autoAnswerEnabled>
            </autoAnswer>
        <callWaiting>3</callWaiting>
        <authName>208</authName>
        <authPassword>*1234#</authPassword>
        <sharedLine>false</sharedLine>
        <messageWaitingLampPolicy>1</messageWaitingLampPolicy>
        <messagesNumber>3501</messagesNumber>
        <ringSettingIdle>4</ringSettingIdle>
        <ringSettingActive>5</ringSettingActive>
        <contact>208</contact>
        <forwardCallInfoDisplay>
        <callerName>true</callerName>
        <callerNumber>true</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></phonePassword>
        <backgroundImageAccess>true</backgroundImageAccess>
        <callLogBlfEnabled>1</callLogBlfEnabled>
   </commonProfile>
        <loadInformation>sip88xx.10-3-1-20</loadInformation>
        <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>
        <spanToPCPort>1</spanToPCPort>
        <loggingDisplay>1</loggingDisplay>
        <loadServer></loadServer>
   </vendorConfig>
        <versionStamp>1143565489-a3cbf294-7526-4c29-8791-c4fce4ce4c37</versionStamp>
        <networkLocale>US</networkLocale>
        <networkLocaleInfo>
        <name>US</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>
    
You can change the values of the elements of the xml configuration file to reflect your PBX installation and save the files.

For newer models of Cisco IP phones in which the IP address of the TFTP server can be manually entered into the phone, follow this step to input the TFTP Server address.

Press the menu key on the phone then press Admin Settings -> Network Setup -> Ethernet Configuration -> IPV4 Setup -> Alternate TFTP Server -> TFTP Server 1

Once the file has been saved, power cycle the IP Phone in which the configuration file was jut created by removing the Rj45 cable from the POE switch and plug it back while holding the # key on the phone, when the light comes on the display press 1234567890*# this will start the upgrade process for the phone.

Provisioning 7942G

Updated 06/01/2016
Provisioning 7942G model of Cisco IP phones takes a different approach, because manual input of TFTP server IP address has been disabled, press **# to unlock the manual input screen. Then follow the steps mentioned earlier to reset or power cycle the phone.

An approach earlier used before the update posted above is to use a utility; tftpd as explained in the way I earlier got the phone configured below. I took the 7942G phones off the general network and placed on a private local network with no DHCP server, I used the Tftpd32 utility on a Windows PC to make the PC both the DHPC and the TFTP server and assigned a static IP address to the PC as shown in the picture below.





You should point the tftpd application to the location of the sip upgrade files on the windows PC. You can then power cycle the IP Phones has described earlier, the phones will be assigned IP address by Tftpd32 application and the phone will start the upgrade, you will see on the application log as the files are being sent to the phone as shown in the screen below.



8861 Model


7861 Model


7821 Model


7811 Model


7942G Model




Share this page on


  3 People Like(s) This Page   Permalink  

 Click  To Like This Page

comments powered by Disqus

page