We are working on implementing telephone-events in a mixed WebRTC and SIP environment and we noticed that the
telephone-event rate in the SDP from Chrome is only 8000. For example:
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:107 CN/48000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
Since the telephone-event packets must use the same timestamp as the audio packets this seems to mean that telephone-events (according to the RFCs, see below) will only be used for the 8000 Hz codecs (i.e. PCMU and PCMA) and not the other high bandwidth codecs (Opus and ISAC) since the other codecs are not using 8000 Hz as their clock rate. Is this a correct interpretation or is Chrome going to send telephone events with a different clock when Opus is selected as the Codec?
For comparison this is the SDP we would have expected if telephone-events are being offered for all the codecs:
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:107 CN/48000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=rtpmap:127 telephone-event/16000
a=rtpmap:128 telephone-event/32000
a=rtpmap:129 telephone-event/48000
Here are some relevant RFC quotes that support this:
From 7.1:
----------------------------------------------------------------
A3-7 WebRTC MUST generate [RFC4733] events using
the same SSRC as the audio codec(s) for a
stream.
----------------------------------------------------------------
A3-8 WebRTC MUST generate [RFC4733] events in the
same RTP sequence number space as the audio RTP
packets.
----------------------------------------------------------------
A3-9 WebRTC MUST generate [RFC4733] events with the
same clock frequency and timestamp space as
the audio.
----------------------------------------------------------------
Named telephone events are carried as part of the audio stream and
MUST use the same sequence number and timestamp base as the regular
audio channel to simplify the generation of audio waveforms at a
gateway. The named telephone-event payload type can be considered to
be a very highly-compressed audio codec and is treated the same as
other codecs.