Sunteți pe pagina 1din 33

Megaco/H.

248 Protocol

Sangwon Min
Communication Protocol Engineering Lab.
Dept. of Electronics & Communications Engineering
Kwangwoon University

CPE Lab
(http://cpe.kw.ac.kr)

Sangwon Min
(min@kw.ac.kr)

Contents


Protocol
Architecture
Connection model transaction and context
Command and parameters

Procedure Example
Simplified version
Detail version

CPE Lab
(http://cpe.kw.ac.kr)

2/33

Sangwon Min
(min@kw.ac.kr)

Our Location in Study Flow for VoIP

CPE Lab
(http://cpe.kw.ac.kr)

3/33

Sangwon Min
(min@kw.ac.kr)

Initiation of megaco/H.248
98 fall ~ Each TIPHONE and IETF accept gateway decomposition
98-99 winter
Th first megaco meeting in the IETF
H.GCP is standardizing in the ITU-T
99 sping ~ the megaco/H.248 was off
A novel connection model by the active design team

CPE Lab
(http://cpe.kw.ac.kr)

4/33

Sangwon Min
(min@kw.ac.kr)

Architecture
Similar to the architecture of MGCP ~ MG and MGC
Based on the transaction ~ request and reply
Message description ~ both a text encoding and a binary encoding
Augmented backus-naur form (ABNF) in RFC 2234
Abstract syntax notation no. 1 (ASN 1) in ITU-T X.380


Connection Model
Termination; a logical entity as a source or a sink of a media stream
Physical entity : an analog line or a TDM channel in the trunk
Ephemeral termination ~ transiently exists during of a call or
media flows; an RTP session
Context; an association between a number of terminations for
sharing media between terminations
A termination can exist in only one context at any time

CPE Lab
(http://cpe.kw.ac.kr)

5/33

Sangwon Min
(min@kw.ac.kr)

MEDIA-GATEWAY-CONTROL DEFINITIONS AUTOMATIC TAGS::= BEGIN


MegacoMessage ::= SEQUENCE
{
authHeader
AuthenticationHeader OPTIONAL,
mess
Message
}
AuthenticationHeader ::= SEQUENCE
{
secParmIndex SecurityParmIndex,
seqNum
SequenceNum,
ad
AuthData
}
SecurityParmIndex ::= OCTET STRING(SIZE(4))
SequenceNum
AuthData

::= OCTET STRING(SIZE(4))


::= OCTET STRING (SIZE (12..32))

CPE Lab
(http://cpe.kw.ac.kr)

Message ::= SEQUENCE


{ version
INTEGER(0..99),
-- The version of the protocol defined here is equal to 1.
mId
MId, -- Name/address of message originator
messageBody
CHOICE
{
messageError ErrorDescriptor,
transactions SEQUENCE OF Transaction
},
...
}
MId ::= CHOICE
{
ip4Address
IP4Address,
ip6Address
IP6Address,
domainName
DomainName,
deviceName
PathName,
mtpAddress
OCTET STRING(SIZE(2)),
-- Addressing structure of mtpAddress:
-15
0
-| PC
| NI |
-14 bits 2 bits
...
}

6/33

Sangwon Min
(min@kw.ac.kr)

Termination and Context




Termination
Specific properties according
to the type ~ a set of descriptors
Identified by a TerminationID
Wildcard ~ * (all), $ (choose)
Root termination
Gateway itself as whole

Context
Attribute and topology
Topology; flow of media
Identified by a ContextID
Wildcard, assigned by the MG
Null context with ContextID = Contains all terminations that do not exist in any other context

CPE Lab
(http://cpe.kw.ac.kr)

7/33

Sangwon Min
(min@kw.ac.kr)

Format and Example

Call Waiting
Scenario

CPE Lab
(http://cpe.kw.ac.kr)

8/33

Sangwon Min
(min@kw.ac.kr)

Commands and Descriptors




Commands

Descriptors
Parameters included in a command and a response

CPE Lab
(http://cpe.kw.ac.kr)

9/33

Sangwon Min
(min@kw.ac.kr)

Types of Descriptors (contd)

Media Descriptor

CPE Lab
(http://cpe.kw.ac.kr)

10/33

Sangwon Min
(min@kw.ac.kr)

Types of Descriptors


DigitMap Descriptor

ServiceChange Descriptor
Code
900
901
902
903
904
907
910
913
915
916
917

CPE Lab
(http://cpe.kw.ac.kr)

Commentary
Service restored
Cold boot
Warm boot
MGC-directed change
Termination malfunction
Transmission failure
Media capability failure
Signal capability failure
State loss
Package change
Capability change

11/33

Sangwon Min
(min@kw.ac.kr)

Types of Descriptors - Error Descriptor


400
401
402
4XX
403
410
Protocol-related error 421
441
451
471

Bad request
Protocol error
Unauthorized
Syntax error in transaction
Incorrect identifier
Unknown action or illegal combination of actions
Missing remote descriptor
No such event in this package
Implied add for multiplex failure

500
501
503
5XX
510
517
Network-related error
520
530
581

Internal gateway error


Not implemented
Service unavailable
Insufficient resources
Unsupported or invalid mode
MG does not have a digit map
Temporary network failure
Does not exist

CPE Lab
(http://cpe.kw.ac.kr)

12/33

Sangwon Min
(min@kw.ac.kr)

Types of Descriptors topology Descriptor


Flow direction between terminations in a context
Before commands in an action
T2

T2

T3

T1

T2

T3

T1

1. No Topology Description

2. ( T1, T2 Isolate)

T2

T2

T1

T3

4. ( T2, T3 oneway)

CPE Lab
(http://cpe.kw.ac.kr)

T1

T3

T1

3. ( T3, T2 oneway)

T2

T3

5. ( T2, T3 bothway)

13/33

T1

T3

6. ( T1, T2 bothway)

Sangwon Min
(min@kw.ac.kr)

Command Syntax (contd)

CPE Lab
(http://cpe.kw.ac.kr)

14/33

Sangwon Min
(min@kw.ac.kr)

Command Syntax
TerminationID
[,MediaDescriptor]
[,ModemDescriptor]
[,MuxDescriptor]
[,EventsDescriptor]
[,SignalsDescriptor]
[,DigitMapDescriptor]
[,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor]
[,PackagesDescriptor]
AuditValue ( TerminationID
AuditDescriptor
)

CPE Lab
(http://cpe.kw.ac.kr)

TerminationID
[,MediaDescriptor]
[,ModemDescriptor]
[,MuxDescriptor]
[,EventsDescriptor]
[,SignalsDescriptor]
[,DigitMapDescriptor]
[,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor]
[,PackagesDescriptor]
AuditCapabilities ( TerminationID
AuditDescriptor
)

15/33

Notifiy ( TerminationID
ObservedEventDescriptor
[, ErrorDescriptor]
)
TerminationID
[,ServiceChangeDescriptor]
ServiceChange ( TerminationID
ServiceChangeDescriptor
)

Sangwon Min
(min@kw.ac.kr)

Package


Possible Items for Package


Common properties, event and signal can be grouped into packages
Termination realizes a set of package
To define the detail feature of the protocol for a specific application

Components
PropertyID, EventID, SignalID, StatisticalID and ParameterID and
procedure

Annex E : 13 basic package


Base root package, tone generator/detection package, Analog line
supervision package

CPE Lab
(http://cpe.kw.ac.kr)

16/33

Sangwon Min
(min@kw.ac.kr)

Transport


Reliable transport of transaction between an MGC and MG


Both TCP and UDP/ALF
Port number
2944 for text-encoded operation for either UDP or TCP
2945 for binary-encoded operation for either UDP or TCP

Security
IPsec [RFC 2401 to RFC 2411] in the IP layer
Interim solution : AH header option

CPE Lab
(http://cpe.kw.ac.kr)

17/33

Sangwon Min
(min@kw.ac.kr)

Next Topics


Protocol
Architecture
Connection model transaction and context
Command and parameters

Procedure Example
Simplified version
Detail version

CPE Lab
(http://cpe.kw.ac.kr)

18/33

Sangwon Min
(min@kw.ac.kr)

Example of Call Procedure

CPE Lab
(http://cpe.kw.ac.kr)

19/33

Sangwon Min
(min@kw.ac.kr)

Procedure Simplified Version (1/4)


124.124.124.222

123.123.123.4

MG1

MGC

125.125.125.111
MG2

ServiceChange
(MG registration with MGC)
MEGACO/1 [124.124.124.222]
ROOT
Method = Restart
ServiceChangeAddress=5555
Profile=ResGW/1
Reply
(Transaction accepted)
MEGACO/1 [124.124.124.222]:55555
Reply for the ServiceChange services

Registration procedure
same as MG1
TerminationID = A5555

Modify
(Programs a Termination in the NULL Context)

TerminationID = A4444
StreamID = 1
mode=SendReceive
SDP
Events=2222(al/of)

SDP
v=0
c=IN IPV4 $
m=audio $ RTP/AVP 0
.......

Reply

CPE Lab
(http://cpe.kw.ac.kr)

20/33

Sangwon Min
(min@kw.ac.kr)

Procedure Simplified Version (2/4)


124.124.124.222
User1

123.123.123.4

MG1
OffHook

125.125.125.111

MGC

Event

MG2

User2

Notify
(report event to MGC)

Modify
(modify termination)

Modify=A4444
Events=2223(al/on,dd/ce{DifitMap=Dialplan0}
Signals(cg/dt)
DigitMap=Dialplan0 {0|00|[1-7]xxx|8xxxx ...}
digits dialed
- Digits accumulated
- Find dialplan match
Notify
- Analyze digits
- Determine where to connect
Add
(Add terminations to a new Context )

Context $
Add A4444 (TDM Termination)
Add $ (RTP Termination)
mode =ReceiveOnly
SDP
Reply
(Acknowledges the new Terminations
and fills SDP parameters) )

- New Termination ID and Context ID


- SDP
Local IP address, UDP port, codec

CPE Lab
(http://cpe.kw.ac.kr)

21/33

Sangwon Min
(min@kw.ac.kr)

Procedure Simplified Version (3/4)


124.124.124.222

123.123.123.4

MG1

MGC

User1

125.125.125.111
User2

MG2
Add
(Add terminations to a new Context
and rings on User 2)

Ring

Context $
Add A5555 (TDM Termination)
Event=1234(al/of)
Signals {al/ri)
Add $ (RTP Termination)
Mode =SendReceive
SDP (local)
SDP (remode side)

Ring back

Reply
(Acknowledges the new Terminations
Modify
and fills SDP parameters) )
( Give IPaddress and UDP port of MG2 to MG1)
Modify A4445
Remote
SDP (IPaddr, UDP port)

Event

OffHook

Notify
Modify
(Turn off ringing)
Modify A5555
Event=1235(al/on)
Signals { }

Turn off ringing

Reply
Modify
Modify A4445
Mode=SendReceive
Modify A4444
Signals { }

Audit
(Audit the RTP Termination on MG2)
Reply
RTP stream

CPE Lab
(http://cpe.kw.ac.kr)

22/33

Sangwon Min
(min@kw.ac.kr)

Procedure Simplified Version (4/4)


124.124.124.222

123.123.123.4

MG1

MGC

User1

125.125.125.111
MG2

User2

RTP stream
Event

Notify
(Report OnHook event)

Notify=A5555
ObservedEvent=1235
{19990729T24020002:al/on}

OnHook

Reply
Substract

Substract

(Subtract Terminations to take down the call))

(Subtract Terminations to take down the call))

Subtract = A4444
Audit (Statistics)
Subtract = A4445
Audit (Statistics)

Subtract = A5555
Audit (Statistics)
Subtract = A5556
Audit (Statistics)

Reply

Reply
Reply
A5555
Statistics nt/os=45123
nt/dur=40
A5556
Statistics rtp/ps=1245
nt/os=62345
rtp/pr=780
........

Termination A4444
returns to the null context and is
ready to detet off-hook event

CPE Lab
(http://cpe.kw.ac.kr)

23/33

.
Termination A5555
returns to the null context

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 1/10 )

CPE Lab
(http://cpe.kw.ac.kr)

24/33

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 2/10 )


123.123.123.123.4:55555

124.124.24.222:55555

125.125.125.111:55555

MGCP
MG 1
Hook off

MGCP

MGC

MG 2

Internet
5

MEGACO/1 [123.123.123.4]:55555
Reply = 10000 {
Context = - {Notify = A4444}
7
}
7
8

Same procedure as MG1

MEGACO/1 [124.124.124.222]:55555
Transaction = 10000 {
Context = - {
6
Notify = A4444
{ObservedEvents =2222 {
19990729T22000000:al/of}}
} } }

MEGACO/1 [124.124.124.222]:55555
Reply = 10001 {
Context = - {Modify = A4444}
}

CPE Lab
(http://cpe.kw.ac.kr)

MEGACO/1 [123.123.123.4]:55555
Transaction = 10001 {
Context = - {
Modify = A4444 {
Events = 2223 {
8
al/on, dd/ce {DigitMap=Dialplan0} },
Signals {cg/dt},
DigitMap= Dialplan0{
(0| 00|[1-7]xxx|8xxxxxxx|Fxxxxxxx|Exx|91xxxxxxxxxx|9011x.)}
}}}

25/33

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 3/10 )


123.123.123.123.4:55555

124.124.24.222:55555

125.125.125.111:55555
MEGACO/1 [124.124.124.222]:55555 MGCP
MGCP
MG 2
Transaction = 10002 {
MGC
MG 1
Context = - {
Internet
MGC to MG1:
Notify = A4444 {
MEGACO/1 [123.123.123.4]:55555
10
ObservedEvents =2223 {
19990729T22010001:dd/ce{ds="916135551212",Meth=FM}}} Reply = 10002 {
11 Context = - {Notify = A4444}
}}
}
Push dial
10
9-1-61311
MEGACO/1 [123.123.123.4]:55555
555-1212
Transaction = 10003 {
12
Context = $ {
MEGACO/1 [124.124.124.222]:55555
Reply = 10003 {
Context = 2000 {
Add = A4444,
Add=A4445{
Media {
Stream = 1 {
Local {
v=0
13
c=IN IP4 124.124.124.222
m=audio 2222 RTP/AVP 4
; RTP profile for G.723 is 4
a=recvonly }
}}}}}

CPE Lab
(http://cpe.kw.ac.kr)

13

26/33

Add = A4444,
Add = $ {
Media {
Stream = 1 {
LocalControl {
12
Mode = ReceiveOnly, nt/jit=40 },
Local {
v=0
c=IN IP4 $
m=audio $ RTP/AVP 4
v=0
c=IN IP4 $
m=audio $ RTP/AVP 0 }
}}}}}

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 4/10 )

CPE Lab
(http://cpe.kw.ac.kr)

27/33

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 5/10 )


123.123.123.123.4:55555

124.124.24.222:55555

125.125.125.111:55555
MEGACO/1 [123.123.123.4]:55555
Transaction
= 10005 {
MGCP
MGCP
MG 2
MGC Context = 2000 {
MG 1
Modify = A4444 {
Internet
Signals {cg/rt}},
Modify = A4445 {
16
Media {
Ring-back tone
Stream = 1 {
16
Remote {
17
v=0
MEGACO/1 [124.124.124.222]:55555
c=IN IP4 125.125.125.111
Reply = 10005 {
m=audio 1111 RTP/AVP 4 }
17
Context = 2000 {Modify = A4444, Modify = A4445}
}}}}}
15
}
MEGACO/1 [125.125.125.111]:55555
Transaction = 50005 {
Context = 5000 {
18
Notify = A5555 {ObservedEvents =1234 {
19990729T22020002:al/of}}
}}
MEGACO/1 [123.123.123.4]:55555
Transaction = 50006 {
Context = 5000 {
Modify = A5555 {
20
Events = 1235 {al/on},
Signals { } ; to turn off ringing
}}}

CPE Lab
(http://cpe.kw.ac.kr)

18

Hook off

19
MEGACO/1 [123.123.123.4]:55555
Reply = 50005 {
19 Context = - {Notify = A5555}
}
20
21
MEGACO/1 [125.125.125.111]:55555
Reply = 50006 {
21 Context = 5000 {Modify = A4445}
}

28/33

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 6/10 )

CPE Lab
(http://cpe.kw.ac.kr)

29/33

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 7/10 )

CPE Lab
(http://cpe.kw.ac.kr)

30/33

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 8/10 )

CPE Lab
(http://cpe.kw.ac.kr)

31/33

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 9/10 )

CPE Lab
(http://cpe.kw.ac.kr)

32/33

Sangwon Min
(min@kw.ac.kr)

Detail Procedure ( 10/10)

CPE Lab
(http://cpe.kw.ac.kr)

33/33

Sangwon Min
(min@kw.ac.kr)

S-ar putea să vă placă și