user10709: I would like to connect my Arduino Uno to a telephone line in order to answer a call, record a sequence of DTMF tones, generate a DTMF tone in response, and hang up.
The telephone line uses a standard RJ11 connector. When a touch-tone phone is connected to the line, it receives one of two rings:

a standard ring, which signals an incoming call
a shorter "two-ring" sequence which signals a call from a local intercom

I would like my Arduino to listen for the "two-ring" sequence and only answer those calls.
How would I go about connecting my Arduino to the telephone line? Is there a shield designed for this purpose? I know I can use the tone() function to generate the DTMF tones, but I'm assuming I would need to perform some form of Discrete Fourier transformation in order to "read" the DMTF tones from the other end of the line.
Any suggestions would be appreciated.

user313: You'll need some hardware assistance for the DTMF detection and generation; I doubt many Arduinos (you didn't say which, but maybe ARM?) have the horsepower to run an FFT (and deliver the results while anyone still cares....)* tone()may not be precise enough in frequency for DTMF detection by the calling device; you'll have to check that out. A quick search finds a number of articles on building or buying tone detectors and generators.
Ringing pattern detection is a little easier but you'll still probably want to sense the ringing and convert it to a level in hardware, rather than tracking the instantaneous line voltage and trying to distinguish in software between noise, ringing, noisy ringing, and various degrees of quiet.
* But maybe this Hackaday project can give you some alternate and computationally feasible ideas.

user9962: You can interface arduino to telephone line using MT8870D chip. This IC can decode DTMF tones. Below is a reference schematic from the datasheet.

Another popular design floating on the internet is below:

There are pre-build modules available from futurelec :

You can use Holtek HT9200 IC to encode DTMF that can be interfaced with Arduino. Below is the reference schematic from its datasheet.


10709: <p>I would like to connect my Arduino Uno to a telephone line in order to answer a call, record a sequence of <a href="https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling" rel="nofollow">DTMF tones</a>, generate a DTMF tone in response, and hang up.</p>

<p>The telephone line uses a standard <a href="https://en.wikipedia.org/wiki/Modular_connector#RJ11_wiring" rel="nofollow">RJ11 connector</a>. When a <a href="https://en.wikipedia.org/wiki/Push-button_telephone#Touch-Tone" rel="nofollow">touch-tone phone</a> is connected to the line, it receives one of two rings:</p>

<ul>
<li>a standard ring, which signals an incoming call</li>
<li>a shorter "two-ring" sequence which signals a call from a local intercom</li>
</ul>

<p>I would like my Arduino to listen for the "two-ring" sequence and only answer those calls.</p>

<p>How would I go about connecting my Arduino to the telephone line? Is there a shield designed for this purpose? I know I can use the <a href="http://www.arduino.cc/en/Tutorial/Tone" rel="nofollow"><code>tone()</code> function</a> to generate the DTMF tones, but I'm assuming I would need to perform some form of <a href="https://en.wikipedia.org/wiki/Discrete_Fourier_transform" rel="nofollow">Discrete Fourier transformation</a> in order to "read" the DMTF tones from the other end of the line.</p>

<p>Any suggestions would be appreciated.</p>
 313: <p>You'll need some hardware assistance for the DTMF detection and generation; I doubt many Arduinos (you didn't say which, but maybe ARM?) have the horsepower to run an FFT (and deliver the results while anyone still cares....)* <code>tone()</code>may not be precise enough in frequency for DTMF detection by the calling device; you'll have to check that out. A quick search finds a number of articles on building or buying tone detectors and generators.</p>

<p>Ringing pattern detection is a little easier but you'll still probably want to sense the ringing and convert it to a level in hardware, rather than tracking the instantaneous line voltage and trying to distinguish in software between noise, ringing, noisy ringing, and various degrees of quiet.</p>

<p><sub>* But maybe <a href="http://hackaday.com/2011/10/20/detecting-dtmf-tones-from-scratch/" rel="nofollow">this Hackaday project</a> can give you some alternate and computationally feasible ideas.</sub></p>
 9962: <p>You can interface arduino to telephone line using MT8870D chip. This IC can decode DTMF tones. Below is a reference schematic from the datasheet.</p>

<p><img src="https://i.stack.imgur.com/PcIHu.png" alt="Ref Design"></p>

<p>Another popular design floating on the internet is below:</p>

<p><img src="https://i.stack.imgur.com/8uwXd.gif" alt="popular design"></p>

<p>There are pre-build modules available from <a href="http://www.futurlec.com/Mini_MT8870.shtml" rel="noreferrer">futurelec</a> :</p>

<p><img src="https://i.stack.imgur.com/ZGJcL.jpg" alt="module"></p>

<p>You can use Holtek HT9200 IC to encode DTMF that can be interfaced with Arduino. Below is the reference schematic from its datasheet.</p>

<p><img src="https://i.stack.imgur.com/xhE7V.png" alt="encoder"></p>
