IVR works for some callers but not others

The Asterisk log should show which codecs were negotiated for each call. You can locate a call that was reported as problematic by timestamp and/or caller ID.

For more detail, you can capture all traffic at the PBX, locate the problematic call, look at whether RTP was coming in to the right port in the right format, and even listen to it if needed. For example, see

Another approach: Temporarily change your IVR settings to allow no retries and route timeouts to a receptionist. If they hear silence, you’ll know the RTP is missing or being misrouted (the problem is unrelated to DTMF or IVR). If they hear garbled or choppy voice, that’s another clue. If the voice is fine (the problem really is related to DTMF), the receptionist can connect the call and you’ll avoid annoying the customer.