[asterisk-users] Correct settings for UK (BT) FXO

Brian Candler B.Candler at pobox.com
Thu Sep 14 03:16:50 MST 2006


Is there a document somewhere giving the correct TDM400P FXO settings for
use on a BT PSTN line in the UK? All I can find is
http://www.voip-info.org/wiki/view/UK+Asterisk+Details

but it doesn't give the complete settings, such as loopstart vs kewlstart.

Anyway, the problem I'm having is that an incoming call is answered OK, but
when the remote end disconnects this is not always noticed - at least, the
Echo() application continues for some minutes before hanging up.

There's also an error message reported when loading wctdm, which may or may
not be related; see below.

Here's my configuration:

--- zaptel.conf ---
# Ports 1 and 2 are FXS (FXO signalling)
fxoks=1-2
# Port 4 is FXO (FXS signalling)
fxsks=4

loadzone=uk
defaultzone=uk

--- zapata.conf ---
[trunkgroups]
; define any trunk groups

[channels]
;default
usecallerid=yes
hidecallerid=no
callwaiting=no
threewaycalling=yes
transfer=yes
echocancel=yes
echotraining=yes
immediate=no
answeronpolarityswitch=no

; define channels
context=internal
signalling=fxo_ks
channel => 1

context=internal
signalling=fxo_ks
channel => 2

context=incoming
signalling=fxs_ks       ; Use FXS signalling for an FXO channel
channel => 4

--- extensions.conf ---
[incoming]
; incoming calls from the FXO port are directed to this context from zapata.conf
exten => s,1,Answer()
exten => s,2,Echo()

--- other ---
# grep wctdm /etc/modprobe.conf
install wctdm /sbin/modprobe --ignore-install wctdm  && /sbin/ztcfg
install wctdm24xxp /sbin/modprobe --ignore-install wctdm24xxp  && /sbin/ztcfg
alias wcfxs wctdm
options wctdm opermode=UK

-------------------

The base platform is CentOS 4.4, and I'm running Asterisk compiled from SVN
trunk as of yesterday.

Starting from a freshly booted system, here's what I do: note there's an
apparent problem when installing the wctdm module, but this doesn't seem to
prevent it from accepting calls.

[root at asterisk1 ~]# modprobe zaptel
[root at asterisk1 ~]# modprobe wctdm
Notice: Configuration file is /etc/zaptel.conf
line 0: Unable to open master device '/dev/zap/ctl'

1 error(s) detected

FATAL: Error running install command for wctdm
[root at asterisk1 ~]# ls -l /dev/zap/ctl
crw-rw----  1 root root 196, 0 Sep 14 12:05 /dev/zap/ctl
[root at asterisk1 ~]# modprobe wctdm
[root at asterisk1 ~]# ztcfg -vv

Zaptel Version: SVN-trunk-r1459
Echo Canceller: MG2
Configuration
======================


Channel map:

Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)

3 channels configured.

Changing signalling on channel 1 from Unused to FXO Kewlstart
Changing signalling on channel 2 from Unused to FXO Kewlstart
Changing signalling on channel 4 from Unused to FXS Kewlstart
[root at asterisk1 ~]# asterisk -cvvv

syslog doesn't seem to show anything abnormal:

Sep 14 12:05:07 asterisk1 kernel: Zapata Telephony Interface Registered on major 196
Sep 14 12:05:07 asterisk1 kernel: Zaptel Version: SVN-trunk-r1459 Echo Canceller: MG2
Sep 14 12:05:13 asterisk1 kernel: Freshmaker version: 73
Sep 14 12:05:13 asterisk1 kernel: Freshmaker passed register test
Sep 14 12:05:13 asterisk1 kernel: Module 0: Installed -- AUTO FXS/DPO
Sep 14 12:05:13 asterisk1 kernel: Module 1: Installed -- AUTO FXS/DPO
Sep 14 12:05:13 asterisk1 kernel: Module 2: Not installed
Sep 14 12:05:13 asterisk1 kernel: Module 3: Installed -- AUTO FXO (UK mode)
Sep 14 12:05:13 asterisk1 kernel: Found a Wildcard TDM: Wildcard TDM400P REV I (3 modules)
Sep 14 12:05:27 asterisk1 kernel: Registered tone zone 4 (United Kingdom)
Sep 14 12:06:21 asterisk1 kernel: Zaptel Transcoder support loaded
Sep 14 12:06:21 asterisk1 kernel: Registered tone zone 4 (United Kingdom)


As you can see, port 4 on the TDM400P is the FXO port, plugged into the BT
PSTN line.

When I call this line's number from another phone, here's what I get:

*CLI>     -- Starting simple switch on 'Zap/4-1'
[Sep 14 12:12:28] NOTICE[4392]: chan_zap.c:6320 ss_thread: Got event 18 (Ring Begin)...
[Sep 14 12:12:30] NOTICE[4392]: chan_zap.c:6320 ss_thread: Got event 2 (Ring/Answered)...
[Sep 14 12:12:31] NOTICE[4392]: chan_zap.c:6320 ss_thread: Got event 18 (Ring Begin)...
    -- Executing [s at incoming:1] Answer("Zap/4-1", "") in new stack
    -- Executing [s at incoming:2] Echo("Zap/4-1", "") in new stack

This is working, since if I "tut" into the phone which originated the call I
can hear the slightly delayed echo. However, when I put the phone down,
Asterisk doesn't always notice this. Nothing happens, and if I try to ring
in again, I get an engaged tone.

After a minute or two I may then get:

  == Spawn extension (incoming, s, 2) exited non-zero on 'Zap/4-1'
    -- Hungup 'Zap/4-1'

Is there anything I can do to make this more robust?

Thanks,

Brian Candler.


More information about the asterisk-users mailing list