Using Asterisk in the UK
This guide describes how to get Asterisk working properly in the UK. As each telco's standards differ, services such as caller ID work differently.
Compiling Asterisk
Due to UK caller ID specifications, you will need to make a small modification to the source.
Open up chan_zap.c, and find the line:
#DEFAULT_CIDRINGS 1
Change this line to read
#DEFAULT_CIDRINGS 2
and save the file. Now build asterisk as usual.
On asterisk > 1.2 you can avoid this by adding:
sendcalleridafter = 2
to zapata.conf
BT PRI
BT is the main carrier in the UK. Their PRI lines are, by default, ISDN30e (euroisdn). By default you will have no extra services turned on, so you will need to call up the ISDN management team and get them to turn on this feature (Be aware! It costs extra!).
In my configuration, the PRI is plugged in to span 1 on a TE410P interface. On span 2 i have a Rhino T1 ChannelBank, and spans 3 and 4 are currently unused. My zaptel.conf is below:
span=1,1,1,ccs,hdb3,crc4
span=2,0,0,esf,b8zs
span=3,0,0,esf,b8zs
span=4,0,0,esf,b8zs
bchan=1-15
dchan=16
bchan=17-31
fxols=32-55
loadzone=uk
defaultzone=uk
span=2,0,0,esf,b8zs
span=3,0,0,esf,b8zs
span=4,0,0,esf,b8zs
bchan=1-15
dchan=16
bchan=17-31
fxols=32-55
loadzone=uk
defaultzone=uk
Even though only 8 channels are active on the PRI, all channels should be configured in zaptel.conf as shown.
The zapata.conf for the above system is shown below:
[channels]
language=en
usecallerid=yes
hidecallerid=no
callwaiting=no
callwaitingcallerid=yes
restrictcid=no
usecallingpres=no
threewaycalling=yes
callreturn=yes
transfer=yes
cancallforward=yes
echocancelwhenbridged=yes
echocancel=yes
musiconhold=default
rxgain=0.0
txgain=0.0
signalling=pri_cpe
switchtype=euroisdn
immediate=no
overlapdial=yes
pridialplan=unknown
prilocaldialplan=unknown
group=1
context = incomingfrompstn
callerid=asreceived
channel => 1-8
group=2
pickupgroup=2
callgroup=2
signalling=fxo_ls
context=dialphone
channel => 32-55
language=en
usecallerid=yes
hidecallerid=no
callwaiting=no
callwaitingcallerid=yes
restrictcid=no
usecallingpres=no
threewaycalling=yes
callreturn=yes
transfer=yes
cancallforward=yes
echocancelwhenbridged=yes
echocancel=yes
musiconhold=default
rxgain=0.0
txgain=0.0
signalling=pri_cpe
switchtype=euroisdn
immediate=no
overlapdial=yes
pridialplan=unknown
prilocaldialplan=unknown
group=1
context = incomingfrompstn
callerid=asreceived
channel => 1-8
group=2
pickupgroup=2
callgroup=2
signalling=fxo_ls
context=dialphone
channel => 32-55
Sending Caller ID to the BT PRI
When you placed your order, you may have got a DDI allocation. If this is the case, then you may want the outgoin caller ID set to the DDI of the user making the call. You will first need to contact BT and ask them to add all your DDI numbers to the list of allowed calling id numbers. Once this is done (it takes a few hours) then you can set your outgoing callerid in extensions.conf like so:
exten => _X.,1,SetCIDNum(123456)
By default, BT pass 6 digit extensions in and out of their network.
Incoming Caller ID
Again: By default, BT pass 6 digit extensions in and out of their network.
Therefore in your incoming context, incomingfrompstn in the example here, you will need to specify these 6 digit extension.
For ease of use, i have created a macro to handle dialling a channel and passing off to voicemail:
[macro-dialddi]
exten => s,1,SetCIDNum(90${CALLERIDNUM})
exten => s,2,Dial(${ARG1},20,tT)
exten => s,3,Voicemail(u${ARG2})
exten => s,4,Hangup
exten => s,103,Voicemail(b${ARG2})
exten => s,104,Hangup
To execute this for your DDI numbers, an example incomingfrompstn context is shown below:
[incomingfrompstn]
exten => 123451,1,Macro(dialddi,Zap/32,6100)
exten => 123452,1,Macro(dialddi,Zap/33,6101)
exten => 123453,1,Macro(dialddi,Zap/34,6102)
TDM 400 FXS & BT POTS lines
(SimonHobson, 13 June 2006, mod Dirk Koopman 21 Sept 2006)Set the card to UK lines spec by adding
options wctdm opermode=UK
to /etc/modprobe.conf (or possibly /etc/modprobe.d/zaptel or /etc/modules.conf depending on distro ?)
BT do not supply Caller ID by default, you can pay extra for this as one of the "Star Services" that are available, or, you can get it free by signing up for "BT Privacy" http://www.bt.com/privacy which signs you up to the Telephone Preference Service and gives you Caller ID for free. To set up for UK Caller ID signalling use (note: I haven't been able to verify this, it came from another forum) :
cidsignalling=v23
cidstart=polarity
cidstart=polarity
In UK CID is sent after a polarity reversal and before the first ring. In theory one can set
sendcalleridafter = 0
to zapata.conf. It works for me.
FXO phantom ringing
I had a BIG problem with phantom ringing, after calls ended, there would immediately be an incoming call but you would get dialtone when you answer it. This was solved by adding :
answeronpolarityswitch=no
to /etc/zapata.conf
This should not be done for FXS lines as this will prevent CID and answering!
TDM400P & Not Detecting Hangups
Got a TDM400P installed and having problems with Asterisk not detecting hangups? Using BT? If so, contact BT and ask what the "Disconnect Clear Time" setting is for your phone line. Odds are it's probably 100. Increasing it to 800 fixed the issue for me."Disconnect Clear Time" is BT's name for CPC.
See http://www.voip-info.org/wiki/index.php?page=Asterisk+Disconnect+Supervision for more info on CPC.
Page Changes
"By default you will have no extra services turned on, so you will need to call up the ISDN management team and get them to turn on this feature (Be aware! It costs extra!). "
I'd like to know which feature needs to be turned on?
"By default you will have no extra services turned on, so you will need to call up the ISDN management team and get them to turn on this feature (Be aware! It costs extra!). "
I'd like to know which feature needs to be turned on?
"By default you will have no extra services turned on, so you will need to call up the ISDN management team and get them to turn on this feature (Be aware! It costs extra!). "
I'd like to know which feature needs to be turned on?
"By default you will have no extra services turned on, so you will need to call up the ISDN management team and get them to turn on this feature (Be aware! It costs extra!). "
I'd like to know which feature needs to be turned on?
"By default you will have no extra services turned on, so you will need to call up the ISDN management team and get them to turn on this feature (Be aware! It costs extra!). "
I'd like to know which feature needs to be turned on?
"By default you will have no extra services turned on, so you will need to call up the ISDN management team and get them to turn on this feature (Be aware! It costs extra!). "
I'd like to know which feature needs to be turned on?