DCI, you are a trip, you really lack some fundamentals to be in the business.
I do love to teach so a lesson on DTMF is in order.
DTMF stands for Dual Tone Multi Frequency, invented by Bell Labs and originally marketed under the name “Touch Tone” it replaced the pulse method of dialing.
Later as computers were integrated with telephony DTMF was the only means of the user communicating with the CTI platform. Digital Paging is a great example of how DTMF was utilized by an external platform. Of course later Voice Mail and fully interactive IVR’s came along.
The Dual refers to the fact that each tone actually consists of two tones.
The keypad is layed out in a 4x4 arrangement (the ABCD column was used for signalling applications)
Tone 1 Tone 2 Tone 3 Tone 4
1 2 3 A | Tone 5
4 5 6 B | Tone 6
7 8 9 C | Tone 7
So if you press button two for example tone 2 and tone 5 are mixed together to produce the DTMF tone.
This results in an overlap of two sine waves. If you can envision two sine waves of equal amplitude and different frequency at two places the wave forms will converge. This cross point is how DTMF is detected. It used to be done with filters, now those filters are emulated in software.
So how does this differ with CODEC’s you ask? This is where it gets somewhat more complicated.
g.711 is a lossless or linear CODEC, the waveform is reproduced within the numerical constraints of the sampling rate in a 1:1 relationship.
g.729 is a highly compressed CODEC that uses very advanced techniques including variable bandwidth depending on the Annex used (g.729 uses Annex instead of versions)
Lossy CODEC’s such as g.729 can’t reproduce the complex DTMF waveform with sufficient fidelity to allow it to be reliably decoded at the far end.
To solve the issue various Out of Band signalling methods are utilized to send the number DTMF and regenerate it at the far end. “In Band” coding refers exactly to what it describes the DTMF tones are transmitted in the RTP payload.
The out of band methods encode the DTMF in various methods as described below:
SIP Info: Sends a SIP info message for each DTMF keypress
RFC2833: Encodes the DTMF keypress in a special packet in the RTP stream
Either of these methods work fine with any lossy CODEC.
The key to successful DTMF coding is continuity of encoding method. Each voice hop that involves transcoding should be audited for DTMF method continuity.
As a for instance in Asterisk:
Phone DTMF method must match the peer method
Trunk DTMF method must match the provider method
If Asterisk SIP reinvite is used the Phone or endpoint encoding method must the provider as SIP sends the DTMF method in the SDP (Service Description) message.
This is critical information that must be understood to deploy a carrier class voice system.
I hope this explanation sheds some light on a complex subject.