Download ppt

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
H.323網路電話音訊監控
與錄製系統之研製
The Design and Implementation of Audio Monitoring
and Recording System for H.323-based Internet Phone
1
Speaker : 黃威穎
Advisor : 柯開維 教授
Data : 2008 07/25
Outline
Introduction
 Background
 Audio Recover
 System Framework
 Compare with Wireshark
 Conclusion
 Demo

2
Introduction
VoIP has already been the killer
application.
 Requirement of the audio recording
system.
 VoIP protocol

H.323
 SIP (Session Initiation Protocol)


Transport protocol
RTP
 RTCP

3
Background
H.323
 H.323 Related Software
 H.323 Related Protocol
 WinPcap
 How to Build WAVE File

4
H.323
H.323 is a multimedia conferencing
protocol, which includes audio, video,
and data conferencing over packetswitched networks.
 Element of H.323 system

Terminals
 Gatekeeper
 Multipoint Control Units (MCU)
 Gateway

5
H.323 Framework
Audio Coding/Decoding
(G.711)
TCP
RTP/RTCP
(Real-time Transport
protocol/Real-time
Transport Control
Protocol)
UDP
IP
6
System conrtrol
H.225
Call
Signaling
H.245
Control
H.225
RAS
(Registration
, Admission,
and Status)
The Flowchart of H.323 Call
Caller PC
Callee PC
Gatekeeper
Gatekeepr Request
Gatekeeper Confirm
Registration Request
Registration Confirm
Gatekeep Request
Gatekeeper Confirm
RAS
Registration Request
Registration Confirm
Admission Request
Admission Confirm
Setup
H.225
Call Proceeding
Admission Request
RAS
Admission Confirm
Alerting
H.225
Connect
Master Slave Determination
H.245
Terminal Capability Set
Open Logical Channel
RTP or RTCP
7
Voice communication
.
.
.
RTP or RTCP
H.323 Related Software

OpenH323


GNU Gatekeeper (GUNGK)
An open source project that implements
an H.323 gatekeeper.
 Implement most of these functions based
on the OpenH323 protocol stack.

8
An open source library for the
development of applications using the
H.323 protocol.
H.323 Related Protocol



9
Q,931/H.225
H.245
RTP
Q.931/H.225


10
Q.931/H.225 call signaling is used to
establish a H.323 call.
Q.931 Header Structure
Name
Protocol
Discriminator
Length(Octets)
Call Reference
1,2 or 3
Message Type
2
IEs (Information
Elements)
1
various
Note
Always 0x08 for
ISDN
The call
reference field
Detail
Detail
H.245
H.245 is a control channel protocol
and involves the line transmission of
non-telephone signals.
 H.245 signaling is intended to be
carried out in parallel to H.225
signaling.

11
Important H.245 Message
Message
Note
Possible reply
Master-Slave
Determination
Capability
Exchange
Determines which terminal
is the master.
Contains information about
a terminal's capability.
Acknowledge,
Reject, Release
Acknowledge,
Reject, Release
Open and Close Transport of audio and data
of Logical
information.
Channels
Acknowledge,
Reject, Confirm
Close the H.245 Indicates the end of the
Control Channel H.245 session.
No other H.245
message
12
RTP Header Structure
0
1
2
3
Version
P
Ex
4
5
6
7
CSRC Counter
8
9
10
M
11
12
13
Payload Type
Sequence Number
Timestamp
Timestamp
SSRC(Synchronization source)
SSRC(Synchronization source)
CSRC(Contributing source)
……….



13

P : Padding
Ex : Extension
CSRC : contributing source identifiers count
M : Mark
14
15
Payload Type
RTP PT
Name
Type
Clock rate (Hz)
Audio
channels
References
0
PCMU
Audio
8000
1
RFC 3551
2
G721
Audio
8000
1
RFC 3551
3
GSM
Audio
8000
1
RFC 3551
8
PCMA
Audio
8000
1
RFC 3551
9
G722
Audio
8000
1
RFC 3551
15
G728
Audio
8000
1
RFC 3551
18
G729
Audio
8000
1
14
WinPcap

An architecture for packet capture and
network analysis for the Win32 platforms.
Application
Wpcap.dll
Packet.dll
Netgroup Packet Filter Device
Driver
15
Packet
User Level
Kernel Level
How to Build WAVE File

16
WAVE file format is a subset of RIFF
(Resource Interchange File Format)
specification.
WAVE file format
Field Size
(Byte)

17
ByteRate = SampleRate *
NumChannels *
BitsPerSample / 8
BlockAlign =
NumChannels *
BitsPerSample / 8
Chunk ID
4
Chunk Size
4
Format
4
Subchunk 1 ID
4
Subchunk 1 Size
2
Audio Format
2
Num Channels
4
Sample Rate
4
Byte Rate
2
Block Align
2
Bits Per Sample
4
Subchnuk 2 ID
4
Subchunk 2 Size
fmt subchunk
Subchunk 2 Size

4
RIFF chunk
Data subchunk
Data
Audio Recover


Silence Suppression
Synchronization Problem
Caller
Monitor System
Connect
RTP
RTP
RTP
RTP
(Time Instant of
packet captured)
18
Callee
Silence Suppression

Stop sending RTP packets during silent
periods is known as "Silence
Suppression".

How to detect Silence Suppression?
RTP mark bit
 RTP timestamp

19
Silence Suppression Handle
20
355920 - 355680 = 240
((357120 – 355920) / 240) - 1 = 4
Synchronization Problem Handle
Caller Audio Packet
Callee Audio Packet
1
2
3
4
5
1
2
3
4 ……
6
7
8
9 ……
Time
Combine
Caller Audio Packet
0
0
0
0
0
1
2
3
4 ……
Callee Audio Packet
1
2
3
4
5
6
7
8
9 ……
Time
21
System Framework
System Environment of Network
 System Structure
 The Flow of Packet Handle
 The Interface between
RecDrv_h323.dll and RecApp.exe

22
System Environment of Network
Gate Keeper
Gate Keeper
Intranet
Wireless
Internet Phone
Switch
Gate Keeper
Audio Monitoring and Recording
System for H.323-base Internet Phone
Wirless Network
Ethernet
23
PDA
Smart Phone
Software Internet Phone
Internet
Phone
System Structure
RecApp.exe
H.323 Signal
Recorder
Audio Recover
Event Handle
RecDrv_h323.dll
Monitor List
Protocol Analyzer
Packet Buffer
24
Packet
The Flow of
Packet Handle
Packet Capture
Does this IP
need to be
recorded?
No
Yes
UDP
Is the port
correct?
TCP or UDP?
No
Finish
TCP
No
Is it H.323
signal?
Yes
Yes
RTP analysis
Other H.323 signal
analysis
RecDrv_h323.dll
(H323 Packet Analysis)
Callback function call
RecApp.exe
(EveHandleApp)
Event Type handler
H.323 signal event
Silence RTP event
Synchronization RTP event
RTP data event
Synchronization
Problem handler
Silence Suppression
handler
25
RTP payload decoder
and file handler
Finish
H.323 signal
handler
The Interface between
RecDrv_h323.dll and RecApp.exe
26

Callback function
 void handleData(int channelID, int evtType,
struct tm *timeStamp, string sourceAddr, string
destinAddr, char* buff, int buffSize, int xtraInfo);

H323 Packet Analysis interface
 int RDSysStart(callback _callback);
//return: 1 means success, 0 means failure
 int RDSetChannelParams(int buffSize);
//return: 1 means success, 0 means failure
The Interface between
RecDrv_h323.dll and RecApp.exe
int RDInitChannel(string IPAddr, int& channelID);
//return: 1 means success, 0 means failure
 int ReleaseChannel(string IPAddr)
//return: 1 means success, 0 means failure
 int GetDrvCap(char** drvInfo)
//return the number of network interface card
 int StartpCap(int inum) //input the NIC number
//return: 1 means success, 0 means failure
 int RDSysShutdown()
//return: 1 means success, 0 means failure

27
Compare with Wireshark
Audio Monitoring and
Recording System for H.323based Internet Phone
Wireshark
Multiple conference
monitoring
Yes
Yes
Silence suppression
recovering
Yes
Yes
Asynchronization
resolution
Yes
Yes
Only H.323, but system can
be extend
Many
Yes
No
Function
VoIP protocol support
State monitoring
28
Compare with Wireshark (cont.)
Audio Monitoring and
Recording System for H.323based Internet Phone
Wireshark
Raw/Wave file
generation for tracking
Yes
No
Ease for post processing
Yes
No
Present detailed
information
Detail and easy to
understand summary
information
Implicit and timebased handshaking
message
User interface
miscellaneous
Specific design for
recording/monitoring
Design for packet
analyzing
Function
29
Conclusion
30

This research implements a system
that provides H.323 audio phone
analysis and audio recover.

It can deal with silence suppression
problem, asynchronization problem
and multiple H.323 phone at the same
time.
Future work
31

Extend tp SIP or some famous
protocols like skype, skinny(Cisco)

Accommodate various audio codec, eg.
GSM, ADPCM

Monitor and recover the mulitpoint
conference
Demo

Other software




Single phone call
Multiple phone calls

32
OpenH323
Golasoft Packet Player
64 phone calls
Related documents