Hi Guys,
I’ve been using asterisk for several years on 3 servers each with their own Digium TDM400. the setup of each is just a single line in from BT. Caller ID is active on each line. A few years ago I spent days trying to get caller ID working reliably rather than randomly working on about 1 in 4 calls. After quite some searching I found the following patch
cat chan_dahdi.patch-1629[code]
— channels/chan_dahdi.c 2010-06-19 13:46:31.139948106 +0100
+++ channels/chan_dahdi.c.NEW 2010-06-19 13:47:18.509931693 +0100
@@ -8455,20 +8455,25 @@
}
if (i & DAHDI_IOMUX_SIGEVENT) {
res = dahdi_get_event(p->subs[idx].dfd);
-
ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res)); if (res == DAHDI_EVENT_NOALARM) { p->inalarm = 0; }
-
if (p->cid_signalling == CID_SIG_V23_JP) {
-
if (res == DAHDI_EVENT_RINGBEGIN) {
-
res = dahdi_set_hook(p->subs[SUB_REAL].dfd, DAHDI_OFFHOOK);
-
usleep(1);
-
}
-
} else {
-
/* Ignore ring before end of cid 'slot' (955ms = 7640 @ 8K samples/sec) */
-
if (res == 2 && samples < 7640) {
-
ast_log(LOG_NOTICE, "Ignoring event %d (%s) due to waiting for CID, samples=%d\n", res, event2str(res), samples);
-
} else {
-
ast_log(LOG_NOTICE, "Got event %d (%s)...\n", res, event2str(res));
-
if (p->cid_signalling == CID_SIG_V23_JP) {
-
if (res == DAHDI_EVENT_RINGBEGIN) {
-
res = dahdi_set_hook(p->subs[SUB_REAL].dfd, DAHDI_OFFHOOK);
-
usleep(1);
-
}
-
} else { res = 0; break;
-
}
-
}
-
} } else if (i & DAHDI_IOMUX_READ) { res = read(p->subs[idx].dfd, buf, sizeof(buf)); if (res < 0) {
[/code]
as soon as I used this patch caller ID worked 100%, so I used the same method for the other 2 servers and again 100% caller ID.
As Asterisk has been updated I’ve just manually applied the patch to chan_dahdi and compiled, it’s fixed the caller ID each time.
Recently I’ve had to rebuild one of the 3 servers. so I’ve installed Ubuntu 12.04.1, dahdi-linux-complete-2.6.1+2.6.1 and thought I’d go for the newest asterisk-11.0.1. I thought I’d test the caller ID without the patch just incase things have moved on and it’s no longer needed. But no luck, it’s back to randomly getting the caller ID. So I manually applied the above patch again. However this time it hasn’t fixed the caller ID problems.
My question is, does anyone have any idea what the above patch does? from my limited ability to read it, it seems to slow down the processing.
Incase anyone has any ideas to get caller ID working, here’s snippets of my config
chan_dahdi.conf[code]
usedistinctiveringdetection=no
distinctiveringaftercid=no
usecallerid=yes
cidsignalling=v23
cidstart=polarity
callprogress=yes
progzone=uk
[phone-line]
signalling=fxs_ks
context=dahdi-incoming
callerid=asreceived
cidsignalling=v23
cidstart=polarity
;echocancel=yes
rxgain=3.0
txgain=0.0
group=1
dahdichan=1
[/code]
dahdi/system.conf[code]
loadzone=uk
defaultzone=uk
Span 1: WCTDM/4 “Wildcard TDM400P REV I Board 5” (MASTER)
fxsks=1
echocanceller=mg2,1
fxoks=2
echocanceller=mg2,2
fxoks=3
echocanceller=mg2,3
fxoks=4
echocanceller=mg2,4[/code]
As I said the same patch works 100% on Asterisk 1.8.6.0 on 2 others servers, including this one until rebuild. Just not on 11.0.1. Any thoughts would be greatly appreciated as I need to upgrade the others servers but can’t have caller ID being unreliable on the other 2. I haven’t yet tried installing an earlier version of asterisk on server 3 as I’m attempting to keep it relatively clean.
Thanks.