]> 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:37 +0000 (13:35 +0000)
commit624f509ce4c74df852269d6eddd93de678ec4d1b
tree8e1909bc377d9aabf7889b3d4c1e77177e244cd6
parent685f525b286382e316da6a7d8f5ebeb03046f2c3
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