Wednesday, May 26, 2010

PRI/T1 having issues.... follow some of the checkpoints

[I am assuming that you know how to play with Asterisk]

A. Phyical Connection Issues

1. cabling

2. smart jack : It is the jack that can be used by Telco provider to do the loopback test remotely. With that said, it is not the mandatory device to put in the customer side, but Telco installs it on customer side so that they can do loopback test from their end remotely.

3. demarc : Telco line terminates to demarc of the customer primises.

Make a loop back plug. Simply take RJ-45 plug, loop a wire from pin1 to pin4 and another from pin2 to pin 5 and crip down the RJ-45.

If the circuit or the PRI/T1 card showing RED alarm, plug the loopback plug, if the circuit goes green then it says that hardware is good and configuration might also be good. But not 100% sure.
Plug the loopback plug on the smart jack to see if the Telco is having the issue. If the circuit goes green on the smart jack too, then jump to step B.

B. Protocol/signalling/configuration issues

1. Check if you are in sync on the physical layer - one of your T1 endpoints should provide clocking and another end should take clocking from the line

#/etc/zaptel.conf or /etc/dahdi/system.conf

span=<span num>,<clocking>,<LBO>,<framing>,<encoding>
e.g span=1,0,0,esf,b8zs

Here, clocking is set to 0 so it is using internal clock for clocking. So, it's configured like master clock source. The other end should be configured as slave for clocking ( i.e set second parameter to 1). If you are using T1 line from Telco provider, make sure that you set clocking to '0' as Telco is always configured as master for clocking.

esf,b8zs is widely accepted framing and encoding in North America.

2. Then, check if you have the same protocol running by both parties on the D-channel

#/etc/asterisk/zapata.conf or /etc/asterisk/chan_dahdi.conf

switchtype=<specify switchtype>
e.g switchtype=national

3. Finally, check if you have the right master/slave relationship on ISDN level. One side of the link should be set as network while another end should be set as user/slave.

#/etc/asterisk/zapata.conf or /etc/asterisk/chan_dahdi.conf

signalling=<specify signalling>


e.g signalling=pri_cpe #user-side configuration (Slave/User)
e.g signalling=pri_net #network-side configuration (Master)

If you are unsure how the other side is configured just try to set pri_net on Asterisk side. If it works with Telco provider, make sure that you contact them and tell them to change their configuration to NETWORK so that you can change your Asterisk as USER (pri_cpe).



Some bonus information:

Framing:
ESF
D4
CAS
CCS

Encoding:
B8ZS
AMI
HDB3
NCRC2

Signalling:
pri_cpe
pri_net
fxs_ks
fxs_ls
fxs_gs
fxo_ks
fxo_ls
fxo_gs
em (E&M)
em_w (E&M Wink)
em_e1

Switchtype:

Only used for PRI
national --> National ISDN 2 (default)
dms100 --> Nortel DMS100
4ess --> AT&T 4ESS
5ess --> Lucent 5ESS
euroisdn --> EuroISDN (common in Europe)
ni1 --> Old National ISDN 1
qsig --> Q.SIG




FAQs:


Why do we need encoding for T1 circuit? Why B8ZS?

Ans: B8ZS (Bipolar/Binary Eight Zero Substitution), also known as "Clear Channel" or "clear 64" is used with ESF framing in T1 Carrier systems. It uses Out-of-band signalling frees up all 8 bits of each byte to carry data, allowing each channel 64kpbs.

Consecutive eight zero bits is encoded as 000+-0-+0


B8ZS satisfies T1 Carrier regenerator ones density requirement that fifteen consecutive zeros cannot be send and that an average of at least one out of eigth bits contains a one. With that said, sending and receiving end both should be using B8ZS.


Why do we require framing for T1 circuit? Why ESF?
Ans: Since T1 circuit used TDM (Time Division Multiplexing). Acceptable audio bandwith is 4 KHz, so as per Nyquist Criteria sampling frequency should be 2x4KHz i.e 8 KHz. 8KHz can also be considerd as 8000 frames /second. Each channel is framed at 8KHz, so each channel has occupies bandwith of 8 bytes/frame x 8000 frames /second = 64 kpbs.

Frame synchronization is necessary to identify the timeslots wthin each 24 channel frame in T1 circuit. Synchronization takes place by allocating a framing or 193rd bit.
(8 bits data/channel x 24 channels/frame + 1 framing bit/frame)=193
i.e 193rd bit is the framing bit

For T1 line (also known as DS1)
(8 bits data/channel x 24 channels/frame + 1 framing bit/frame) x 8000 frames/second=1.544kbps

Looking at the above expression, we can say that we have
framing data= (1 framing bit/frame x 8000 frames/second) = 8 kbps
Because this 8 kbps channel is used for framing, only 1.536 kpbs (i.e 1.544kpbs - 8 kbps) is actually passed on to the user.

ESF (Extended Super Frame) consists of twenty-four consecutive 193rd bit frames.


No comments:

Post a Comment