Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modified from the talk by

Similar presentations


Presentation on theme: "Modified from the talk by"— Presentation transcript:

1 Modified from the talk by
MEGACO Protocol Modified from the talk by Wei-Kuo Chiang (江為國) Internet Telecom. Dept. (K200) CCL/ITRI 2019/2/23 1

2 H323, SIP & MGCP, MEGACO PSTN SS7 MGCP GK GW TN GK GW TN PSTN H.323
CA PSTN SG MGCP TGW RGW GK GW TN GK GW TN CO PSTN H.323 RTP MCU TN TN MCU TN TN GW : Gateway GK : Gatekeeper TN : Terminal MCU : Multipoint Control Unit CA : Call Agent TGW : Trunking Gateway RGW : Residential Gateway SG : Singling Gateway 2019/2/23 2

3 H323, SIP & MGCP, MEGACO Concept H.323, SIP Problems MGCP, MEGACO
peer-to-peer internet oriented intelligent endpoint optional GK decentralized Problems maintenance cost & scalability of large systems signaling & media control are coupled interoperability with SS7 MGCP, MEGACO client-server traditional telephony intelligent server “dumb” terminal “stateless” terminal centralized Concept gateway decomposed separate call control from media ports CA, MG, SG interoperability with PSTN 2019/2/23 3

4 MEGACO Features Media Gateway Control Protocol
Change of Connection Model Concept of Context Change of Command Naming Comparison of Commands MEGACO Transaction & Descriptor Call Flows: RGW to RGW 2019/2/23 4

5 MEGACO Connection Model
MGCP MEGACO 1 Endpoint Termination 2 Connection Context 3 Call Agent (CA) Media Gateway Controller (MGC) 2019/2/23 5

6 Text encoding and binary encoding
TransactionRequest Consists of a number of commands Usually requested by an MGC TransacionReply A number of responses Text encoding and binary encoding Augmented Backus-Naur Form, RFC 2234 Abstract Syntax Notation One (ASN.1), ITU-T R X.680 2019/2/23 6

7 MEGACO Connection Model
Termination A logical entity on a MG that sources / sinks media / control streams Two kinds of Termination Physical Interface RTP stream (ephemeral termination) Add/subtraction command CreateConnection and DeleteConnection 2019/2/23 7

8 The properties of a termination
Grouped into a set of descriptors Are included in MEGACO commands Can be changed Wild cards *, all ; $, any Termination ID an arbitrary string assigned by the MG at the time of their creation Root Termination the entire MG itself 2019/2/23 8

9 MEGACO Connection Model
Context An association between a collection of terminations Added to, removed from, moved from one to another A termination can exist in only one context at any time describe the topology (who hears/sees whom) refer to Topology Descriptor Context ID a 32-bit integer chosen by the MG  : ALL ; - : NULL; $ : Choosing one Null Context Containing all terminations that are not associated to any other termination 2019/2/23 9

10 MEGACO Contexts and Termination
2019/2/23 10

11 MEGACO Connection Model
Media Flow Topology of a Context describe the media flow between Terminations within a Context refer to Topology Descriptor Mode of a Termination describe the media flow at the ingress/egress of the media gateway refer to Media Descriptor Stream Descriptor Local Control Descriptor (receive-only, send/receive, …) Context SCN 1 RTP SCN 2 Contexts in GW SCN 1 RTP SCN 1 2019/2/23 11

12 Add 2 Terminations into 1 context
Concept of Context MGCP MEGACO MGC CA MGCP MEGACO MG MG RGW RGW RTP RTP Context IP Endpoint IP Endpoint Termination SCN Channel Termination RTP Stream Connection established after CRCX Add 2 Terminations into 1 context 2019/2/23 12

13 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} } ) TransactionReplay (TransactionID { ContextID1 {Response, Response, … Response}, ContextID2 {Response, Response, … Response}, ContextID3 {Response, Response, … Response} } ) 2019/2/23 13

14 Messages Commands are executed in sequence An interim reply
If a command fails, the subsequent commands are not processed Not the case for optional commands O-”command-name” An interim reply TransactionPending (TransactionID {} ) Messages Concatenate multiple transactions The transactions are treated independently 2019/2/23 14

15 Action 2 for the Other Context Action 3 for Another Context
MEGACO Transactions MGC to MG1: MEGACO/1 [ ]:5555 Transaction = { Context = $ { Add = A4444, Add = $ { Media { Stream = 1 { LocalControl { …} Local { v=0 c=IN IP4 $ m= audio $ RTP/AVP 4 }}}}} Transaction Action 1 for One Context Command 1 Command 2 Command 3 Action 2 for the Other Context Command 1 Action 3 for Another Context Command 1 Command 2 2019/2/23 15

16 Similar Commands in MGCP
MEGACO Command Naming MEGACO Similar Commands in MGCP (1) Add (Termination to Context) (1) CreateConnection (Endpoint) (2) Modify (Termination-descriptor) (2) ModifyConnection (Endpoint) (3) Subtract (Termination) (3) DeleteConnection (Endpoint) (4) Move (Termination)  CreateConnection + DeleteConnection (5) AuditValue (Termination) (4) AuditEndpoint (6) AuditCapability (Termination) (NONE) (7) Notify (Termination) (5) Notify (Endpoint) (8) ServiceChange (Termination) (6) RestartInProgress (Endpoint) (NONE) (7) AuditConnection  Add, Modify, Move (8) NotificationRequest (Endpoint)  Add, Modify, Move (9) EndpointConfiguration (Endpoint-encode) 2019/2/23 16

17 MEGACO Commands Add Modify Subtract Adds a termination to a context
Change the property values of a termination E.g., to issue signals or to detect specific events Subtract Remove a termination from a context The response provides statistics 2019/2/23 17

18 Move AuditValue AuditCapabilities From one context to another
Cannot be moved to the null context AuditValue Retrieve current values for properties, events, and signals AuditCapabilities Retrieve the possible values of properties, signals, and events 2019/2/23 18

19 Notify ServiceChange Inform the MGC of events that have occurred
Accompanied by a RequestID ServiceChange Inform an MGC that a group of termination will be taken out of service or will resume service 2019/2/23 19

20 Descriptors For use with commands and responses
To qualify a given command/response Mandatory, forbidden or optional Descriptorname=<someID>{parm=value, …} Parameters can be fully specified, under specified; the use of $, over specified; a list of acceptable parameter value in order of preference 2019/2/23 20

21 Termination Descriptors
Transaction Media Descriptors Modem Descriptors MUX Descriptors Events Descriptors Signals Descriptors Digit Map Descriptors Audit Dsp (unused in Reply) Service Change Descriptors Observed Events Descriptors Event Buffer Descriptors Statistics Descriptors Package Descriptors Action 1 for One Context Topology Descriptor Command 1 Command 2 Command 3 Action 3 for Another Context Command 1 Command 2 2019/2/23 21

22 Modem Descriptor Multiplex Descriptor
Modem type and associated parameters By default, a termination does not have a modem descriptor They may be applied later in an Add or Modify Multiplex Descriptor Multimedia communications; different media streams on different channel channels The association between media streams and bearers 2019/2/23 22

23 Media Descriptors Describes the various media streams Hierarchical
Termination State Descriptor Stream Descriptor Local Control Descriptor Local Descriptor Remote Descriptor 2019/2/23 23

24 Termination State Descriptor
ServiceStates “test,” “out-of-service,” or “in service” EventBufferControl Off, the termination reports detected events immediately Lockstep, the events will be buffered in a FIFO buffer, time-stamped Examined upon receipt of a new Events Descriptor Or when the control is set off 2019/2/23 24

25 Stream Descriptor A stream is created by specifying a new StreamID on a particular termination in a context A stream is deleted by setting empty Local and Remote Descriptors and by setting ReserveGroup and ReserveValue in LocalControl descriptor to “false” Local Control Descriptor Mode, ReserveGroup, and ReserveValue Properties Mode: sendonly, receiveonly, sendreceive, inactive, and loopback Send and receive directions are w.r.t. the exterior of a context MGC specifies a set of choices for the session ReserveGroup and ReserveValue indicate the resources should be reserved 2019/2/23 25

26 Events Descriptor Signal Descriptor
Local Descriptor and Remote Descriptor Zero or more SDP sessions descriptions It’s permissible to indicate several alternatives for a parameters Events Descriptor A RequestIdentifier and a list of events Off-hook, fax-tone, etc. EventControlBuffer property Signal Descriptor A list of signals that a termination is to apply To just a single stream or to all streams 2019/2/23 26

27 Audit Descriptor Three type of signals
On/off: remains on until it is turned off Timeout Brief: only for a limited time Audit Descriptor A list of information to be returned from an MG to an MGC A list of other descriptors such as Modem, Multiplex, Events, Signals, ObserveEvents, DigitMap, Statistics, Packages, and Eventbuffer 2019/2/23 27

28 Service Change Descriptor
Used only in association with the ServiceChange command The type of service change, ServiceChangeMethod Graceful, the removal of existing terminations w/o interrupting existing connections Forced, an abrupt removal Restart, after a specified delay Disconnected, applied to the entire MG Handoff, from the old MGC; a new MGC is taking over or Failover, from MG to MGC ServiceChangeDelay, a number of seconds SericeChangeReason, Table 6-4, page 279. and a new address 2019/2/23 28

29 DigitMap Descriptor A dialing plan A string or a list of strings
[0-9] and [A-K] x: a wild card .: zero of more repetitions of the immediately proceeding digit A start timer, to start A short timer, when more digits are needed A long timer, to differentiate different routing (0|00|[1-7]xxx|8xxxxxxx|Fxxxxxxx|Exx|91xxxxxxxxxx|9011x.) The timers are applied by default 2019/2/23 29

30 Statistics Descriptor
Statistical information regarding the usage of a termination For the response of a Subtract command In response to the AuditValue command Observed Events Descriptor Mandatory in the Notify command RequestIdentifier Optional time-stamp for each observed event yyyymmddThhmmssss For the response of a ServiceChange command In a response to the AuditValue command Events stored in the event buffer 2019/2/23 30

31 Topology Descriptor Relevant to a context only
How media streams should flow within a context By default, all terminations in a context can send and receive media to and from each other Isolate, oneway and bothway A useful tool for implementing services such as call waiting 2019/2/23 31

32 Action 3 for Another Context
Context Descriptors Context 1 Context 2 Context 3 Transaction T2 T2 T2 Action 1 for One Context Topology Descriptor Command 1 Command 2 T1 T3 T1 T3 T1 T3 1. No topology descriptor 2. T1, T2 isolate 3. T3, T2 oneway Context 4 Context 5 Context 6 T2 T2 T2 Action 3 for Another Context Command 1 T1 T3 T1 T3 T1 T3 4. T2, T3 oneway 5. T2, T3 bothway 6. T1, T2 bothway 2019/2/23 32

33 Packages Groups of properties, signals, events and statistics
For different types of terminations Items are defined and given identifiers Tone Detection Package, DTMF Generator Package, Analog Line Supervision Package, … Package Descriptor Provides the MGC with a list of the packages implemented in a termination 2019/2/23 33

34 MEGAO Command and Response
Command Syntax MEGACO/1 [ ]:3456 Transaction = { Context = - { Modify = * { Events = 7777 {al/of}, DigitMap = Map1 { (0|00|[1-7]xxx|8xxxxxxx|Fxxxxxxx|Exxx|9011x.)} } 2019/2/23 34

35 Response Syntax MEGACO/1 {111.111.333.333]:5678 Reply = 12345 {
context = - { Modify = * } } context = - { Modify = * { Error = 500 {Internal Gateway Error} }}} 2019/2/23 35

36 Call Setup Using MEGACO
pp 2019/2/23 36

37 Based on Detected Events
pp. 295- 2019/2/23 37

38 2019/2/23 38

39 Call Flow: RGW to RGW Internet MGC 1 3 2 4 RGW A4444  A5555 
MGC 1 3 2 4 RGW RGW Internet A4444 A5555 NULL Context NULL Context 1.(3) ServiceChange(ROOT): MG register with MGC 2.(4) Modify(A4444): MGC set Mode(SendReceive) & Events(al/of) 2019/2/23 39

40 Call Flow: RGW to RGW Internet MGC 5 6 RGW A4444  A5555 
MGC 5 6 RGW RGW Internet A4444 A5555 NULL Context NULL Context DTMF detection/ Digit Map Complete Event 5. Notify(A4444): MG report an off hook event(time) 6. Modify(A4444): MGC set Events(al/on, dd/ce, {DigitMap = Dialplan0}) Signals(cg/dt) DigitMap = Dialplan0{…} Call Progress Tone Generator/Dial Tone 2019/2/23 40

41 8. Add(A4444,$:Mode(ReceiveOnly), Local(RTP))
Call Flow: RGW to RGW MGC 7 8 RGW RGW Internet A4444 A4445 A5555 Context ID = 2000 Full Match Digit String 7. Notify(A4444): MG report a Digit Map Complete event(ds= ,Meth=FM) 8. Add(A4444,$:Mode(ReceiveOnly), Local(RTP)) 2019/2/23 41

42 10. Modify(A4444: Signals(cg/rt)); Modify(A4445: Remote(…))
Call Flow: RGW to RGW MGC 10 9 RGW RGW Internet A4444 A5556 A5555 A4445 Context ID = 2000 Context ID = 5003 9. Add(A5555: Mode(SendReceive), Events(al/of), Signals(al/ri), $: Mode(SendReceive), Local(RTP), Remote(...)) 10. Modify(A4444: Signals(cg/rt)); Modify(A4445: Remote(…)) 2019/2/23 42

43 Call Flow: RGW to RGW Internet MGC 12 13 11 RGW A4444 A4445 A5556 
MGC 12 13 11 RGW RGW Internet A4444 A4445 A5556 A5555 Context ID = 2000 Context ID = 5003 11. Notify(A5555: Observed(al/of)) 12. Modify(A5555: Events(al/on), Signals()); to turn off ringing 13. Modify(A4445: Mode(SendReceive)); Modify(A4444: Signals()) 2019/2/23 43

44 PSTN Originating Call to IMS
2019/2/23 44

45 IMS UE termination, CS Domain roaming
2019/2/23 45

46 PSTN termination call 2019/2/23 46

47 PSTN initiated session release
2019/2/23 47

48 Mobile-initiated Hold and Resume of a Mobile-PSTN Session
2019/2/23 48


Download ppt "Modified from the talk by"

Similar presentations


Ads by Google