JohnG
JohnG

Reputation: 837

ambiguity in G729 Annexes

In SIP SDP:

How to detect G729A codec by reading SDP media attributes ? For example below SDP, says this is a G729B codec,

m = audio 33712 RTP/AVP 18 101
a = rtpmap:18 G729/8000
a = fmtp:18 annexb=yes
a = rtpmap:101 telephone-event/8000
a = fmtp:101 0-15

If I get "annexb=no", does it mean G729a ?? or when I get "annexa=yes" only then its G729a. according to wikipedia G729 codec has various annexes like A, B, C, D, E, F etc... If I want to detect each of them can I depend on string "annex", for example I want to detect G729F, Can I depend on attribute string "annexf=yes" ??

Upvotes: 1

Views: 9802

Answers (2)

Don M
Don M

Reputation: 1

I believe there is a misunderstanding in the above description of SDP's

From RFC7261

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 [RFC4856].

This clearly states that the absence of annexb is to be considered as annexb=yes

Upvotes: 0

jsantander
jsantander

Reputation: 5102

From RFC4856 Section 2.1.9

    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.

More details can be found From RFC3551 Section 4.5.6 (G.729, G.729a and G.729b) and 4.5.7 (G.729d and G.729e)

In general, G.729/G.729a/G.729b have the same format (with G.729b adding additional frames carrying the confort noise).

G.729 Annex C:

This annex provides a description of an alternative implementation in floating-point arithmetic for the full version of ITU-T G.729 and Annex A.

G.729d and G.279e define different frame formats (and are identified differently in the SDP media line)

G.729 Annex F:

This annex provides a description of integrating Annexes B and D, hereby defining DTX functionality for Annex D

G.729 Annex G:

This annex provides a description of integrating Annexes B and E, hereby defining DTX functionality for Annex E.

So G.729f and G.729g do not introduce new formats, but use the frame formats from G.729d and G.279e: (on RF3551:)

The voice activity detector (VAD) and comfort noise generator (CNG) algorithm specified in Annex B of G.729 may be used with Annex D and Annex E frames in addition to G.729 and G.729 Annex A frames. The algorithm details for the operation of Annexes D and E with the Annex B CNG are specified in G.729 Annexes F and G. Note that Annexes F and G do not introduce any new encodings. Receivers MUST accept comfort noise frames if restriction of their use has not been signaled. The MIME registrations for G729D and G729E in RFC 3555 [7] specify a parameter that MAY be used with MIME or SDP to restrict the use of comfort noise frames

The parameter mentioned above is the annexb=yes|no


In terms of representation in the SDP payload.

  • G729, G729a (and G729c):
    • number in m= line: 18
    • a=rtpmap:18 G729/8000
    • a=fmtp:18 annexb=no (or not present)
  • G729b
    • number in m= line: 18
    • a=rtpmap:18 G729/8000
    • a=fmtp:18 annexb=yes
  • G729d
    • number in m= line: n (dynamic)
    • a=rtpmap:n G729D/8000
    • a=fmtp:n annexb=no (or not present)
  • G729e
    • number in m= line: n (dynamic)
    • a=rtpmap:n G729E/8000
    • a=fmtp:n annexb=no (or not present)
  • G729f
    • number in m= line: n (dynamic)
    • a=rtpmap:n G729D/8000
    • a=fmtp:n annexb=yes
  • G729g
    • number in m= line: n (dynamic)
    • a=rtpmap:n G729E/8000
    • a=fmtp:n annexb=yes

Upvotes: 3

Related Questions