]> git.ipfire.org Git - thirdparty/asterisk.git/commit
rtp_engine: add support for multirate RFC2833 digits
authorMike Bradeen <mbradeen@sangoma.com>
Mon, 8 Apr 2024 17:00:14 +0000 (11:00 -0600)
committerMike Bradeen <mbradeen@sangoma.com>
Tue, 14 May 2024 13:35:32 +0000 (13:35 +0000)
commit6bf66b82d768e6029373079e1f95d0eb3acbd5bc
tree0f92e209d69d8b87dc7736addc6fa27c27426e4f
parentee6a0365ab78dd09d8cf999aba556de478497bd4
rtp_engine: add support for multirate RFC2833 digits

Add RFC2833 DTMF support for 16K, 24K, and 32K bitrate codecs.

Asterisk currently treats RFC2833 Digits as a single rtp payload type
with a fixed bitrate of 8K.  This change would expand that to 8, 16,
24 and 32K.

This requires checking the offered rtp types for any of these bitrates
and then adding an offer for each (if configured for RFC2833.)  DTMF
generation must also be changed in order to look at the current outbound
codec in order to generate appropriately timed rtp.

For cases where no outgoing audio has yet been sent prior to digit
generation, Asterisk now has a concept of a 'preferred' codec based on
offer order.

On inbound calls Asterisk will mimic the payload types of the RFC2833
digits.

On outbound calls Asterisk will choose the next free payload types starting
with 101.

UserNote: No change in configuration is required in order to enable this
feature. Endpoints configured to use RFC2833 will automatically have this
enabled. If the endpoint does not support this, it should not include it in
the SDP offer/response.

Resolves: #699
include/asterisk/rtp_engine.h
main/rtp_engine.c
res/res_pjsip_sdp_rtp.c
res/res_rtp_asterisk.c