<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc rfcedstyle='yes'?>
<?rfc toc='yes'?>
<?rfc tocdepth='4'?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc category="std" ipr="trust200811" number="7261" submissionType="IETF" consensus="yes"  >
	<front>
		<title abbrev="Offer/Answer G723 AnnexA and G729 AnnexB">
		    Offer/Answer Considerations for G723 Annex A and G729 Annex B
		</title>
            <author initials="M. A. M" surname="Perumal" fullname="Muthu Arul Mozhi Perumal">
			<organization>Cisco Systems</organization>
			<address>
				<postal>
					<street>Cessna Business Park</street>
                    <street>Sarjapur-Marathahalli Outer Ring Road</street>
					<city>Bangalore</city>
					<region>Karnataka</region>
					<code>560103</code>
					<country>India</country>
				</postal>
				<email>mperumal@cisco.com</email>
			</address>
		</author>
            <author initials="P" surname="Ravindran" fullname="Parthasarathi Ravindran">
			<organization>NSN</organization>
			<address>
				<postal>
				<street> Manyata Embassy Business park</street>	
					<city>Bangalore</city>
					<region>Karnataka</region>
                           <code>560045</code>

					<country>India</country>
				</postal>
				<email>partha@parthasarathi.co.in</email>
			</address>
		</author> 
		<date month="May" year="2014"/>
		<area>RAI</area>
		<workgroup>MMUSIC</workgroup>

		<abstract>
			<t>This document provides the offer/answer considerations for the annexa parameter of G723 
			and the annexb parameter of G729, G729D, and G729E when the value of the annexa or annexb 
			parameter does not match in the Session Description Protocol (SDP) offer and answer.
			</t>
		</abstract>
	</front>
	<middle>
		<section title="Introduction">
			<t><xref target="RFC4856"/> describes the annexa parameter for G723 as follows:
			<list style="empty"> 
				<t>annexa: indicates that Annex A, voice activity detection, is used or preferred.
				Permissible values are "yes" and "no" (without the quotes); "yes" is implied if 
				this parameter is omitted.</t>
				</list>
		</t>
		      <t> Also, <xref target="RFC4856"/> describes the annexb parameter for G729, G729D, and
			  G729E as follows:
			<list style="empty">
				<t>annexb: indicates that Annex B, voice activity detection, is used or preferred. 
				Permissible values are "yes" and "no" (without the quotes); "yes" is implied if 
				this parameter is omitted.</t>
			</list></t>
            
			<t>However, a problem arises when the value of the annexa or annexb parameter does not match 
            in the SDP <xref target="RFC4566"/> offer and answer.</t>
			
			<t>For example, if the offer has G729 with annexb=yes and the answer has G729 with annexb=no, 
			it can be interpreted in two different ways:
			<list style="symbols">
				<t>The offerer and answerer proceed as if G729 is negotiated with annexb=yes, or</t>
				<t>The offerer and answerer proceed as if G729 is negotiated with annexb=no.</t>
			</list></t>
			
			<t>Since this is not clear in the existing specifications, various implementations have 
			interpreted the offer/answer in their own ways, resulting in a different codec being chosen
			to call failure, when the parameter value does not match in the offer and answer.</t>
            
			<t><xref target="RFC3264"/> requires SDP extensions that define new fmtp parameters to specify 
			their proper interpretation in offer/answer. This document specifies the proper interpretation 
			for the annexa and annexb parameters in offer/answer.</t>
            </section>
			
		<section title="Terminology" anchor="sec-term">
			<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"/>.</t>
		</section>
		
		<section title="Offer/Answer Considerations">
		    <t>The general objective of the offer/answer considerations is to make sure that if the offerer or 
			   answerer indicates it does not support Annex A or Annex B, then Annex A or Annex B is not used.</t>
			   
			<section title="Considerations for Use of Comfort Noise Frames">
			<t><xref target="RFC3551"/> states that:
			<list style="empty">
				   <t>Receivers MUST accept comfort noise frames if restriction of their use has not been signaled.
				      The MIME registration for G729 in RFC 3555 specifies a parameter that MAY be used with MIME or 
					  SDP to restrict the use of comfort noise frames.</t>
			   	   </list></t>
				<t>Hence, if the SDP offer or answer indicates that comfort noise is not supported, comfort noise 
				   frames MUST NOT be used.</t>
		
			</section>
			
			<section title="Offer/Answer Considerations for G723 Annex A">
				<t>When the offer or answer has G723 and the annexa parameter is absent, the offerer or answerer knows 
				   that it has implied the default "annexa=yes". This is because the annexa attribute is part of the 
				   original registration of audio/G723 <xref target="RFC4856"/>. All implementations that support G723 
				   understand the annexa attribute. Hence, this case MUST be considered as if the offer or answer has 
				   G723 with annexa=yes.</t>

                <t>When the offer has G723 with annexa=yes and the answer has G723 with annexa=no, the offerer and 
				   answerer MUST proceed as if G723 is negotiated with annexa=no.</t>
                
				<t>When the offer has G723 with annexa=no, after the offer/answer completion the offerer and answerer 
				   MUST proceed as if G723 is negotiated with annexa=no.</t>
				
				<t><list style="empty">
				   <t>When the offer has G723 with annexa=no, the reason for not mandating that the answer MUST have annexa=no 
				      for G723 is that there are implementations that omit the annexa parameter in answer. In such cases, the 
				      offerer and answerer proceed as if G723 is negotiated with annexa=no.</t>
				   </list></t>
                
				<t>When the offer has G723 with no annexa parameter and the answer has G723 with annexa=yes,
				   the offerer and answerer MUST proceed as if G723 is negotiated with annexa=yes.</t>
            </section>
				
            <section title="Offer/Answer Considerations for G729 Annex B, G729D Annex B, and G729E Annex B">
				<t>In this section, G729 represents any of G729 or G729D or G729E.</t>

				<t>When the offer or answer has G729 and the annexb parameter is absent, the offerer or answerer knows 
				   that it has implied the default "annexb=yes". This is because the annexb attribute is part of the 
				   original registration of audio/G729 <xref target="RFC4856"/>. All implementations that support G729 
				   understand the annexb attribute. Hence, this case MUST be considered as if the offer or answer has 
				   G729 with annexb=yes.</t>

                <t>When the offer has G729 with annexb=yes and the answer has G729 with annexb=no, the offerer and 
				   answerer MUST proceed as if G729 is negotiated with annexb=no.</t>
            
			    <t>When the offer has G729 with annexb=no, after the offer/answer completion the offerer and answerer 
				   MUST proceed as if G729 is negotiated with annexb=no.</t>
			<t><list style="empty">
				   <t>When the offer has G729 with annexb=no, the reason for not mandating that the answer MUST have annexb=no 
				      for G729 is that there are implementations that omit the annexb parameter in the answer. In such cases, the 
				      offerer and answerer proceed as if G729 is negotiated with annexb=no.</t>
					</list></t>
                
				<t>When the offer has G729 with no annexb parameter and the answer has G729 with annexb=yes, 
				   the offerer and answerer MUST proceed as if G729 is negotiated with annexb=yes.</t>
             </section>
        </section>
		
		<section title="Examples">
			<section title="Offer with G729 annexb=yes and Answer with G729 annexb=no">
		<figure><artwork> <![CDATA[
        [Offer with G729 annexb=yes]
		
        v=0
        o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com
        s=
        c=IN IP4 host.atlanta.example.com
        t=0 0
        m=audio 49170 RTP/AVP 18
        a=rtpmap:18 G729/8000
        a=fmtp:18 annexb=yes]]> </artwork></figure>
		<figure><artwork> <![CDATA[ 
        [Answer with G729 annexb=no]   

        v=0
        o=bob 1890844326 1890844326 IN IP4 host.bangalore.example.com
        s=
        c=IN IP4 host.bangalore.example.com
        t=0 0
        m=audio 19140 RTP/AVP 18
        a=rtpmap:18 G729/8000
        a=fmtp:18 annexb=no]]> </artwork></figure>
			<t>In the above example, the offerer and answerer proceed as if G729 is negotiated with annexb=no.</t>
			</section>
			<section title="Offer with G729 annexb=yes and Answer with G729 and No annexb parameter">
		<figure><artwork> <![CDATA[
        [Offer with G729 annexb=yes]

        v=0
        o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com
        s=
        c=IN IP4 host.atlanta.example.com
        t=0 0
        m=audio 49170 RTP/AVP 18
        a=rtpmap:18 G729/8000
        a=fmtp:18 annexb=yes]]> </artwork></figure>
		<figure><artwork> <![CDATA[
        [Answer with G729 and no annexb parameter]

        v=0
        o=bob 1890844326 1890844326 IN IP4 host.bangalore.example.com
        s=
        c=IN IP4 host.bangalore.example.com
        t=0 0
        m=audio 19140 RTP/AVP 18
        a=rtpmap:18 G729/8000]]> </artwork></figure>
			<t>In the above example, the offerer and answerer proceed as if G729 is negotiated with annexb=yes.</t>
            </section> 
			<section title="Offer with G729 and No annexb Parameter and Answer with G729 annexb=no">
		<figure><artwork> <![CDATA[
        [Offer with G729 and no annexb parameter]

        v=0
        o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com
        s=
        c=IN IP4 host.atlanta.example.com
        t=0 0
        m=audio 49170 RTP/AVP 18
        a=rtpmap:18 G729/8000]]> </artwork></figure>
		<figure><artwork> <![CDATA[
        [Answer with G729 annexb=no]

        v=0
        o=bob 1890844326 1890844326 IN IP4 host.bangalore.example.com
        s=
        c=IN IP4 host.bangalore.example.com
        t=0 0
        m=audio 19140 RTP/AVP 18
        a=rtpmap:18 G729/8000
        a=fmtp:18 annexb=no	]]> </artwork></figure>

		<t>In the above example, the offerer and answerer proceed as if G729 is negotiated with annexb=no.</t>
            </section> 
		</section>
		
		<section title="Security Considerations">
			<t>The guidelines described in <xref target="RFC6562"/> are to be followed for Use of Voice 
			Activity Detection (i.e., Annex A or Annex B) with the Secure Real-time Transport Protocol (SRTP).</t>
		</section>
        
		<section title="Acknowledgments">
			<t>Thanks to Flemming Andreasen (Cisco), Miguel A.&nbsp;Garcia (Ericsson), Ali C.&nbsp;Begen (Cisco), Paul Kyzivat (Huawei), 
			Roni Even (Huawei), Kevin Riley (Sonus), Ashish Sharma (Sonus), Kevin P.&nbsp;Fleming (Digium), Dale Worley (Avaya), 
			Cullen Jennings (Cisco), Ari Keranen (Ericsson), Harprit S.&nbsp;Chhatwal (InnoMedia), Aurelien Sollaud (Orange), 
			SM, Stephen Casner, Keith Drage (Alcatel-Lucent), Stephen Farrell, Barry Leiba, and Ted Lemon for their valuable 
			input and comments. Martin Dolly (ATT) and Hadriel Kaplan (Acme Packet) provided useful suggestions at the mic 
			at IETF 83.</t>
        </section>

	</middle>
	<back>
 		<references title="Normative References">
            <?rfc include="reference.RFC.2119"?>
            <?rfc include="reference.RFC.3264"?>
            <?rfc include="reference.RFC.3551"?>
            <?rfc include="reference.RFC.4566"?>
            <?rfc include="reference.RFC.4856"?>
            <?rfc include="reference.RFC.6562"?>
        </references>
	</back>
</rfc>
