🔢 FreePBX DTMF Configuration: Ensuring Touch-Tone Works
Summary: DTMF (Dual-Tone Multi-Frequency) – the touch-tone signals you hear when pressing phone keys – is essential for IVR menus, voicemail, and call automation. This guide covers everything you need to configure DTMF in FreePBX: the three transmission methods (RFC2833, Inband, SIP INFO), step-by-step settings for PJSIP and chan_sip trunks, extension-level DTMF configuration, and troubleshooting common issues like IVR not detecting digits.
📖 Table of Contents
- 1. DTMF Basics: What It Is & Why It Matters
- 2. The Three DTMF Transmission Methods
- 3. DTMF Methods Comparison Table
- 4. Configuring DTMF on PJSIP Trunks
- 5. Configuring DTMF on chan_sip Trunks
- 6. Extension-Level DTMF Configuration
- 7. IVR DTMF Troubleshooting
- 8. Best Practices
- 9. Frequently Asked Questions
- 10. Related Resources
🔊 DTMF Basics: What It Is & Why It Matters
DTMF (Dual-Tone Multi-Frequency) is the signaling system used by touch-tone phones. Each key press generates a unique combination of two frequencies, allowing the phone system to recognize which digit was pressed. In a modern VoIP environment, DTMF is critical for:
🔹 Common DTMF Use Cases
- IVR (Interactive Voice Response): "Press 1 for Sales, Press 2 for Support"
- Voicemail Access: Entering PIN codes to retrieve messages
- Call Transfer & Features: Using feature codes like *98 to transfer calls
- Auto Attendants: Routing callers to the right department
- Payment Systems: Entering credit card numbers over the phone
⚠️ Why DTMF Fails
- Incorrect DTMF mode – provider expects RFC2833, but you're using Inband
- NAT/Firewall issues – RTP packets (containing DTMF) are blocked
- Codec compression – Inband DTMF only works with uncompressed codecs like G.711
- Provider incompatibility – some carriers only support SIP INFO
- No audio flow – some IVRs require audio to be sent before DTMF is detected[reference:0]
📡 The Three DTMF Transmission Methods
In SIP-based telephony, DTMF can be transmitted in three ways[reference:1][reference:2]:
| Method | How It Works | Best For | Reliability |
|---|---|---|---|
| RFC2833 / RFC4733 | DTMF is sent as special RTP events (packets) separate from audio. Each digit is marked with a payload type and timestamp. | Most SIP trunks and VoIP providers | ⭐⭐⭐⭐⭐ Most reliable |
| Inband | DTMF tones are sent as regular audio in the voice stream – just like analog phones[reference:3]. | Only works with uncompressed codecs like G.711[reference:4] | ⭐⭐⭐ Susceptible to distortion[reference:5] |
| SIP INFO | DTMF is sent as SIP messages (INFO requests) out-of-band, separate from RTP. | Some carriers and PBXs that don't support RFC2833 | ⭐⭐⭐⭐ Reliable but less widely supported |
💡 Recommendation: RFC2833 (RFC4733) is the industry standard and the most reliable DTMF method for SIP trunks. Use it unless your provider specifically requires otherwise[reference:6].
📊 DTMF Methods Comparison
| Feature | RFC2833 / RFC4733 | Inband | SIP INFO |
|---|---|---|---|
| Transmission | RTP events | Audio stream | SIP messages |
| Codec Dependent | No – works with any codec | Yes – only G.711[reference:7] | No |
| NAT Friendly | Yes – uses RTP | Yes – uses RTP | May have issues with NAT |
| Provider Support | Widely supported | Limited | Some carriers |
| Susceptible to Audio Issues | No | Yes – distortion affects detection[reference:8] | No |
| Default in FreePBX | Auto (prefers RFC2833) | Not default | Not default |
🛠️ Configuring DTMF on PJSIP Trunks
FreePBX 15 and above use PJSIP (chan_pjsip) as the default SIP driver[reference:9]. Here's how to configure DTMF on a PJSIP trunk:
- 1 Log in to the FreePBX Admin interface.
- 2 Go to Connectivity → Trunks.
- 3 Click on the Edit icon next to your SIP trunk (or add a new trunk).
- 4 Navigate to the pjsip Settings tab.
- 5 Click on the Advanced sub-tab.
- 6 Locate the DTMF Mode field[reference:10][reference:11]:
- Auto – Asterisk negotiates the DTMF mode with the peer (recommended starting point)[reference:12]
- RFC4733 – Forces RFC2833/RFC4733 (most reliable)[reference:13]
- Inband – Forces inband DTMF (only with G.711)
- 7 Click Submit and then Apply Config.
⚠️ Important: The "Auto" setting works for most providers. However, if you experience DTMF issues, manually set DTMF Mode to RFC4733[reference:14]. Some providers may require RFC4733 specifically[reference:15].
🛠️ Configuring DTMF on chan_sip Trunks
If you're using the legacy chan_sip driver (older FreePBX versions), DTMF is configured in the Peer Details:
- 1 Go to Connectivity → Trunks.
- 2 Edit your SIP trunk and go to the sip Settings tab.
- 3 In the Peer Details section, add or modify the dtmfmode parameter[reference:16]:
dtmfmode=rfc2833– Recommended for most providersdtmfmode=inband– Only with G.711[reference:17]dtmfmode=info– SIP INFO method[reference:18]
- 4 Some providers may also require
rfc2833compensate=yesfor compatibility[reference:19][reference:20], but be aware this can cause issues with Comfort Noise[reference:21]. - 5 Click Submit and Apply Config.
💡 chan_sip Note: chan_sip is deprecated in Asterisk[reference:22]. For new installations, always use PJSIP. If you're on an older system, consider migrating to PJSIP.
📞 Extension-Level DTMF Configuration
You can also configure DTMF behavior per extension in FreePBX:
- 1 Go to Connectivity → Extensions.
- 2 Edit the desired extension.
- 3 Go to the Advanced tab.
- 4 Locate DTMF Signalling[reference:23][reference:24]:
- RFC2833 – Forces RFC2833 for this extension[reference:25]
- Inband – Forces inband DTMF[reference:26]
- Auto – Default, negotiates with peer
- 5 Click Submit and Apply Config.
⚠️ Note: Extension-level DTMF settings override trunk-level settings for calls to/from that extension. Use this for specific endpoints that require a different DTMF method (e.g., legacy devices that only support inband)[reference:27].
🚀 Need Help with FreePBX DTMF Configuration? NetviaVoice Can Assist
Our VoIP specialists can help you diagnose DTMF issues, configure trunks correctly, and ensure your IVR and auto attendant work flawlessly.
Visit NetviaVoice🔍 IVR DTMF Troubleshooting
IVR (Interactive Voice Response) systems are the most common place where DTMF issues surface. Here are the most frequent problems and solutions:
| Issue | Likely Cause | Solution |
|---|---|---|
| IVR doesn't detect any DTMF | DTMF mode mismatch between trunk and provider | Set trunk DTMF Mode to RFC4733 (PJSIP) or dtmfmode=rfc2833 (chan_sip)[reference:28] |
| DTMF works only after audio plays | NAT/firewall issue – RTP needs outgoing media to establish flow[reference:29] | Add a silent audio file as IVR announcement to force RTP[reference:30]; check firewall/NAT settings |
| DTMF digits are doubled or echoed | Hardware DTMF detection + software detection both active[reference:31] | Disable hardware DTMF detection or enable DTMF Removal in Wanpipe config[reference:32] |
| DTMF works from landlines but not mobiles | Mobile networks often compress audio, breaking inband DTMF[reference:33] | Ensure trunk uses RFC2833, not inband |
| No DTMF in logs | DTMF logging not enabled or digits not reaching PBX | Enable DTMF logging[reference:34]; capture RTP with tcpdump/Wireshark[reference:35] |
💡 Quick Fix for IVR: If your IVR is not detecting DTMF, try adding a silent audio file as the IVR announcement. This forces RTP to flow from the PBX to the caller, which can resolve NAT-related DTMF detection issues[reference:36].
🔧 Enabling DTMF Logging for Troubleshooting
To see if DTMF digits are reaching your FreePBX system:
- 1 Go to Settings → Asterisk Logfile Settings.
- 2 Enable DTMF logging to the console or full log[reference:37].
- 3 Alternatively, run from the command line:
asterisk -rx "logger enable channel dtmf"[reference:38]. - 4 Place a test call and check
/var/log/asterisk/fullfor DTMF event entries. - 5 Look for lines containing
DTMForRFC2833to confirm digits are received[reference:39].
🏆 Best Practices for DTMF in FreePBX
✅ Trunk Configuration
- Use PJSIP (not chan_sip) for new installations[reference:40]
- Set DTMF Mode to RFC4733 (or Auto as a starting point)[reference:41]
- For chan_sip, use
dtmfmode=rfc2833in Peer Details[reference:42] - Avoid
rfc2833compensate=yesunless specifically required[reference:43]
✅ Network & Firewall
- Ensure RTP ports (10000-20000) are open[reference:44]
- Disable SIP ALG on your router
- Configure NAT settings correctly if behind NAT[reference:45]
- Use public IP or proper port forwarding[reference:46]
✅ Testing & Validation
- Enable DTMF logging during troubleshooting[reference:47]
- Test with both landline and mobile numbers[reference:48]
- Use Wireshark/tcpdump to capture RTP for deep analysis[reference:49]
- Test IVR with a silent audio file to force RTP flow[reference:50]
✅ Provider Compatibility
- Check your provider's recommended DTMF mode
- Some providers require SIP INFO instead of RFC2833
- Test with multiple providers if using failover trunks
- Document working configurations for each trunk
❓ Frequently Asked Questions
RFC2833 (also called RFC4733) is the most reliable and widely supported DTMF mode for SIP trunks. Most providers recommend RFC2833. Auto mode is a good starting point, but if you experience issues, manually set it to RFC2833. Inband should only be used when the audio codec is G.711 and the other side does not support RFC2833.
For PJSIP trunks: go to Connectivity → Trunks, edit your trunk, go to the pjsip Settings tab, then Advanced, and set DTMF Mode to Auto, RFC4733, or Inband[reference:51]. For chan_sip trunks: edit the trunk, go to the sip Settings tab, and add 'dtmfmode=rfc2833' (or inband/info) in the Peer Details section[reference:52].
Common causes include: incorrect DTMF mode on the trunk (try RFC2833), NAT issues preventing RTP from reaching the PBX[reference:53], or the IVR not playing audio before expecting digits[reference:54]. A quick fix is to add a silent audio file as the IVR announcement to force RTP flow[reference:55]. Also check that your firewall allows RTP ports (usually 10000-20000).
RFC2833 (RFC4733) sends DTMF as special RTP events separate from audio – most reliable[reference:56]. Inband sends DTMF as audio tones in the voice stream – only works with uncompressed codecs like G.711 and is susceptible to distortion[reference:57]. SIP INFO sends DTMF as SIP messages – reliable but some providers and PBXs have limited support[reference:58].
Go to Settings → Asterisk Logfile Settings and enable DTMF logging to the console or full log[reference:59]. You can also run 'asterisk -rx "logger enable channel dtmf"' from the command line[reference:60]. Then place a test call and check /var/log/asterisk/full for DTMF event entries.
📚 Related Articles & Resources (NetviaVoice)
Explore more guides to optimize your FreePBX and VoIP infrastructure:
✨ For personalized assistance with FreePBX DTMF configuration, SIP trunk setup, or VoIP troubleshooting, visit our Services page or contact our team directly.
📢 Having DTMF issues in FreePBX? Let NetviaVoice help you diagnose and fix them.