You are on page 1of 22

Học viện công nghệ bưu chính viễn thông TPHCM

Khoa viễn thông 2

TIỂU LUẬN

Môn: Tổng Đài Điện Tử Số


Đề Tài: Tìm Hiểu MGCP và Megaco

GVHD: Thầy Trần Đình Thuần


SVTH: Nguyễn Chí Công
Phạm Trần Diễm Hằng
Trần Thị Hoài Hân
Nội dung
♦ Khái niệm MGCP/MEGACO.
♦ Kiến trúc MGCP/MEGACO.
♦ các khái niệm cơ bản.
♦ Các lệnh và đáp ứng MGCP/MEGACO.
♦ Bản tin Megaco.
♦ Các quá trình thiết lập cuộc gọi.
♦ Tài liệu tham khảo.
MGCP/Megaco
MGCP proposal by
merging IPDC and
IPDC
SGCP
(Telcordia & Level 3)
MGCP released as
Informational RFC
SGCP MGCP I-RFC 2705 (Oct 99)

Lucent submits MDCP MDCP


to ITU-T SG16 (proposal)
(Nov 1999)

Consensus between IETF and


ITU on Megaco Protocol
(March 99)

IETF
Megaco/H.248 RFC 3015

Standard in 2000
SGW

P
S CA
T
N MGC

Megaco/H.248 protocol

TGW MG
IP phone

PHONE ANALOGUE
Các khái niệm cơ bản
♦ Media gateway controller (MGC)
♦ Media gateway
– Events
– Signals : 3 dạng :
• On/off
• Timeout
• Brief
♦ MGCP
– Endpoint: A Terminal, Gateway, MCU
– Connection : Point-To-Point, Point-To-Multipoint

♦ Megaco
– Termination
– Context
♦ Call
♦ Call flow
Cấu trúc các lệnh và đáp ứng
200 2005 OK
I: 686B
♦ Command
v=0 Head Body
o=- 26731 2005 IN IP4 218.232.96.222
s=-
c=IN IP4 218.232.96.222
t=0 0 cmd tid Endpoint Name version parameters SDPs
m=audio 3456 RTP/AVP 0 8 4 18
a=recvonly
a=ptime:20
CRCX 2005 aaln/1@mta2.icablesystem.com MGCP 1.0 NCS 1.0
C: 0
♦ Respone L: p:20, a:PCMU;PCMA;G.723.1-5.3;G.723;G.729A, s:on, e:o
M: recvonly
Head Body
X: 3
R: hu
S: rt
ReCode tid comment parameters SDPs
Các lệnh MGCP/Megaco
Lệnh_MGCP Huớng Lệnh_Megaco Hướng
CreateConnection MGC  MG Add MGC  MG
DeleteConnection MGC  MG Subtract MGC  MG
CreateConnection+DeleteConnection MGC  MG Move MGC  MG
ModifyConnection MGC  MG Modify MGC  MG
Notify MG  MGC Notify MG  MGC
{None} Audit capability MGC  MG
AuditEndpoint MGC  MG Audit value MGC  MG
AuditConnection MGC  MG {None}
NotificationRequest MGC  MG =Add,Modify,Move MGC  MG
EndpointConfiguration MGC  MG =Add,Modify,Move MGC  MG
RestartInProgress MG  MGC Service change MGC  MG
Đáp ứng
♦ Giá trị 200 đến 299 : chỉ thị thành công.
– Vd: 200 : thực hiện giao dịch bình thường.

♦ Giá trị 400 đến 499 : cảnh báo lỗi nhất thời.
– Vd: 404 : không đủ băng thông thời điểm này.

♦ Giá trị 500 đến 599 : cảnh báo lỗi thường


xuyên.
– Vd: 501 : đầu cuối chưa sẵn sàng.
Cấu trúc bản tin Megaco
Megaco/H.248 message

Header Transaction Transaction ... Transaction


Req or Reply Req or Reply Req or Reply

- Initiated by a
Trans Hdr Action ... Action
transaction
-Protocol version
request
-The originator of - Closed by a
the message Ctx Hdr Ctx transaction reply
Properties Command ... Command

Cmd Hdr Descriptor ... Descriptor


Descriptorname = <someID> {parm=value, …}
MEGACO Transactions
♦ The passing of commands and the responses
– Commands are directed towards terminations within contexts
• ContextID + TerminationIDs
– Multiple commands can be grouped:
• TransactionRequest (TransactionID {
ContextID1 {Command, Command, … Command},
ContextID2 {Command, Command, … Command},
ContextID3 {Command, Command, … Command} } )
• TransactionReply (TransactionID {
ContextID1 {Response, Response, … Response},
ContextID2 {Response, Response, … Response},
ContextID3 {Response, Response, … Response} } )
MEGACO Transactions
IP MGC Port megaco

MGC
MGC to
to MG1:
MG1:
Transaction MEGACO/1
MEGACO/1 [123.123.123.41]:5555
[123.123.123.41]:5555
Action 1 for One Context Transaction
Transaction == 10003
10003 {{
Context
Context == $$ {{
Command Command Command
1 2 3 Add
Add == A4444,
A4444,
Add
Add == $$ {{
Media
Media {{
Action 2 for the Other Context Stream
Stream == 11 {{
Command LocalControl
LocalControl {{
1 …}
…}
Local
Local {{
Action 3 for Another Context v=0
v=0
Command Command c=IN
c=IN IP4
IP4 $$
1 2 m=
m= audio
audio $$ RTP/AVP4
RTP/AVP4
…}
…}
}}}}}
}}}}}
Cuộc gọi từ TGW đến RGW
SS7/CO TGW Call Agent RGW
IAM
Create connection
200 IP address ,port Create connection

Modify connection 200 IP address ,port

200 N R Ringing
ACM
Notify off-hook
ANM
End to end conversation (full duplex connection)
Notify on-hook
Delete connection
REL Delete connection
250
250
REL CMP
N R: Notify Request
Cuộc gọi từ RGW đến TGW
RGW Call Agent TGW SS7/CO
Notify off-hook
N R dial-tone
Notify dialed-digits
Create connection N R: Notify Request
200 IP address port Create connection
200 IP address ,port
Modify connection
IAM
200 ACM
N R Ring-back ANM
N R make
End to end conversation (full duplex connection)
REL
Delete connection
delete connection
250
REL CMP
250
Cuộc gọi giữa 2 thuê bao IP

Route
CA1 server/DB
port 5678
) 5(
Y RQ
TF NT
NT) 1(
N
3( )
RQ X) CR
0( DC CX
CX) 4(
M )) 6(
NT
CR FY
2( X) )
DC
M
7(
endpoint endpoint
Rgw2567 Rgw124
128.96.41.1 IP
IPNetwork
Network 128.96.63.25

Hằng Hân
14083238155
Tài liệu tham khảo
♦ RFC 2705
♦ RFC 3015
♦ Internet
♦ …….
Thank you for your listening!
Media Getway Controller
MGC

MG MG
SGW

WGW

TGW
AGW RGW
BGW
Context
♦ Tập hợp nhiều termination

♦ context ID (32 bit int )


∗ : ALL ; - : NULL; $ : Choosing one

♦ Null context
Context

Context 1 Context 2 Context 3


Transaction T2 T2 T2
Action 1 for One Context
Topology Descriptor

Command Command T1 T3 T1 T3 T1 T3
1 2
1. No topology 2. T1, T2 3. T3, T2
descriptor isolate oneway
Context 4 Context 5 Context 6

T2 T2 T2

Action 3 for Another Context


Command T1 T3 T1 T3
T1 T3
1
4. T2, T3 5. T2, T3 6. T1, T2
oneway bothway bothway
Termination
♦ Là một thực thể logic trong MG
♦ 2 lọai termination :
– physical interface
– RTP stream
♦ Termination ID
♦ Root Termination
Termination
Media
Media Descriptors
Descriptors
Transaction
Modem
Modem Descriptors
Descriptors
MUX
MUX Descriptors
Descriptors
Action 1 for One Context
Events
Events Descriptors
Descriptors
Topology Descriptor
Signals
Signals Descriptors
Descriptors
Command Command Command Digit
1 2 3 Digit Map
Map Descriptors
Descriptors
Audit
Audit Dsp
Dsp (unused
(unused in
in Reply)
Reply)
Service
Service Change
Change Descriptors
Descriptors
----------------------------
----------------------------

Observed
Observed Events
Events Descriptors
Descriptors
Action 3 for Another Context
Event
Event Buffer
Buffer Descriptors
Descriptors
Command Command
1 2 Statistics
Statistics Descriptors
Descriptors
Package
Package Descriptors
Descriptors

You might also like