Go to content Go to navigation Go to search

Configuring a Cisco 7961 for SIP and Asterisk

May 29th, 2007 by eric

Just prior to writing this, I think I was about ready to kill someone. Setting up this phone was probably one of the most challenging things I have done in a long time. So this will be my attempt to explain to other’s what I did and I will hopefully save some people some time.

Since we all need to be on the same page, let’s start out with the conventions:

  • Asterisk: Gentoo Linux, 192.168.1.5
  • Workhorse: Gentoo Linux (DHCP, TFTP, NTP), 192.168.1.20
  • Phone: Cisco 7961
  • Anything starting with a $ means you put your value in it. I will name the variable something descriptive for you
  • Remember that all filenames with Cisco are case sensitive
  • If there are some files you need examples of or access to and aren’t listed, please don’t hesitate to contact me.

I am not going to go into a lot of detail with things, just give some overview and some examples and it will hopefully be enough to get you in the right direction. Check throughout the document for some references and read up on those if need be.

DISCLAIMER: I am not an expert. If you break your phone while doing anything I mention here, I am not responsible. This is just what I did to get everything to work.

1. The first order of business was to add the phone’s MAC address to DHCP so I could be sure what was accessing the tftp server. I also needed to know the MAC address to create the proper files in the tftp directory. Ensure that you set the tftp server, ntp server, and SIP server in DHCP.

group voip {
        option domain-name-servers 192.168.1.20, 1.2.3.4;
        option domain-name "inside.mycompany.com";
        option smtp-server 192.168.1.20;
        option ntp-servers 192.168.1.20;
        option time-servers 192.168.1.20;
        option routers 192.168.1.1;
        option sip-server 192.168.1.5;
        default-lease-time 86400; # 1 day
        max-lease-time 86400;
        server-name "192.168.1.20";
        option tftp-server-name "192.168.1.20";

        host myphone {
            hardware ethernet 00:19:E8:F4:B4:D0;
            fixed-address 192.168.1.200;
        }
}

2. When you first plug in the phone, it’s loaded with the Skinny protocol software only (SCCP), nothing for SIP. This is because the phone was designed to work best (and really only) with the Cisco Call Manager. The first thing I had to do was to obtain the files that go in the tftproot on 192.168.1.20. In the upgrade package were the files:

  • apps41.1-1-3-15.sbn
  • cnu41.3-1-3-15.sbn
  • copstart.sh
  • cvm41sip.8-0-3-16.sbn
  • dsp41.1-1-3-15.sbn
  • jar41sip.8-0-3-16.sbn
  • load115.txt
  • load30018.txt
  • load308.txt
  • load309.txt
  • SIP41.8-0-4SR1S.loads
  • term41.default.loads
  • term61.default.loads

3. Once you place these files in the tftp root directory, you are ready for the upgrade. (Note: You need a Cisco smartnet file (or be good with Google) to find these files). Upgrading requires a factory reboot of the phone so it will look for the term61.default.loads file. To perform a factory reset of the phone, hold down the ‘#‘ as the phone powers up. Then dial ‘123456789*0#‘ and then let it work. The next time it reboots, it should then grab the necessary files from the tftp server and upgrade itself. You can watch the tftp logs and the phones LCD to ensure that everything that is supposed to be happening is happening.

4. At this point, the phone should be able to completely boot up and will likely just show you the word Unprovisioned at the bottom of the screen. The next step is to create the files that each phone needs to survive. The first file we are going to create is the SEP$MAC.cnf.xml. In the case of the phone that I am going to use for this demo, the filename is: SEP0019E8F490AD.cnf.xml. I know that the phone is also requesting the file CTLSEP0019E8F490AD.tlv, but you can safely ignore that. The minimalist version of the SEP$MAC.cnf.xml file:

<device>
   <deviceProtocol>SIP</deviceProtocol>
   <sshUserId>cisco</sshUserId>
   <sshPassword>cisco</sshPassword>
   <devicePool>
      <dateTimeSetting>
         <dateTemplate>M/D/Ya</dateTemplate>
         <timeZone>Eastern Standard/Daylight Time</timeZone>
         <ntps>
              <ntp>
                  <name>192.168.1.20</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.1.5</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>1</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>0</natEnabled>
      <natAddress></natAddress>
      <phoneLabel>LinkExperts</phoneLabel>
      <stutterMsgWaiting>1</stutterMsgWaiting>
      <callStats>true</callStats>
      <silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
      <disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
      <startMediaPort>16384</startMediaPort>
      <stopMediaPort>32766</stopMediaPort>
      <sipLines>
         <line button="1">
            <featureID>9</featureID>
            <featureLabel>100</featureLabel>
            <proxy>192.168.0.205</proxy>
            <port>5060</port>
            <name>100</name>
            <displayName>Eric Lubow</displayName>
            <autoAnswer>
               <autoAnswerEnabled>2</autoAnswerEnabled>
            </autoAnswer>
            <callWaiting>3</callWaiting>
            <authName>100</authName>
            <authPassword></authPassword>
            <sharedLine>false</sharedLine>
            <messageWaitingLampPolicy>1</messageWaitingLampPolicy>
            <messagesNumber>*97</messagesNumber>
            <ringSettingIdle>4</ringSettingIdle>
            <ringSettingActive>5</ringSettingActive>
            <contact>100</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>SIP41.8-0-4SR1S</loadInformation>
   <vendorConfig>
      <disableSpeaker>false</disableSpeaker>
      <disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
      <pcPort>1</pcPort>
      <settingsAccess>1</settingsAccess>
      <garp>0</garp>
      <voiceVlanAccess>0</voiceVlanAccess>
      <videoCapability>0</videoCapability>
      <autoSelectLineEnable>0</autoSelectLineEnable>
      <webAccess>1</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>proxy:3128</proxyServerURL>
   <servicesURL></servicesURL>
   <dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
   <dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
   <dscpForCm2Dvce>96</dscpForCm2Dvce>
   <transportLayerProtocol>4</transportLayerProtocol>
   <capfAuthMode>0</capfAuthMode>
   <capfList>
      <capf>
         <phonePort>3804</phonePort>
      </capf>
   </capfList>
   <certHash></certHash>
   <encrConfig>false</encrConfig>
</device>

5. You will also need to create a dialplan so the phone doesn’t try to dial immediately. Below is a minimalist dialplan.xml (which is the filename we used in the above schema).

<DIALTEMPLATE>
  <TEMPLATE MATCH="." TIMEOUT="5" User="Phone" />
  <TEMPLATE MATCH="2500" TIMEOUT="2" User="Phone" />
  <TEMPLATE MATCH=".97" TIMEOUT="2" User="Phone" />
  <TEMPLATE MATCH="5..." TIMEOUT="2" User="Phone" />
  <TEMPLATE MATCH="1.........." TIMEOUT="2" User="Phone" />
</DIALTEMPLATE>

6. Although I am still not entirely sure that you need them, here are 2 other files that I was told need to be referenced:
SIPDefault.cnf:

# Image Version
image_version: "P0S3-08-6-00"

# Proxy Server
proxy1_address: "192.168.1.5"

# Proxy Server Port (default - 5060)
proxy1_port:"5060"

# Emergency Proxy info
proxy_emergency: "192.168.1.5" # IP address here alternatively
proxy_emergency_port: "5060"

# Backup Proxy info
proxy_backup: "192.168.0.205"
proxy_backup_port: "5060"

# Outbound Proxy info
outbound_proxy: ""
outbound_proxy_port: "5060"

# NAT/Firewall Traversal
nat_enable: "0"
nat_address: "192.168.1.5"
voip_control_port: "5061"
start_media_port: "16384"
end_media_port: "32766"
nat_received_processing: "0"

# Proxy Registration (0-disable (default), 1-enable)
proxy_register: "1"

# Phone Registration Expiration [1-3932100 sec] (Default - 3600)
timer_register_expires: "3600"

# Codec for media stream (g711ulaw (default), g711alaw, g729)
preferred_codec: "none"

# TOS bits in media stream [0-5] (Default - 5)
tos_media: "5"

# Enable VAD (0-disable (default), 1-enable)
enable_vad: "0"

# Allow for the bridge on a 3way call to join remaining parties upon hangup
cnf_join_enable: "1" ; 0-Disabled, 1-Enabled (default)

# Allow Transfer to be completed while target phone is still ringing
semi_attended_transfer: "0" ; 0-Disabled, 1-Enabled (default)

# Telnet Level (enable or disable the ability to telnet into this phone
telnet_level: "2" ; 0-Disabled (default), 1-Enabled, 2-Privileged

# Inband DTMF Settings (0-disable, 1-enable (default))
dtmf_inband: "1"

# Out of band DTMF Settings (none-disable, avt-avt enable (default), avt_always - always avt ) dtmf_outofband: "avt" ~np~# DTMF dB Level Settings (1-6dB down, 2-3db down, 3-nominal (default), 4-3db up, 5-6dB up)
dtmf_db_level: "3"

# SIP Timers
timer_t1: "500" ; Default 500 msec
timer_t2: "4000" ; Default 4 sec
sip_retx: "10" ; Default 11
sip_invite_retx: "6" ; Default 7
timer_invite_expires: "180" ; Default 180 sec

# Setting for Message speeddial to UOne box
messages_uri: "*97"

# TFTP Phone Specific Configuration File Directory
tftp_cfg_dir: "./"
# Time Server
sntp_mode: "unicast"
sntp_server: "ntp2.usno.navy.mil" # IP address here alternatively
time_zone: "EST"
dst_offset: "1"
dst_start_month: "April"
dst_start_day: ""
dst_start_day_of_week: "Sun"
dst_start_week_of_month: "1"
dst_start_time: "02"
dst_stop_month: "Oct"
dst_stop_day: ""
dst_stop_day_of_week: "Sunday"
dst_stop_week_of_month: "8"
dst_stop_time: "2"
dst_auto_adjust: "1"

# Do Not Disturb Control (0-off, 1-on, 2-off with no user control, 3-on with no user control)
dnd_control: "0" ; Default 0 (Do Not Disturb feature is off)

# Caller ID Blocking (0-disabled, 1-enabled, 2-disabled no user control, 3-enabled no user control)
callerid_blocking: "0" ; Default 0 (Disable sending all calls as anonymous)

# Anonymous Call Blocking (0-disbaled, 1-enabled, 2-disabled no user control, 3-enabled no user control)
anonymous_call_block: "0" ; Default 0 (Disable blocking of anonymous calls)

# Call Waiting (0-disabled, 1-enabled, 2-disabled with no user control, 3-enabled with no user control)
call_waiting: "1" ; Default 1 (Call Waiting enabled)

# DTMF AVT Payload (Dynamic payload range for AVT tones - 96-127)
dtmf_avt_payload: "101" ; Default 100

# XML file that specifies the dialplan desired
dial_template: "dialplan"

# Network Media Type (auto, full100, full10, half100, half10)
network_media_type: "auto"

#Autocompletion During Dial (0-off, 1-on [default])
autocomplete: "0"

#Time Format (0-12hr, 1-24hr [default])
time_format_24hr: "1"

# URL for external Phone Services
services_url: "" # IP address here alternatively

# URL for external Directory location
directory_url: "" # IP address here alternatively

# URL for branding logo
logo_url: "" # IP address here alternatively

# Remote Party ID
remote_party_id: 1 ; 0-Disabled (default), 1-Enabled

and
XmlDefault.cnf.xml

<Default>
<callManagerGroup>
    <members>
       <member priority="0">
          <callManager>
             <ports>
                <ethernetPhonePort>2000</ethernetPhonePort>
                <mgcpPorts>
                   <listen>2427</listen>
                   <keepAlive>2428</keepAlive>
                </mgcpPorts>
             </ports>
             <processNodeName></processNodeName>
          </callManager>
       </member>
    </members>
 </callManagerGroup>
<loadInformation30018 model="IP Phone 7961">P0S3-08-6-00</loadInformation30018>
<loadInformation308 model="IP Phone 7961G-GE">P0S3-08-6-00</loadInformation308>
<authenticationURL></authenticationURL>
<directoryURL></directoryURL>
<idleURL></idleURL>
<informationURL></informationURL>
<messagesURL></messagesURL>
<servicesURL></servicesURL>
</Default>

This should be all the examples and information that you need to get going with your Cisco 7961(|G|GE) phone. Simplicity at it’s finest, eh Cisco?

Powered by Gregarious (37)

22 Responses to “Configuring a Cisco 7961 for SIP and Asterisk”

  1. Bal Says:

    Hi i have used a 7961 also but for some reason when i go via my external sip provider sipgate i cannot dial calls out. The dial plan seems to fail do you have a solution?

  2. eric Says:

    I don’t know what you mean by the dialplan fails. Are you sure its getting picked up by the phone?

  3. Bal Says:

    the dial plan is what the phone uses to dial out. I am using SIP and Sipgate when i dial out i cannot get it to work.

  4. eric Says:

    Are you talking about the dialplan.xml file or the dialplan that contains the outbound context in the extensions.conf? What happens when it “doesn’t work?”

  5. Henrique Says:

    Flash Files Link would be Great?
    Cisco don’t like Guest Accounts :S
    i’ll keep Searching seems hard to find
    any help would great Cheers
    7961G needs SIP :)

  6. eric Says:

    Cisco 7961G does support SIP, assuming you update the firmware. However, the SIP implementation seems to be developed towards an ease of use and functionality with Cisco call manager. Cisco is putting a lot of effort into developing a better SIP stack, but again they are doing it for their CCM.
    You can get that software by signing up for a Cisco Smartnet Contract, its only $8 US.

  7. Henrique Says:

    Hello Again,
    Managed to get the Sip Image
    SIP41.8-0-2SR1S
    After Doing some Reading and Setting it up it’s doesn’t seem to register with Asterisk
    it’s just says Registering all the time
    Running Trixbox 2.2 with all updates
    Flash = ok
    i got Dial Tone
    FreePbx Replies by saying
    “The number you have Dialed is not in Service…..”
    it might me Firmware Compatibility Issues
    not sure what to do next

  8. John Says:

    I have a problem with the 7961G I did all of the above my problem is I had a hell of a time finding the files

    • apps41.1-1-3-15.sbn
    • cnu41.3-1-3-15.sbn
    • copstart.sh
    • cvm41sip.8-0-3-16.sbn
    • dsp41.1-1-3-15.sbn
    • jar41sip.8-0-3-16.sbn
    • SIP41.8-0-4SR1S.loads
    • term41.default.loads
    • term61.default.loads
    But now is missing

    • load115.txt
    • load30018.txt
    • load308.txt
    • load309.txt

    and after doing the upgrade I still do not see any SIP options did I miss something ???? Please Help I also have 7914 Not sure if that will show me the extension that are busy. I am regisering on a SIP server on the internet. All of my phone are doing that SPA942 but this is my fist Cisco and man its dificult to setup

  9. Henrique Says:

    Tried Softphone with no luck
    also stuck on registering
    Reinstalling trixbox and starting from Scratch

  10. eric Says:

    *John,
    The only file you need is the load30018.txt file. That is likely what’s preventing the file from doing the upgrade properly. What makes you 100% sure that the phone did the upgrade? Yes, the Cisco phones are a PITA to setup. They also don’t even work 100% when they are setup unless they have a Cisco CCM attached to them somewhere.

    load30018.txt:
    30018 TAB SIP41.8-0-4SR1S TAB 11

  11. Marvin Says:

    i need to configure a cisco ip phone 7941 series for sip and asterisk, i have all the necesary files but i can´t configure the CTLSEP001759767068.tlv file, What parameters i need to place in this file and Which
    is the format ?

  12. jeff chang Says:

    quite note that the Phone tries to download jar file with a capital J, no doubt a windows dev enviroment.
    Version 8-2-2ES6

  13. dap182 Says:

    I am not being able to register two SIP lines to the same Asterisk server with the 7961G, anyone else having this problem?

  14. John Says:

    I got as far as the upgrade but it never registers I tried both a local asteriskds (Trisbox) and 2 different SIP providers still no luck.

    I have also found serveral newer SIp upgrades I used the one listed above but shouldn’t I use the latest one ???

  15. ig Says:

    Thanks for posting this, it saved me a lot of time. One change I had to make: the setting for natEnabled had to be “false” rather than “0″ otherwise my 7961 choked on the config. Other than that it was perfect.

  16. Matthias Pickel Says:

    hello eric,

    i am searching the firmware for 2 months now. could you help me… or any other guy who is using the sipfirmware.

    my mailadresse is matthias.pickel@gmx.de

    thanks!!!!!!!!!
    matthias

  17. oiram Says:

    > You can get that software by signing up for a Cisco Smartnet Contract, its only $8 US.

    Eric, just searched and the only one I’ve found was some £30 for that. Any other recommendations? or places to go and get CCO account? Thanks a lot

    oiram

  18. Fab Says:

    Hi,
    My cisco 7961 can register, it can receive calls from other SIP soft phone but I have only one-way audio (I can hear on the Cisco phone, but not on other SIP soft phone). Any idea ? (they are on the same LAN, no NAT).
    Cheers

  19. Reg Samuel Says:

    Hi Eric,

    I’ve been trying to get the files listed in Step 2. for quite a while.
    I have a smartnet contract with Cisco. I have searched their website with no luck.
    Could you let me know where you got them from?

    Cheers.

    Reg

  20. L@M-IN a.k.a The Kebab Master Says:

    Hi Eric, thanks for this report it’s very interessant.

    (Sorry in advance for my bad English).

    I use a Cisco 7960 (i think the procedure is the same like a 7961) with SIP protocol :

    When i first plug in the phone he try to join this file ; OS79XX.TXT in this file i put the version (bin) of the firmware i use : P003-07-1-00.

    After that, the phone try automaticaly to find the SEPmacaddress.cnf.xml file.

    In this file i indicate :

    P003-07-1-00

    The phone starts his upgrade and stop with the message “Protocol Application Invalid”.

    I have to edit the SEPmacaddress.cnf.xml file and modify it like this :

    P0S3-07-1-00

    After that, the phone ends his upgrade.

    Anybody has an idea ?

  21. Paul Says:

    Hello Eric,
    Everything works well with the exception of receiving calls onto the Cisco 7961 from any other device.
    I can place calls from Cisco 7961 to Softphone - Okay. Also 7960 to FXS ports works.

    Running Trixbox CE
    Any ideas?

  22. shadow7777 Says:

    Do you have a link for this => Cisco Smartnet Contract.
    And can you put the necessary file some where ???
    It will be great. As i bought 7961 and i would like to use it with sip.
    Thanks in advance

Leave a Reply