CallerID logic


I’ve worked with Asterisk only with FXO card X100P Clone. I have 2 running setup with severals cards and lines, everything work great except caller ID. I’ve read the book, look voip-wiki, googled around, and can’t find an answer.

I can’t get the callerid from the calls coming to my FXO. The call records .csv file all show empty column:

# tail -n 1 /var/log/asterisk/cdr-csv/Master.csv "","","99","external_index","","Zap/2-1","","BackGround","out-index","2006-03-22 19:54:05","2006-03-22 19:54:05","2006-03-22 19:54:34",29,29,"ANSWERED","DOCUMENTATION"

When calls are bridged to VoIP hardphone, extension don’t appear on their LCD.

the debug output show nothing about caller ID except small number of incoming call, maybe 2-3%, where this error appear:

# cat /var/log/asterisk/messages | grep -i caller Mar 21 08:34:43 WARNING[17912]: CallerID returned with error on channel 'Zap/2-1' Mar 21 08:35:15 WARNING[17912]: CallerID feed failed: Success

All others call don’t warn this, like if for other calls, asterisk can get the callerid but drop it somewhere.

All my FXO cards are:

I’m in canada with Bell Canada service, I’ve tested with a regular phone with a LCD and see the CallerID num and name.

I use Asterisk 1.0.7 from debian-stable with zaptel 1.0.7 driver (and tried 1.2.4 as well).

here is my configuration:

# cat /etc/zaptel.conf | grep -v '^\#' | tr -s '\n' fxsks=1 loadzone=us defaultzone=us fxsks=2 loadzone=us defaultzone=us

# cat /etc/asterisk/zapata.conf | grep -v '^\;' | tr -s '\n' [trunkgroups] [channels] context=default switchtype=national usedistinctiveringdetection=no usecallerid=yes cidsignalling=bell cidstart=polarity hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes threewaycalling=yes transfer=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=yes echotraining=yes echotraining=400 immediate=no faxdetect=both signalling=fxs_ks rxgain=-4.1 txgain=0.0 group=1 callerid=asreceived channel => 1 rxgain=-4.5 txgain=0.0 group=1 callerid=asreceived channel => 2

In my extensions.conf, I’ve put some SayAlpha(${CALLERIDNUM}) and it just:

CallerID handling seem to be straightforward because all documentations don’t go deep into that subject. But I might do something wrong.
Because I never had the opportunity to look at a running asterisk configuration with working callerid I can’t troubleshoot my problem.