Beruflich Dokumente
Kultur Dokumente
Part II
Digital Signaling
By:
Voice Quality
Digital Telephony
Voice Quality
Benefits of Digital
No signal attenuation on digital circuits.
No echo generated on digital circuits.
Discrete values (i.e. binary 0/1) do not suffer signal degradation and
thus can operate in low SNR environments.
Repeaters, on digital circuits, regenerate perfect pulses whereas
amplifiers, on analog circuits, boost signal strength and noise levels.
Easy to switch and manipulate signal with digital components.
Built in error checking routines into signal/frame (i.e. CRC).
Higher speeds
Greater call density (TDM based)
Statistics collection (FDL)
Digitizing Voice
Digital Telephony
Pulse Code Modulation - Nyquist Theorem
The sampling frequency must be at least 2 times the largest
frequency being sampled for signal replication.
Codec Technique
Sampling Stage
= Sample
Voice Bandwidth =
300 Hz to 3400 Hz
2002, Cisco Systems, Inc. All rights reserved.
Quantizing Noise
100100111011001
Stage 1
Law (USAJapan)
2002, Cisco Systems, Inc. All rights reserved.
Quantizing Stage
6
Input
Output
Input
Linear Encoding
Relatively Easy to Analyze,
Synthesize, and Regenerate
All Amplitudes Have Roughly
Equal Quantization Distortion
7
Digitizing Voice
Bit Rate Of Digital Voice
= 2 x 4 kHz x 8 bits per sample
= 64,000 bits per second
CODEC
PCM
= DS-0
64 KBPS
DS-1
Voice Quality
10
DS-1 Basics
DS-1 Frame Format
TS1
TS2
TS3
TS23
TS24
Each Timeslot:
sampled at 8000 times per second ~ 2 times voice spectrum
8000 samples/sec * 8 bits/sample = 64000 bps
24 DS0s make up a DS1 frame
11
2nd Cycle
1st Cycle
DS-2
DS-3
6 5 4 32 10
6 54 3 2 10
DS-4
DS-5
TimeSlots n
DS-6
12
DS-1 Linecoding
13
Frame #1
DS-0 #1
DS-0 #2
DS-0 #3
DS-0 #4
.......
DS-0 #24
Frame #2
DS-0 #1
DS-0 #2
DS-0 #3
DS-0 #4
.......
DS-0 #24
Frame #3
DS-0 #1
DS-0 #2
DS-0 #3
DS-0 #4
.......
DS-0 #24
DS-0 #4
.......
DS-0 #24
:
Frame #12
DS-0 #1
:
DS-0 #2
:
DS-0 #3
14
ESF Frame
Frame1
Frame2
Frame3
Frame4
Frame5
Frame6
Frame7
Frame8
Frame9
Frame10
Frame11
Frame12
Frame13
Frame14
Frame15
Frame16
Frame17
Frame18
Frame19
Frame20
Frame21
Frame22
Frame23
Frame24
TS1
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
M - FDL
TS2
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
TS6
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
C - CRC
TS12
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
TS18
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
TS24
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
12345678
F Bit
M
C
M
0
M
C
M
0
M
C
M
1
M
C
M
0
M
C
M
1
M
C
M
1
ESF
Frame
Framing bit
Number Terminal Signalling
1
1
2
0
3
0
4
0
5
1
6
1
7
0
8
1
9
1
10
1
11
0
12
0
7
d
d
d
d
d
d
d
d
d
d
d
d
Bit in Timeslot
6 5 4 3 2 1
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
0
d
d
d
d
d
A
d
d
d
d
d
B
Frame
Number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Framing bit
Term CRC FDL
M
C1
M
0
M
C2
M
0
M
C3
M
1
M
C4
M
0
M
C5
M
1
M
C6
M
1
Bit in Timeslot
7 6 5 4 3 2
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
d d d d d d
1
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
d
16
0
d
d
d
d
d
A
d
d
d
d
d
B
d
d
d
d
d
C
d
d
d
d
d
D
Debugging T1
3660a#show controller t1 2/0
T1 2/0 is down.
Applique type is Channelized T1
Cablelength is long gain36 0db
Transmitter is sending remote alarm.
Receiver has loss of signal.
Version info Firmware: 19990702, FPGA: 6
Framing is ESF, Line Code is B8ZS, Clock Source is Line.
Data in current interval (774 seconds elapsed):
0 Line Code Violations, 0 Path Code Violations
0 Slip Secs, 774 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 774 Unavail Secs
Data in Interval 1:
0 Line Code Violations, 0 Path Code Violations
0 Slip Secs, 900 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 900 Unavail Secs
17
Debugging T1
DTE
DCE
DCE
DSUCSU
DSUCSU
Local
Loopback
controller T1 1/0/1
framing esf
linecode b8zs
loop local
channel-group 1 timeslots 1-24
!
interface Serial1/0/1:1
ip address 1.1.1.1 255.255.255.0
Telco
DTE
Remote
Loopback
18
In-band/Out-of-band
In-channel/Out-of-channel
19
Signaling in DS-1
Common Channel Signaling (CCS)
Instead of robbed bit, robbed ds0
Example: ISDN
Frame #1
DS-0 #1
DS-0 #2
DS-0 #3
DS-0 #4
.......
DS-0 #24
20
ISDN
Voice Quality
21
Packetized Voice
D-channel - Signaling
q921, q931
D-channel - Signaling
q921, q931
WAN
B1B2D-
B- Channel
Layer-3
Voice
LAP-D
(Q921)
Layer-2
Physical
Layer-1
For Signaling
B1B2D-
D- Channel
Q.931
B-channels - Voice
Physical
22
BRI
192
64 Kbps
64 Kbps
{
2B
BRI
16 Kbps
64K*2 + 16k
+ 48K (framing bits) =
192 Kbps
23
PRI
1.544 kbps total speed
23 B-channels at 64 kbps
1 D-channel at 64 kbps (channel 24)
8 kbps framing and synchronization
ESF/B8ZS
Point to point
64 Kbps
23B
PRI
64 Kbps
24
ISDN Standards
25
Q.921
Switch
ISDN BRI
Q.921
WAN
ISDN PRI
Switch
Q.921
Q.921 protocol is used between the TE and the local ISDN switch
(not end-to-end)
The ISDN network does not impose the use of any data link layer protocol
for the B channels
Full duplex protocol
Responsible for sending/receiving error-free data
Q.921 LAPD (Link Access Procedure on the D channel) is modeled after
26
Q.931
Switch
ISDN BRI
Q.931
WAN
ISDN PRI
Switch
Q.931
Q.931 protocol is used between the TE and the local ISDN switch
(not end-to-end)
The ISDN network does not impose the use of any network layer protocol
for the B channels
Full duplex protocol
Message based protocol responsible for call setup and call teardown
Q.931 signaling is encapsulated in Q.921 frames
27
Debugging ISDN
Voice Quality
28
Troubleshooting ISDN
B-Channel
Q.931
ACTIVE
LAPDQ.921
Physical
Layer 1 Status:
Physical
Data Link
Voice
Samples
Layer 2 Status:
TEI = 0, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
Layer 3 Status:
1 Active Layer 3 Call(s)
Network
D-Channel
29
ON.
vnt-3745-32a#
Feb 6 22:03:42.049: ISDN Se1/0:23 Q921: User TX -> SABMEp sapi=0 tei=0
Feb 6 22:03:43.048: ISDN Se1/0:23 Q921: User TX -> SABMEp sapi=0 tei=0
Feb 6 22:03:43.056: ISDN Se1/0:23 Q921: User RX <- UAf sapi=0 tei=0
Feb 6 22:03:53.042: ISDN Se1/0:23 Q921: User RX <- RRp sapi=0 tei=0 nr=0
Feb 6 22:03:53.042: ISDN Se1/0:23 Q921: User TX -> RRf sapi=0 tei=0 nr=0
Feb 6 22:04:03.035: ISDN Se1/0:23 Q921: User RX <- RRp sapi=0 tei=0 nr=0
Feb 6 22:04:03.039: ISDN Se1/0:23 Q921: User TX -> RRf sapi=0 tei=0 nr=0
Q.921
TE
NET
30
ISDN PRI
WAN
Switch
ISDN PRI
Outgoing
Call Made
Call Accepted
31
Standard = CCITT
Transfer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0xA18397
Preferred, Channel 23
Calling Party Number i = 0x21, 0x81, '9199915622'
Plan:ISDN, Type:National
Called Party Number i = 0xC1, '5552104'
Plan:ISDN, Type:Subscriber(local)
2002, Cisco Systems, Inc. All rights reserved.
32
Q.931
NET
TE
2002, Cisco Systems, Inc. All rights reserved.
33
ISDN PRI
WAN
ISDN PRI
Switc
h
34
Troubleshooting Tips:
Always be aware of message direction to know who placed/cleared a call
Most disconnect cause codes are self explanatory (so dont try to make them difficult!)
Use show isdn service to determine available B-channels
Find out which part of the call establishment is failing, and determine if the problem
seems to be in the ISDN negotiation or in the VoIP negotiation.
2002, Cisco Systems, Inc. All rights reserved.
35
Voice Quality
36
CAS Signaling on T1
Channel Associated Signaling (CAS) robs the least significant bit
from the voice channel to convey supervisory signaling
These robbed bits are known as A/B/C/D bits and they are in every
sixth frame of a DS-1
Super Frame (SF) - A/B
Extended Super Frame (ESF) - A/B/C/D
37
DS-1 Frame
Bit
A
B
C
D
Framing
Bit
Audio
Address Signaling
(DTMF)
Supervision
On/Off Hook
Frame
6th
12th
18th
24th
Address Signaling
(Dial Pulse)
38
TS1
12345678
12345678
12345678
12345678
12345678
1234567A
12345678
12345678
12345678
12345678
12345678
1234567B
12345678
12345678
12345678
12345678
12345678
1234567C
12345678
12345678
12345678
12345678
12345678
1234567D
TS2
12345678
12345678
12345678
12345678
12345678
1234567A
12345678
12345678
12345678
12345678
12345678
1234567B
12345678
12345678
12345678
12345678
12345678
1234567C
12345678
12345678
12345678
12345678
12345678
1234567D
M - FDL
C - CRC
TS6
12345678
12345678
12345678
12345678
12345678
1234567A
12345678
12345678
12345678
12345678
12345678
1234567B
12345678
12345678
12345678
12345678
12345678
1234567C
12345678
12345678
12345678
12345678
12345678
1234567D
TS12
12345678
12345678
12345678
12345678
12345678
1234567A
12345678
12345678
12345678
12345678
12345678
1234567B
12345678
12345678
12345678
12345678
12345678
1234567C
12345678
12345678
12345678
12345678
12345678
1234567D
TS18
12345678
12345678
12345678
12345678
12345678
1234567A
12345678
12345678
12345678
12345678
12345678
1234567B
12345678
12345678
12345678
12345678
12345678
1234567C
12345678
12345678
12345678
12345678
12345678
1234567D
TS24
12345678
12345678
12345678
12345678
12345678
1234567A
12345678
12345678
12345678
12345678
12345678
1234567B
12345678
12345678
12345678
12345678
12345678
1234567C
12345678
12345678
12345678
12345678
12345678
1234567D
F Bit
M
C
M
0
M
C
M
0
M
C
M
1
M
C
M
0
M
C
M
1
M
C
M
1
E&M Signaling
Simplest of the digital signaling protocols
Provides both disconnect and answer supervision as
well as glare avoidance
State
On Hook
Off Hook
On Hook
Off Hook
A
0
1
0
1
B C
0 0
1 1
0 0
1 1
D
0
1
0
1
40
E&M Signaling
There are 4 types of E&M Signaling that are supported on
Cisco routers:
wink-start (fgb) wink is used to notify the remote side it can send the
DNIS.
41
E&M Signaling
6
A=1 B=1
A=0 B=0
2
4
A=1 B=1
3
A=0 B=0
Outgoing Call (Router Network): Same procedure as above except the Network' described
above would be the Router' and vice-versa. This is due to the fact that the signaling is symmetric.
7)
43
Disconnect
Supervision is
done with A bit
44
Network toggles B-bit to indicate ringing. Standard U.S. ringing cadence (i.e. 2sec on, 4sec off).
2)
Router will detect the 'ringing' and go 'off-hook'. A-bit goes from 0 to 1.
4)
5)
Router detects in-band that the call has dropped (i.e. supervisory tones).
7)
45
46
47
1
8
Network goes off-hook. A-bit transitions from 1 to 0. Ringing also occurs by B-bit
toggling between 0 and 1 (0=ringing, 1=no ringing).
Router detects ringing AND seizure and goes off-hook via A-bit = 1.
Network stops ringing. B-bit is now 1. A-bit still equals 0.
Disconnect (NetworkRouter):
8)
9)
Note:
Disconnect (RouterNetwork)
Steps 8&9 above will be reversed
48
Debugging CAS
Voice Quality
49
Debugging Topology
5400
PBX
3745
PBX
IP
T1 E&M
Wink Start
Setup Direction
T1 E&M
Wink Start
Disconnect Direction
50
Debugging CAS
On AS5xxx platforms use the debug cas command to
troubleshoot CAS signaling issues.
Debug output on an AS5400 for an inbound CAS wink-start call:
/* Inbound call comes into the router (i.e. network goes off-hook) */
*May 27 23:44:21.979: from Trunk(7): (2/0): Rx LOOP_CLOSURE (ABCD=1111)
/* 200 msec wink sent by the router */
*May 27 23:44:22.199: from Trunk(7): (2/0): Tx LOOP_CLOSURE (ABCD=1111)
*May 27 23:44:22.399: from Trunk(7): (2/0): Tx LOOP_OPEN (ABCD=0000)
/* Router receives DNIS digits and then goes off-hook once call is answered */
*May 27 23:44:30.375: from Trunk(7): (2/0): Tx LOOP_CLOSURE (ABCD=1111)
/* Disconnect received by the router (i.e. call was connected for approx. 121 seconds) */
*May 27 23:46:31.443: from Trunk(7): (2/0): Rx LOOP_OPEN (ABCD=0000)
/* Router disconnects call from its side */
*May 27 23:46:31.759: from Trunk(7): (2/0): Tx LOOP_OPEN (ABCD=0000)
2002, Cisco Systems, Inc. All rights reserved.
51
Debugging CAS
vnt-5400-37a#show controller t1 7/2 timeslots 1-24
T1 7/2 is up:
Loopback: NONE
DS0 Type
Modem
52
Debugging CAS
On 26xx/36xx/37xx platforms use the debug vpm signaling
command to troubleshoot CAS signaling issues.
*Apr 23 17:04:35.807: htsp_timer_stop3 htsp_setup_req
*Apr 23 17:04:35.807: htsp_process_event: [1/1:0(1), EM_ONHOOK,
E_HTSP_SETUP_REQ]em_onhook_setup
*Apr 23 17:04:35.807: em_offhook (0)vnm_dsp_set_sig_state:
[recEive and transMit1/1:0(1)] set signal state = 0x8
/* Router goes off-hook */
*Apr 23 17:04:35.807: htsp_process_event: [1/1:0(1),
EM_BRANCH, EM_EVENT_WINK]
*Apr 23 17:04:35.807: em_start_timer: 550 ms
*Apr 23 17:04:35.811: htsp_timer - 550 msec
*Apr 23 17:04:36.059: htsp_process_event: [1/1:0(1),
/* Router receives off-hook part
EM_WAIT_WINKUP, E_DSP_SIG_1100]em_wink_offhook
of wink*/
*Apr 23 17:04:36.059: em_stop_timers
*Apr 23 17:04:36.059: htsp_timer_stop
*Apr 23 17:04:36.059: em_start_timer: 1200 ms
*Apr 23 17:04:36.059: htsp_timer - 1200 msec
*Apr 23 17:04:36.259: htsp_process_event: [1/1:0(1),
/* Router receives on-hook part
EM_WAIT_WINKDOWN, E_DSP_SIG_0000]em_wink_onhook
of wink- duration is 200ms*/
*Apr 23 17:04:36.259: em_stop_timers
*Apr 23 17:04:36.259: htsp_timer_stop htsp_wink_ind
2002, Cisco Systems, Inc. All rights reserved.
53
Debugging CAS
*Apr 23 17:04:36.259: htsp_timer - 70 msec
/* Router transmits DNIS digits. Not seen
*Apr 23 17:04:36.331: htsp_process_event: [1/1:0(1), via debug vpm signal. View outbound
EM_WAIT_DIALOUT_DELAY, E_HTSP_EVENT_TIMER] digits with debug vtsp session */
em_imm_send_digits em_send_digits htsp_dial
*Apr 23 17:04:36.943: htsp_process_event: [1/1:0(1), EM_WAIT_DIAL_DONE,
E_DSP_DIALING_DONE]em_offhook_digit_done
/* Finished sending digits */
*Apr 23 17:04:36.943: htsp_timer_stop2 htsp_progress
*Apr 23 17:04:36.943: htsp_timer2 - 850 msec
*Apr 23 17:04:36.943: htsp_process_event: [1/1:0(1),
EM_WAIT_FOR_ANSWER,E_HTSP_VOICE_CUT_THROUGH]
*Apr 23 17:04:36.943: htsp_timer_stop2
*Apr 23 17:04:40.263: htsp_process_event: [1/1:0(1),EM_WAIT_FOR_ANSWER,
E_DSP_SIG_1100]em_wait_answer_offhook
/* Router sees off-hook
*Apr 23 17:04:40.263: em_stop_timers
(answer supervision) */
*Apr 23 17:04:40.263: htsp_timer_stop
*Apr 23 17:04:40.263: htsp_timer_stop2
54
Debugging CAS
*Apr 23 17:04:43.571: htsp_digit_ready: digit = 31
*Apr 23 17:04:43.571: htsp_process_event: [1/1:0(1),
EM_CONNECT, E_VTSP_DIGIT]
*Apr 23 17:04:43.775: htsp_digit_ready: digit = 32
*Apr 23 17:04:43.775: htsp_process_event: [1/1:0(1),
/* User dials dtmf 1234
EM_CONNECT, E_VTSP_DIGIT]
once call is connected.
*Apr 23 17:04:43.987: htsp_digit_ready: digit = 33
Router received 1234 from
*Apr 23 17:04:43.987: htsp_process_event: [1/1:0(1),
T1 interface.*/
EM_CONNECT, E_VTSP_DIGIT]
*Apr 23 17:04:44.187: htsp_digit_ready: digit = 34
*Apr 23 17:04:44.187: htsp_process_event: [1/1:0(1),
EM_CONNECT, E_VTSP_DIGIT]
*Apr 23 17:06:41.711: htsp_timer_stop3
*Apr 23 17:06:41.711: htsp_process_event: [1/1:0(1),
EM_CONNECT, E_HTSP_RELEASE_REQ]em_conn_release
*Apr 23 17:06:41.711: htsp_timer_stop
*Apr 23 17:06:41.711: htsp_timer_stop2
em_onhook(0)vnm_dsp_set_sig_state:
/* Router disconnects call.
[recEive and transMit1/1:0(1)] set signal state = 0x0
Duration is approx 121 sec*/
*Apr 23 17:06:41.711: em_start_timer: 400 ms
*Apr 23 17:06:41.711: htsp_timer - 400 msec
55
Debugging CAS
56
Telephony Lab
Voice Quality
57
Lab Topology
FXS
Ext. 1234
Router A
T1
E&M
T1
E&M
Router B
FXS
Ext. 4321
58
Lab Exercises
1.
2.
3.
4.
5.
6.
7.
8.
9.
Configure the T1 with AMI/SF. Change 1 side to B8ZS and look at the show
controller output. Next change 1 side to ESF and view the show controller output.
Configure both sides for ESF/B8ZS.
Make a loopback plug and plug into the T1.
Hook an analyzer into the T1, loopback the controller to the analyzer and bert the
controller.
Configure Router A with extension 1234 and Router B with extension 4321.
Configure 6 timeslots all with different signaling types between the 2 Routers.
Configure dial-peers such that Router A can call Router B and vice versa using
any of the 6 channels between the 2 routers. (i.e. use an access code)
Debug vpm signal and capture debugs to a file. Notate all signaling state
changes.
Debug vtsp session to see out-pulsed digits.
10.
Configure the router so you can place hairpin calls to a second phone off Router A
(extension 1235).
11.
12.
On the analyzer, watch the signaling bits for idle and active channels.
Listen to the audio for an active call with the analyzer.
13.
14.
59
Presentation_ID
60