Asterisk UK Caller ID

I’m sure I’ve got an older post giving details of a patch to get caller ID working. I’d used the same patch for about 5 years over the different versions of Asterisk and it always worked, until recently.

A fresh install on one of the servers, applied the patch and made a bunch of test calls, half caught the Caller ID half missed it. So I worked on it for a while, and could not get it to reliably detect the Caller ID. I posted onto the forums incase anyone else had used the patch nothing.
What made it worse was this server was 1 of 3 running asterisk with a Digum Card on a UK phoneline. the other 2 were still working. So in an effort to eliminate possible causes I ended up installing the same version of asterisk and dahdi that was on each of the other 2 servers in turn and running tests, both with the patch and without. Sometimes it looked better than others catching 8 out of 10 CLI’s but that wasn’t the 10/10 that I was getting on this server before a fresh install of the OS.

After a while I gave up, it wasn’t an important server. I’d only put the asterisk card in to track calls coming into the home line, but it didn’t do anything more than log the Date and CLI. Everything else was done over SIP on this server, so I left it kind of working.
Over time the logs seemed to fill with unknown CLI’s more often.

Anyway onto this month. Earlier in the month I reboot my server remotely, when it didn’t come back online I went to investigate why. It was at this point I was almost in tears. I’d stupidly left an SD card in the server that I was imaging, and the server had boot from it. What made this a really really bad move was the fact the SD card I’d imaged with the Rasberry OS, and it decided to go off and format sda (I presume hard coded) which unfortunately was my HDD NOT the SD Card. To make things worse my OS on this server was encrypted, so little chance of recovering anything at all.
As the server runs alot of different stuff, I had to rebuild it as quickly as I possibly could.
A few days ago I got onto the asterisk installation, so ran through installing Dahdi and Asterisk, and changed the configuration based on memory and copying from the other 2 servers. Then I hit the Caller ID problem, out of 8 test calls 3 CLI’s. Now I know this one was working 100% so it has to be something obvious.
Then I remembered seeing something on the “working” server as I was checking it’s configuration to copy and paste.

nano -w /etc/modprobe.d/dahdi.conf
# You should place any module parameters for your DAHDI modules here
# Example:
# options wctdm24xxp latency=6
options wctdm opermode=UK fwringdetect=1 battthresh=4

Not something I would have paid attention to, I only ever remember editing a dahdi.blacklist.conf to stop the card being detected as a NetJet. Anyway I added the above file and contents, then reboot. (It should be noted at this point that I hadn’t applied the patch and was almost about to).
After the reboot I started asterisk and run through test calls. 9 out of 9 calls all CLI detected.

So the following day I went and checked the server I was originally having problems with after a fresh install. That didn’t have the line

options wctdm opermode=UK fwringdetect=1 battthresh=4

Bit it did have the blacklist setup. So I added the above and reboot. 10 test calls later all CLI’s detected.

I’ve no idea where I got the above from, but I must have stumbled upon it as a replacement fixed instead fo the patch I’d been using. I say that because the patch files wasn’t on the server that had this configuration, and I always leave the patch files in root incase I need them again.

So if your having a problem with UK Caller ID it maybe worth adding the above.
For info I’m running:-
Server 3:

Server 2:

Server 1:

Server 1 being the newest install, and Server 2 being the one I left with the problem for months.

Hope this helps someone. As UK Caller ID on Asterisk used to be a huge pain with little support and not something that people seemed to cover because Businesses tend to go SIP, IAX or ISDN eliminating the need to fix missing CLI’s.

Asterisk SIP One way Audio

ok, I know what your all thinking just from the title alone.
It’s SIP and One way Audio, it’s going to be a NAT and firewall issue. That was my immediate thought too, but it’s wrong.
To explain a little of the background will probably help.

I’ve been running Asterisk at home now for years, using a Digium 422. One line coming in, and a few Linksys SIP phones.
I’ve been happy with it running away for some time, adding in blacklist functions into the dial plan of incoming calls, blocking withheld numbers into entering their number and building up a list of numbers that are annoying me to reject. I’ve had a few people questioning when they’ve called about it. and even more from visitors whose witnessed the Tivo auto pausing if a call comes in as well as displaying who it is.

So after years of me singing it’s praises (as well as a linux server in general), it’s no-wonder that someone else wanted me to do a similar setup. Enter cousin 🙂

After weeks of searching on ebay, finally someone is selling a digium card. So bought it up quickly.

He’s had a Linux server running for a good few months, and I’ve got it all VPN’d together with my network.
So I installed the Digium card, installed asterisk, and went about configuring it using my config as the basis.
It all worked well, incoming and outgoing calls all fine using the card 2 phones connected and one line.
But obviously, now you’ve got a little you want more. So off he went looking at phones, I have to be fair he found a great deal of linksys phones, 4 of them with power for £40 when most are selling single units at over £20.

So I spend another few hours running network cables to 4 different locations in the house, connect up the phones and go back to configuring asterisk and the phones. Fairly straight forward, run through testing phone to phone etc, all appeared fine.

The following day I had a lovely call saying that their now getting one way audio. Straight away I thought that’s NAT, but as all the phones and asterisk box are on the inside NAT shouldn’t come into it. Still I went back through the SIP config and adjusted lots of it to completely wipe out NAT (I use NAT in my config as I have some connections from SIP providers etc).
More testing, but still the same.
So I started running SIP and RTP traces, I’ve had to read through them bother before and can just about follow what’s going on, but I mainly just look for anything obvious out of place, like IP addresses that are external etc.
Still after going through them, it all looked good in the SIP debug, but the RTP was only showing one side audio on calls that were going in / out over the Line. Calls to other phones were fine.
So I registered one of the phones onto my system and placed a call, that worked fine.
So I come home and registered one of my phones to his system. Placed the call, and again one way audio.

I’m not convinced it’s a NAT problem as my phone would now be running over the VPN to his server and it’s the same server that terminates the VPN. I now started checking out the codecs, but testing using different ones just pointed to it not being codecs. If it couldn’t find common ground the call failed from the start.

It took a few days to get back to as I was onto other stuff, but check after check just showed that everything was fine. But still the one way audio on calls.

I looked again and there was a new version of asterisk released 10.1.3, where I was using 10.1.2 on his server. The 2 fixes in the change were around SIP. So I downloaded the new version, compiled it and installed. Made sure it was all running and then got home to make some test calls.

Still one way audio. So I’m now left with one option. My own server is running an older version of asterisk, I uninstalled his asterisk completely and then downloaded the source for, compiled and then installed.
Using the same config from the 10.1.3 install threw a few warnings on loading, but it still loaded. Got him to make a test call, he called my mobile and hey presto we can hear each other.

I wanted to update my own asterisk, but after encountering this issue and especially as it’s still present in the latest I think I’ll leave updating my system for a while.

Bottom line, dont just consider One way Audio a NAT problem, and if everything looks to be working correct consider downgrading if there’s no upgrade available.