1
客製化 H.323 協定之智慧型網路電話監控與錄音系統
研究生 : 蔡家瑞指導教授 : 柯開維Date : 2009/07/23
Intelligent monitoring and recording system implementation for Customized H.323-based Internet phone
2
Outline
Motivation and Goal Background Implementation of System
System Environment of Network System Architecture Design flow chart Audio Recording
Conclusion and Future Works DEMO
3
Motivation
VoIP (Voice over Internet Protocol) 是目前網際網路上的一個相當流行且重要的應用 ,VoIP 透過將音訊數位化處理後壓縮編碼,然後藉由封包透過封包交換網路來傳輸到目的端。此種方式可大幅節省通話費用,常見應用於跨國公司的通信以及境外客服中心
也因為 VoIP 的普遍,使用 VoIP 的單位對於能夠還原通話內容以及通話歷程追蹤的音訊錄音系統的需求也與日俱增
VoIP protocolH.323→Customized H.323SIP(Session Initiation Protocol)
4
Goal
本論文的目標是設計一個針對特定客製化 H.323 協定之網路電話的監控與錄音系統
其預計達成目標如下 可還原通話實況 可紀錄通話歷程 可監控點對點通話 可監控通話轉移 可監控會議通話 可同時監控大量通話
5
Background
Standard H.323 H.323 network structure H.323 protocol stack H.323 call flow chart H.323 related protocol
Customized H.323 Customized Signal Customized H.323 Call Flow
6
Standard H.323
H.323 是常見的 VoIP 標準,由 ITU-T 於 1996 年提出,原本是用於區域網路( LAN ) 上的視訊會議,後來被應用於 VoIP 網路電話上。
H.323 定義了一個綜合性的規範,使網路上的終端設備遵循這些規範,得以順利進行溝通,包括語音壓縮格式( G.711 、 G.729 、 G.723.1 )、影像壓縮格式( H.261 、 H.263 )、呼叫訊息( H.225 )、控制訊息( H.245 )、註冊與認證 等( RAS : Registration Admission Status )
Elements of an H.323 System Terminals Multipoint Control Units (MCU) Gateway Gatekeeper
endpoint
7
H.323 Network Structure
PSTN ISDN
Terminal
Gatekeeper Multipoint Control Units
Gateway
Zone
Terminal
Gatekeeper Multipoint Control Units
Gateway
Zone
WAN
LAN LAN
8
H.323 Protocol Stack
Applications (User Interface)
V.150 T.120 T.38H.225.0
Call Signaling
H.245H.225.0RAS
H.245
RTCP
RTP
Audio Codecs
G.711G.723.1G.729
…
Video CodecsH.261H.263H.264
...
UDP UDPTCPTCP/UDPTCP/UDPTCP UDP
IP
Data Applications Media Control Terminal Control and Management
9
Standard H.323 Call Flow Chart
GateKeeper
ARQ(alias address/bandwidth)
2. ACF(call signaling channel address/bandwidth)
5. ARQ 6. ACF
1. ARQ(alias address/bandwidth)
3. Setup(Involve IP address, H.225 port NO. call_type, Country Code)
4. Call Proceeding(Involve , call_ref, Conntry code)
7. Alerting
8. Connect(Involve H.245 port number)
11. Open logical Channel request(Channel Number, media_data)
9. Terminal Capability Set
10. Master Slave Determination
12. Open Logical Channel Ack(Involve RTP&RTCP port number)
RTP & RTCP Stream
13. Release Complete
14. End Session Command
H.245 Control Channel (Logical Channel)
Q.931 H.225 Call Signaling Channel
Phone A
Phone B
10
H.323 Related Protocol
RAS (Connect with Gatekeeper)
H.225/Q.931 (Call Control)
H.245 (Media Control)
RTP (Media Transport)
11
RAS(Registration,Admission and Status)
閘道管理員搜尋( Gatekeeper Discovery ) 端點註冊( Endpoint Registration ) 端點定址( Endpoint Location ) 允入控制( Admission Control ) 頻寬管理( Bandwidth Management ) 狀態查詢、脫離以及閘道資源指示( Status, Disengage and Resource
Indicate )
12
T GKRRQ
RCF
ARQ
(endpoint is registered)
ACF(endpoint may place call)
DRQ
DCF(call has terminated) T Terminal
GK Gatekeeper
Symbol Key:
ARQ:Admission Request ACF:Admission Confirmation
DRQ:Disconnect Request DCF:Disconnect Confirmation
RRQ:Registration Request
RCF:Registration Confirmation
13
H.225/Q.931 H.225/Q.931 call signaling is used to establish a H.323 call. Q.931 header Structure
Name Length(Octets) Note
Protocol Discriminator 1 Always 0x08
Call Reference 1, 2, or 3 The call reference field
Message Type 2 See Appendix
IEs (Information Elements) various see Appendix
14
H.245
H.245 是一個多媒體控制協定,負責溝通協調兩個端點之間的多媒體的處理能力以及開啟邏輯通道讓多媒體資料流 (media stream) 得以傳輸
H.245 的訊息也可以被夾帶在 H.225 的訊息之中來加快通話的前置作業
15
H.245 function definition
Function Note
Master-Slave Determinatio
n
Determines which terminal is the master.
Capability Exchange
Contains information about a terminal's capability.
Open and Close of Logical
Channels
Transport of audio and data information.
Close the H.245 Control
Channel
Indicates the end of the H.245 session.
16
RTP
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
17
RTP Payload Type
RTP PT Name Type Clock 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
18
Customized H.323
What is customized H.323 ? 部份的 H.323 終端設備製造商為了賺取更高的利潤而藉由更改
H.323 的標準 , 使他們的產品差異化 , 藉此提供 Standard H.323所沒有的額外功能或是使自家產品與其它廠牌產品無法相容
What’s difference about standard and customized H.323? Call Signal Call Flow
19
Customized Signal
夾帶於 H.225 訊息的封包之中 取代原本 RAS 與 H.225 負責的部份功能
20
Customized Signal(Cont.)
Length :整個資料封包的長度,單位為 byte 。長度以十六進位表示
0011 1000 : 十六進位為 38 ,每個控制封包都會有的一個 byte 。
A : 如果為 00h 此訊息是由端點傳送至閘道管理員,如果為 11h 此訊息由閘道管理員傳送至端點。
B : 如果 A 是 00h ,那 B則有三種情況: 60h , 7Fh和 80h 。 60h表示是控制訊息,
例如:保留,轉移等…。 7Fh 為撥號數字訊息,如果是 80h 的話就是Hook
訊息。
Data
BA0011 1000Length
251791
Data
BA0011 1000Length
251791 32
21
5-bytes Customized Signal 話機按鍵 訊息Hook鍵壓下 (On-hook) 05 38 00 80 01
Hook鍵彈起 (Off-hook) 05 38 00 80 02
DROP 05 38 00 60 02
Conference 05 38 00 60 03
Transfer 05 38 00 60 04
Hold 05 38 00 60 05
撥號數字 1~0 05 38 00 7F 01~0A
*字號 05 38 00 7F 0B
#字號 05 38 00 7F 0C
8-bytes Customized Signal
描述 訊息
話機於號碼撥完時收到 08 38 11 20 A3 83 04 42
受話端收到呼叫時 08 38 11 20 A2 80 05 40
受話端接受呼叫時由發話端收到 08 38 11 20 A3 80 18 07
22
19-bytes Customized Signal
25-bytes Customized Signal
內線通話 19 38 11 20 AE E3 50 20 53 6F 66 74 50 68 6F 6E 65 31 20 (softphone1)
外線通話 13 38 11 20 AE E3 55 54 53 49 44 45 20 43 41 4C 4C 20 20 (outsidecall)
分機號碼 19 38 11 20 AE E3 1B 5B 00 3B 1D 48 20 XX XX XX XX20 20 A5 E3 20 20 1B 45
通話結束訊號
19 38 11 20 A2 80 06 AD E3 1B 5B 00 3B 00 48 16 5B 02 4B 1B 45 A3 80 2F 0E
23
Customized H.323 Call Flow
The difference between standard and customized H.323 call flow
P2P call flow chart
* Call Transfer flow chart(see Appendix)
* Conference call flow chart(see Appendix)
24
The difference between standard and customized H.323 call flow
25
Register flow Detail
26
P2P Call flow Detail
27
P2P Call flow Detail (Cont.)
28
Implementation of System
System Environment of Network
System Architecture
Design flow chartUser InterfaceLog
Audio Recording
29
System Environment of Network
Intranet
LAN
PDASmart Phone
客製化H.323網路電話
桌上型電腦網路軟體電話
Switch
無線網路電話
客製化H.323網路電話監控與錄音系統Wirless
Network
Gate KeeperGate Keeper
Gate Keeper
30
System ArchitecturePacket
Packet Analyzer
Packet Buffer
Callback function point
RecDrv_h323 library (back end)
Event Handler
Audio Recover GUI
RecApp (front end)
31
Design flow chart
32
User Interface
33
Log
格式 : [Time] [Type] [Description]
34
Audio Recording
RTP 封包處理
音訊還原解碼
35
RTP 封包處理
封包收納一定得依音源來分開收納
不同音源的封包混在一起,解碼後的音訊將會有嚴重的斷續現象
RTP 封包
屬於哪一個端點?
送出的封包儲存區
接收的封包儲存區
是接收還是送出的封包?
RTP 封包處理流程
36
音訊還原解碼 編碼格式為PCMU(G.711 u-law 64k bps)
解碼後的格式為Linear PCM (16bits)
必須先解碼後才能合成 否則無法正確解碼
合成方法為將解碼後的兩個音源一個單位一個單位的相加
送出的封包儲存區
接收的封包儲存區
解碼 解碼
合成
輸出成RAW檔案
音訊還原解碼流程
37
Conclusion
本論文成功實作了一個智慧型客製化 H.323 錄音監控系統
此系統可以分析多種通話型態,且可同時監控 大量通話
本論文也證明了即使協定經過客製化更動,仍然可以還原通話內容及追蹤通話歷程
38
Future Works 前端子系統與後端子系統的徹底切割 前端子系統介面的多樣化 將前端子系統與後端子系統分開在不同的主機上佈署並擴大監控規模
Intranet
企業內部乙太網路
PDASmart Phone
網路電話 桌上型電腦網路+GUI
Switch
無線網路電話
IP RecorderMain Server
+Database
Wirless Network
IP PBX
IP RecorderSlave Server
+Packet Analyzer
IP RecorderSlave Server
+Packet Analyzer
39
DEMO
單通電話測試 點對點通話 通話轉移 會議通話
多通電話混合測試 96 通點對點通話 +16 通通話轉移 +16 通會議通話
40
Q & A