Sample:
m=audio 49170 RTP/AVP 18
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
m=audio - the numeric type will be present here. The static type assigned by IANA is 18, which means G729/8000. Another number may be used if a a=rtpmap line defines it, but very rarely would be.
a=rtpmap is optional (see ${verbose_sdp}) but specifies the codec name using the 18 code. It's optional since 18 is defined to be G729/8000 unless overridden.
"a=fmtp:18 annexb=yes" defines Annex B is in use (either G729B or G729AB), the absence of it means it is not.
Annex A (G729A or G729AB) does not appear at all in the SDP. It's an alternative method of encoding using less CPU at the expense of quality. The results can be decoded by any G729 implementation so they do not need to know G729A was used.
Some phones will send G729A/8000 (Cisco/Linksys) - this is incorrect. I believe FreeSWITCH handles this special case though.