From: Alexey Vasilyev Date: Mon, 25 Nov 2024 08:41:48 +0000 (+0100) Subject: res_rtp_asterisk.c: Fix bridged_payload matching with sample rate for DTMF X-Git-Tag: 21.7.0-rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=614db1c2186e89c669e1e279aaf7c376e087ee63;p=thirdparty%2Fasterisk.git res_rtp_asterisk.c: Fix bridged_payload matching with sample rate for DTMF Fixes #1004 (cherry picked from commit 9060a267e0adf901f0e94dc31c03adf2e0795600) --- diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index 028150f950..1953e15e29 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -7240,8 +7240,8 @@ static int bridge_p2p_rtp_write(struct ast_rtp_instance *instance, } /* Otherwise adjust bridged payload to match */ - bridged_payload = ast_rtp_codecs_payload_code_tx(ast_rtp_instance_get_codecs(instance1), - payload_type->asterisk_format, payload_type->format, payload_type->rtp_code); + bridged_payload = ast_rtp_codecs_payload_code_tx_sample_rate(ast_rtp_instance_get_codecs(instance1), + payload_type->asterisk_format, payload_type->format, payload_type->rtp_code, payload_type->sample_rate); /* If no codec could be matched between instance and instance1, then somehow things were made incompatible while we were still bridged. Bail. */ if (bridged_payload < 0) {