Caller ID on incoming calls TDM400

hi,

i cant seem to get the caller id of incoming calls to the asterisk system and therefor not to the extensions. i have caller id on all extension (analog as well as IAX or SIP) from internal calls and from calls coming in via the IAX trunks. i have tested the actual phone line with an analog phone and i get a caller id on the if i plug it directly into the phone line. here my config:

zaptel.conf

fxoks=1-2
fxsks=3-4
loadzone=uk
defaultzone=uk

zapata.conf

[channels]
language=en
usecallerid=yes
hidecallerid=no
ukcallerid=yes
cidsignalling=v23
cidstart=polarity
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
useincommingcalleridonzaptransfer=yes
adsi=yes
sendcalleridafter=2

; include zap extensions defined in AMP
#include zapata_additional.conf

context=from-internal
signalling=fxo_ks
immediate=no
echocancel=yes
callwaiting=yes
threewaycalling=yes
transfer=yes
channel=1-2

context=from-zaptel
signalling=fxs_ks
faxdetect=incoming
callerid=asreceived
busydetect=yes
busycount=8
echocancel=yes
echocancelwhenbridged=no
echotraining=800
group=0
channel=3-4

i have tried a number of different settings which i was reading about which are supposed to work in UK. i am actually in ireland and assumed UK would be the same settings since all UK hardware works fine here.

if anybody can help here.

regards
Jan

How quick are you programming it to answer the call? Caller ID is transmitted between the rings (I believe Ring 2 and 3), so if the system is picking it before that time you’'ll never get it. It works for me on my tdm400 here in the states.

wow, good point. i have never thought of that. its kinda logic of course since it says “sendcalleridafter=2”. the only question is how can i delay the IVR to answer the call ? all inbound calls go to “day and night mode” and from there to two different IVR. any way to introduce a delay in answering the call ?

Jan

In the zapta*.conf files make sure you don’t have immediate=yes for those ports, as it will pickup on first ring detect. if you do not have it anyplace make sure to put immediate=no under the [general] context.

i guess [general] goes before [channels] in the zapata.conf ? but anyway, i had immediate=no in the config for the channels which are connected to the outside line. is there any way i can delay the IVR to leave it ring for 2 times ?

thanks
Jan

[Edited]

okay, have just dome something else, i have reorganized the zapata.conf file like this:

[general]
usecallerid=yes
hidecallerid=no
ukcallerid=yes
cidsignalling=v23
immediate=no
language=en
cidstart=polarity
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
useincommingcalleridonzaptransfer=yes
adsi=yes
sendcalleridafter=2

[channels]
language=en
#include zapata_additional.conf

context=from-internal
signalling=fxo_ks
echocancel=yes
callwaiting=yes
threewaycalling=yes
transfer=yes
channel=1-2

context=from-zaptel
signalling=fxs_ks
faxdetect=incoming
callerid=asreceived
busydetect=yes
busycount=8
echocancel=yes
echocancelwhenbridged=no
echotraining=800
group=0
channel=3-4

now it works !!!

thanks for your help
Jan

Have you seen this?

http://www.voip-info.org/wiki/view/Asterisk+and+UK+Caller+ID

http://www.voip-info.org/wiki/view/UK+Asterisk+Details

Hi,
this is a working UK config:

[channels]
language=en
usecallerid=yes
callerid=asreceived
cidsignalling=v23
cidstart=polarity
sendcalleridafter=2
callwaitingcallerid=yes
busydetect=no
answeronpolarityswitch=no
callprogress=no
ringtimeout=2500
threewaycalling=yes
transfer=yes
canpark=yes
useincomingcalleridonzaptransfer=yes
;overlapdial=yes
;

context=from-zaptel
signalling=fxs_ks
;faxdetect=incoming
echocancel=yes
echocancelwhenbridged=no
echotraining=200

;callwaiting=yes
usecallingpres=yes
;cancallforward=yes
;callreturn=yes

; Span 1:WCTDM/0 “TDM800 Board 1”
;AMPLABEL:Channel %c - Button %n
;;;;[trunk1]
context=from-zaptel
group=0
channel=>2

(other channels…)

; include zap extensions defined in AMP
#include zapata_additional.conf
(END)

In your /etc/modprobe.conf, set the Country mode for the zaptel driver module.
You need an opermode=UK line before the appropriate driver line, like:

options wctdm opermode=UK
install wctdm /sbin/modprobe --ignore-install wctdm && /sbin/ztcfg
options wctdm24xxp opermode=UK
install wctdm24xxp /sbin/modprobe --ignore-install wctdm24xxp && /sbin/ztcfg

UK caller ID is sent before the first ring, so you don’t have the problem of answering before it’s completed.

sendcalleridafter=2 is still required for Caller ID to be sent to extensions, there is (or was) a bug in the driver code that prvented caller ID being sent at all if this value was less than 2. It does not affect incoming caller ID, timing for that is controlled by the line polarity change which precedes the start of ringing.

All channels should be configured for kewlstart in /etc/zaptel.conf - fxoks or fxsks - so polarity changes are recognised & sent.

Finally, look in zconfig.h in the zaptel source directory.
un-comment the line
/* #define SHORT_FLASH_TIME */
(so it look like)
#define SHORT_FLASH_TIME
then recompile / reinstall
(Don’t forget to re-do this if you update zaptel)

This allows the ‘R’ Recall button to function correctly.

With this setup you should get Caller ID and all correct UK tones without any other changes from a standard source install.

At leat once, and after any changes to the trunk lines, run
fxotune -i 1

This calibrates the hybrids in the FXO ports.

run
fxotune -s
from your startup scripts (after starting zaptel but before asterisk) to load the calibration settings.
(fxotune is built & left in the zaptel directory, I copy it to /usr/sbin so it’s easily available).

Hope this all helps!

The working UK setup above is great.

But even though it’s five years old, it’s important for the rest of the world (because Google brings you here on a search for “FreePBX UK Caller ID” to note that what fskrotzki said above is simply wrong.

UK Caller ID is sent BEFORE any ringing takes place. The exchange signals the impending arrival of a call by a polarity reversal.

This means on a normal phone or caller ID box, the Caller Display is already there when you hear the ringing.

Nigel Roberts


@nigelrbrts