From 4389aed9e9046456c44d71709a471ef2c3dc3ef4 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 17 Mar 2023 12:53:25 -0400 Subject: [PATCH] MT#56861 use correct codec handler for DTMF inject DTMF injection must use the codec handler of the primary payload (audio stream), not the handler of the DTMF PT itself. Change-Id: Ied2d1f969bfc76ef7af0ada063b90a47c4633557 --- daemon/dtmf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/dtmf.c b/daemon/dtmf.c index 03706f61a..e660623c8 100644 --- a/daemon/dtmf.c +++ b/daemon/dtmf.c @@ -602,6 +602,9 @@ const char *dtmf_inject(struct call_media *media, int code, int volume, int dura ch = codec_handler_get(media, pt, sink, NULL); if (!ch) continue; + // skip DTMF PTs + if (pt == ch->dtmf_payload_type) + continue; if (ch->output_handler && ch->output_handler->ssrc_hash) // context switch if we have multiple inputs going to one output ch = ch->output_handler;