13_megaco_h248
DESCRIPTION
H248 Standards by ITU-TTRANSCRIPT
-
Sangwon Min
CPE Lab
(http://cpe.kw.ac.kr)
Megaco/H.248 Protocol
Sangwon Min
Communication Protocol Engineering Lab.
Dept. of Electronics & Communications Engineering
Kwangwoon University
-
2/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Contents
Protocol Architecture
Connection model transaction and context
Command and parameters
Procedure Example Simplified version
Detail version
-
3/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Our Location in Study Flow for VoIP
-
4/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.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
-
5/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.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
-
6/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.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 ::= OCTET STRING(SIZE(4))
AuthData ::= OCTET STRING (SIZE (12..32))
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
...
}
-
7/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.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
-
8/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Format and Example
Call Waiting
Scenario
-
9/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Commands and Descriptors
Commands
Descriptors Parameters included in a command and a response
-
10/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Types of Descriptors (contd)
Media Descriptor
-
11/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Types of Descriptors
DigitMap Descriptor
ServiceChange Descriptor
900 Service restored901 Cold boot902 Warm boot903 MGC-directed change904 Termination malfunction 907 Transmission failure 910 Media capability failure913 Signal capability failure915 State loss916 Package change917 Capability change
Code Commentary
-
12/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Types of Descriptors - Error Descriptor
400 Bad request401 Protocol error402 Unauthorized403 Syntax error in transaction410 Incorrect identifier421 Unknown action or illegal combination of actions441 Missing remote descriptor 451 No such event in this package471 Implied add for multiplex failure
500 Internal gateway error501 Not implemented503 Service unavailable 510 Insufficient resources517 Unsupported or invalid mode520 MG does not have a digit map530 Temporary network failure581 Does not exist
4XX
Protocol-related error
5XX
Network-related error
-
13/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Types of Descriptors topology Descriptor
Flow direction between terminations in a context
Before commands in an action
T2
T1 T3
T2
T1 T3
T2
T1 T3
T2
T1 T3
T2
T1 T3
T2
T1 T3
1. No Topology Description 2. ( T1, T2 Isolate) 3. ( T3, T2 oneway)
4. ( T2, T3 oneway) 5. ( T2, T3 bothway) 6. ( T1, T2 bothway)
-
14/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Command Syntax (contd)
-
15/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Command Syntax
TerminationID
[,MediaDescriptor]
[,ModemDescriptor]
[,MuxDescriptor]
[,EventsDescriptor]
[,SignalsDescriptor]
[,DigitMapDescriptor]
[,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor]
[,PackagesDescriptor]
AuditValue ( TerminationID
AuditDescriptor
)
TerminationID
[,MediaDescriptor]
[,ModemDescriptor]
[,MuxDescriptor]
[,EventsDescriptor]
[,SignalsDescriptor]
[,DigitMapDescriptor]
[,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor]
[,PackagesDescriptor]
AuditCapabilities ( TerminationID
AuditDescriptor
)
Notifiy ( TerminationIDObservedEventDescriptor
[, ErrorDescriptor]
)
TerminationID
[,ServiceChangeDescriptor]
ServiceChange ( TerminationID
ServiceChangeDescriptor
)
-
16/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.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
-
17/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.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
-
18/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Next Topics
Protocol Architecture
Connection model transaction and context
Command and parameters
Procedure Example Simplified version
Detail version
-
19/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Example of Call Procedure
-
20/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Procedure Simplified Version (1/4)
MG1 MG2MGC
(MG registration with MGC)
ServiceChange
MEGACO/1 [124.124.124.222]ROOT Method = Restart ServiceChangeAddress=5555 Profile=ResGW/1
Reply
TerminationID = A4444 StreamID = 1 mode=SendReceive SDP Events=2222(al/of)
Modify
(Programs a Termination in the NULL Context)
Reply
Registration proceduresame as MG1
TerminationID = A5555
124.124.124.222 123.123.123.4 125.125.125.111
MEGACO/1 [124.124.124.222]:55555Reply for the ServiceChange services
(Transaction accepted)
SDPv=0c=IN IPV4 $m=audio $ RTP/AVP 0.......
-
21/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Procedure Simplified Version (2/4)
MG1 MG2MGCUser1 User2
OffHookNotify
(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 accumulated- Find dialplan match
Notify
- Analyze digits- Determine where to connect
Add
Context $ Add A4444 (TDM Termination) Add $ (RTP Termination) mode =ReceiveOnly SDP
Reply
- New Termination ID and Context ID- SDP Local IP address, UDP port, codec
Event
124.124.124.222 123.123.123.4 125.125.125.111
digits dialed
(Add terminations to a new Context )
(Acknowledges the new Terminationsand fills SDP parameters) )
-
22/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Procedure Simplified Version (3/4)
MG1 MG2MGCUser1 User2
Add
Ring
Reply
Modify( Give IPaddress and UDP port of MG2 to MG1)Ring back
Reply
Modify
(Audit the RTP Termination on MG2)
Modify A5555 Event=1235(al/on) Signals { }
Notify
Modify
Modify A4445 Mode=SendReceiveModify A4444 Signals { }
OffHook
Reply
124.124.124.222 123.123.123.4 125.125.125.111
Context $ Add A5555 (TDM Termination) Event=1234(al/of) Signals {al/ri) Add $ (RTP Termination) Mode =SendReceive SDP (local) SDP (remode side)
(Add terminations to a new Contextand rings on User 2)
(Acknowledges the new Terminationsand fills SDP parameters) )
Modify A4445 Remote SDP (IPaddr, UDP port)
Event
(Turn off ringing)
Turn off ringing
Audit
RTP stream
-
23/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Procedure Simplified Version (4/4)
MG1 MG2MGCUser1 User2
Substract
Reply
Event
OnHook
Notify
Reply
Substract
Reply
Notify=A5555 ObservedEvent=1235 {19990729T24020002:al/on}
(Report OnHook event)
Subtract = A4444 . Audit (Statistics) Subtract = A4445 Audit (Statistics)
(Subtract Terminations to take down the call)) (Subtract Terminations to take down the call))
Subtract = A5555 . Audit (Statistics) Subtract = A5556 Audit (Statistics)
Reply A5555 . Statistics nt/os=45123 nt/dur=40 A5556 Statistics rtp/ps=1245 nt/os=62345 rtp/pr=780 ........
Termination A4444returns to the null context and isready to detet off-hook event
Termination A5555returns to the null context
124.124.124.222 123.123.123.4 125.125.125.111
RTP stream
-
24/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 1/10 )
-
25/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 2/10 )
MGCMG 1
Internet
MGCP MGCP MG 2
124.124.24.222:55555125.125.125.111:55555
123.123.123.123.4:55555
5 Same procedure as MG1
MEGACO/1 [124.124.124.222]:55555 Transaction = 10000 { Context = - { Notify = A4444
{ObservedEvents =2222 {19990729T22000000:al/of}}
} } }
Hook off
MEGACO/1 [123.123.123.4]:55555 Reply = 10000 { Context = - {Notify = A4444} }
MEGACO/1 [123.123.123.4]:55555 Transaction = 10001 { Context = - { Modify = A4444 { Events = 2223 { al/on, dd/ce {DigitMap=Dialplan0} }, Signals {cg/dt}, DigitMap= Dialplan0{ (0| 00|[1-7]xxx|8xxxxxxx|Fxxxxxxx|Exx|91xxxxxxxxxx|9011x.)} } } }
MEGACO/1 [124.124.124.222]:55555 Reply = 10001 { Context = - {Modify = A4444} }
6
6
7
7
8
8
9
9
-
26/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 3/10 )
MGCMG 1
Internet
MGCP MGCP MG 2
124.124.24.222:55555125.125.125.111:55555
123.123.123.123.4:55555
MEGACO/1 [124.124.124.222]:55555 Transaction = 10002 { Context = - { Notify = A4444 {
ObservedEvents =2223 {19990729T22010001:dd/ce{ds="916135551212",Meth=FM}}}
} }
MGC to MG1: MEGACO/1 [123.123.123.4]:55555 Reply = 10002 { Context = - {Notify = A4444} }
11
11
MEGACO/1 [123.123.123.4]:55555 Transaction = 10003 { Context = $ { Add = A4444, Add = $ { Media { Stream = 1 { LocalControl { Mode = ReceiveOnly, nt/jit=40 }, Local {
v=0c=IN IP4 $ m=audio $ RTP/AVP 4 v=0 c=IN IP4 $ m=audio $ RTP/AVP 0 }
} } } } }
10
10
12
12
MEGACO/1 [124.124.124.222]:55555 Reply = 10003 { Context = 2000 { Add = A4444, Add=A4445{ Media { Stream = 1 { Local {
v=0c=IN IP4 124.124.124.222
m=audio 2222 RTP/AVP 4; RTP profile for G.723 is 4
a=recvonly } } } } } }
1313
Push dial
9-1-613-
555-1212
-
27/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 4/10 )
-
28/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 5/10 )
MGCMG 1
Internet
MGCP MGCP MG 2
124.124.24.222:55555125.125.125.111:55555
123.123.123.123.4:55555
MEGACO/1 [124.124.124.222]:55555 Reply = 10005 { Context = 2000 {Modify = A4444, Modify = A4445} } 15
MEGACO/1 [123.123.123.4]:55555 Transaction = 10005 { Context = 2000 { Modify = A4444 { Signals {cg/rt}}, Modify = A4445 { Media { Stream = 1 { Remote {
v=0 c=IN IP4 125.125.125.111 m=audio 1111 RTP/AVP 4 }
} } } } }
Ring-back tone16
16
17
17
MEGACO/1 [125.125.125.111]:55555 Transaction = 50005 { Context = 5000 { Notify = A5555 {ObservedEvents =1234 { 19990729T22020002:al/of}} } }
Hook off
MEGACO/1 [123.123.123.4]:55555 Reply = 50005 { Context = - {Notify = A5555} }
MEGACO/1 [123.123.123.4]:55555 Transaction = 50006 { Context = 5000 { Modify = A5555 { Events = 1235 {al/on}, Signals { } ; to turn off ringing } } }
MEGACO/1 [125.125.125.111]:55555 Reply = 50006 { Context = 5000 {Modify = A4445} }
18
18
19
19
20
20
21
21
-
29/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 6/10 )
-
30/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 7/10 )
-
31/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 8/10 )
-
32/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 9/10 )
-
33/33 Sangwon Min([email protected])
CPE Lab
(http://cpe.kw.ac.kr)
Detail Procedure ( 10/10)