It is a free choice. you can use the ones that come by default. If something specific is required you will be asked by the device manufacturer of the phone or other PBX system that you are connected to.
For example, on VitXi WebRTC, https://wiki.vitalpbx.org/documentation/vitxi-webrtc/vitalpbx-preparations/, you are asked to use a specific set of codecs to match what are the most common on browsers with WebRTC.
For DTMF, sometimes, when connecting to other PBX systems, they will require that DTMF is sent in audio, so you can choose that to ensure compatibility with that system.