[Asterisk-Users] Static and echo on PRI

Mark Johnson asterisk at astroshapes.com
Sun Apr 24 18:10:47 MST 2005


I need some serious help!!  I have been in the process of building an 
Asterisk system to replace a Cisco Call Manager.  I have most everything 
setup, but only got to test the PRI today.  To make a long story short, 
my Call Manager is half broken and I need to go live with * a lot sooner 
than I expected. 

Here's where I am and what I tried.  I am using all Cisco phones, mostly 
7940's and 60's in a SIP configuration.  All internal calls work with no 
issues.  I have a TE405P for the PRI and a TDM22B for my paging system 
and whatnot.  I am currently only using one PRI on the quad card.  When 
calling out on the PRI, I am getting static and some echoing.  I have 
tried various orders and values for the txand rxgains, echocancellation 
and nothing seems to help.  I get the staticy noise only when sound is 
coming in, like when the other is ringing or when the other person is 
talking.  Complete silence the rest of the time.  I get different 
amounts of echo when calling out, the person on the other end says they 
hear no echo or static at all, just on the SIP phones.  I made sure that 
I have no IRQ conflicts (output below) and my CPU usage seems to be 
fine, plenty of horsepower remaining.

Here are the parts of my configs that I feel are relavent:

/etc/zaptel.conf
-------------------
span=1,1,0,esf,b8zs
bchan=1-23
dchan=24
loadzone = us
defaultzone=us

fxoks=97
fxoks=98
fxsks=99
fxsks=100

/etc/asterisk/zapata.conf
------------------------------
[trunkgroups]

[channels]
context=incoming
switchtype=national
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
callgroup=1
pickupgroup=1

immediate=no
callerid=xxxxxxxxxx
rxgain=0.0
txgain=0.0
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
;echotraining=800
switchtype = national
signalling = pri_cpe
group = 1
channel => 1-23

signalling=fxo_ks
group = 2
channel => 97
signalling=fxo_ks
group = 3
channel => 98
signalling=fxs_ks
group = 4
channel => 99
signalling=fxs_ks
group = 5
channel => 100

/etc/asterisk/extensions.conf
-----------------------------------
TRUNK=Zap/g1
TRUNKMSD=1

[trunklocal]
exten => _6NXXXXXXXXX,1,SetCallerID(xxxxxxxxxx)
exten => _6NXXXXXXXXX,2,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _6NXXXXXXXXX,3,Congestion


Here are a few lines from the logs that might mean something to someone:

Apr 24 18:22:40 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1
Apr 24 18:22:40 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1
Apr 24 18:22:41 NOTICE[196620]: PRI got event: 8 on Primary D-channel of 
span 1
Apr 24 18:22:41 NOTICE[196620]: PRI got event: 8 on Primary D-channel of 
span 1
Apr 24 18:24:31 NOTICE[196620]: PRI got event: 8 on Primary D-channel of 
span 1
Apr 24 18:25:53 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1
Apr 24 18:25:54 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1
Apr 24 18:26:09 NOTICE[196620]: PRI got event: 8 on Primary D-channel of 
span 1
Apr 24 18:26:09 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1
Apr 24 18:26:09 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1
Apr 24 18:26:10 WARNING[196620]: PRI: !! Got reject for frame 51, but we 
only have others!
Apr 24 18:26:10 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1
Apr 24 18:26:11 NOTICE[196620]: PRI got event: 8 on Primary D-channel of 
span 1
Apr 24 18:27:01 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1
Apr 24 18:27:41 NOTICE[196620]: PRI got event: 6 on Primary D-channel of 
span 1

** I tried the line span=1,0,0,esf,b8zs in my zaptel.conf and made no 
difference.

Here is a debug section for my PRI when I was getting static and echo:

Enabled debugging on span 1
    -- Executing SetCallerID("SIP/226-9fca", "3307551414") in new stack
    -- Executing Dial("SIP/226-9fca", "Zap/g1/3305596313") in new stack
-- Making new call for cr 32771
 > Protocol Discriminator: Q.931 (8)  len=46
 > Call Ref: len= 2 (reference 3/0x3) (Originator)
 > Message type: SETUP (5)
 > [04 03 80 90 a2]
 > Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer 
capability: Speech (0)
 >                              Ext: 1  Trans mode/rate: 64kbps, 
circuit-mode (16)
 >                              Ext: 1  User information layer 1: u-Law (34)
 > [18 03 a9 83 81]
 > Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, 
Exclusive Dchan: 0
 >                        ChanSel: Reserved
 >                       Ext: 1  Coding: 0   Number Specified   Channel 
Type: 3
 >                       Ext: 1  Channel: 1 ]
 > [1e 02 80 83]
 > Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard 
(0) 0: 0   Location: User (0)
 >                               Ext: 1  Progress Description: Calling 
equipment is non-ISDN. (3) ]
 > [6c 0c 21 80 33 33 30 37 35 35 31 34 31 34]
 > Calling Number (len=14) [ Ext: 0  TON: National Number (2)  NPI: 
ISDN/Telephony Numbering Plan (E.164/E.163) (1)
 >                           Presentation: Presentation permitted, user 
number not screened (0) '3307551414' ]
 > [70 0b a1 33 33 30 35 35 39 36 33 31 33]
 > Called Number (len=13) [ Ext: 1  TON: National Number (2)  NPI: 
ISDN/Telephony Numbering Plan (E.164/E.163) (1) '3305596313' ]
    -- Called g1/3305596313
Apr 24 18:13:13 NOTICE[196620]: chan_zap.c:7050 pri_dchannel: PRI got 
event: 8 on Primary D-channel of span 1
< Protocol Discriminator: Q.931 (8)  len=10
< Call Ref: len= 2 (reference 32771/0x8003) (Terminator)
< Message type: CALL PROCEEDING (2)
< [18 03 a9 83 81]
< Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive 
Dchan: 0
<                        ChanSel: Reserved
<                       Ext: 1  Coding: 0   Number Specified   Channel 
Type: 3
<                       Ext: 1  Channel: 1 ]
-- Processing IE 24 (cs0, Channel Identification)
    -- Zap/1-1 is making progress passing it to SIP/226-9fca
< Protocol Discriminator: Q.931 (8)  len=9
< Call Ref: len= 2 (reference 32771/0x8003) (Terminator)
< Message type: ALERTING (1)
< [1e 02 84 88]
< Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 
0: 0   Location: Public network serving the remote user (4)
<                               Ext: 1  Progress Description: Inband 
information or appropriate pattern now available. (8) ]
-- Processing IE 30 (cs0, Progress Indicator)
    -- Zap/1-1 is ringing

Here are my interrupts:

cat /proc/interrupts
         CPU0
0:     960018          XT-PIC  timer
1:          4          XT-PIC  keyboard
2:          0          XT-PIC  cascade
3:    9565339          XT-PIC  t4xxp
5:      16301          XT-PIC  eth0
8:          1          XT-PIC  rtc
9:          0          XT-PIC  usb-ohci, usb-ohci, usb-ohci, ehci_hcd
10:          0          XT-PIC  ohci1394
11:    9566436          XT-PIC  wctdm
12:         23          XT-PIC  PS/2 Mouse
14:      16978          XT-PIC  ide0
15:          0          XT-PIC  ide1
NMI:          0
ERR:          0

Output of lsmod:

lsmod
Module                  Size  Used by    Not tainted
parport_pc             19076   1  (autoclean)
lp                      9060   0  (autoclean)
parport                37056   1  (autoclean) [parport_pc lp]
soundcore               6468   0  (autoclean)
autofs4                12180   0  (autoclean) (unused)
sis900                 15756   1
wctdm                  87328   4
wct4xxp                51360  24
zaptel                178688  62  [wctdm wct4xxp]
floppy                 58012   0  (autoclean)
sg                     36492   0  (autoclean) (unused)
scsi_mod              108168   1  (autoclean) [sg]
microcode               4700   0  (autoclean)
ohci1394               29160   0  (unused)
ieee1394              204676   0  [ohci1394]
keybdev                 2976   0  (unused)
mousedev                5556   0  (unused)
hid                    24708   0  (unused)
input                   5888   0  [keybdev mousedev hid]
ehci-hcd               20264   0  (unused)
usb-ohci               21512   0  (unused)
usbcore                79168   1  [hid ehci-hcd usb-ohci]
ext3                   71300   2
jbd                    52084   2  [ext3]

I was getting IRQ MISSES previously in zttool when I discovered that the 
PRI card was sharing and IRQ.  After I rectified that, the misses have 
stopped but the static and echo continue.  Does anyone have any 
suggestions?  Sorry for the long post, but I'm in big trouble.  THANKS!!!

Mark



More information about the asterisk-users mailing list