UK Caller ID on TDM410P ARGRGRHH

Hi,

I am running Asterisk 1.6.2.17.2 CLI only and a TDM410P.
I’m UK based to the damn caller id issue is prevailing.

I’m using DAHDI but I am having the exact problem mentioned in the following threads;
The digium thread explains the problem AND solution better than I can.

Sorry guys, I know this is a lot to read but I would really appreciate some guidance on the matter as it is basically a deal breaker for me. No caller id, no asterisk! The first thread is short and to the point.

http://forums.digium.com/viewtopic.php?t=8477
http://fonality.com/trixbox/forums/trixbox-forums/help/uk-caller-id-issues-dahdi

/etc/asterisk/chan_dahdi.conf

; DAHDI Telephony Configuration file

; GENERAL -->

[trunkgroups]

[channels]
language=en
context=incoming
usecallerid=yes
cidsignalling=v23
cidstart=polarity
hidecallerid=no
waitfordialtone=yes
callwaiting=no
usecallingpres=yes
sendcalleridafter = 2
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
callerid = asreceived
useincomingcalleridondahditransfer = yes
busydetect=no
busycount=3
progzone=uk
tonezone=4

;TRUNKS -->

;FXO1
context = pstn-inbound
group = 1                                                                             
signalling = fxs_ks
channel = 1

;FXO2
context = gsm-outbound
group = 2
signalling = fxs_ks
channel = 2

;TEMPLATES -->

[fxs-phones](!)
usecallerid = yes
hidecallerid = no
threewaycalling = yes
transfer = yes
echocancel = yes
echotraining = yes
context = local
signalling = fxo_ks

;PHONES -->

[FXS4](fxs-phones)
callerid = "Ding-Dong-The-PBX-Is-Dead" <(i.e.9999999999>
dahdichan = 4

/etc/dahdi/system.conf

# Dahdi Configuration File
# Span 1: WCTDM/0 "Wildcard TDM410P Board 1" (MASTER)

fxsks=1
echocanceller=mg2,1
fxsks=2
echocanceller=mg2,2
# channel 3, WCTDM/0/2, no module.
fxoks=4
echocanceller=mg2,4

# Global data

loadzone        = uk
defaultzone     = uk

I’ve simplified the dialplan to try and diagnose the problem, so just two phones that ring when a call comes in from the pstn/fxo- channel 1.

/etc/asterisk/extensions.conf

; extensions.conf - the Asterisk dial plan

; GENERAL -->

[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
;
;extenpatternmatchnew=no
;priorityjumping=yes
;userscontext=default


; GLOBALS -->

[globals]
ignorepat => 9

; DIALPLAN -->

[default]

[local]
exten => 100,1,Dial(DAHDI/4)

exten => 200,1,Dial(SIP/TEST-SIP)

exten => 1234,1,VoiceMailMain()

[pstn-inbound]
exten => s,1,Dial(DAHDI/4&SIP/TEST-SIP,10)
        same => n,Hangup()

[incoming]
exten => s,1,Dial(DAHDI/4&SIP/TEST-SIP,10)
        same => n,Hangup()

and here is the debug output from the wctdm24xxp module when an incoming call is received.
Notice that Asterisk is answering the call before the polarity reversal. The polarity event should come first!

/var/log/messages

Mar 20 15:47:01 localhost kernel: wctdm24xxp 0000:00:0a.0: FW RING on 1/1!
Mar 20 15:47:02 localhost kernel: wctdm24xxp 0000:00:0a.0: 348398 Polarity reversed (-1 -> 1)
Mar 20 15:47:02 localhost kernel: wctdm24xxp 0000:00:0a.0: FW NO RING on 1/1!
Mar 20 15:47:02 localhost kernel: wctdm24xxp 0000:00:0a.0: FW RING on 1/1!
Mar 20 15:47:02 localhost kernel: wctdm24xxp 0000:00:0a.0: FW NO RING on 1/1!
Mar 20 15:47:04 localhost kernel: wctdm24xxp 0000:00:0a.0: FW RING on 1/1!
Mar 20 15:47:05 localhost kernel: wctdm24xxp 0000:00:0a.0: FW NO RING on 1/1!
Mar 20 15:47:05 localhost kernel: wctdm24xxp 0000:00:0a.0: FW RING on 1/1!
Mar 20 15:47:05 localhost kernel: wctdm24xxp 0000:00:0a.0: FW NO RING on 1/1!
Mar 20 15:47:07 localhost kernel: wctdm24xxp 0000:00:0a.0: FW RING on 1/1!
Mar 20 15:47:08 localhost kernel: wctdm24xxp 0000:00:0a.0: FW NO RING on 1/1!
Mar 20 15:47:08 localhost kernel: wctdm24xxp 0000:00:0a.0: FW RING on 1/1!
Mar 20 15:47:08 localhost kernel: wctdm24xxp 0000:00:0a.0: 354983 Polarity reversed (1 -> -1)
Mar 20 15:47:08 localhost kernel: wctdm24xxp 0000:00:0a.0: FW NO RING on 1/1!

Thanks
Danny