asterisk / asterisk

The official Asterisk Project repository.
https://www.asterisk.org
Other
1.97k stars 924 forks source link

rtp_engine: add support for multirate RFC2833 digits #700

Closed mbradeen closed 4 days ago

mbradeen commented 1 month ago

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

gtjoseph commented 5 days ago

cherry-pick-to: 18 cherry-pick-to: 20 cherry-pick-to: 21

github-actions[bot] commented 4 days ago

Successfully merged to branch master and cherry-picked to ["18","20","21"]