Top Banner
H.323 網網網網網網網網 網網網網網網網網 The Design and Implementation of Audio M onitoring and Recording System for H.323- based Internet Phone Speaker : 黃黃黃 Advisor : 黃黃黃 黃黃 Data : 2008 07/25 1
32

H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Jan 15, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

H.323 網路電話音訊監控與錄製系統之研製

The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phon

e

Speaker : 黃威穎Advisor : 柯開維 教授Data : 2008 07/251

Page 2: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Outline

Introduction Background Audio Recover System Framework Compare with Wireshark Conclusion Demo

2

Page 3: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

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

Page 4: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Background

H.323 H.323 Related Software H.323 Related Protocol WinPcap How to Build WAVE File

4

Page 5: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

H.323

H.323 is a multimedia conferencing protocol, which includes audio, video, and data conferencing over packet-switched networks.

Element of H.323 system Terminals Gatekeeper Multipoint Control Units (MCU) Gateway5

Page 6: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

H.323 Framework

System

conrtrol

H.225Call

Signaling

R T P / R T C P

( R e a l - t i m e T r a n s p o r t

p r o t o c o l / R e a l - t i m e

T r a n s p o r t C o n t r o l

P r o t o c o l )

I P

U D PA u d i o C o d i n g / D e c o d i n g

( G . 7 1 1 )

H.225RAS

(Registration, Admission, and Status)

H.245Control

T C P

6

Page 7: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

The Flowchart of H.323 Call Caller PC Callee PC Gatekeeper

Gatekeepr Request

Gatekeeper Confirm

Registration Request

Registration Confirm

Gatekeep Request

Gatekeeper Confirm

Registration Request

Registration Confirm

Admission Request

Admission Confirm

Admission Request

Admission Confirm

Setup

Call Proceeding

Alerting

Connect

Master Slave Determination

Terminal Capability Set

Open Logical Channel

RTP or RTCP

RTP or RTCP

.

.

.

RAS

H.225

RAS

H.225

H.245

Voice communication

7

Page 8: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

H.323 Related Software

OpenH323 An open source library for the

development of applications using the H.323 protocol.

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

Page 9: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

H.323 Related Protocol

Q,931/H.225 H.245 RTP

9

Page 10: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Q.931/H.225

Q.931/H.225 call signaling is used to establish a H.323 call.

Q.931 Header StructureName Length(Octets) Note

Protocol Discriminator

1Always 0x08 for ISDN

Call Reference 1,2 or 3The call reference field

Message Type 2 Detail

IEs (Information Elements) various

Detail

10

Page 11: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

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

Page 12: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Important H.245 Message

Message Note Possible reply

Master-Slave Determinatio

n

Determines which terminal is the master.

Acknowledge, Reject, Release

Capability Exchange

Contains information about a terminal's capability.

Acknowledge, Reject, Release

Open and Close of Logical

Channels

Transport of audio and data information. Acknowledge,

Reject, Confirm

Close the H.245 Control

Channel

Indicates the end of the H.245 session.

No other H.245 message

12

Page 13: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

RTP Header Structure

P : Padding Ex : Extension CSRC : contributing source identifiers count M : Mark

CSRC(Contributing source)……….

SSRC(Synchronization source)

SSRC(Synchronization source)

Timestamp

Timestamp

Sequence Number

Payload TypeMCSRC CounterExPVersion

1514131211109876543210

CSRC(Contributing source)……….

SSRC(Synchronization source)

SSRC(Synchronization source)

Timestamp

Timestamp

Sequence Number

Payload TypeMCSRC CounterExPVersion

1514131211109876543210

13

Page 14: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Payload Type

RTP PT

Name TypeClock rate

(Hz)

Audio channel

sReferences

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

Page 15: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

WinPcap An architecture for packet capture and

network analysis for the Win32 platforms.

Application

Wpcap.dll

Packet.dll User Level

Kernel LevelNetgroup Packet Filter Device Driver

Packet

15

Page 16: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

How to Build WAVE File

WAVE file format is a subset of RIFF (Resource Interchange File Format) specification.

16

Page 17: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

WAVE file format

ByteRate = SampleRate * NumChannels * BitsPerSample / 8

BlockAlign = NumChannels * BitsPerSample / 8

Chunk ID

Chunk Size

Format

Subchunk 1 ID

Subchunk 1 Size

Audio Format

Num Channels

Sample Rate

Byte Rate

Block Align

Bits Per Sample

Subchnuk 2 ID

Subchunk 2 Size

Data

Field Size(Byte)

4

2

4

4

4

4

2

2

2

4

4

4

4

Subc

hunk

2 S

ize

RIFF chunk

fmt subchunk

Data subchunk

17

Page 18: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Audio Recover

Silence Suppression Synchronization Problem

Caller Monitor System Callee

Connect

RTP

RTP

RTP

RTP

(Time Instant of packet captured)

18

Page 19: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

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

Page 20: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Silence Suppression Handle

355920 - 355680 = 240((357120 – 355920) / 240) - 1 = 4

20

Page 21: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Synchronization Problem Handle

……

……

Time

Caller Audio Packet

Callee Audio Packet 21 3 4 5 6 7 8 9

1 2 3 4

……

……

Time

Caller Audio Packet

Callee Audio Packet 21 3 4 5 6 7 8 9

1 2 3 40 0 0 0 0

Combine

21

Page 22: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

System Framework

System Environment of Network System Structure The Flow of Packet Handle The Interface between RecDrv_h323.

dll and RecApp.exe

22

Page 23: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

System Environment of Network

Intranet

Ethernet

PDASmart Phone Internet

Phone

Software Internet Phone

Switch

Wireless Internet Phone

Audio Monitoring and Recording System for H.323-base Internet Phone

Wirless Network

Gate KeeperGate Keeper

Gate Keeper

23

Page 24: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

System Structure

Packet

Packet Buffer

Monitor List Protocol Analyzer

RecDrv_h323.dll

Event Handle

H.323 Signal Recorder

Audio Recover

RecApp.exe

24

Page 25: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

The Flow of Packet Handle

Packet Capture

Callback function call

H.323 signal event

Finish

RecDrv_h323.dll(H323 Packet Analysis)

RecApp.exe(EveHandleApp)

UDP TCP

RTP analysisOther H.323 signal

analysis

Does this IP need to be recorded?

TCP or UDP?

Is the port correct?

Is it H.323 signal?

Yes Yes

Yes

Finish

No

No No

H.323 signal handler

Silence Suppression handler

RTP payload decoder and file handler

Silence RTP event

RTP data eventSynchronization Problem handler

Synchronization RTP event

Event Type handler

25

Page 26: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

The Interface between RecDrv_h323.dll and RecApp.exe

Callback function void handleData(int channelID, int evtType, str

uct tm *timeStamp, string sourceAddr, string destinAddr, char* buff, int buffSize, int xtraInfo);

H323 Packet Analysis interface int RDSysStart(callback _callback); //ret

urn: 1 means success, 0 means failure int RDSetChannelParams(int buffSize); //retu

rn: 1 means success, 0 means failure

26

Page 27: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

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) //retu

rn: 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

Page 28: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Compare with Wireshark

FunctionAudio Monitoring and Recording System for H.323-based Internet

Phone

Wireshark

Multiple conference monitoring

Yes Yes

Silence suppression recovering

Yes Yes

Asynchronization resolution Yes Yes

VoIP protocol support Only H.323, but system can be extend

Many

State monitoring Yes No

28

Page 29: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Compare with Wireshark (cont.)

FunctionAudio Monitoring and Recording System for H.323-based 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 time-based

handshaking message

User interface miscellaneous

Specific design for recording/monitoring

Design for packet analyzing

29

Page 30: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Conclusion

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.

30

Page 31: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Future work

Extend tp SIP or some famous protocols like skype, skinny(Cisco)

Accommodate various audio codec, eg. GSM, ADPCM

Monitor and recover the mulitpoint conference

31

Page 32: H.323 網路電話音訊監控 與錄製系統之研製 The Design and Implementation of Audio Monitoring and Recording System for H.323-based Internet Phone Speaker : 黃威穎 Advisor

Demo

Other software OpenH323 Golasoft Packet Player

Single phone call Multiple phone calls

64 phone calls

32