RFC3015 - Megaco Protocol Version 1.0(7)

时间:2005-02-17 来源: 作者: 点击:
interval. Type: double Possible Values: a 32 bit whole number and a 32 bit fraction. Jitter ------ StatisticID: jit (0x0007) Requests the current value of the interarrival jitter on an RTP stream as
  
interval.

Type: double

Possible Values: a 32 bit whole number and a 32 bit fraction.

Jitter
------
StatisticID: jit (0x0007)

Requests the current value of the interarrival jitter on an RTP
stream as defined in IETF RFC1889. Jitter measures the variation in
interarrival time for RTP data packets.

Delay
-----
StatisticID:delay (0x0008)

Requests the current value of packet propagation delay expressed in
timestamp units. Same as average latency.

E.12.5 Procedures

none

E.13 TDM Circuit Package

PackageID: tdmc (0x000d)
Version: 1
Extends: Network Package version 1

This package is used to support TDM circuit terminations.

E.13.1 Properties

Echo Cancellation
-----------------
PropertyID: ec (0x0008)

By default, the telephony gateways always perform echo cancellation.
However, it is necessary, for some calls, to turn off these
operations.

Type: boolean

Possible Values:
"on" (when the echo cancellation is requested) and
"off" (when it is turned off.)
The default is "on".

Defined In: LocalControlDescriptor

Characteristics: read/write

Gain Control
------------
PropertyID: gain (0x000a)

Gain control, or usage of of signal level adaptation and noise level
reduction is used to adapt the level of the signal. However, it is
necessary, for example for modem calls, to turn off this function.

Type: enumeration (integer)

Possible Values:
The gain control parameter may either be specified as "automatic"
(0xffffffff), or as an explicit number of decibels of gain (any other
integer value). The default is provisioned in the MG.

Defined In: LocalControlDescriptor

Characteristics: read/write

E.13.2 Events

none

E.13.3 Signals

none

E.13.4 Statistics

None

E.13.5 Procedures

None

APPENDIX A EXAMPLE CALL FLOWS (INFORMATIVE)

All Megaco implementors must read the normative part of this document
carefully before implementing from it. No one should use the examples
in this section as stand-alone explanations of how to create protocol
messages.

The examples in this section use SDP for encoding of the Local and
Remote stream descriptors. SDP is defined in RFC2327. If there is
any discrepancy between the SDP in the examples, and RFC2327, the
RFCshould be consulted for correctness. Audio profiles used are
those defined in RFC1890, and others registered with IANA. For
example, G.711 A-law is called PCMA in the SDP, and is assigned
profile 0. G.723 is profile 4, and H263 is profile 34. See also

http://www.isi.edu/in-notes/iana/assignments/rtp-parameters

A.1 Residential Gateway to Residential Gateway Call

This example scenario illustrates the use of the elements of the
protocol to set up a Residential Gateway to Residential Gateway call
over an IP-based network. For simplicity, this example assumes that
both Residential Gateways involved in the call are controlled by the
same Media Gateway Controller.

A.1.1 Programming Residential GW Analog Line Terminations for Idle
Behavior

The following illustrates the API invocations from the Media Gateway
Controller and Media Gateways to get the Terminations in this
scenario programmed for idle behavior. Both the originating and
terminating Media Gateways have idle AnalogLine Terminations
programmed to look for call initiation events (i.e.-offhook) by using
the Modify Command with the appropriate parameters. The null Context
is used to indicate that the Terminations are not yet involved in a
Context. The ROOT termination is used to indicate the entire MG
instead of a termination within the MG.

In this example, MG1 has the IP address 124.124.124.222, MG2 is
125.125.125.111, and the MGC is 123.123.123.4. The default Megaco
port is 55555 for all three.

1. An MG registers with an MGC using the ServiceChange command:

MG1 to MGC:
MEGACO/1 [124.124.124.222]
Transaction = 9998 {
Context = - {
ServiceChange = ROOT {Services {
Method=Restart,
ServiceChangeAddress=55555, Profile=ResGW/1}
}

}
}

2. The MGC sends a reply:

MGC to MG1:
MEGACO/1 [123.123.123.4]:55555
Reply = 9998 {
Context = - {ServiceChange = ROOT {
Services {ServiceChangeAddress=55555, Profile=ResGW/1} } }
}

3. The MGC programs a Termination in the NULL context. The
terminationId is A4444, the streamId is 1, the requestId in the
Events descriptor is 2222. The mId is the identifier of the sender
of this message, in this case, it is the IP address and port
[123.123.123.4]:55555. Mode for this stream is set to SendReceive.
"al" is the analog line supervision package.

MGC to MG1:
MEGACO/1 [123.123.123.4]:55555
Transaction = 9999 {
Context = - {
Modify = A4444 {
Media { Stream = 1 {
LocalControl {
Mode = SendReceive,
tdmc/gain=2, ; in dB,
tdmc/ec=on
},
Local {
v=0
c=IN IP4 $
m=audio $ RTP/AVP 0
a=fmtp:PCMU VAD=X-NNVAD ; special voice activity
; detection algorithm
}

}
},
Events = 2222 {al/of}
}
}
}

The dialplan script could have been loaded into the MG previously.
Its function would be to wait for the OffHook, turn on dialtone and
start collecting DTMF digits. However in this example, we use the
digit map, which is put into place after the offhook is detected
(step 5 below).

Note that the embedded EventsDescriptor could have been used to
combine steps 3 and 4 with steps 8 and 9, eliminating steps 6 and 7.

4. The MG1 accepts the Modify with this reply:

MG1 to MGC:
MEGACO/1 [124.124.124.222]:55555
Reply = 9999 {
Context = - {Modify = A4444}
}

5. A similar exchange happens between MG2 and the MGC, resulting in
an idle Termination called A5555.

A.1.2 Collecting Originator Digits and Initiating Termination

The following builds upon the previously shown conditions. It
illustrates the transactions from the Media Gateway Controller and
originating Media Gateway (MG1) to get the originating Termination
(A4444) through the stages of digit collection required to initiate a
connection to the terminating Media Gateway (MG2).

6. MG1 detects an offhook event from User 1 and reports it to the
Media Gateway Controller via the Notify Command.

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

7. And the Notify is acknowledged.

MGC to MG1:
MEGACO/1 [123.123.123.4]:55555
Reply = 10000 {
Context = - {Notify = A4444}
}

8. The MGC Modifies the termination to play dial tone, to look for
digits according to Dialplan0 and to look for the on-hook event now.
MGC to MG1:

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.)}
}
}
}

9. And the Modify is acknowledged.

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

10. Next, digits are accumulated by MG1 as they are dialed by User 1.
Dialtone is stopped upon detection of the first digit. When an
appropriate match is made of collected digits against the currently
programmed Dialplan for A4444, another Notify is sent to the Media
Gateway Controller.

MG1 to MGC:
MEGACO/1 [124.124.124.222]:55555
Transaction = 10002 {
Context = - {
Notify = A4444 {ObservedEvents =2223 {
19990729T22010001:dd/ce{ds="916135551212",Meth=FM}}}
}
}

11. And the Notify is acknowledged.

MGC to MG1:
MEGACO/1 [123.123.123.4]:55555
Reply = 10002 {
Context = - {Notify = A4444}
}

12. The controller then analyses the digits and determines that a
connection needs to be made from MG1 to MG2. Both the TDM termination
A4444, and an RTP termination are added to a new context in MG1. Mode
is ReceiveOnly since Remote descriptor values are not yet specified.
Preferred codecs are in the MGC's preferred order of choice.

MGC to MG1:
MEGACO/1 [123.123.123.4]:55555
Transaction = 10003 {
Context = $ {
Add = A4444,
Add = $ {
Media {
Stream = 1 {
LocalControl {
Mode = ReceiveOnly,

nt/jit=40 ; in ms
},
Local {
v=0
c=IN IP4 $
m=audio $ RTP/AVP 4
a=ptime:30
v=0
c=IN IP4 $
m=audio $ RTP/AVP 0
}
}
}
}
}
}

NOTE - The MGC states its preferred parameter values as a series of
sdp blocks in Local. The MG fills in the Local Descriptor in the
Reply.

13. MG1 acknowledges the new Termination and fills in the Local IP
address and UDP port. It also makes a choice for the codec based on
the MGC preferences in Local. MG1 sets the RTP port to 2222.
MEGACO/1 [124.124.124.222]:55555
Reply = 10003 {
Context = 2000 {
Add = A4444,
Add=A4445{
Media {
Stream = 1 {
Local {
v=0
c=IN IP4 124.124.124.222
m=audio 2222 RTP/AVP 4
a=ptime:30
a=recvonly
} ; RTP profile for G.723 is 4
}
}
}
}
}

14. The MGC will now associate A5555 with a new Context on MG2, and
establish an RTP Stream (i.e, A5556 will be assigned), SendReceive
connection through to the originating user, User 1. The MGC also sets
ring on A5555.

MGC to MG2:
MEGACO/1 [123.123.123.4]:55555
Transaction = 50003 {
Context = $ {
Add = A5555 { Media {
Stream = 1 {
LocalControl {Mode = SendReceive} }},
Events=1234{al/of},
Signals {al/ri}
},
Add = $ {Media {
Stream = 1 {
LocalControl {
Mode = SendReceive,
nt/jit=40 ; in ms
},
Local {
v=0
c=IN IP4 $
m=audio $ RTP/AVP 4

a=ptime:30
},
Remote {
v=0
c=IN IP4 124.124.124.222
m=audio 2222 RTP/AVP 4
a=ptime:30
} ; RTP profile for G.723 is 4
}
}
}
}
}

15. This is acknowledged. The stream port number is different from
the control port number. In this case it is 1111 (in the SDP).

MG2 to MGC:
MEGACO/1 [124.124.124.222]:55555
Reply = 50003 {
Context = 5000 {
Add = A5555,
Add = A5556{
Media {
Stream = 1 {
Local {
v=0
c=IN IP4 125.125.125.111
m=audio 1111 RTP/AVP 4
}
} ; RTP profile for G723 is 4
}
}
}
}

16. The above IPAddr and UDPport need to be given to MG1 now.

MGC to MG1:
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
}
} ; RTP profile for G723 is 4
}
}
}
}

MG1 to MGC:
MEGACO/1 [124.124.124.222]:55555
Reply = 10005 {
Context = 2000 {Modify = A4444, Modify = A4445}
}

17. The two gateways are now connected and User 1 hears the RingBack.
The MG2 now waits until User2 picks up the receiver and then the
two-way call is established.

From MG2 to MGC:

MEGACO/1 [125.125.125.111]:55555
Transaction = 50005 {
Context = 5000 {
Notify = A5555 {ObservedEvents =1234 {
19990729T22020002:al/of}}
}
}

From MGC to MG2:

MEGACO/1 [123.123.123.4]:55555
Reply = 50005 {
Context = - {Notify = A5555}
}

From MGC to MG2:

MEGACO/1 [123.123.123.4]:55555
Transaction = 50006 {
Context = 5000 {
Modify = A5555 {
Events = 1235 {al/on},
Signals { } ; to turn off ringing
}
}

}

From MG2 to MGC:

MEGACO/1 [125.125.125.111]:55555
Reply = 50006 {
Context = 5000 {Modify = A4445}
}

18. Change mode on MG1 to SendReceive, and stop the ringback.

MGC to MG1:
MEGACO/1 [123.123.123.4]:55555
Transaction = 10006 {
Context = 2000 {
Modify = A4445 {
Media {
Stream = 1 {
LocalControl {
Mode=SendReceive
}
}
}
},
Modify = A4444 {
Signals { }
}
}
}

from MG1 to MGC:
MEGACO/1 [124.124.124.222]:55555
Reply = 10006 {
Context = 2000 {Modify = A4445, Modify = A4444}}

19. The MGC decides to Audit the RTP termination on MG2.

MEGACO/1 [123.123.123.4]:55555
Transaction = 50007 {
Context = - {AuditValue = A5556{
Audit{Media, DigitMap, Events, Signals, Packages, Statistics
}}
}
}

20. The MG2 replies.

MEGACO/1 [125.125.125.111]:55555
Reply = 50007 {
Context = - {
AuditValue = A5556 {
Media {
TerminationState { ServiceStates = InService,
Buffer = OFF },
Stream = 1 {
LocalControl { Mode = SendReceive,
nt/jit=40 },
Local {
v=0
c=IN IP4 125.125.125.111
m=audio 1111 RTP/AVP 4
a=ptime:30
},
Remote {
v=0
c=IN IP4 124.124.124.222
m=audio 2222 RTP/AVP 4
a=ptime:30
} } },
Events,
Signals,
DigitMap,
Packages {nt-1, rtp-1},
Statistics { rtp/ps=1200, ; packets sent
nt/os=62300, ; octets sent
rtp/pr=700, ; packets received
nt/or=45100, ; octets received
rtp/pl=0.2, ; % packet loss
rtp/jit=20,
rtp/delay=40 } ; avg latency
}
}
}

21. When the MGC receives an onhook signal from one of the MGs, it
brings down the call. In this example, the user at MG2 hangs up
first.

From MG2 to MGC:

MEGACO/1 [125.125.125.111]:55555
Transaction = 50008 {
Context = 5000 {

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

From MGC to MG2:

MEGACO/1 [123.123.123.4]:55555
Reply = 50008 {
Context = - {Notify = A5555}
}

22. The MGC now sends both MGs a Subtract to take down the call. Only
the subtracts to MG2 are shown here. Each termination has its own set
of statistics that it gathers. An MGC may not need to request both to
be returned. A5555 is a physical termination, and A5556 is an RTP
termination.

From MGC to MG2:

MEGACO/1 [123.123.123.4]:55555
Transaction = 50009 {
Context = 5000 {
Subtract = A5555 {Audit{Statistics}},
Subtract = A5556 {Audit{Statistics}}
}
}

From MG2 to MGC:

MEGACO/1 [125.125.125.111]:55555
Reply = 50009 {
Context = 5000 {
Subtract = A5555 {
Statistics {
nt/os=45123, ; Octets Sent
nt/dur=40 ; in seconds
}
},
Subtract = A5556 {
Statistics {
rtp/ps=1245, ; packets sent
nt/os=62345, ; octets sent
rtp/pr=780, ; packets received
nt/or=45123, ; octets received
rtp/pl=10, ; % packets lost
rtp/jit=27,

rtp/delay=48 ; average latency
}
}
}
}

23. The MGC now sets up both MG1 and MG2 to be ready to detect the
next off-hook event. See step 1. Note that this could be the default
state of a termination in the null context, and if this were the
case, no message need be sent from the MGC to the MG. Once a
termination returns to the null context, it goes back to the default
termination values for that termination.

Authors' Addresses

Fernando Cuervo
Nortel Networks
P.O. Box 3511, Station C
Ottawa, ON K1Y 4H7
Canada
E-mail: cuervo@nortelnetworks.com

Nancy Greene
Nortel Networks
P.O. Box 3511, Station C
Ottawa, ON K1Y 4H7
Canada
E-mail: ngreene@nortelnetworks.com

Christian Huitema*
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052-6399
USA
E-mail: huitema@microsoft.com

* The contribution of Christian Huitema was developed while he was
employed by Telcordia Technologies.

Abdallah Rayhan
Nortel Networks
P.O. Box 3511, Station C
Ottawa, ON K1Y 4H7
Canada
E-mail: arayhan@nortelnetworks.com

Brian Rosen
Marconi
1000 FORE Drive
Warrendale, PA 15086
USA
E-mail: brian.rosen@marconi.com

John Segers
Lucent Technologies, Room HE 303
Dept. Forward Looking Work
P.O. Box 18, 1270 AA Huizen
The Netherlands
E-mail: jsegers@lucent.com

Full Copyright Statement

Copyright (C) The Internet Society (2000). All Rights Reserved.

This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.

The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

Funding for the RFCEditor function is currently provided by the
Internet Society.

------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容