<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

        <!ENTITY rfc2119 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">

        <!ENTITY rfc3550 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3550.xml">

        <!ENTITY rfc3435 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3435.xml">

        <!ENTITY rfc2198 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2198.xml">

        <!ENTITY rfc4566 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4566.xml">

        <!ENTITY rfc4733 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4733.xml">

        <!ENTITY rfc4734 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4734.xml">

        <!ENTITY rfc3261 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3261.xml">
<!--
        <!ENTITY rfc4234 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4234.xml">
-->
        <!ENTITY rfc5234 PUBLIC ""
          "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
<!--
        <!ENTITY rfc2733 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2733.xml">
-->
        <!ENTITY rfc5109 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5109.xml">
<!--
        <!ENTITY rfc2793 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2793.xml">
-->

        <!ENTITY rfc3407 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3407.xml">

        <!ENTITY rfc3660 PUBLIC ""
	  "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3660.xml">

]>


<rfc category="info" ipr="trust200811" docName="draft-stone-mgcp-vbd-04">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>

<front>
        <title abbrev="MGCP VBD package">
                Media Gateway Control Protocol Voiceband Data Package and General Purpose Media Descriptor Parameter Package
        </title>

        <author initials='S.S.' surname="Sharma, Ed." fullname='Sandeep Sharma (Editor)'>
                <organization>CableLabs</organization>
                <address>
                        <postal>
                                <street>858 Coal Creek Circle</street>
                                <city>Louisville</city> <region>Co</region> 
                                <code>80027</code>
                                <country>USA</country>
                        </postal>
                        <email>s.sharma@cablelabs.com</email>
                        <uri>http://www.cablelabs.com/</uri>
                </address>
        </author>

	<author initials='J.S.' surname="Stone" fullname='Joe Stone'>
                <organization>Cisco Systems</organization>
                <address>
                        <postal>
                                <street>2200 East President George Bush Highway</street>
                                <city>Richardson</city> <region>Tx</region> 
                                <code>75082</code>
                                <country>USA</country>
                        </postal>
                        <email>joestone@cisco.com</email>
                        <uri>http://www.cisco.com/</uri>
                </address>
        </author>

	<author initials='R.K.' surname="Kumar" fullname='Rajesh Kumar'>
                <organization>Cisco Systems</organization>
                <address>
                        <postal>
                                <street>771 Alder Drive</street>
                                <city>Milpitas</city> <region>CA</region> 
                                <code>75082</code>
                                <country>USA</country>
                        </postal>
                        <email>rkumar@cisco.com</email>
                        <uri>http://www.cisco.com/</uri>
                </address>
        </author>

	
        <date month="March" year="2009"/>

        <workgroup>                Network                </workgroup>


        <keyword>                MGCP                </keyword>
        <keyword>                VBD        </keyword>

        <abstract>
		<t>
This document defines Media Gateway Control Protocol (MGCP) packages that enable a Call Agent to authorize and monitor the transition of a connection to and from voiceband data (VBD) with or without redundancy and FEC (forward error correction). Although the focus is on VBD, the General-Purpose Media Descriptor Parameter package can be used to authorize other modes of operation, not relevant to VBD, for a particular codec. In addition to the definition of these new packages, this document describes the use of the Media Format Parameter package and Fax package with VBD, redundancy and FEC.
                </t>
        </abstract>
</front>


<middle>
	<section title="Introduction">
		<t>
   The term voiceband data (or simply VBD) refers to the use of a suitable 
   voiceband codec (commonly G.711u or G.711a) for the transport of data 
   payloads using the RTP protocol defined in IETF RFC 3550 [RFC3550]. This 
   document defines Media Gateway Control Protocol (MGCP) [RFC3435] packages 
   that enable a Call Agent to authorize and monitor the transition of a 
   connection to and from VBD with or without redundancy [RFC2198] and FEC 
   (forward error correction) [RFC5109].

   <vspace blankLines='1' />

   There are a number of different VBD procedures. These procedures vary in 
   terms of how the transition to and from VBD is coordinated end to end. Some 
   coordination techniques are mutually negotiated by the two Gateways using the 
   SDP [RFC4566]. These coordination techniques include,

   <vspace blankLines='1' />

     ITU-T Recommendation V.150.1 State Signalling Event (SSE) [V1501]

     ITU-T Recommendation V.152 Payload Type Switching [V152]

   <vspace blankLines='1' />


   Other coordination techniques are not negotiated. For example, the detection 
   of fax, modem and text tones in the direction from the IP to the General Switched Telephone Network (GSTN) 
   MAY result in a switch to VBD or a change (e.g., disable echo cancellation) to 
   the Gateway controlled VBD procedure already in place. The IP-side detected 
   tone serves as both a VBD stimulus and a coordination technique.


   <vspace blankLines='1' />

   IETF RFC 4733 [RFC4733] and RFC 4734 [RFC4734] can be used to convey fax and modem events and tones. 
   As with IP-side tone detection, the telephone event MAY serve as both a VBD 
   stimulus and a coordination technique. Note that while the use of RFC 4733 and RFC 4734 to 
   convey fax and modem events and tones is negotiated, the use of RFC 4733 and RFC 4734 as a 
   Gateway VBD coordination technique (at present) is not.


   <vspace blankLines='1' />

   The Voiceband Data (VBD) package is defined to support all VBD procedures. 
   This document does not address the relative merits of different procedures 
   nor advocate one procedure over another.


   <vspace blankLines='1' />

   We will use the term VBD to refer to Voiceband Data in general. In referring 
   to VBD the package, we will use the term VBD package. We use the term "audio" 
   (with double quotes) to refer to the IANA media type. We use the term audio 
   (without double quotes) to refer to the use of the "audio" media type for 
   (most commonly) voice.

   <vspace blankLines='1' />

   A package is defined for the General-Purpose Media Descriptor Parameter 
   [V152]. In the context of VBD, the General-Purpose Media Descriptor Parameter 
   (GPMD) package is used to authorize the negotiation of a particular codec for 
   use with VBD. The General-Purpose Media Descriptor Parameter is "general" in 
   nature and may be used in applications other than VBD.

   <vspace blankLines='1' />

   The Media Format Parameter (FM) package [RFC3660] describes the use of the 
   standard audio MIME subtype "RED" in conjunction with the "fmtp" 
   LocalConnectionOption in order to authorize the negotiation of redundancy 
   [RFC2198], to identify the levels of redundancy and the media format 
   associated with each redundancy level. This document will further explore the 
   use of the FM package with VBD and redundancy.


   <vspace blankLines='1' />

   This document will explore the use of the FM package with VBD and FEC.


   <vspace blankLines='1' />

   The VBD package is intended to complement the MGCP Fax (FXR) package 
   [RFCABCD]. This document will explore the use of the FXR package with VBD.


   <vspace blankLines='1' />

   The VBD package definition is provided in section 3. The GPMD package 
   definition is provided in section 4. In section 5, we discuss the use of the 
   FM package with VBD and redundancy. In section 6, we discuss the use of the 
   FM package with VBD and FEC. In section 7, we discuss the use of the FXR 
   package with VBD. In section 8, we provide two call flow examples showing how 
   to use the VBD and GPMD packages.  Security considerations are found in
   section 9, followed by the IANA considerations and references. 
			
		</t>
	</section>

	<section anchor="Terminology" title="Terminology">
                <t>
                  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in  <xref target="RFC2119">RFC 2119</xref>.        
	  	</t>
	</section>

	<section title="Voiceband Data Package Definition">
		<t>
   A package is defined for (Voiceband Data) VBD.  The package defines new 
   events as detailed below. 
    

   <vspace blankLines='1' />

   Package Name:        VBD  

   <vspace blankLines='1' />

   Package Version:     0 

			
		</t>

		<section title="Events and Signals">
			<t>
 The following events are defined in support of the above: 

   			<figure title="">
                                <artwork>
<![CDATA[
  ------------------------------------------------------------------- 
 | Symbol |   Definition                    |  R  |  S  |  Duration  | 
 |--------|---------------------------------|-----|-----|------------| 
 | gwvbd  | Gateway Controlled VBD          |  x  |     |            | 
 | nopvbd | No Negotiated Procedure for VBD |  x  |     |            | 
  ------------------------------------------------------------------- 
]]>
                                </artwork>
                        </figure> 

   The definitions of the individual events are provided in the following 
   subsections. 


			</t>

			<section title="Gateway Controlled Voiceband Data">
				<t>
   The "Gateway Controlled Voiceband Data" (or simply "gwvbd") event occurs when 
   a gwvbd procedure has been negotiated and VBD stimulus is detected. The 
   "gwvbd" event may occur when the gwvbd procedure is updated (e.g., upon 
   detecting new stimulus) and when the procedure fails. The "gwvbd" event 
   occurs when the gwvbd procedure ends. The gwvbd procedure MUST be negotiated 
   with the other side by passing and recognizing relevant parameters via the 
   LocalConnectionDescriptor and RemoteConnectionDescriptor. 

   <vspace blankLines='1' />

  
   The following recommendations from MGCP [RFC3435] apply.


   			<figure title="">
                                <artwork>
<![CDATA[
   In this section, we provide a formal description of the protocol
   syntax, following the "Augmented BNF for Syntax Specifications"
   defined in [RFC5234].  The syntax makes use of the core rules defined
   in [RFC5234], Section B.1 (Appendix B), which are not included here.  
   Furthermore, the syntax follows the case-sensitivity rules of 
   [RFC5234], i.e., MGCP is case-insensitive (but SDP is not). It should 
   be noted, that ABNF does not provide for implicit specification of 
   linear white space and MGCP messages MUST thus follow the explicit 
   linear white space rules provided in the grammar below.  However, in 
   line with general robustness principles, implementers are strongly 
   encouraged to tolerate additional linear white space in messages 
   received.
]]>
                                </artwork>
                        </figure> 

   The RequestedEvent is encoded as,


   <vspace blankLines='1' />

     GwVbdReqEvent = "gwvbd"


   <vspace blankLines='1' />

   The ObservedEvent is encoded as,

   			<figure title="">
                                <artwork>
<![CDATA[
  GwVbdObsEvent = GwVbdObsEventStart / GwVbdObsEventUpdate / 
                  GwVbdObsEventStop / GwVbdObsEventFailure

  GwVbdObsEventStart   = "gwvbd(start" Rc [Codec] [Coord] [Dir] ")"
  GwVbdObsEventUpdate  = "gwvbd(update" Rc [Codec] [Dir] ")"
  GwVbdObsEventStop    = "gwvbd(stop" [Rc] [Codec] ")"
  GwVbdObsEventFailure = "gwvbd(failure" [Rc] [Codec] ")"  

  Codec = "," *WSP "codec=" CodecString
  CodecString = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-" / "_" / "." / "/")
  Coord = "," *WSP "coord=" CoordinationTechnique
  CoordinationTechnique = "v152ptsw" / "v150fw"
  Rc = "," *WSP "rc=" ReasonCode
  ReasonCode = 1*(ALPHA / DIGIT / "-" / "_" / "." / "/") 
               ; Refer to the values listed in the tables below.
  Dir = "," *WSP "dir=" Direction  
  Direction = "GstnToIp" / "IpToGstn"
]]>
                                </artwork>
                        </figure> 

   ABNF does not provide for position independent parameters. The "rc", "codec", 
   "coord", and "dir" parameters, if present, MUST appear in the relative order
   shown. 


   <vspace blankLines='1' />

   The "start", "update", "stop" and "failure" ObservedEvent parameters are 
   defined: 
    

   <vspace blankLines='1' />

   * VBD Start (start)

   <vspace blankLines='1' />

  
     The gwvbd procedure was initiated.  The Call Agent SHOULD refrain from 
     issuing media handling instructions to the Gateway until either a 
     "gwvbd(stop)" or "gwvbd(failure)" event is generated. One and only one 
     "gwvbd(stop)" or "gwvbd(failure)" event is generated corresponding to each
     "gwvbd(start)" event.
      

   <vspace blankLines='1' />

   * VBD Update (update)


   <vspace blankLines='1' />

     The gwvbd procedure was updated. The "gwvbd(update)" event MUST only be 
     generated after a "gwvbd(start)" event and before a "gwvbd(stop)" or 
     "gwvbd(failure)" event. 


   <vspace blankLines='1' />

   * VBD Stop (stop)


   <vspace blankLines='1' />

     The gwvbd procedure ended and the Gateway did not detect any errors. Note 
     that this does not necessarily imply a successful fax, modem, or text 
     transmission. It merely indicates that the gwvbd procedure has ended and 
     the procedure itself did not encounter any errors. The "stop" parameter may 
     correspond to a change from VBD to a non-VBD "audio" codec or from VBD to 
     another media type such as "image" or "text". This change may be under Call 
     Agent or Gateway control. For example, the Gateway may coordinate the 
     switch from VBD to "image/t38" through the exchange of SSEs [T38] and [V152]. 
     For an example involving Call Agent control, refer to the "MC" Reason Code. 
     In both examples, the gwvbd procedure ends with the media change. 


   <vspace blankLines='1' />

   * VBD Failure (failure)

   <vspace blankLines='1' />


     The gwvbd procedure ended abnormally. Some kind of problem was encountered 
     in the gwvbd procedure and the procedure ended.
    

   <vspace blankLines='1' />

   When the "gwvbd" event is reported, exactly one of the "start", "update",
   "stop", or "failure" parameters MUST be present and MUST be the first
   parameter supplied.
    

   <vspace blankLines='1' />

   The "rc", "codec", "coord" and "dir" ObservedEvent parameters are defined: 


   <vspace blankLines='1' />

   * Coordination Technique (coord=&lt;CoordinationTechnique&gt;)
  

   <vspace blankLines='1' />

     The technique used to coordinate the transition to and from VBD with the 
     remote endpoint. The Coordination Techniques are summarized in the 
     following table:



   			<figure title="">
                                <artwork>
<![CDATA[
          ------------------------------------------------------
         | CoordinationTechnique | Description                  |
         |-----------------------|------------------------------|
         | v152ptsw              | V.152 Payload Type Switching |
         | v150fw                | V.150.1 SSE                  |
          ------------------------------------------------------
]]>
                                </artwork>
                        </figure> 

     With the "v152ptsw" Coordination Technique, payload type switching [V152] 
     is used to coordinate the transition to and from VBD. 

   <vspace blankLines='1' />


     With the "v150fw" Coordination Technique, state signalling events [V1501] 
     are used to coordinate the transition to and from VBD.


   <vspace blankLines='1' />

     The list of Coordination Techniques may be extended to include values with 
     meaning mutually understood between the Gateway and the Call Agent.


   <vspace blankLines='1' />

   * Reason Code (rc=&lt;ReasonCode&gt;)
  

   <vspace blankLines='1' />

     With the "start" and "update" parameter, the reason for triggering the 
     switch/change to VBD. With the "stop" and "failure" parameter, the reason 
     for triggering the switch from VBD. The Reason Codes in the following 
     table, which are based on the ITU-T FAX/Textphone/Modem Tones Detection 
     package [H2482], ITU-T V.150.1 Amendment 1 [V1501A1] and ITU-T V.152 
     [V152], may be used with the "start" and "update" parameter:

   			<figure title="">
                                <artwork>
<![CDATA[
    -------------------------------------------------------------------
   | ReasonCode | Description                                          |
   |------------|------------------------------------------------------|
   | CNG        | T.30 fax calling                                     |
   | V21flag    | V.21 tone and flags for fax answering                |
   | CIV18      | V.8 CI with V.18 call function                       |
   | XCI        | V.18 XCI                                             |
   | V18txp     | V.18 txp                                             |
   | Belltone   | Bell 103 carrier, high or low frequency channel      |
   |            | (ITU-T Recommendation V.18)                          |
   | Baudot     | Baudot initial tone and character (ITU-T             |
   |            | Recommendation V.18)                                 |
   | Edt        | EDT initial tone and character (ITU-T Recommendation |
   |            | V.18)                                                |
   | CIdata     | V.8 CI with any data call function                   |
   | CT         | V.25 calling tone                                    |
   | CIfax      | V.8 CI with facsimile call function                  |
   | V21tone    | V.21 carrier, high or low frequency channel          |
   | V23tone    | V.23 carrier, high or low frequency channel          |
   | V8bis      | V.8 bis modem handshaking signal                     |
   | ANS        | V.25 ANS, equivalent to T.30 CED from answering      |
   |            | terminal                                             |
   | /ANS       | V.25 ANS with periodic phase reversals               |
   | ANSam      | V.8 ANSam                                            |
   | /ANSam     | V.8 ANSam with periodic phase reversals              |
   | CMFax      | V.8 CM sequence indicating fax call function         |
   | JMFax      | V.8 JM sequence indicating fax call function         |
   | CMData     | V.8 CM sequence indicating unspecified data call     |
   |            | function                                             |
   | JMData     | V.8 JM sequence indicating unspecified data call     |
   |            | function                                             |
   | CMText     | V.8 CM sequence indicating text call function        |
   | JMText     | V.8 JM sequence indicating text call function        |
   | PTSW       | Payload type switch as defined in V.152              |
    ------------------------------------------------------------------- 
]]>
                                </artwork>
                        </figure> 

     For solutions involving textphones using a modulation with interspersed 
     text and speech on the same "channel" such as Baudot and EDT, the Call 
     Agent SHOULD interpret the ReasonCode parameter as part of the 
     "vbd/gwvbd(start)" event in order to differentiate between fax, modem and 
     text. In the case of interspersed text and speech the Call Agent SHOULD 
     remove the notification request for "vbd/gwvbd" upon receiving the 
     "vbd/gwvbd(start)" event in order to avoid large numbers of notifications. 
     For example,


   <vspace blankLines='1' />

       vbd/gwvbd(start, rc=Baudot)


   <vspace blankLines='1' />

     With a ReasonCode of "PTSW", the Call Agent cannot differentiate text from
     fax/modem. In this case, the Call Agent SHOULD adopt a policy which guards
     against large numbers of notifications. We consider several such policies.


   <vspace blankLines='1' />

     The Call Agent MAY remove the notification request for "vbd/gwvbd" upon
     receiving the "vbd/gwvbd(start, rc=PTSW)" event. With this policy, 
     "update", "stop" and "failure" notifications will not be generated with 
     text AND fax/modem.


   <vspace blankLines='1' />

     The Call Agent MAY wait for a subsequent "vbd/gwvbd(update)" event which
     differentiates text from fax/modem. If the ReasonCode indicates 
     interspersed text and speech, the Call Agent SHOULD remove the notification 
     request for "vbd/gwvbd". For example,


   <vspace blankLines='1' />

       vbd/gwvbd(update, rc=Edt)


   <vspace blankLines='1' />

     The Call Agent MAY remove the notification request for "vbd/gwvbd" upon
     receiving a "vbd/gwvbd(stop)" event without having differentiated between
     text and fax/modem.


   <vspace blankLines='1' />

     The Call Agent MAY remove the notification request for "vbd/gwvbd" after
     having received a number of "vbd/gwvbd(start)" events without having
     differentiated between text and fax/modem. The specific number of events 
     after which the notification request is removed is considered an 
     implementation
     detail outside the scope of this specification.


   <vspace blankLines='1' />

     Reason Codes applicable with the "stop" parameter:



   			<figure title="">
                                <artwork>
<![CDATA[
             ------------------------------------------------------
            | ReasonCode | Description                             |
            |------------|-----------------------------------------|
            | SIL        | Bidirectional silence                   |
            | Voice      | Voice signals                           |
            | PTSW       | Payload type switch as defined in V.152 |
            | MC         | Media change                            |
             ------------------------------------------------------
]]>

                                </artwork>
                        </figure> 

     The "MC" Reason Code indicates that the media type has changed from "audio" 
     (to "image", "text", ...) or the "audio" media format has changed from a 
     VBD codec (for a reason other than "PTSW"). For example, the gwvbd
     procedure may be initiated upon detecting CED. Subsequently, the Call Agent 
     controlled T.38 procedure of the MGCP Fax (FXR) package [RFCABCD] may be 
     initiated upon detecting V.21 flags. Upon receipt of a "t38(start)" event, 
     the Call Agent will instruct the Gateway to switch from VBD to T.38 through 
     the use of a ModifyConnection command involving a LocalConnectionOption 
     encoding method of "L:a:image/t38" and/or a RemoteConnectionDescriptor with 
     an "image/t38" media description. This stops the gwvbd procedure. There is 
     no specific interdependency between the VBD package and the FXR package (or 
     any other package). The gwvbd procedure is stopped as a consequence of the 
     media change, not as a direct consequence of the T.38 procedure being 
     initiated. Note that in this situation the "t38(start)" event will be sent 
     before the "gwvbd(stop)" event. The Call Agent MAY choose to infer that the 
     gwvbd procedure has ended upon receiving the "t38(start)" event and disable 
     the notification of the "gwvbd" event. Refer to the example call flow in 
     section 8.2.

   <vspace blankLines='1' />


     Reason Codes applicable with the "failure" parameter:


   			<figure title="">
                                <artwork>
<![CDATA[
              ----------------------------------------------------
             | ReasonCode | Description                           |
             |------------|---------------------------------------|
             | TO         | Indicates that a timeout has occurred |
              ----------------------------------------------------
]]>

                                </artwork>
                        </figure> 

     The list of Reason Codes may be extended to include values with meaning 
     mutually understood between the Gateway and the Call Agent.


   <vspace blankLines='1' />

   * Codec String (codec=&lt;CodecString&gt;)

   <vspace blankLines='1' />


     With the "start" and "update" parameter, the codec parameter describes the MIME type associated with the 
     switch/change to VBD (e.g., "audio/RED", "audio/PCMU", "audio/PCMA", 
     "audio/G726-32", "audio/clearmode", ...). With the "stop" and "failure" 
     parameter, the codec parameter describes the MIME type associated with the switch from VBD (e.g., 
     "audio/G729", "image/t38", "text/t140", "audio/v150mr", ...). These strings 
     should be full MIME types as listed in,

   <vspace blankLines='1' />


       http://www.iana.org/assignments/media-types

   <vspace blankLines='1' />


   * Direction of Stimulus (dir=&lt;Direction&gt;)

   <vspace blankLines='1' />


     With the "start" and "update" parameter, the "dir" parameter describes the direction of the stimulus 
     which resulted in the switch/change to VBD.


   			<figure title="">
                                <artwork>
<![CDATA[
                 -----------------------------------------------
                | Direction | Description                       |
                |-----------|-----------------------------------|
                | GstnToIp  | Stimulus detected from GSTN to IP |
                | IpToGstn  | Stimulus detected from IP to GSTN |
                 -----------------------------------------------
]]>

                                </artwork>
                        </figure> 

   Call Agents and Gateways MUST implement the "start" and "stop" parameters and 
   MAY implement the "update" and "failure" parameters. Call Agents and Gateways
   MAY implement the "coord", "codec", and "dir" parameters. Call Agents MAY and
   Gateways MUST implement the "rc" parameter in conjunction with the "start" 
   and "update" parameters. Call Agents and Gateways MAY implement the "rc"
   parameter in conjunction with the "stop" and "failure" parameters. A Call
   Agent MUST ignore all unknown ObservedEvent parameters including parameters
   which are defined as part of this specification and not implemented.
				</t>
				
				<section title="Gateway Controlled Voiceband Data Examples">
					<t>

   The following examples illustrate the encoding of the "gwvbd(start)" event,
    
			<figure title="">
                                <artwork>
<![CDATA[
        O: vbd/gwvbd(start, rc=ANS) 
        O: vbd/gwvbd(start, rc=ANS, codec=audio/PCMU, coord=v152ptsw) 
        O: vbd/gwvbd(start, rc=PTSW, codec=audio/RED)
]]>

                                </artwork>
                        </figure> 


   The following example illustrates the encoding of the "gwvbd(update)" event,
   
			<figure title="">
                                <artwork>
<![CDATA[
        O: vbd/gwvbd(update, rc=/ANSam, dir=IpToGstn)
]]>

                                </artwork>
                        </figure> 


   The following examples illustrate the encoding of the "gwvbd(stop)" event,
   
			<figure title="">
                                <artwork>
<![CDATA[
        O: vbd/gwvbd(stop) 
        O: vbd/gwvbd(stop, rc=SIL, codec=audio/G729)
        O: vbd/gwvbd(stop, rc=MC, codec=image/t38)
]]>

                                </artwork>
                        </figure> 

   The following examples illustrate the encoding of the "gwvbd(failure)" event,
    
			<figure title="">
                                <artwork>
<![CDATA[
        O: vbd/gwvbd(failure, codec=audio/G729) 
        O: vbd/gwvbd(failure, rc=TO, codec=audio/G729)
]]>

                                </artwork>
                        </figure> 

					</t>
				</section>

			</section>

			<section title="No Negotiated Procedure for Voiceband Data">
				<t>

   The "No Negotiated Procedure for Voiceband Data" (or simply "nopvbd") event 
   occurs when a VBD procedure has not been negotiated and VBD stimulus is 
   detected. The "nopvbd" event may occur when the procedure is updated (e.g., 
   upon detecting new stimulus), when the procedure ends and when the procedure 
   fails.

   <vspace blankLines='1' />

   The nopvbd procedure MAY involve VBD handling including but not limited to 
   adjusting gain and jitter, disabling voice activity detection and DC offset 
   filters. The nopvbd procedure MAY involve switching to another codec. The 
   Call Agent MAY have to issue further commands in response to the "nopvbd" 
   event in order to ensure a successful VBD call.

   <vspace blankLines='1' />
  
   As with the "gwvbd" event, the same recommendations from MGCP [RFC3435] 
   regarding ABNF, general robustness principles and white space apply.

<figure title="">
	<artwork>
<![CDATA[
   The RequestedEvent is encoded as,

     NopVbdReqEvent = "nopvbd"

   The ObservedEvent is encoded as,

     NopVbdObsEvent = NopVbdObsEventStart / NopVbdObsEventUpdate / 
                      NopVbdObsEventStop / NopVbdObsEventFailure

     NopVbdObsEventStart   = "nopvbd(start" Rc [Codec] [Dir] ")"
     NopVbdObsEventUpdate  = "nopvbd(update" Rc [Codec] [Dir] ")"
     NopVbdObsEventStop    = "nopvbd(stop" [Rc] [Codec] ")"
     NopVbdObsEventFailure = "nopvbd(failure" [Rc] [Codec] ")"
]]>
                                </artwork>
                        </figure> 

     The following ABNF notation is common with the "gwvbd" ObservedEvent.
			<figure title="">
                                <artwork>
<![CDATA[
  Codec = "," *WSP "codec=" CodecString
  CodecString = (ALPHA / DIGIT) *(ALPHA / DIGIT / "-" / "_" / "." / "/")
  Rc = "," *WSP "rc=" ReasonCode
  ReasonCode = 1*(ALPHA / DIGIT / "-" / "_" / "." / "/") 
               ; Refer to the values listed in the tables above.
  Dir = "," *WSP "dir=" Direction  
  Direction = "GstnToIp" / "IpToGstn"
]]>

                                </artwork>
                        </figure> 

   ABNF does not provide for position independent parameters. The "rc", "codec",
   and "dir" parameters, if present, MUST appear in the relative order shown. 

   <vspace blankLines='1' />


   The "start", "update", "stop" and "failure" ObservedEvent parameters are 
   defined: 

   <vspace blankLines='1' />

    
   * VBD Start(start)

   <vspace blankLines='1' />


     The nopvbd procedure was initiated. The Call Agent may have to issue 
     further commands in order to ensure a successful VBD call (e.g., switch to 
     another codec). At most one "nopvbd(stop)" or "nopvbd(failure)" event MAY 
     be generated corresponding to each "nopvbd(start)" event. The Call Agent 
     MAY need to infer that the nopvbd procedure has ended.

   <vspace blankLines='1' />

    
   * VBD Update (update)

   <vspace blankLines='1' />


     The nopvbd procedure was updated. The "nopvbd(update)" event MUST only be 
     generated after a "nopvbd(start)" event and before a "nopvbd(stop)" or 
     "nopvbd(failure)" event. 

   <vspace blankLines='1' />


   * VBD Stop (stop)


   <vspace blankLines='1' />

     The nopvbd procedure ended and the Gateway did not detect any errors. Note 
     that this does not necessarily imply a successful fax, modem, or text 
     transmission. It merely indicates that the nopvbd procedure has ended and 
     the procedure itself did not encounter any errors. Refer to the definition 
     of the "stop" parameter from the "gwvbd" event in section 3.1.1 for 
     additional information.


   <vspace blankLines='1' />

   * VBD Failure (failure)

   <vspace blankLines='1' />


     The nopvbd procedure ended abnormally. Some kind of problem was encountered 
     in the nopvbd procedure and the procedure ended.

   <vspace blankLines='1' />


    
   Call Agents and Gateways MUST implement the "start" parameter and MAY 
   implement the "update", "stop" and "failure" parameters. Call Agents MAY and
   Gateways MUST implement the "rc" parameter in conjunction with the "start" 
   and "update" parameters. Call Agents and Gateways MAY implement the "rc"
   parameter in conjunction with the "stop" and "failure" parameters. A Call
   Agent MUST ignore all unknown ObservedEvent parameters including parameters
   which are defined as part of this specification and not implemented.

   <vspace blankLines='1' />

    
   The definitions of the "rc", "codec" and "dir" ObservedEvent parameters are 
   taken from the "gwvbd" event.


   <vspace blankLines='1' />

   As with the "gwvbd" event, the same recommendations regarding interspersed 
   text and speech apply.


					
				</t>

				<section title="No Negotiated Procedure for Voiceband Data Examples">
					<t>
  The following examples illustrate the encoding of the "nopvbd(start)" event,
			<figure title="">
                                <artwork>
<![CDATA[
        O: vbd/nopvbd(start, rc=ANS) 
        O: vbd/nopvbd(start, rc=ANS, codec=audio/PCMU)
]]>

                                </artwork>
                        </figure> 


   The following example illustrates the encoding of the "nopvbd(update)" event,
   
			<figure title="">
                                <artwork>
<![CDATA[
        O: vbd/nopvbd(update, rc=/ANSam, dir=IpToGstn)
]]>

                                </artwork>
                        </figure> 

   The following examples illustrate the encoding of the "nopvbd(stop)" event,
   
			<figure title="">
                                <artwork>
<![CDATA[
        O: vbd/nopvbd(stop) 
        O: vbd/nopvbd(stop, rc=SIL, codec=audio/G729)
        O: vbd/nopvbd(stop, rc=MC, codec=image/t38)
]]>

                                </artwork>
                        </figure> 

   The following examples illustrate the encoding of the "nopvbd(failure)" 
   event,
    
			<figure title="">
                                <artwork>
<![CDATA[
        O: vbd/nopvbd(failure, codec=audio/G729) 
        O: vbd/nopvbd(failure, rc=TO, codec=audio/G729)
]]>

                                </artwork>
                        </figure> 

					</t>
				</section>

			</section>

		</section>

	</section>

	<section title="General-Purpose Media Descriptor Parameter Package Definition">
		<t>

   A package is defined for the General-Purpose Media Descriptor Parameter 
   [V152].  The package defines a new LocalConnectionOption as detailed below. 
    
			<figure title="">
                                <artwork>
<![CDATA[
   Package Name:        GPMD  
   Package Version:     0 
]]>

                                </artwork>
                        </figure> 

		</t>

		<section title="LocalConnectionOptions">
			<t>

   The following LocalConnectionOption is defined in support of the above: 
    
			<figure title="">
                                <artwork>
<![CDATA[
    ------------------------------------------------------ 
   | Symbol |   Definition                                | 
   |--------|---------------------------------------------| 
   | gpmd   | General-Purpose Media Descriptor Parameter  | 
    ------------------------------------------------------ 
]]>

                                </artwork>
                        </figure> 

   The definition of the LocalConnectionOption is provided in the following 
   subsection. 
				
			</t>

			<section title="General-Purpose Media Descriptor Parameter">
				<t>
    The General-Purpose Media Descriptor Parameter LocalConnectionOption is 
    similar to the "gpmd" SDP [RFC4566] attribute defined in ITU-T 
    Recommendation V.152 [V152] and is applicable to all of the same media 
    formats that the corresponding SDP "gpmd" attribute could be used with.

   <vspace blankLines='1' />


    The General-Purpose Media Descriptor Parameter is encoded as the keyword 
    "gpmd" or "o-gpmd", followed by a colon and a quoted string beginning with 
    the media format name (MIME subtype only) followed by a space, followed by 
    the media format parameters associated with that media format,

			<figure title="">
                                <artwork>
<![CDATA[
      gpmd/gpmd:"<format> <parameter list>"
]]>

                                </artwork>
                        </figure> 



   <vspace blankLines='1' />

    For simplicity, we will use the terms "codec" and "media format" 
    interchangeably in the following. Multiple media formats may be indicated by 
    either repeating the "gpmd" LocalConnectionOption multiple times, such as:

			<figure title="">
                                <artwork>
<![CDATA[
      L: a:codec1;codec2, gpmd/gpmd:"codec1 parameterX",
                          gpmd/gpmd:"codec2 parameterY"
]]>

                                </artwork>
                        </figure> 

    or alternatively by having a single "gpmd" keyword followed by a colon, and 
    a semi-colon separated list of quoted strings for each General-Purpose Media
    Descriptor Parameter, as in:

			<figure title="">
                                <artwork>
<![CDATA[
      L: a:codec1;codec2, gpmd/gpmd:"codec1 parameterX";
                                    "codec2 parameterY"
]]>

                                </artwork>
                        </figure> 

    The two formats may be mixed,

			<figure title="">
                                <artwork>
<![CDATA[
      L: a:codec1;codec2;codec3, gpmd/gpmd:"codec1 parameterX", 
                                 gpmd/gpmd:"codec2 parameterY";
                                           "codec3 parameterZ"
]]>

                                </artwork>
                        </figure> 

    The carriage returns above are included for formatting reasons only and are 
    not permissible in a real implementation. This holds true for all of the 
    examples in this document.


   <vspace blankLines='1' />

    If it is possible for the same codec to be requested with and without the 
    "gpmd" parameter, the following could result:

			<figure title="">
                                <artwork>
<![CDATA[
      L: a:codec1;codec1, gpmd/gpmd:"codec1 parameterX"
]]>

                                </artwork>
                        </figure> 

    However, it would not be clear if the "gpmd" parameter was to be applied to 
    the first or the second occurrence of the codec.  The problem is 
    that codec ordering is important (i.e., codecs are listed in preferred
    order), and the above syntax does not provide a way to indicate if 
    "parameterX" is preferred (i.e., associated with the first "codec1") or not 
    (i.e., associated with the second "codec1").  In order to resolve this 
    dilemma, the codec in the "gpmd" media format is followed by a colon and an 
    &lt;order&gt;, where &lt;order&gt; is a number from one to N for occurrences of the same 
    codec in the codec list i.e.:

			<figure title="">
                                <artwork>
<![CDATA[
      L:a:codec1;codec1, gpmd/gpmd:"codec1:2 parameterX"
]]>

                                </artwork>
                        </figure> 


    indicates that "parameterX" is associated with the second instance of 
    "codec1" in the "a:codec1;codec1" list.  If an invalid instance number is 
    supplied (e.g., instance 3 where there are only two instances), then error 
    code 524 - inconsistency in local connection options will be returned. In 
    the absence of an &lt;order&gt;, the first instance is assumed.

   <vspace blankLines='1' />


    Pre-pending "gpmd" with the string "o-" (i.e., "o-gpmd") indicates that the 
    parameter is optional.  In that case, the Gateway may decide not to use the 
    "gpmd" parameter specified, or only use it in part.


   <vspace blankLines='1' />

    If the "gpmd" LocalConnectionOption parameter is not optional (i.e., does 
    not have "o-" in front of it), and the LocalConnectionOption parameter value 
    is either not recognized or not supported, then the associated codec is 
    considered "not supported".


   <vspace blankLines='1' />

    When auditing capabilities, the "gpmd" LocalConnectionOption parameter MUST 
    be returned with a semi-colon separated list of supported formats and/or 
    multiple independent "gpmd" parameters as in:

			<figure title="">
                                <artwork>
<![CDATA[
      A: a:codec1;codec2, gpmd/gpmd:"codec1 parameterX";
                                    "codec2 parameterY"

    or,

      A: a:codec1;codec1, gpmd/gpmd:"codec1 parameterX"
]]>

                                </artwork>
                        </figure> 

    One example uses the General-Purpose Media Descriptor Parameter 
    LocalConnectionOption in conjunction with Gateway controlled Voiceband Data 
    (or simply VBD) using payload type switching [V152]. In the context of VBD, 
    the &lt;format&gt; must be an RTP/AVP payload type. The &lt;parameter list&gt; is a  
    semicolon-separated list of "parameter=value" pairs,

			<figure title="">
                                <artwork>
<![CDATA[
  L: a:codec1, gpmd/gpmd:"codec1 parameterX=ValueA;parameterY=ValueB"
]]>

                                </artwork>
                        </figure> 

    In the example below, G.729 is an audio codec and G.711u is a VBD codec,

			<figure title="">
                                <artwork>
<![CDATA[
      L: a:G729;PCMU, gpmd/gpmd:"PCMU vbd=yes"
]]>

                                </artwork>
                        </figure> 


    The corresponding media description in the SDP as part of the connection 
    request acknowledgment might look like:

			<figure title="">
                                <artwork>
<![CDATA[
      m=audio 12345 RTP/AVP 18 96
      a=rtpmap:96 PCMU/8000
      a=gpmd:96 vbd=yes
]]>

                                </artwork>
                        </figure> 

    If a request is made to audit the capabilities of an endpoint, and the 
    endpoint supports G.711u as both an audio and VBD codec, then the "gpmd" 
    LocalConnectionOption parameter might look like:

			<figure title="">
                                <artwork>
<![CDATA[
      A: a:PCMU, p:10-40, e:on, s:on,
         m:sendonly;recvonly;sendrecv;inactive
      A: a:PCMU, p:10-40, e:on, s:off, 
         m:sendonly;recvonly;sendrecv;inactive,
         gpmd/gpmd:"PCMU vbd=yes"
]]>

                                </artwork>
                        </figure> 

    Given that some parameters, such as e.g., silence suppression, are only 
    compatible with G.711u as an audio codec, then the Gateway MUST return 
    different capability sets corresponding to audio and VBD.


   <vspace blankLines='1' />

    If we combine V.152 and redundancy [RFC2198], an example 
    LocalConnectionOption might look as follows. In the example below, G.729 is 
    an audio codec and G.711u is a VBD codec with a redundancy level of one:

			<figure title="">
                                <artwork>
<![CDATA[
  L: a:G729;RED;PCMU, gpmd/gpmd:"PCMU vbd=yes", fmtp:"RED PCMU/PCMU"
]]>

                                </artwork>
                        </figure> 

    The corresponding media description in the SDP as part of the connection 
    request acknowledgment might look like:

			<figure title="">
                                <artwork>
<![CDATA[
      m=audio 12345 RTP/AVP 18 96 97
      a=rtpmap:96 RED/8000
      a=fmtp:96 97/97
      a=rtpmap:97 PCMU/8000
      a=gpmd:97 vbd=yes
]]>

                                </artwork>
                        </figure> 

    Refer to section 5 for more examples involving V.152 and redundancy. 

				</t>
			</section>
		</section>

	</section>

	<section title="Use of Media Format Parameter Package with VBD and Redundancy">
		<t>

   The MGCP Media Format Parameter (FM) package [RFC3660] in conjunction with the 
   standard audio MIME subtype "RED" may be used by the Call Agent to authorize 
   the negotiation of redundancy [RFC2198], to identify the levels of redundancy 
   and the media format associated with each redundancy level. An example of
   this was demonstrated in section 4.


   <vspace blankLines='1' />

   The FM package states that the "fmtp" LocalConnectionOption MUST be returned 
   when auditing capabilities. Applying this to VBD and redundancy might result 
   in:

			<figure title="">
                                <artwork>
<![CDATA[
      A: a:PCMU, p:10-40, e:on, s:on,
         m:sendonly;recvonly;sendrecv;inactive
      A: a:RED;PCMU, p:10-40, e:on, s:off, 
         m:sendonly;recvonly;sendrecv;inactive,
         gpmd/gpmd:"PCMU vbd=yes",
         fmtp:"RED PCMU/PCMU"

   The FM package defines "instance syntax" in which,

     L:a:codec1;codec1, fmtp:"codec1:2 formatX"
]]>

                                </artwork>
                        </figure> 

   indicates that "formatX" is associated with the second instance of "codec1" 
   in the "a:codec1;codec1" list. The examples in the FM package are limited to 
   the use of the instance syntax in conjunction with the media format. We 
   propose the use of the instance syntax in conjunction with the media format 
   parameters,

			<figure title="">
                                <artwork>
<![CDATA[
     L:a:codec1;codec2;codec3;codec2, fmtp:"codec3 codec2:2/codec2:2"
]]>

                                </artwork>
                        </figure> 


   Let's build on the example of section 4. In the example below, G.729 is an 
   audio codec, G.711u is both an audio codec and a VBD codec with a redundancy 
   level of one:

			<figure title="">
                                <artwork>
<![CDATA[
     L: a:G729;PCMU;RED;PCMU, gpmd/gpmd:"PCMU:2 vbd=yes",
                              fmtp:"RED PCMU:2/PCMU:2"
]]>

                                </artwork>
                        </figure> 

   The corresponding media description in the SDP as part of the connection 
   request acknowledgment might look like:

			<figure title="">
                                <artwork>
<![CDATA[
     m=audio 12345 RTP/AVP 18 0 96 97
     a=rtpmap:96 RED/8000
     a=fmtp:96 97/97
     a=rtpmap:97 PCMU/8000
     a=gpmd:97 vbd=yes
]]>

                                </artwork>
                        </figure> 

   Note that the relative preference of the LocalConnectionOption encoding 
   methods is preserved in the "audio" media formats (i.e., payload types) as 
   part of the media description. In this example, this reflects a preference 
   for V.152 with redundancy versus without. No preference is inferred from the 
   relative order of the different LocalConnectionOptions, namely "a", 
   "gpmd/gpmd" and "fmtp".

   <vspace blankLines='1' />


   A Call Agent can authorize the negotiation of audio codecs and VBD codecs 
   involving different levels of redundancy. In the example below, G.711u is a 
   VBD codec with a redundancy level of two (preferred) or one:

			<figure title="">
                                <artwork>
<![CDATA[
    L: a:G729;RED;RED;PCMU, fmtp:"RED PCMU/PCMU/PCMU", 
                                 fmtp:"RED:2 PCMU/PCMU", 
                                 gpmd/gpmd:"PCMU vbd=yes"
]]>

                                </artwork>
                        </figure> 

   The corresponding media description in the SDP as part of the connection 
   request acknowledgment might look like:
  
			<figure title="">
                                <artwork>
<![CDATA[
     m=audio 12345 RTP/AVP 18 96 97 98
     a=rtpmap:96 RED/8000
     a=fmtp:96 98/98/98
     a=rtpmap:97 RED/8000
     a=fmtp:97 98/98
     a=rtpmap:98 PCMU/8000
     a=gpmd:98 vbd=yes
]]>

                                </artwork>
                        </figure> 

   Redundancy can be applied to both audio codecs and VBD codecs. In the example 
   below, G.729 is an audio codec with a redundancy level of two and G.711u is a 
   VBD codec with a redundancy level of one:

			<figure title="">
                                <artwork>
<![CDATA[
     L: a:RED;G729;RED;PCMU, fmtp:"RED G729/G729/G729", 
                             fmtp:"RED:2 PCMU/PCMU",
                             gpmd/gpmd:"PCMU vbd=yes"
]]>

                                </artwork>
                        </figure> 

   The corresponding media description in the SDP as part of the connection 
   request acknowledgment might look like:
  
			<figure title="">
                                <artwork>
<![CDATA[
     m=audio 12345 RTP/AVP 96 18 97 98
     a=rtpmap:96 RED/8000
     a=fmtp:96 18/18/18
     a=rtpmap:97 RED/8000
     a=fmtp:97 98/98
     a=rtpmap:98 PCMU/8000
     a=gpmd:98 vbd=yes
]]>

                                </artwork>
                        </figure> 

		</t>
	</section>

	<section title="Use of Media Format Parameter Package with VBD and FEC">
		<t>
  A Call Agent may authorize the negotiation of forward error correction (FEC) 
   [RFC5109] with the standard audio MIME subtype "parityfec",
			<figure title="">
                                <artwork>
<![CDATA[
       L: a:PCMU;parityfec
]]>

                                </artwork>
                        </figure> 


   By default, we assume that FEC packets are to be sent as a separate stream.   
   The corresponding media description in the SDP as part of the connection 
   request acknowledgment might look like:

			<figure title="">
                                <artwork>
<![CDATA[
      v=0
      c=IN IP4 192.0.2.0
      m=audio 49170 RTP/AVP 0 96
      a=rtpmap:96 parityfec/8000
      a=fmtp:96 49172 IN IP4 192.0.2.0
]]>

                                </artwork>
                        </figure> 

   If FEC is to be sent as a secondary codec in the redundant codec payload 
   format [RFC2198], we again leverage the MGCP Media Format Parameter (FM)    
   package [RFC3660] in conjunction with the standard audio MIME subtype "RED",

			<figure title="">
                                <artwork>
<![CDATA[
       L: a:G729;RED;PCMU;parityfec, gpmd/gpmd:"PCMU vbd=yes",
                                    fmtp:"RED PCMU/parityfec"

   The corresponding media description might look like:

      v=0
      c=IN IP4 192.0.2.0
      m=audio 49170 RTP/AVP 18 96 97 98
      a=rtpmap:96 RED/8000
      a=fmtp:96 97/98
      a=rtpmap:97 PCMU/8000
      a=gpmd:97 vbd=yes
      a=rtpmap:98 parityfec/8000
]]>

                                </artwork>
                        </figure> 

   The FM package states that the "fmtp" LocalConnectionOption MUST be returned 
   when auditing capabilities. Applying this to VBD, redundancy and FEC might 
   result in:
			<figure title="">
                                <artwork>
<![CDATA[
      A: a:PCMU, p:10-40, e:on, s:on,
         m:sendonly;recvonly;sendrecv;inactive
      A: a:RED;PCMU;parityfec, p:10-40, e:on, s:off, 
         m:sendonly;recvonly;sendrecv;inactive,
         gpmd/gpmd:"PCMU vbd=yes",
         fmtp:"RED PCMU/parityfec"
]]>

                                </artwork>
                        </figure> 


		</t>
	</section>

	<section title="Use of Fax Package with VBD">
		<t>

  The MGCP Fax (FXR) package [RFCABCD] is used by a Call Agent to authorize fax 
   handling including Call Agent controlled T.38 and Gateway procedures such as 
   V.152. With the FXR package, VBD falls into one of two categories: "special 
   fax handling" as part of the Gateway procedure (resulting in the "gwfax" 
   event); or "no special fax handling" as part of the Gateway and Off 
   procedures (resulting in the "nopfax" event). In order for a VBD procedure to 
   fall into the "special fax handling" category, support for it MUST be
   negotiated with the other side by passing and recognizing relevant parameters
   via the LocalConnectionDescriptor and RemoteConnectionDescriptor.

   <vspace blankLines='1' />


   A Gateway controlled VBD procedure such as V.152 MUST fall into the category 
   of Gateway controlled mode involving "special fax handling". The resulting 
   "gwfax" event is what informs the Call Agent to refrain from issuing media 
   handling instructions which could otherwise have a negative impact on the 
   Gateway procedure.

   <vspace blankLines='1' />


   Consider the following example (with shorthand SDP notation):

			<figure title="">
                                <artwork>
<![CDATA[
        CRCX 2000 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
        C: 1 
        M: sendrecv 
        L: a:G729;PCMU, gpmd/gpmd:"PCMU vbd=yes", fxr/fx:t38;gw
        X: 1
        R: fxr/t38, fxr/gwfax, fxr/nopfax 
         
        v=0  
        c=IN IP4 192.0.2.1  
        m=audio 3456 RTP/AVP 18 96
        a=rtpmap:96 PCMU/8000
        a=gpmd:96 vbd=yes


        200 2000 OK
        I: 1

        v=0
        c=IN IP4 192.0.2.2
        m=audio 1296 RTP/AVP 18 96
        a=rtpmap:96 PCMU/8000
        a=gpmd:96 vbd=yes
]]>

                                </artwork>
                        </figure> 

   The RemoteConnectionDescriptor does not indicate support for "image/t38" as a 
   latent capability [RFC3407]. Consequently, the Gateway will not initiate the 
   T.38 strict fax procedure, "t38", upon detecting fax stimulus (i.e., CNG, 
   V.21 flags, ...). However, the two endpoints did successfully negotiate a 
   Gateway controlled VBD procedure (e.g., V.152), therefore, Gateway controlled 
   mode involving "special fax handling" is used. The "gwfax(start)" event will 
   be generated upon detecting VBD (including fax) stimulus.


   <vspace blankLines='1' />

   A Call Agent can express a preference for a Gateway procedure involving 
   "special fax handling" over a T.38 procedure (strict or loose). For example,


   <vspace blankLines='1' />

     L: fxr/fx:gw;t38


   <vspace blankLines='1' />

   and,

   <vspace blankLines='1' />


     L: fxr/fx:gw;t38-loose


   <vspace blankLines='1' />

   However, with the existing syntax of the FXR package, a Call Agent cannot 
   express a preference for one Gateway procedure over another, each with 
   possibly different preferences relative to a T.38 procedure.


   <vspace blankLines='1' />

   The FXR package allows a Gateway to implement additional fax handling
   parameters. We define just such a parameter by qualifying the existing "gw" 
   parameter with a list of one or more MIME types,

			<figure title="">
                                <artwork>
<![CDATA[
     Gateway  = "gw[" mimeType 0*("|" mimeType) "]"
     mimeType = mimeMediaType "/" mimeSubType
     ; mimeMediaType and mimeSubType from,
     ;   http://www.iana.org/assignments/media-types/ 
]]>

                                </artwork>
                        </figure> 


   By qualifying the "gw" parameter with a list of MIME types, we narrow the 
   scope of the Gateway procedure. Consider the following examples in which the 
   Call Agent authorizes the use of a Gateway controlled fax handling procedure:

			<figure title="">
                                <artwork>
<![CDATA[
      - involving "image/t38" (e.g., T.38oUDPTL, T.38oTCP),

         L: a:G729, fxr/fx:gw[image/t38]

     - involving VBD (e.g., PCMU and V.152),

         L: a:G729;PCMU, gpmd/gpmd:"PCMU vbd=yes", fxr/fx:gw[audio/PCMU]

     - involving VBD with redundancy (e.g., PCMU, V.152 and RFC 2198),

     L: a:G729;RED;PCMU, fmtp:"RED PCMU/PCMU", gpmd/gpmd:"PCMU vbd=yes", 
        fxr/fx:gw[audio/RED|audio/PCMU]
]]>

                                </artwork>
                        </figure> 

   Only "special fax handling" involving one of the specified MIME types is 
   authorized. Support for "special fax handling" involving one of the specified 
   MIME types MUST be negotiated or this "instance" of the Gateway procedure is 
   not initiated. Consider the following example in which the Call Agent 
   authorizes the use of a Gateway controlled fax handling procedure:

			<figure title="">
                                <artwork>
<![CDATA[
     - involving "audio/t38" (e.g., T.38oRTP),

         L: a:G729;t38, fxr/fx:gw[audio/t38]
]]>

                                </artwork>
                        </figure> 

   In this example, the call will fail if the Gateway fails to negotiate 
   "audio/t38".

   <vspace blankLines='1' />


   The "fx" LocalConnectionOption MAY now involve multiple instances of the "gw" 
   parameter, each with a different list of MIME types. In order to authorize 
   "no special fax handling", the Call Agent MUST include: the "gw" parameter 
   without a MIME type; or the "off" parameter. The instance of the "gw"
   parameter without a MIME type should appear as the last instance of the "gw" 
   parameter. In the following example, 


   <vspace blankLines='1' />

     L: a:G729;PCMU, fxr/fx:gw[image/t38];gw


   <vspace blankLines='1' />

   the Call Agent authorizes the use of and expresses a preference for,


   <vspace blankLines='1' />

      1. Gateway controlled image/t38 (e.g., T.38oUDPTL)

   <vspace blankLines='1' />

      2. Any other Gateway procedure with "special fax handling"

   <vspace blankLines='1' />

      3. No special fax handling

   <vspace blankLines='1' />


   If present, the "off" parameter should appear as the last parameter. In the 
   following example, 

   <vspace blankLines='1' />


     L: a:G729;PCMU;t38, fxr/fx:gw[audio/t38];off


   <vspace blankLines='1' />

   the Call Agent authorizes the use of and expresses a preference for,


   <vspace blankLines='1' />

      1. Gateway controlled audio/t38 (e.g., T.38oRTP)

   <vspace blankLines='1' />

      2. No special fax handling

   <vspace blankLines='1' />


   We can express relative preferences for different Gateway controlled fax 
   handling procedures, not only with respect to one another, but with respect 
   to T.38 procedures. Consider the following preferential list of fax handling 
   procedures,


   <vspace blankLines='1' />

      1. Gateway controlled audio/t38 (e.g., T.38oRTP)

   <vspace blankLines='1' />

      2. Gateway controlled image/t38 (e.g., T.38oUDPTL)

   <vspace blankLines='1' />

      3. Call Agent Controlled image/t38

   <vspace blankLines='1' />

      4. Gateway controlled VBD with Redundancy (e.g., PCMU, V.152 and RFC 2198)

   <vspace blankLines='1' />

      5. Gateway controlled VBD without Redundancy (e.g., PCMU and V.152)

   <vspace blankLines='1' />

      6. Any other Gateway procedure with "special fax handling"

   <vspace blankLines='1' />

      7. No special fax handling

   <vspace blankLines='1' />


   This would be expressed as,
  
			<figure title="">
                                <artwork>
<![CDATA[
     L: a:G729;PCMU;t38;RED;PCMU, 
        gpmd/gpmd:"PCMU:2 vbd=yes",
        fmtp:"RED PCMU:2/PCMU:2",
        fxr/fx:gw[audio/t38|image/t38];t38;gw[audio/RED|audio/PCMU:2];gw
]]>

                                </artwork>
                        </figure> 

   Note that the bracketed form of the "gw" parameter is NOT defined as part of 
   the VBD package. The bracketed form of the "gw" parameter is defined as an 
   extension to the FXR package. Gateways that implement the bracketed form of 
   the "gw" parameter MUST return this form of the parameter when capabilities 
   are audited as illustrated by the following example:

			<figure title="">
                                <artwork>
<![CDATA[
     A: fxr/fx:t38;t38-loose;gw[audio/t38|image/t38];gw;off
]]>

                                </artwork>
                        </figure> 

  
   Support for the bracketed "gw" parameter MAY be spread across multiple 
   capability lines,

			<figure title="">
                                <artwork>
<![CDATA[
     A: a:RED;PCMU, p:10-40, e:on, s:off, 
        m:sendonly;recvonly;sendrecv;inactive,
        gpmd/gpmd:"PCMU vbd=yes",
          fmtp:"RED PCMU/PCMU",
          fxr/fx:gw[audio/RED|audio/PCMU]
     A: a:t38, fxr/fx:gw[audio/t38]
     A: a:image/t38, fxr/fx:t38;t38-loose;gw[image/t38]
]]>

                                </artwork>
                        </figure> 

   A Call Agent SHOULD only attempt to leverage the bracketed form of the "gw" 
   parameter in conjunction with an endpoint which indicates support for the 
   bracketed syntax as part of its capabilities.


   <vspace blankLines='1' />

   Call Agents and Gateways that do not support this form of the "gw" parameter 
   MUST ignore the bracketed MIME type information consistent with the MGCP 
   grammar [RFC3435].


		</t>
	</section>

	<section title="Call Flow Examples">
		<t>
   In this section, we provide two example call flows. The first one illustrates 
   a modem call under Gateway control using V.152.  The second one illustrates a 
   fax call under Gateway control using V.152 and Call Agent controlled T.38.
		</t>
		<section title="Modem Call with Gateway Controlled VBD">
			<t>
   In this example, both sides support Gateway controlled VBD using V.152 with 
   redundancy. We assume the originating and terminating Call Agents communicate 
   via the Session Initiation Protocol (SIP) [RFC3261]: 
			<figure title="">
                                <artwork>
<![CDATA[
    ------------------------------------------------------------------ 
   | #|     GW-o      |     CA-o      |      CA-t     |      GW-t     | 
   |==|===============|===============|===============|===============| 
   | 1|             <-|CRCX           |               |               | 
   | 2|     200(sdp-o)|->             |               |               | 
   | 3|               |  INVITE(sdp-o)|->             |               | 
   | 4|               |               |    CRCX(sdp-o)|->             | 
   | 5|               |               |             <-|200 (sdp-t)    | 
   | 6|               |             <-|200(sdp-t)     |               | 
   | 7|             <-|MDCX(sdp-t)    |               |               | 
   | 8|            200|->             |               |               | 
   |--|---------------|---------------|---------------|---------------| 
   | 9|               |               |               |<- ANS/T.30 CED| 
   |10|               |               |           <- NTFY(gwvbd start)| 
   |11|               |               |            200|->             | 
   |12|NTFY(gwvbd start) ->           |               |               |
   |13|             <-|200            |               |               | 
   |--|---------------|---------------|---------------|---------------| 
   |14|               |               |               | (modem ends)  | 
   |15|               |               |           <- NTFY(gwvbd stop) | 
   |16|               |               |            200|->             | 
   |17|NTFY(gwvbd stop) ->            |               |               |
   |18|             <-|200            |               |               | 
    ------------------------------------------------------------------ 
]]>

                                </artwork>
                        </figure> 

   Step 1: 

   <vspace blankLines='1' />

    
   The Call Agent issues a CreateConnection command to the Gateway instructing 
   it to use G.729 media encoding and to notify it of the "gwvbd" and "nopvbd" 
   events. The Call Agent authorizes the negotiation of G.711u as a VBD codec 
   with a redundancy level of one:
    
			<figure title="">
                                <artwork>
<![CDATA[
      CRCX 1000 ds/ds1-1/1@gw-o.whatever.net MGCP 1.0  
      C: 1 
      L: a:G729;RED;PCMU, gpmd/gpmd:"PCMU vbd=yes", fmtp:"RED PCMU/PCMU"
      M: recvonly 
      R: vbd/gwvbd, vbd/nopvbd 
      X: 1 
      Q: process, loop
]]>

                                </artwork>
                        </figure> 

    
   Step 2: 

   <vspace blankLines='1' />

    
   The Gateway acknowledges the command and includes SDP with codec 
   information as well as V.152 and redundancy information: 
    
			<figure title="">
                                <artwork>
<![CDATA[
        200 1000 OK 
        I:1 
         
        v=0  
        o=- 25678 753849 IN IP4 192.0.2.1  
        s=-  
        c=IN IP4 192.0.2.1  
        t=0 0  
        m=audio 3456 RTP/AVP 18 96 97
        a=rtpmap:96 RED/8000
        a=fmtp:96 97/97
        a=rtpmap:97 PCMU/8000
        a=gpmd:97 vbd=yes
]]>

                                </artwork>
                        </figure> 

   Step 3: 
    

   <vspace blankLines='1' />

   The originating Call Agent sends a SIP INVITE message with the SDP to the 
   terminating Call Agent. 
    

   <vspace blankLines='1' />

   Step 4: 
    

   <vspace blankLines='1' />

   The terminating Call Agent issues a CreateConnection command to the 
   terminating Gateway instructing it to use G.729 media encoding and to notify 
   it of the "gwvbd" and "nopvbd" events. Again, the Call Agent authorizes the 
   negotiation of G.711u as a VBD codec with a redundancy level of one:
    
			<figure title="">
                                <artwork>
<![CDATA[
      CRCX 2000 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
      C: 2 
      L: a:G729;RED;PCMU, gpmd/gpmd:"PCMU vbd=yes", fmtp:"RED PCMU/PCMU"
      M: sendrecv 
      R: vbd/gwvbd, vbd/nopvbd 
      X: 20 
      Q: process, loop
         
      v=0  
      o=- 25678 753849 IN IP4 192.0.2.1  
      s=-  
      c=IN IP4 192.0.2.1  
      t=0 0  
      m=audio 3456 RTP/AVP 18 96 97
      a=rtpmap:96 RED/8000
      a=fmtp:96 97/97
      a=rtpmap:97 PCMU/8000
      a=gpmd:97 vbd=yes
]]>

                                </artwork>
                        </figure> 

   Step 5: 

   <vspace blankLines='1' />

    
   The terminating Gateway supports V.152 and redundancy, and the 
   RemoteConnectionDescriptor included indicates that the other side supports 
   V.152 and redundancy.  The terminating Gateway sends back a success response 
   with its SDP which also includes V.152 and redundancy information: 
   
			<figure title="">
                                <artwork>
<![CDATA[
        200 2000 OK 
        I:2 
         
        v=0  
        o=- 25678 753849 IN IP4 192.0.2.2 
        s=-  
        c=IN IP4 192.0.2.2 
        t=0 0  
        m=audio 1296 RTP/AVP 18 96 97  
        a=rtpmap:96 RED/8000
        a=fmtp:96 97/97
        a=rtpmap:97 PCMU/8000
        a=gpmd:97 vbd=yes
]]>

                                </artwork>
                        </figure> 

   Step 6: 
    

   <vspace blankLines='1' />

   The terminating Call Agent sends back a SIP 200 OK response to the 
   originating Call Agent, which in turn sends a SIP ACK (not shown).  
    

   <vspace blankLines='1' />

   Step 7: 

   <vspace blankLines='1' />

    
   The originating Call Agent in turns sends a ModifyConnection command to the 
   originating Gateway: 
    
			<figure title="">
                                <artwork>
<![CDATA[
        MDCX 1001 ds/ds1-1/1@gw-o.whatever.net MGCP 1.0  
        C: 1 
        I: 1 
        M: sendrecv 
         
        v=0  
        o=- 25678 753849 IN IP4 192.0.2.2 
        s=-  
        c=IN IP4 192.0.2.2 
        t=0 0  
        m=audio 1296 RTP/AVP 18 96 97  
        a=rtpmap:96 RED/8000
        a=fmtp:96 97/97
        a=rtpmap:97 PCMU/8000
        a=gpmd:97 vbd=yes
]]>

                                </artwork>
                        </figure> 

   Since the RemoteConnectionDescriptor indicates the other side supports V.152 
   and redundancy, the Gateway will in fact be able to use the Gateway 
   controlled VBD procedure with redundancy. Had there not been any support for 
   V.152 in the RemoteConnectionDescriptor, then this command would still have 
   succeeded, however there would be no negotiated procedure for VBD handling.  

   <vspace blankLines='1' />

    
   Step 8: 

   <vspace blankLines='1' />

    
   The Gateway acknowledges the command.  At this point, a call is established 
   using G.729 encoding, and if a VBD call is detected, the Gateway controlled 
   VBD procedure will be initiated. 
    

   <vspace blankLines='1' />

   Step 9-10: 
    

   <vspace blankLines='1' />

   A modem call now occurs.  The terminating Gateway detects a T.30 CED tone 
   (a.k.a. V.25 ANS) in the GSTN to IP direction and begins transmitting RTP 
   packets with the negotiated redundant VBD payload type (96).
    

   <vspace blankLines='1' />

   The "gwvbd(start)" event occurs and is notified to the Call Agent: 
			<figure title="">
                                <artwork>
<![CDATA[
        NTFY 2500 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
        O: vbd/gwvbd(start, rc=ANS, codec=audio/RED, coord=v152ptsw) 
        X: 20
]]>

                                </artwork>
                        </figure> 

   Step 11: 
    

   <vspace blankLines='1' />

   The Call Agent acknowledges the Notify command: 

   <vspace blankLines='1' />

    
        200 2500 OK 

   <vspace blankLines='1' />


   Step 12: 

   <vspace blankLines='1' />

     
   Upon receiving a RTP packet with the redundant VBD payload type (96), the 
   originating Gateway begins transmitting RTP packets with the redundant VBD 
   payload type.

   <vspace blankLines='1' />


   The "gwvbd(start)" event occurs and is notified to the Call Agent: 
			<figure title="">
                                <artwork>
<![CDATA[
        NTFY 1500 ds/ds1-1/1@gw-o.whatever.net MGCP 1.0  
        O: vbd/gwvbd(start, rc=PTSW, codec=audio/RED)
        X: 1
]]>

                                </artwork>
                        </figure> 

    
   Step 13:

   <vspace blankLines='1' />


   The Call Agent acknowledges the Notify command: 

   <vspace blankLines='1' />

    
        200 1500 OK 

   <vspace blankLines='1' />


   Step 14 - 15: 

   <vspace blankLines='1' />

    
   The modem call ends. The terminating Gateway detects bi-directional silence 
   and begins transmitting RTP packets with the negotiated audio payload type
   (18).

   <vspace blankLines='1' />


   The "gwvbd(stop)" event occurs and is notified to the Call Agent: 
			<figure title="">
                                <artwork>
<![CDATA[
        NTFY 2501 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
        O: vbd/gwvbd(stop, rc=SIL, codec=audio/G729) 
        X: 20
]]>

                                </artwork>
                        </figure> 

   Step 16: 

   <vspace blankLines='1' />

    
   The Call Agent acknowledges the Notify command: 

   <vspace blankLines='1' />

    
        200 2501 OK 

   <vspace blankLines='1' />


   Step 17: 

   <vspace blankLines='1' />

     
   Upon receiving a RTP packet with the audio payload type (18), the originating 
   Gateway begins transmitting RTP packets with the audio payload type.

   <vspace blankLines='1' />


   The "gwvbd(stop)" event occurs and is notified to the Call Agent: 
    
			<figure title="">
                                <artwork>
<![CDATA[
        NTFY 1501 ds/ds1-1/1@gw-o.whatever.net MGCP 1.0  
        O: vbd/gwvbd(stop, rc=PTSW, codec=audio/G729)
        X: 1
]]>

                                </artwork>
                        </figure> 

   Step 18:

   <vspace blankLines='1' />


   The Call Agent acknowledges the Notify command: 
    
			<figure title="">
                                <artwork>
<![CDATA[

        200 1501 OK 
   ]]>

                                </artwork>
                        </figure> 

    
   The modem call is now over.  
			
			</t>
		</section>

		<section title="Fax Call with Gateway Controlled VBD and Call Agent Controlled T.38">
			<t>
   In this example, both sides support Gateway controlled VBD using V.152 with 
   Redundancy and Call Agent controlled T.38. We assume the originating and 
   terminating Call Agent communicate via the Session Initiation Protocol (SIP) 
   [RFC3261]: 

			<figure title="">
                                <artwork>
<![CDATA[
    ------------------------------------------------------------------ 
   | #|     GW-o      |     CA-o      |      CA-t     |      GW-t     | 
   |==|===============|===============|===============|===============| 
   | 1|             <-|CRCX           |               |               | 
   | 2|     200(sdp-o)|->             |               |               | 
   | 3|               |  INVITE(sdp-o)|->             |               | 
   | 4|               |               |    CRCX(sdp-o)|->             | 
   | 5|               |               |             <-|200 (sdp-t)    | 
   | 6|               |             <-|200(sdp-t)     |               | 
   | 7|             <-|MDCX(sdp-t)    |               |               | 
   | 8|            200|->             |               |               | 
   |--|---------------|---------------|---------------|---------------| 
   | 9|               |               |               |<- ANS/T.30 CED| 
   |10|               |               |           <- NTFY(gwvbd start)|      
   |11|               |               |            200|->             |
   |12|NTFY(gwvbd start) ->           |               |               |
   |13|             <-|200            |               |               |
   |14|               |               |               <- V.21 Preamble|
   |15|               |               |             <- NTFY(t38 start)|
   |16|               |               |            200|->             |
   |17|               |               |      MDCX(t38)|->             | 
   |18|               |               |             <-|200(sdp-t2)    | 
   |19|               |             <-|INVITE(sdp-t2) |               | 
   |20|             <-|MDCX(sdp-t2)   |               |               | 
   |21|    200(sdp-o2)|->             |               |               | 
   |22|               |    200(sdp-o2)|->             |               | 
   |23|               |               |   MDCX(sdp-o2)|->             |  
   |24|               |               |             <-|200            |
   |25| V.21 Preamble |->             |               |               |
   |26|NTFY(t38 start)|->             |               |               |
   |27|             <-|200            |               |               | 
   |--|---------------|---------------|---------------|---------------| 
   |28|               |               |               |   (fax ends)  | 
   |29|               |               |             <-|NTFY(t38 stop) | 
   |30|               |               |            200|->             | 
   |31|NTFY(t38 stop) |->             |               |               | 
   |32|             <-|200            |               |               | 
    ------------------------------------------------------------------ 
]]>

                                </artwork>
                        </figure> 

   Step 1: 

   <vspace blankLines='1' />

    
   The Call Agent issues a CreateConnection command to the Gateway instructing 
   it to use G.729 media encoding and to use either the strict T.38 procedure or 
   the Gateway procedure. Consequently, the Call Agent requests notification of 
   the "t38", "gwfax", "gwvbd" and "nopvbd" events. The Call Agent authorizes
   the negotiation of G.711u as a VBD codec with a redundancy level of one:
    
			<figure title="">
                                <artwork>
<![CDATA[
     CRCX 1000 ds/ds1-1/1@gw-o.whatever.net MGCP 1.0  
     C: 1 
     L: a:G729;RED;PCMU, gpmd/gpmd:"PCMU vbd=yes", fmtp:"RED PCMU/PCMU", 
        fxr/fx:t38;gw 
     M: recvonly 
     R: fxr/t38, fxr/gwfax, vbd/gwvbd, vbd/nopvbd
     X: 1 
     Q: process, loop
]]>

                                </artwork>
                        </figure> 

   Step 2: 

   <vspace blankLines='1' />

    
   The Gateway acknowledges the command and includes SDP with codec 
   information as well as capability, V.152 and redundancy information: 
			<figure title="">
                                <artwork>
<![CDATA[
        200 1000 OK 
        I:1 
         
        v=0  
        o=- 25678 753849 IN IP4 192.0.2.1  
        s=-  
        c=IN IP4 192.0.2.1  
        t=0 0  
        a=pmft: T38
        m=audio 3456 RTP/AVP 18 96 97
        a=rtpmap:96 RED/8000
        a=fmtp:96 97/97
        a=rtpmap:97 PCMU/8000
        a=gpmd:97 vbd=yes
        a=sqn: 0  
        a=cdsc: 1 audio RTP/AVP 18 96 97
        a=cdsc: 4 image udptl t38
]]>

                                </artwork>
                        </figure> 

   Note that V.152 requires the use of the session-level "a=pmft" SDP attribute
   in order to express a preference for T.38 over V.152 for fax handling.

   <vspace blankLines='1' />

        
   Step 3: 

   <vspace blankLines='1' />

    
   The originating Call Agent sends a SIP INVITE message with the SDP to the 
   terminating Call Agent. 

   <vspace blankLines='1' />

    
   Step 4: 

   <vspace blankLines='1' />

    
   The terminating Call Agent issues a CreateConnection command to the
   terminating Gateway instructing it to use G.729 media encoding and to use 
   either the strict T.38 procedure or the Gateway procedure.  Consequently, 
   the Call Agent requests notification of the "t38", "gwfax", "gwvbd" and 
   "nopvbd" events. Again, the Call Agent authorizes the negotiation of G.711u 
   as a VBD codec with a redundancy level of one:
    
			<figure title="">
                                <artwork>
<![CDATA[
     CRCX 2000 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
     C: 2 
     L: a:G729;RED;PCMU, gpmd/gpmd:"PCMU vbd=yes", fmtp:"RED PCMU/PCMU", 
        fxr/fx:t38;gw
     M: sendrecv 
     R: fxr/t38, fxr/gwfax, vbd/gwvbd, vbd/nopvbd 
     X: 20  
     Q: process, loop  
         
     v=0  
     o=- 25678 753849 IN IP4 192.0.2.1  
     s=-  
     c=IN IP4 192.0.2.1  
     t=0 0  
     a=pmft: T38
     m=audio 3456 RTP/AVP 18 96 97
     a=rtpmap:96 RED/8000
     a=fmtp:96 97/97
     a=rtpmap:97 PCMU/8000
     a=gpmd:97 vbd=yes
     a=sqn: 0  
     a=cdsc: 1 audio RTP/AVP 18 96 97
     a=cdsc: 4 image udptl t38
]]>

                                </artwork>
                        </figure> 

   Step 5: 

   <vspace blankLines='1' />

   
   The terminating Gateway supports T.38, and the RemoteConnectionDescriptor 
   included indicates that the other side supports T.38 as well, so the strict 
   T.38 Call Agent controlled procedure requested can be used.  The terminating 
   Gateway supports V.152 and redundancy, and the RemoteConnectionDescriptor 
   included indicates that the other side supports V.152 and redundancy, so 
   Gateway controlled VBD using V.152 and redundancy can be used for modem and 
   text transmissions.  The terminating Gateway sends back a success response 
   with its SDP which also includes capability, V.152 and redundancy 
   information: 
    
			<figure title="">
                                <artwork>
<![CDATA[
        200 2000 OK 
        I:2 
         
        v=0  
        o=- 25678 753849 IN IP4 192.0.2.2 
        s=-  
        c=IN IP4 192.0.2.2 
        t=0 0  
        a=pmft: T38
        m=audio 1296 RTP/AVP 18 96 97
        a=rtpmap:96 RED/8000
        a=fmtp:96 97/97
        a=rtpmap:97 PCMU/8000
        a=gpmd:97 vbd=yes
        a=sqn: 0  
        a=cdsc: 1 audio RTP/AVP 18 96 97
        a=cdsc: 4 image udptl t38
]]>

                                </artwork>
                        </figure> 

    
   Step 6: 

   <vspace blankLines='1' />

    
   The terminating Call Agent sends back a SIP 200 OK response to the 
   originating Call Agent, which in turn sends a SIP ACK (not shown).  
    

   <vspace blankLines='1' />

   Step 7: 

   <vspace blankLines='1' />

    
   The originating Call Agent in turns sends a ModifyConnection command 
   to the originating Gateway: 
			<figure title="">
                                <artwork>
<![CDATA[
        MDCX 1001 ds/ds1-1/1@gw-o.whatever.net MGCP 1.0  
        C: 1 
        I: 1 
        M: sendrecv 
         
        v=0  
        o=- 25678 753849 IN IP4 192.0.2.2 
        s=-  
        c=IN IP4 192.0.2.2 
        t=0 0  
        a=pmft: T38
        m=audio 1296 RTP/AVP 18 96 97
        a=rtpmap:96 RED/8000
        a=fmtp:96 97/97
        a=rtpmap:97 PCMU/8000
        a=gpmd:97 vbd=yes
        a=sqn: 0  
        a=cdsc: 1 audio RTP/AVP 18 96 97
        a=cdsc: 4 image udptl t38
]]>

                                </artwork>
                        </figure> 

   The ModifyConnection command does not repeat the LocalConnectionOptions sent 
   previously.  As far as fax handling is concerned, the Gateway therefore 
   attempts to continue using the current fax handling procedure, i.e. strict 
   Call Agent controlled T.38.  Since the capability information indicates the 
   other side supports T.38, the Gateway will in fact be able to use the strict 
   Call Agent controlled T.38 procedure.  Since the RemoteConnectionDescriptor 
   indicates the other side supports V.152 and redundancy, the Gateway will in 
   fact be able to use the V.152 VBD procedure with redundancy.

   <vspace blankLines='1' />

     
   Step 8: 

   <vspace blankLines='1' />

    
   The Gateway acknowledges the command.  At this point, a call is established 
   using G.729 encoding, and if a fax call is detected, the Call Agent 
   controlled T.38 procedure will be initiated. If a modem or text call is 
   detected, the V.152 VBD procedure will be initiated. 
    

   <vspace blankLines='1' />

   Step 9-10: 

   <vspace blankLines='1' />

        
   The terminating Gateway detects the T.30 CED tone (a.k.a. V.25 ANS). Since 
   both fax and modem calls can start with this sequence, it is not possible to 
   determine that this is a fax call until step 14, where the V.21 fax preamble 
   is detected. The terminating Gateway begins transmitting RTP packets with the 
   negotiated redundant VBD payload type (96).


   <vspace blankLines='1' />

   The "gwvbd(start)" event occurs and is notified to the Call Agent: 
			<figure title="">
                                <artwork>
<![CDATA[
        NTFY 2500 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
        O: vbd/gwvbd(start, rc=ANS, codec=audio/RED, coord=v152ptsw) 
        X: 20
]]>

                                </artwork>
                        </figure> 

   Step 11: 

   <vspace blankLines='1' />

    
   The Call Agent acknowledges the Notify command: 
    
			<figure title="">
                                <artwork>
<![CDATA[
        200 2500 OK
]]>

                                </artwork>
                        </figure> 


   Step 12: 

   <vspace blankLines='1' />

     
   Upon receiving a RTP packet with the redundant VBD payload type (96), the 
   originating Gateway begins transmitting RTP packets with the redundant VBD 
   payload type.

   <vspace blankLines='1' />


   The "gwvbd(start)" event occurs and is notified to the Call Agent: 
			<figure title="">
                                <artwork>
<![CDATA[
        NTFY 1500 ds/ds1-1/1@gw-o.whatever.net MGCP 1.0  
        O: vbd/gwvbd(start, rc=PTSW, codec=audio/RED)
        X: 1
]]>

                                </artwork>
                        </figure> 

    
   Step 13:

   <vspace blankLines='1' />


   The Call Agent acknowledges the Notify command: 
			<figure title="">
                                <artwork>
<![CDATA[
        200 1500 OK
]]>

                                </artwork>
                        </figure> 


   Step 14 - 15:

   <vspace blankLines='1' />


   The terminating Gateway detects the V.21 fax preamble.

   <vspace blankLines='1' />

 
   The terminating Gateway is using the Call Agent controlled T.38 strict
   procedure for fax calls, so the "t38(start)" event occurs: 
			<figure title="">
                                <artwork>
<![CDATA[
        NTFY 2500 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
        O: fxr/t38(start)
        X: 20
]]>

                                </artwork>
                        </figure> 

   Step 16: 

   <vspace blankLines='1' />

    
   The Call Agent acknowledges the Notify command: 
			<figure title="">
                                <artwork>
<![CDATA[
        200 2500 OK
]]>

                                </artwork>
                        </figure> 

   Step 17: 

   <vspace blankLines='1' />

    
   The Call Agent then instructs the terminating Gateway to change to using the 
   "image/t38" MIME type instead: 
			<figure title="">
                                <artwork>
<![CDATA[
        MDCX 2002 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
        C: 2 
        I: 2 
        L: a:image/t38 
        R: fxr/t38 
        X: 21
]]>

                                </artwork>
                        </figure> 

    
   Note that the Call Agent is no longer requesting notification of the "gwvbd" 
   event.

   <vspace blankLines='1' />


   Step 18: 

   <vspace blankLines='1' />

    
   The terminating Gateway sends back a success response with its SDP which also 
   includes the "image/t38" media description: 
			<figure title="">
                                <artwork>
<![CDATA[
        200 2002 OK 
    
        v=0  
        o=- 25678 753850 IN IP4 192.0.2.2 
        s=-  
        c=IN IP4 192.0.2.2 
        t=0 0  
        m=image 1296 udptl t38  
        a=sqn: 0  
        a=cdsc: 1 audio RTP/AVP 18 96 97
        a=cpar: a=rtpmap:96 RED/8000
        a=cpar: a=fmtp:96 97/97
        a=cpar: a=rtpmap:97 PCMU/8000
        a=cpar: a=gpmd:97 vbd=yes
        a=cdsc: 4 image udptl t38
]]>

                                </artwork>
                        </figure> 

  
   The gwvbd procedure ends due to the media type change. The "gwvbd(stop)" 
   event would normally be notified at this point, however, the Call Agent is no 
   longer requesting notification of the "gwvbd" event. The Call Agent would 
   have inferred from the "t38(start)" event that the gwvbd procedure ended.

   <vspace blankLines='1' />


   Step 19:

   <vspace blankLines='1' />

    
   The terminating Call Agent sends a re-INVITE to the originating Call Agent 
   with the updated SDP.  

   <vspace blankLines='1' />

    
   Step 20: 

   <vspace blankLines='1' />

    
   The originating Call Agent then sends a ModifyConnection command to the 
   originating Gateway: 
			<figure title="">
                                <artwork>
<![CDATA[
        MDCX 1003 ds/ds1-1/1@gw-o.whatever.net MGCP 1.0  
        C: 1 
        I: 1 
        R: fxr/t38
        X: 2
    
        v=0  
        o=- 25678 753850 IN IP4 192.0.2.2 
        s=-  
        c=IN IP4 192.0.2.2 
        t=0 0  
        m=image 1296 udptl t38  
        a=sqn: 0  
        a=cdsc: 1 audio RTP/AVP 18 96 97
        a=cpar: a=rtpmap:96 RED/8000
        a=cpar: a=fmtp:96 97/97
        a=cpar: a=rtpmap:97 PCMU/8000
        a=cpar: a=gpmd:97 vbd=yes
        a=cdsc: 4 image udptl t38
]]>

                                </artwork>
                        </figure> 

   Step 21: 

   <vspace blankLines='1' />

    
   The originating Gateway changes to T.38 and sends back a success response 
   with updated SDP: 
			<figure title="">
                                <artwork>
<![CDATA[
        200 1003 OK 
    
        v=0  
        o=- 25678 753850 IN IP4 192.0.2.1  
        s=-  
        c=IN IP4 192.0.2.1  
        t=0 0  
        m=image 3456 udptl t38  
        a=sqn: 0  
        a=cdsc: 1 audio RTP/AVP 18 96 97
        a=cpar: a=rtpmap:96 RED/8000
        a=cpar: a=fmtp:96 97/97
        a=cpar: a=rtpmap:97 PCMU/8000
        a=cpar: a=gpmd:97 vbd=yes
        a=cdsc: 4 image udptl t38
]]>

                                </artwork>
                        </figure> 


   Again, the gwvbd procedure ends due to the media type change. The
   "gwvbd(stop)" event would normally be notified at this point, however, the 
   Call Agent is no longer requesting notification of the "gwvbd" event.

   <vspace blankLines='1' />


   Step 22:

   <vspace blankLines='1' />


   The originating Call Agent sends a SIP 200 OK response with the updated SDP 
   to the terminating Call Agent, which in turn sends a SIP ACK (not shown).

   <vspace blankLines='1' />


   Step 23:

   <vspace blankLines='1' />


   The terminating Call Agent sends a ModifyConnection with the updated SDP to 
   the terminating Gateway:

			<figure title="">
                                <artwork>
<![CDATA[
        MDCX 2002 ds/ds1-1/2@gw-t.whatever.net MGCP 1.0  
        C: 2 
        I: 2 

        v=0  
        o=- 25678 753850 IN IP4 192.0.2.1  
        s=-  
        c=IN IP4 192.0.2.1  
        t=0 0  
        m=image 3456 udptl t38  
        a=sqn: 0  
        a=cdsc: 1 audio RTP/AVP 18 96 97
        a=cpar: a=rtpmap:96 RED/8000
        a=cpar: a=fmtp:96 97/97
        a=cpar: a=rtpmap:97 PCMU/8000
        a=cpar: a=gpmd:97 vbd=yes
        a=cdsc: 4 image udptl t38
]]>

                                </artwork>
                        </figure> 

   Step 24 - 32:

   These steps correspond to the Call Agent controlled T.38 strict procedure as
   defined in the MGCP Fax (FXR) package [RFCABCD].

			</t>
		</section>

	</section>

	<section title="Security Considerations">
		<t>
   The MGCP VBD package itself is not known to introduce any new security
   concerns.  VBD media is transported over RTP.  If security services are in 
   place to protect RTP media streams, these will also be in effect for the VBD 
   media stream.

   <vspace blankLines='1' />


   The MGCP GPMD package does not require any further security considerations 
   beyond those indicated in MGCP [RFC3435].
		</t>
	</section>

	<section title="IANA Considerations">
		<t>
   The IANA is hereby requested to register the following MGCP packages,

			<figure title="">
                                <artwork>
<![CDATA[
      Package Title                               Name     Version
      -------------                               ----     -------
      Voiceband Data                              VBD      0 
      General-Purpose Media Descriptor Parameter  GPMD     0
]]>

                                </artwork>
                        </figure> 

   and the following LocalConnectionOption,
			<figure title="">
                                <artwork>
<![CDATA[
      Field                                      Name
      -------                                    ----
      General-Purpose Media Descriptor Parameter gpmd
]]>

                                </artwork>
                        </figure> 


		</t>
	</section>

<section title="Acknowledgements">
<t>
   Several people have contributed to the development of the MGCP VBD and GPMD 
   packages and the use of the MIME subtypes "RED" and "parityfec" with the FM 
   package for VBD with redundancy and FEC. In particular, the authors would 
   like to thank Flemming Andreasen, John Atkinson, Bill Foster and the
   CableLabs PacketCable TGCP/NCS focus team for their contributions. Many
   thanks to Billy Hare for doing a thorough review of this document.
</t>
</section>

	<section title="Summary of Changes">
		<t>
   
 Changes in 01:

   <vspace blankLines='1' />

* Number of formatting corrections (mainly to remove extra blank lines)

   <vspace blankLines='1' />

* Updated a number of internal section references (these were off by one due to addition of new section 2 Terminology as part of initial version 00 submission)

   <vspace blankLines='1' />

* In section 3.1.2, corrected Start VBD to VBD Start

   <vspace blankLines='1' />

   * In section 4.1.1, added text to clarify that the first instance is assumed in the absence of &lt;order&gt;

		</t>
		<t>
   
 Changes in 02:

   <vspace blankLines='1' />

* Fix errors, warnings and comments reported by ID nits

		</t>
		<t>
   
 Changes in 03:

   <vspace blankLines='1' />

* Editorial corrections throughout the document

		</t>

		<t>
   
 Changes in 04:

   <vspace blankLines='1' />

* No changes

		</t>

	</section>

</middle>


<back>
	<references title="Normative References">
		&rfc2119;
		&rfc3550;
		&rfc3435;
		&rfc2198;
		&rfc4566;
		&rfc4733;
		&rfc4734;
		&rfc5234;
		&rfc5109;
<!--
		&rfc2793;
-->
		&rfc3407;
		&rfc3660;

        	<reference anchor='V1501'>
            		<front>
				<title>
				ITU-T Recommendation V.150.1, "Modem-over-IP networks: Procedures for the end-to-end connection of V-series DCEs"
				</title>
                		<author>
                    				<organization abbrev='ITU-T'>
                    				International Telecommunications Union - Telecommunication Standardization Sector 
                    				</organization>
                		</author>
                		<date month='Jan' year='2003' />
            		</front>
    		</reference>

        	<reference anchor='V152'>
            		<front>
				<title>
				ITU-T Recommendation V.152, "Procedures for supporting Voice-Band Data over IP Networks"
				</title>
                		<author>
                    				<organization abbrev='ITU-T'>
                    				International Telecommunications Union - Telecommunication Standardization Sector 
                    				</organization>
                		</author>
                		<date month='Jan' year='2005' />
            		</front>
    		</reference>

		
        	<reference anchor='H2482'>
            		<front>
				<title>
				ITU-T Recommendation H.248.2, "Gateway control protocol: Facsimile, text conversation and call discrimination packages"
				</title>
                		<author>
                    				<organization abbrev='ITU-T'>
                    				International Telecommunications Union - Telecommunication Standardization Sector 
                    				</organization>
                		</author>
                		<date month='Nov' year='2000' />
            		</front>
    		</reference>


        	<reference anchor='V1501A1'>
            		<front>
				<title>
				ITU-T Recommendation V.150.1 Amendment 1, "Modem-over-IP networks: Procedures for the end-to-end connection of V-series DCEs, Amendment 1: Modification to SSE reason identifier codes to support voice band data and text relay", 
				
				</title>
                		<author>
                    				<organization abbrev='ITU-T'>
                    				International Telecommunications Union - Telecommunication Standardization Sector 
                    				</organization>
                		</author>
                		<date month='Jan' year='2005' />
            		</front>
    		</reference>

        	<reference anchor='RFCABCD'>
            		<front>
				<title>
				Media Gateway Control Protocol Fax Package
				</title>
                		<author initials='F.' surname='Andreasen' fullname='Flemming Andreasen'>
					<organization abbrev='Cisco'>
						Cisco Systems, Inc
                    			</organization>
                		</author>
            		</front>
				
				<seriesInfo name='RFC' value='ABCD'/>

			<format type='TXT' target='http://www.ietf.org/internet-drafts/draft-andreasen-mgcp-fax-06.txt'/>

			<annotation>Editor's Note: Please replace all references to ABCD with the RFC number of I-D draft-andreasen-mgcp-fax when it gets accepted</annotation>
    		</reference>
	
	</references>



	<references title="Informative References">
		&rfc3261;

        	<reference anchor='T38'>
            		<front>
				<title>
 				ITU-T Recommendation T.38, "Procedures for real-time Group 3 facsimile communication over IP networks",
				</title>
                		<author>
                    				<organization abbrev='ITU-T'>
                    				International Telecommunications Union - Telecommunication Standardization Sector 
                    				</organization>
                		</author>
                		<date month='April' year='2004' />
            		</front>

    		</reference>

	</references>
</back>


</rfc>



