Resolved - PRI Config Help

The following Issue has been resolved. After Correctly interfacing with the T-1 the PRI appeared to work correctly, Calls would flow both directions, but without audio.

Apparently there is a “known” issue (known meaning some of the top engineers at Sangoma know) with the B601 on 64bit systems with over 4gb or RAM. There is a flag needed to compile the drivers else EVERYTHING will work EXCEPT audio.

Here the the message a received back from Travis.

Hope this helps someone else. Perhaps a check could be added to the install script provided in the distro.


Hi Jared,

The flag I used when compiling the driver is:

./Setup install --64bit-4BG

The flag is only to be used with the B601 on systems that are 64bit and have 4GB of RAM or more.


Travis Semczyszyn

Sangoma Technologies Inc.
100 Renfrew Drive, Suite 100
Markham, ON, Canada L3R 9R6


I ave a PRI from Cavalier. CPE is an Adtran 908e. Pri Card is Sangoma A601

They told me voice is on port 4, Framing is esf and coding is b8zs

They are sending me 4 digits


dahdi/system.conf

#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
#autogenrated on 2012-02-04
#Dahdi Channels Configurations
#For detailed Dahdi options, view /etc/dahdi/system.conf.bak
loadzone=us
defaultzone=us

#Sangoma A601 port 2 [slot:4 bus:7 span:1]
span=1,1,0,esf,b8zs
bchan=1-23
echocanceller=mg2,1-23
hardhdlc=24

#Sangoma AFT-A601 [slot:4 bus:7 span:2]
fxsks=25
echocanceller=mg2,25
fxsks=26
echocanceller=mg2,26
fxsks=27
echocanceller=mg2,27
fxsks=28
echocanceller=mg2,28
fxoks=29
echocanceller=mg2,29


dahdi-channels.conf

; Autogenerated by /usr/sbin/setup-sangoma 2012-02-04
; If you edit this file and execute /usr/sbin/setup-sangoma again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

;Sangoma A601 port 2 [slot:4 bus:7 span:1]
switchtype=national
context=from-zaptel
group=0
echocancel=yes
signalling=pri_cpe
channel =>1-23

;Sangoma AFT-A601 [slot:4 bus:7 span:2]
context=from-zaptel
group=0
echocancel=yes
signalling = fxs_ks
channel => 25

context=from-zaptel
group=0
echocancel=yes
signalling = fxs_ks
channel => 26

context=from-zaptel
group=0
echocancel=yes
signalling = fxs_ks
channel => 27

context=from-zaptel
group=0
echocancel=yes
signalling = fxs_ks
channel => 28

context=from-internal
group=1
echocancel=yes
signalling = fxo_ks
channel => 29


chan_dahdi.conf

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes
busydetect=yes
busycount=10
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

#include dahdi-channels.conf

group=1

;Include AMP configs
#include chan_dahdi_additional.conf


It appears the Pri card has a “connection” as wanrouter messages show this

Start WANPIPE /var/log/messages

Feb 5 04:02:07 ASIL-PBX syslogd 1.4.1: restart.
Feb 5 06:15:12 ASIL-PBX ntpd[4505]: synchronized to 205.233.73.201, stratum 3
Feb 5 06:55:53 ASIL-PBX ntpd[4505]: synchronized to 173.246.103.93, stratum 3
Feb 5 14:46:43 ASIL-PBX ntpd[4505]: synchronized to 205.233.73.201, stratum 3
Feb 6 08:15:02 ASIL-PBX ntpd[4505]: synchronized to 173.246.103.93, stratum 3
Feb 6 12:25:26 ASIL-PBX ntpd[4505]: synchronized to 205.233.73.201, stratum 3
Feb 6 13:06:22 ASIL-PBX ntpd[4505]: synchronized to 173.246.103.93, stratum 3

End of WANPIPE /var/log/messages

I assume that’s it syncing the clock???

But wanrouter status show this

Devices currently active:
wanpipe1 wanpipe2

Wanpipe Config:

Device name | Protocol Map | Adapter | IRQ | Slot/IO | If’s | CLK | Baud rate |
wanpipe1 | N/A | A101/1D/A102/2D/4/4D/8| 177 | 4 | 1 | N/A | 0 |
wanpipe2 | N/A | A200/A400/B600/B700/B800| 177 | 4 | 1 | N/A | 0 |

Wanrouter Status:

Device name | Protocol | Station | Status |
wanpipe1 | AFT TE1 | N/A | Disconnected |
wanpipe2 | A-ANALOG | N/A | Connected |

Now the million dollar question… What am I missing? This IS my first PRI attempt on asterisk… so i’m kind of flying blind. Sorry if the above is TMI, but too much is usually better than too little… if any other info is needed please let me know.

Disregard the wanrouter messges output… I guess that’s just saying my server synced to ntp.pool.org

I thought it had something to do with timing.

Output from PRI Show Span 1 shows In Alarm, Up, Active
but it also shows that if i’m unplugged.

ASIL-PBX*CLI> pri show span 1
Primary D-channel: 24
Status: In Alarm, Up, Active
Switchtype: National ISDN
Type: CPE
Remote type: Unknown node type
Overlap Dial: 0
Logical Channel Mapping: 0
Timer and counter settings:
N200: 3
N202: 3
K: 7
T200: 1000
T201: 1000
T202: 10000
T203: 10000
T303: 4000
T305: 30000
T308: 4000
T309: 6000
T312: 6000
T313: 4000
T-HOLD: 4000
T-RETRIEVE: 4000
T-RESPONSE: 4000
Q931 RX: 0
Q931 TX: 70
Q921 RX: 0
Q921 TX: 121591
Q921 Outstanding: 0 (TEI=0)
Total active-calls:0 global:0
CC records:
Overlap Recv: No

I’m just going to take a stab at this, but are you plugged into the Adtran with a T1 crossover cable?

I’m not 100% sure if you need that in this particular case, but I know that when we had a 908e (in a non Asterisk environment) we had to have T1 crossover cables between PBX and Adrtran.

When we were using Adtrans for DSX, we did not need the T1 crossover cable.

NO… Using a Straight T1 Cable… which per sangoma, is what i should be using when connecting to CPE.

Cavalier doesn’t exactly provide a wealth of information. I took me 3 days to get IP info for the data side and there was no cut sheet left by the tech.

Interesting. Well, like I said, I was just taking a stab at it. Our 908e’s were setup for a different configuration and I did not have the knowledge back then that I have now so I just did what I was told.

I’m sure someone here can shed some light for you.

OK… so I had been considering going a getting a crossover cable just to try it. After your post I decided to make one. Suddenly my PRI came to life! It went from Alarm to Up and Active. WOOHOO! THANKS

I can make outgoing calls… and they connect.
I can receive incoming calls on my DID’s,

BUT There is No Audio at all on either end… whether inbound or outbound.

(I have internal audio as well as audio over sip trunks. No problems there.)

Any ideas why there would be no audio over the pri?

When I try phone my softphone, i get a momentay “ring splash” then silence… maybe 25% or the normal ringing sound… I get nothing from my polycoms.

wanrouter messages show this

Feb 6 16:48:58 ASIL-PBX kernel: wanpipe1:w1g1: Error: TxDMA Length not equal 0 (reg=0x00004001)
Feb 6 16:48:58 ASIL-PBX kernel: wanpipe1:w1g1: Tx Error: ‘Retry’ exceeds maximum (64k): pci fatal error!
Feb 6 16:51:25 ASIL-PBX kernel: wanpipe1:w1g1: Error: TxDMA Length not equal 0 (reg=0x00004001)
Feb 6 16:51:25 ASIL-PBX kernel: wanpipe1:w1g1: Tx Error: ‘Retry’ exceeds maximum (64k): pci fatal error!

End of WANPIPE /var/log/messages

No audio either direction.

In some posts related tho no Audio over Pri i see reference to adjusting or disabling HWEC in zapata.conf … so i thought i’d have a look.

I don’t have a zapata.conf… just a zapata.conf.template.

Has this file been phased out or am i missing it?

So from Further Reading it looks like zapata.conf is no longer used infavor of dahdi/system.conf

I’m officially lost.

Zaptel is not used anymore. Disable it in the DAHDI config files (I don’t know the exact files, especially since this is Sangoma).

Also make sure you have one end in master timing and one in slave or the line will have slips and sound awful.

Skyking am i correct in assuming that there is always a timing source from the PSTN? I assume the CPE is master, so in the config script i set the pbx to normal as the other option was master.

I get NO audio… Not even a peep, crackle, hiss or anything… it’s a black hole.

Any idea on those errors?

What would be the best way to disable HWEC to see if that’s the problem?

I wondered if it was only a problem on the digital side, and it’s not.

I plugged a POTS line into an FXO port. The PBX answers the call and routes it correctly, but there is no audio on either end.

I’m Stumped

Ok so Sangoma’s docs are a bit Comfusing… It says PSTN should always be the master timing source, but if you connect to a Channel bank that you should be the timing source.

So i tried changing it… no change… still no audio.

Here is a PRI Debug


PRI Span: 1 – Making new call for cref 32774
– Requested transfer capability: 0x00 - SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=47
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 6/0x6) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=20, window is open V(A)=20 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=47
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 6/0x6) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a2]
PRI Span: 1 > Bearer Capability (len= 5) [ Ext: 1 Coding-Std: 0 Info transfer capability: Speech (0)
PRI Span: 1 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 > User information layer 1: u-Law (34)
PRI Span: 1 > [18 03 a1 83 81]
PRI Span: 1 > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
PRI Span: 1 > ChanSel: As indicated in following octets
PRI Span: 1 > Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 > Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 > [1e 02 80 83]
PRI Span: 1 > Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
PRI Span: 1 > Ext: 1 Progress Description: Calling equipment is non-ISDN. (3) ]
PRI Span: 1 > [6c 0c 21 80 32 30 35 33 32 33 31 30 30 30]
PRI Span: 1 > Calling Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 > Presentation: Presentation permitted, user number not screened (0) ‘205323xxxx’ ]
PRI Span: 1 > [70 0c 80 31 38 30 30 34 34 34 34 34 34 34]
PRI Span: 1 > Called Number (len=14) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) ‘18004444444’ ]
PRI Span: 1 q931.c:6036 q931_setup: Call 32774 enters state 1 (Call Initiated). Hold state: Idle
– Called DAHDI/g0/18004444444
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=10
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 6/0x6) (Sent to originator)
PRI Span: 1 < Message Type: CALL PROCEEDING (2)
PRI Span: 1 < [18 03 a9 83 81]
PRI Span: 1 < Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0
PRI Span: 1 < ChanSel: As indicated in following octets
PRI Span: 1 < Ext: 1 Coding: 0 Number Specified Channel Type: 3
PRI Span: 1 < Ext: 1 Channel: 1 Type: CPE]
PRI Span: 1 Received message for call 0x2aaaac1eddd0 on link 0x19f93780 TEI/SAPI 0/0
PRI Span: 1 – Processing IE 24 (cs0, Channel Identification)
PRI Span: 1 q931.c:8454 post_handle_q931_message: Call 32774 enters state 3 (Outgoing Call Proceeding). Hold state: Idle
Span 1: Processing event PRI_EVENT_PROCEEDING
– DAHDI/i1/18004444444-6 is proceeding passing it to SIP/112-00000005
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=9
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 6/0x6) (Sent to originator)
PRI Span: 1 < Message Type: PROGRESS (3)
PRI Span: 1 < [1e 02 82 88]
PRI Span: 1 < Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)
PRI Span: 1 < Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
PRI Span: 1 Received message for call 0x2aaaac1eddd0 on link 0x19f93780 TEI/SAPI 0/0
PRI Span: 1 – Processing IE 30 (cs0, Progress Indicator)
Span 1: Processing event PRI_EVENT_PROGRESS
– DAHDI/i1/18004444444-6 is making progress passing it to SIP/112-00000005
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=5
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 6/0x6) (Sent to originator)
PRI Span: 1 < Message Type: CONNECT (7)
PRI Span: 1 Received message for call 0x2aaaac1eddd0 on link 0x19f93780 TEI/SAPI 0/0
PRI Span: 1 q931.c:8384 post_handle_q931_message: Call 32774 enters state 8 (Connect Request). Hold state: Idle
Span 1: Processing event PRI_EVENT_ANSWER
PRI Span: 1 q931.c:6122 q931_connect_acknowledge: Call 32774 enters state 10 (Active). Hold state: Idle
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=5
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 6/0x6) (Sent from originator)
PRI Span: 1 > Message Type: CONNECT ACKNOWLEDGE (15)
PRI Span: 1 TEI=0 Transmitting N(S)=21, window is open V(A)=21 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=5
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 6/0x6) (Sent from originator)
PRI Span: 1 > Message Type: CONNECT ACKNOWLEDGE (15)
– DAHDI/i1/18004444444-6 answered SIP/112-00000005
ASIL-PBX*CLI>

I had a feeling this required a crossover cable.

If your timing was off, I think you’d see something in /var/log/asterisk/full about it.

Are all of your extensions SIP? I’m wondering if this may be a SIP audio problem now.

Do you have support from Sangoma?

Yes all extensions are sip, but i have internal audio and audio over sip trunks. I emailed support and just got a response this morning, so hopefully they’ll be able to figure it out.

There is a flag needed to compile the drivers for the B601 on 64bit systems with over 4gb or RAM else EVERYTHING will work EXCEPT audio.

Here the the message a received back from Travis.

Have a good day and hope this helps someone else. Perhaps a check would be added to the install script.

Hi Jared,

The flag I used when compiling the driver is:

./Setup install --64bit-4BG

The flag is only to be used with the B601 on systems that are 64bit and have 4GB of RAM or more.


Travis Semczyszyn

Sangoma Technologies Inc.
100 Renfrew Drive, Suite 100
Markham, ON, Canada L3R 9R6

Fantastic! Glad you were able to work it out and it sounds like the Sangoma people had a decent response time.

Yes… They only work 8-5 Eastern time, but they were VERY Diligent. Travis troubleshot with me for hours. He finally escalated it to a Sr engineer who had the answer.