]> 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)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Tue, 14 May 2024 13:35:40 +0000 (13:35 +0000)
commit3b4d2a65064eb7a49d1d765a80e8ffa602532d0a
treee012c3249a3d4a1e223284c6a77e6a14943b4580
parentabe0018d850200ca9af06c0f2903fc9c14d77fa0
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