The case of the mysterious incrementing calls-processed counter

This isn’t strictly a distro question, but I am using the FreePBX distro so that nicely pins all the software versions and how they were installed. The distro is 3.211.63-10 with asterisk 11.

My installation has a TDM410 analogue card (with hardware echo canceller) with two FXO (red/line) modules. Occasionally I will get a problem report that one of the lines is not working, and sure enough they will not be able to call out on it.

It has taken me some time to pin this down but I believe I am starting to home in on the problem. I was able to repro the issue today and the line, DAHDI/2-1, was stuck in ‘pre-ring’ state. I am in the UK so caller-id detection is triggered by a line reversal before the first ring, I expect that is what the pre-ring state is. So my working theory is that the line is getting a line reversal then somehow getting ‘stuck’ doing a caller-id detection. In my experience, line reversal can be a bit unpredictable so I would have thought the caller ID detection would have to be fairly robust and have timeouts, etc. so I would have thought this would simply time out after a second or two, but this condition persisted for at least 2 days.

I was able to clear the condition by busying the first line then calling the second (stuck) line, which rang correctly and went to voicemail. At this point the ‘pre-ring’ state seemed to clear but promptly came back just after the call was hung up. I rang them back to let them know and on the second call, the pre-ring state did completely clear and has not returned for at least 30 minutes.

I’m not sure where to go next. Is there a more detailed log I can get to see what’s happening with caller ID detection? I’d appreciate your learned suggestions, gentlemen.


Sorry about the misleading title. I went through a couple of drafts and I had ruled out that line of enquiry by the time I finished typing the post and forgot to change the title.