Problem with TE220 in Australia

I have a CentOS 5 box running asterisk 1.4.14 and zaptel 1.4.6.
I have installed a TE220 with jumper set to E1.
The card and channels are recognised by asterisk, but I can’t get it to answer a call - the telephone company (Telstra) recorded message comes up after 3 rings telling me that:

When I enable pri debug span 1 I can see that the call makes it as far as Asterisk but it immediately hung up and I can’t work out why. Here is the debug output from asterisk:

[quote][Nov 23 16:49:02] VERBOSE[3387] logger.c: < Protocol Discriminator: Q.931 (8) len=44
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Call Ref: len= 2 (reference 75/0x4B) (Originator)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Message type: SETUP (5)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < [a1]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Sending Complete (len= 1)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < [04 03 80 90 a3]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Ext: 1 User information layer 1: A-Law (35)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < [18 03 a1 83 83]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Preferred Dchan: 0
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < ChanSel: Reserved
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Ext: 1 Coding: 0 Number Specified Channel Type: 3
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Ext: 1 Channel: 3 ]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < [6c 0b 21 81 34 31 33 37 35 34 32 33 37]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Calling Number (len=13) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Presentation: Presentation permitted, user number passed network screening (1) ‘413754237’ ]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < [70 09 c1 36 31 36 33 37 30 30 30]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < Called Number (len=11) [ Ext: 1 TON: Subscriber Number (4) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) ‘61637000’ ]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < [7d 02 91 81]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: < IE: High-layer Compatibility (len = 4)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: – Making new call for cr 75
[Nov 23 16:49:02] VERBOSE[3387] logger.c: – Processing Q.931 Call Setup
[Nov 23 16:49:02] VERBOSE[3387] logger.c: – Processing IE 161 (cs0, Sending Complete)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: – Processing IE 4 (cs0, Bearer Capability)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: – Processing IE 24 (cs0, Channel Identification)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: – Processing IE 108 (cs0, Calling Party Number)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: – Processing IE 112 (cs0, Called Party Number)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: – Processing IE 125 (cs0, High-layer Compatibility)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: q931.c:3296 q931_receive: call 75 on channel 3 enters state 6 (Call Present)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Call Present, peerstate Call Initiated
[Nov 23 16:49:02] VERBOSE[3387] logger.c: q931.c:2891 q931_release_complete: call 75 on channel 3 enters state 0 (Null)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: > Protocol Discriminator: Q.931 (8) len=9
[Nov 23 16:49:02] VERBOSE[3387] logger.c: > Call Ref: len= 2 (reference 75/0x4B) (Terminator)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: > Message type: RELEASE COMPLETE (90)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: > [08 02 81 81]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: > Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
[Nov 23 16:49:02] VERBOSE[3387] logger.c: > Ext: 1 Cause: Unallocated (unassigned) number (1), class = Normal Event (0) ]
[Nov 23 16:49:02] VERBOSE[3387] logger.c: NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
[Nov 23 16:49:02] VERBOSE[3387] logger.c: NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null
[Nov 23 16:49:05] NOTICE[3387] chan_zap.c: PRI got event: HDLC Bad FCS (8) on Primary D-channel of span 2
[Nov 23 16:49:05] DEBUG[3387] chan_zap.c: Got event HDLC Bad FCS (8) on D-channel for span 2
[/quote]

Here is the /etc/zaptel.conf:

[quote]span=1,1,1,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16
span=2,2,1,ccs,hdb3,crc4
bchan=32-46,48-62
dchan=47
loadzone = au
defaultzone = au
[/quote]

Here is the /etc/asterisk/zapata.conf:

[quote][trunkgroups]
[channels]
language=au
context=test
switchtype=euroisdn
overlapdial=yes
signalling=pri_cpe
rxwink=300 ; Atlas seems to use long (250ms) winks
; where the ring cadence is changed after the callerid spill.
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
rxgain=-3.0
txgain=-6.0
group=0
callgroup=1
pickupgroup=1
immediate=no
faxdetect=incoming
switchtype = euroisdn
signalling = pri_cpe
group = 0
channel => 1-15
channel => 17-31
channel => 32-46
channel => 48-62
[/quote]

The ISDN line is currently hooked up to a BrookTrout fax board and fax server so I know the ISDN is working fine, just need to know which of the 100’s of possible parameters in the bunch of config files I need to mess with.
Thanks,
JT

Hi,
We provide dialers for the companies which can support inbound calls and outbound calls

have you tried it with crc off?
Also for span 2 the d channel should be on time slot 48 not 47.

[quote]
span=2,2,1,ccs,hdb3,crc4
bchan=32-46,48-62
dchan=47 [/quote]

should be
span=2,2,1,ccs,hdb3,crc4
bchan=32-47,49-63
dchan=48

The problem actually turned out to be the context for the incoming call. As I wasn’t as familiar with 1.4 as with 1.2 I wasn’t aware of the core set verbose 2 option, which displayed the dial plan diagnostics and showed incoming calls for numbers that didn’t exist. This lead me to fix the context and calls then started coming in successfully.