when forcing PCMU or PCMA we must also include telephone-event (#153)

This commit is contained in:
Dave Horton
2024-11-14 08:37:40 -05:00
committed by GitHub
parent 5e2369e5e8
commit b976a62a60

View File

@@ -89,7 +89,10 @@ const updateRtpEngineFlags = (sdp, opts) => {
try {
const parsed = sdpTransform.parse(sdp);
const codec = parsed.media[0].rtp[0].codec;
if (['PCMU', 'PCMA'].includes(codec)) opts.flags.push(`codec-accept-${codec}`);
if (['PCMU', 'PCMA'].includes(codec)) {
opts.flags.push(`codec-accept-${codec}`);
opts.flags.push('codec-accept-telephone-event');
}
} catch (err) {}
return opts;
};