Tag Archive: SIP

I flashed 5 of these phones back 6 months ago with some difficulty (after trying different methods/firmware versions/network cables/switches etc I finally got them all working), unfortunately I failed to record my findings! Time to resurrect the blog!

Last week I found myself with a few more Cisco CP-7906G IP phones to convert from old SCCP firmware to SIP. Rather than using the xml.conf method I chose to hard reset (I could remember this is how I did it last time);

  • Hold the # key while powering on the phone (either by POE or mains)
  • Once the red indicator on the handset start flashing release #
  • Key 3491672850*#

As my FreePBX (Asterisk PBX) is running and has the firmware ready I hoped everything would just work… Unfortunately not. All of the phones got stuck trying to pull term06.default.loads. I spent countless hours trying to figure out the problem, including;

  • Trying different DHCP servers (tftpd32, tftpd64, pumpkin & solarwinds TFTP server)
  • Trying different switches, network patch leads and even a direct connection between my laptop and the phones
  • Trying different IP ranges and network configurations

But still the phones repeatedly searched for term06.default.loads;

Dec 30 10:15:32 localhost in.tftpd[24929]: RRQ from filename term06.default.loads
Dec 30 10:15:33 localhost in.tftpd[24950]: RRQ from filename term06.default.loads
Dec 30 10:18:00 localhost in.tftpd[25093]: RRQ from filename term06.default.loads
Dec 30 10:18:00 localhost in.tftpd[25094]: RRQ from filename term06.default.loads
Dec 30 10:19:33 localhost in.tftpd[25151]: RRQ from filename term06.default.loads
Dec 30 10:19:34 localhost in.tftpd[25152]: RRQ from filename term06.default.loads

Eventually I decided to try a few different firmware versions “just in case”. Initially none worked (and they are hard to come by because I don’t have an active Cisco subscription and without one, you cannot download them directly from Cisco).

After almost giving up, I figured out that many of the firmware images I was previously unable to open (.cop or .cop.sgn) were in fact just zip files which can be opened in 7-zip. I recall when using the old technique to upgrade the firmware you need to start with a version around 8.5 then slowly incrementally patch. I didn’t think this was necessary with the “hard reset” technique, but found cmterm-7911_7906-sccp.8-5-2.cop.sgn and gave it a whirl….

Dec 30 10:44:41 localhost in.tftpd[26016]: RRQ from filename term06.default.loads
Dec 30 10:44:42 localhost in.tftpd[26017]: RRQ from filename jar11sccp.8-5-2TH1-9.sbn
Dec 30 10:44:49 localhost in.tftpd[26018]: RRQ from filename cnu11.8-5-2TH1-9.sbn
Dec 30 10:44:51 localhost in.tftpd[26019]: RRQ from filename apps11.8-5-2TH1-9.sbn
Dec 30 10:45:03 localhost in.tftpd[26024]: RRQ from filename dsp11.8-5-2TH1-9.sbn
Dec 30 10:45:05 localhost in.tftpd[26025]: RRQ from filename cvm11sccp.8-5-2TH1-9.sbn

Instantly the phone picked up term06.default.loads and proceeded to pickup the other files!

Once the phone booted, it clearly wasn’t going to register against my PBX (as it’s still running SCCP firmware). So I placed the SIP firmware cmterm-7911_7906-sip.9-4-2SR1-1.cop.sgn back on the TFTP. Carried out another hard reset and again, the phone instantly picked up the new files;

Dec 30 11:01:20 localhost in.tftpd[26726]: RRQ from filename term06.default.loads
Dec 30 11:01:21 localhost in.tftpd[26727]: RRQ from filename jar11sip.9-4-2ES9.sbn
Dec 30 11:01:28 localhost in.tftpd[26729]: RRQ from filename cnu11.9-4-2ES9.sbn
Dec 30 11:01:31 localhost in.tftpd[26730]: RRQ from filename apps11.9-4-2ES9.sbn
Dec 30 11:01:44 localhost in.tftpd[26736]: RRQ from filename dsp11.9-4-2ES9.sbn
Dec 30 11:01:46 localhost in.tftpd[26737]: RRQ from filename cvm11sip.9-4-2ES9.sbn

I provisioned the phones in FreePBX but they seemed to get stuck in a cycle registering/updating locale/rebooting. Fortunately I recalled having this issue previously and determined that the 7906 phones have a relatively short maximum password length which the default FreePBX passwords exceed. I was able to confirm this by looking at the Asterisk log;

[root@localhost ~]# tail /var/log/asterisk/full
[2015-12-30 02:06:30] NOTICE[1915] chan_sip.c: Registration from '<sip:1006@>' failed for '' - Wrong password
[2015-12-30 02:08:07] NOTICE[1915] chan_sip.c: Registration from '<sip:1006@>' failed for '' - Wrong password
[2015-12-30 02:08:54] NOTICE[1915] chan_sip.c: Registration from '<sip:1006@>' failed for '' - Wrong password

Once I changed the password and rebuilt the configs in Endpoint manager the phones registered straight away.

In conclusion, I think the bootloader on the phones needed to be upgraded to enable them to be capable of loading the 9.x firmware. Flashing them with the 8.x firmware first upgraded the bootloader and from there it was plane sailing! I have attached the two firmwares for reference;

As a sidenote; I have never had luck with using DHCP option 150 (in either pfSense or tftpd32). Entering an IP address in it’s normal format has definitely never worked (when I do a wireshark trace I can confirm this). I believe you’re supposed to use some hex format, but having tried this in several different formats i’ve still never managed to get it working. The preferable route seems to be using DHCP option 66 (I believe this supports either a hostname or IP). In tftpd32 you don’t actually need to configure this option, the built in DHCP server automatically configures it to the hostname of the interface running the service.

Hopefully this is the first of a number of trixbox how-tos. I have started with this one as i followed hundreds of guides, spent hours googling and tried hundreds of configurations until I eventually got it working. In the end it was relatively simple, i was actually trying to enter too much information!

  • Before we get started, if you haven’t already, forward port 5060 (TCP & UDP) on your router to your trixbox

    Configuring the SIP Trunk

  • Login to the maintenance area of your trixbox server
  • Under the basic heading on the left hand side, select trunks
  • Click add sip trunk
  • Enter your PSTN phone number assigned by sipgate in the “Outbound Caller ID” field
  • “Dial rules” can be configured how you like but a simple example would be 9|. (this will catch everything dialed starting with a 9 and send all the following digits to sipgate
  • Within “Outgoing Settings” enter “Trunk Name” something like sipgate
  • Then in “Peer Details”
  • allow=gsm&alaw&ulaw&g729&slinear
  • Now in the “Incoming Detials” enter your SIP-ID in the “User Context” field
  • Now, this is the important bit i kept getting wrong and all other instructions seemed to point in the wrong direction. Leave the “User Details” section completely blank!
  • And finally, in the “Register String” enter SIP-ID:SIP-PASSWORD@sipgate.co.uk/SIP-ID
  • Submit the changes and apply them

    Configuring the Outbound Route

  • Under the basic heading on the left hand side, select outbound routes
  • Click add route
  • Enter “Route Name” something like 9_sipgate
  • Now in “Dial Patterns” as before 9|.
  • And in “Trunk Sequence” select SIP/sipgate
  • Submit the changes and apply them

    Configuring the Inbound Route

  • Under the basic heading on the left hand side, select inbound routes
  • Click add route
  • In “DID Number” enter your SIP-ID
  • Then finally “Set Destination”. I’d suggest choosing extension and picking an extension of one of your SIP devices or a softphone
  • Submit the changes and apply them

    To check everything is working

  • Access the PBX status screen
  • Under Sip registry you should see sipgate.co.uk with state “Registered”
  • Under Sip peers you should see sipgate/SIP-ID with status “OK”
  • Dial your PSTN phone number assigned by sipgate from a PSTN phone- the extension you configured earlier should ring?
  • Dial 910000 from one of your SIP devices or a softphone- you should hear the “welcome to sipgate…” message?
  • Good luck! Comment if you have any questions or come across problems.

Hopefully in the how-tos to come:

  • Configuring voipbuster for free outbound calls with trixbox (process should be the same for voipcheap, voipstunt, voipdiscount, internetcalls, netappel, poivy, sparvoip, freecall, sipdiscount, webcalldirect, lowratevoip & probably others)
  • Configuring trixbox as a DHCP server
  • Flashing CISCO IP Phones with SIP firmware
  • Configuring/troubleshooting trixbox IVR setup


%d bloggers like this: