Upgrading Avaya 4602SW, 4610SW with SIP Firmware

The railway came by a load of Avaya 4602SW, 4602SW+ and 4610SW phones. All came with the standard H323 firmware and we have upgraded some to the Avaya SIP firmware and linked them to our Asterisk server.

The upgrade to SIP firmware needs a standard HTTP server (you can use TFTP if you wish) and does not require any special Avaya software or tools.

The Avaya phones use DHCP for their IP address and if the DHCP does not deliver a ‘FileServer’ address (i.e. the HTTP server address) they ask the user to enter the IP address of the HTTP server from the numeric keypad.

After doing this the phone goes to Command Mode where you can tell it that you want SIP signalling firmware. To do this press Mute-S-I-G-#   (that’s Mute-7-4-4-#) to go into the Signal Type setting and select SIP.

The phone now restarts and fetches various files from the HTTP server.
First the phone requests 46xxupgrade.scr from the HTTP server which is a script processed by the phone which allows the phone to work out what firmware images it needs based on the phone’s model, the phone’s current firmware and most importantly the ‘SIG’ Signal Type setting we just changed via Mute-S-I-G#. Then the phone requests the latest boot firmware (if needed) from the HTTP server and then request the latest application firmware from the HTTP server.
It takes a few reboots as each part is upgraded and once the firmware is upgraded the phone requests 46xxsettings.txt from the HTTP server. This is a config file where you put the SIP Server’s IP address. This was set to point to our Asterisk machine.
Our 46xxsettings.txt looks like this

SET SIPDOMAIN    avaya.phone

Some of these may not actually be needed.


Once 46xxsettings.txt has been loaded the phone asks for the SIP Extension Number and Password which have to match the entries in the Asterisk sip.conf file. Note that the password is digits only and limited to 8 digits.

The phone then registers with Asterisk and can start making and receiving calls.



Footnote – Avaya stopped doing firmware updates for these phones back in 2011 and they are all End-Of-Life. The support.avaya.com site does have excellent manuals and tutorials on what put in 46xxsettings.txt
The Avaya support page that describe the latest firmware download is broken. It tells you what the firmware versions are but the download link points to a folder on their FTP server that does not exist any more. Drop us a line if you need a copy.

Ethernet over Mains test

I tested some Ethernet over Mains adapters at Parkend today and used the TP Link PA-411 adapters which follow the Homeplug AV500 standard.
There are 3 buildings on site (Station, Goods Shed and Signal Box) and the site is 3 phase (each building is on a different mains phase) but the Neutral wire that Homeplug uses is common to all 3 phases so this was not a problem.

Testing was carried out by accessing the web based speedtest.net service from a laptop.

When connecting the laptop directly to the broadband router my laptop had the full 80Mbps download and 20Mbps upload. (The FTTC broadband cabinet is less than 100 metres)

From the Goods Shed (where the telephone exchange is) I got a download speed of 25 Mbps.
From the Signal Box I got a download speed of 37 Mbps.

The adapters deliver a good throughput over the 3 phase mains to allow internet access and VoIP data.

Manufacturer refurbished PA-411’s are £11 on eBay at the current time so are very cheap.



Netgear DGN2200v4 Disable SIP ALG to make ringing stop

I had to disable SIP ALG on my Netgear DGN2200v4 ADSL Router to fix a SIP problem.

In my office I have a Grandstream HT802 ATA. This is a 2 port (2xFSX) ATA.
It connects to the internet via a Netgear DGN2200v4 ADSL router. Elsewhere across the internet is our Asterisk server, also behind a NAT broadband router.

Both FSX ports have SIP accounts linked to the Asterisk box and I had a phone on each FSX port. I’ll call these extension 401 and extension 402.

If ext 401 calls ext 402 then extension 402 will start ringing. (OK so far),
My problem was that if 401 then hung up the call before 402 answered, 402 would keep ringing and ringing so something was going wrong.

If I did this test the other way around then everything was fine.
i.e. Ext 402 calls Ext 401 and 401 starts to ring. If I then hangup on ext 402 the call clears down properly and ext 401 stops ringing.

The fix turned out to be disabling the SIP ALG support in the Netgear DGN2200 v4.
It is found in Advanced -> Settings -> WAN Setup


Grandstream HT802 ATA – Pulse Dialling and Hook Flash

I’ve been looking at the Grandstream HT800 series ATAs to allow analogue telephones to connect to the asterisk server. Based on cost ‘per FXS port’ we settled on the HT802 which is a 2 port ATA (2xFXS ports). They are about £35 (so £17.50 per port) and a couple were ordered.

The HT802 is a fairly new ATA which is still being manufactured and still receives firmware updates and has technical support.



Pulse Dialling (Loop Disconnect Dialling)
Firmware for the HT802 adds “Enable Pause Dialing:” to the web config page. We have tested it with an old BT phone with the ‘rotary dial’ and some newer phones that support DTMF and Pulse Dial (Loop Disconnect Dial) with a MF/LD switch. It all worked well and we can make calls from all the old analogue phones we tried to the asterisk extensions.
Pulse Dialling needs to be enabled on each FXS port in the web config page

Hook Flash
Also in the web config menu is “Enable Hook Flash:”
Then it is enabled you can flash the hook (press the hook button down and let it go quickly, putting your first call on hold and allowing you to make a 2nd call. This is handy as it allows you to use call holding and do call transfers. But in practice users just end up having two active calls without realising.
Hook Flash can be disabled on each FXS port in the web config page.

Other Settings
There are settings for SLIC (which we set to UK) and settings for “Enable High Power Ring” which we have not tested yet but may help with long lines.

What does SIP scanning look like?

Following on from my post two weeks ago about enhancing SIP Security I’ve been running a tool that’s allowing me to profile the SIP brute force attacks we see, which are an unavoidable cost of our being able to have VoIP phones at home.

Every time anything tries to talk to our Asterisk server over the internet (be that legitimate traffic from our ATA’s at home, or scanning by “bad guys” trying to gain illegitimate access to our Asterisk) it creates a line in a log file.

I’ve been through the results and have classified each connection attempt as legitimate, or unexpected. The graph is quite interesting:

About two thirds of the traffic we see is legitimate. The next largest chunk is ‘friendly-scanner’ which is a known SIP account brute force kit, based on sipvicious. The rest are mostly scans that are masquerading as legitimate devices.

I’ve tweaked our blocking to cover most of the illegitimate traffic, but it’s possible that I’ve widened the net a little too widely, so if your phone at home has stopped working, let me know!

Currently offline – 2017-08-12 – resolved

It looks as though the asterisk is currently offline, as of 2017-08-12 14:25:01 (BST)

I’m not sure yet the cause of this problem. It could be anything from a power failure, to the dynamic dns failing to update, the router being offline, or the router having been reset losing the port forwarding configuration.

More information when I’ve got it.

Update 2017-08-12 22:11 – I don’t think it’s the Dynamic DNS this time. The asterisk regularly phones home to my monitoring server (a process that isn’t reliant on the Dynamic DNS) and it hasn’t reported in since 14:25.

Update 2017-08-13 12:00 Sam very helpfully went in, and found everything switched off. He powered up the UPS and we’re back in business… for now!

New feature! Faultsmans Ringback on VoIP Phones

A “faultsmans ringback” facility is useful for testing that you’re able to receive incoming calls. The idea is that you dial a special number, hang up, and the exchange calls you back.

On our UAX13 strowger exchange, we use this relay set: http://dfrtelecoms.org.uk/ex002.htm and a similar relay set on our PABX4 based exchange: http://dfrtelecoms.org.uk/ex027.htm – but on the asterisk phones we didn’t have a solution.

Until now!

If you dial ‘9#’ from any of our asterisk phones, you should hear a 3 tone “doo… dah… Dit!” sequence, which will repeat until you hang up. There should then be a short pause before your phone rings to indicate an incoming call. If you pick the handset up you should hear dialtone (although you won’t be able to dial any numbers)

The facility is still new, and we’re still ironing out a few wrinkles, but try it and let Paul know how you get on.

For anyone interested in asterisk, it’s based on the following dialplan contexts:

exten => 9,1,Goto(SIP-ringback,s,1) ; Faultsmans ringback

[SIP-ringback] ; This context (and SIP-ringback-complete) do faultsmans ringback
exten => s,1,Answer()
exten => s,n,Set(RINGBACK=${CALLERID(num)})
exten => s,n,Log(NOTICE, Ringback requested for ${RINGBACK})
exten => s,n,Wait(1) ; Wait 1s for the audio to connect
exten => s,n,Playtones(950/330,0/15,1400/330,0/15,1800/330,0/1500) ; "Dooh Dah Dit!"
exten => s,n,Wait(10) ; Play 10S of the above tone before hanging up
exten => s,n,Hangup()

exten => h,1,Log(NOTICE,Executing ringback for ${RINGBACK})
exten => h,n,Wait(3)
exten => h,n,Originate(SIP/${RINGBACK},exten,SIP-ringback-complete)

[SIP-ringback-complete] ; Used in conjunction with [SIP-ringback]
exten => s,1,Answer()
exten => s,n,Playtones(350+440) ; Dialtone
exten => s,n,Wait(10)
exten => s,n,Hangup()

There are a few knotty issues in the above, which mean that it’s not quite as predictable as it might seem at first – but I’ve got plan for ironing those out…

Downtime – fixed

It looks like at about 6pm on 12th July 2016, our external IP address changed at Norchard (so much for “BT Business – Static IP”) but for some reason our dynamic DNS didn’t catch up.

So the asterisk has been effectively offline since then. Service was restored at around 4pm on 14th July when I noticed it was down!

My phones are still offline (including his C*Net and SipGate numbers) due to some technical glitches at home, but that’s unrelated!