Skip to content

Commit

Permalink
when forcing PCMU or PCMA we must also include telephone-event (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
davehorton authored Nov 14, 2024
1 parent 5e2369e commit b976a62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/call-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit b976a62

Please sign in to comment.