2
\$\begingroup\$

I want to automatically record all my calls from my analog telephone line.

I know how to set up to record directly from the phone's microphone but the problem is I don't know when to start the recording. So a simple solution would be to hook up a simple circuit to the usb port to detect if the line is open or closed.I want usb because using ftdi or serial doesn't suit me for 2 reasons (cost and my computer does not have a serial port).

Is there a simple aproach to this problem ?

\$\endgroup\$
6
  • \$\begingroup\$ A heads-up: Not so simple. The USB port does not work like the PC parallel ports of old, i.e. they don't have individual boolean bits that go high / low: There is a data stream carried in a particular bipolar signal, with handshaking and a fairly complex data transmission protocol. Over this lies the actual protocol for transferring voice data, if that is at all applicable in the way you envisage. This question requires some fundamental research and a serious revisit, else it is likely to be voted closed. Read at least USB on WikiPedia to begin with. \$\endgroup\$ Mar 21, 2013 at 13:38
  • \$\begingroup\$ @AnindoGhosh I know the usb port needs to be enumerated and every device has is own id that is identified over the usb hub but I asked the question in hope that somebody has a simple solution by reciclying a cheap part that any of us have lying arround... \$\endgroup\$
    – opc0de
    Mar 21, 2013 at 13:40
  • \$\begingroup\$ You could recycle a keyboard: just connect 2 lines together. On the other hand, detecting when a phone line is active is a bit of a pain (I suppose you could use the "hook" switch). You could record continuously and have software detect whether there's silence? \$\endgroup\$
    – pjc50
    Mar 21, 2013 at 13:48
  • 1
    \$\begingroup\$ @opc0de Then my vote goes for any USB keyboard, mouse, or other such peripheral (not a hub). \$\endgroup\$ Mar 21, 2013 at 13:52
  • 1
    \$\begingroup\$ Anindo's keyboard solution is the simplest, but if you switch focus to another application, that dialog "Are you sure you want to format drive C:\" might get accepted if the phone rings!! \$\endgroup\$
    – MikeJ-UK
    Mar 21, 2013 at 14:41

1 Answer 1

2
\$\begingroup\$

Actually, if you are willing to deal with an unconventional driver approach, the USB interface circuitry could be very simple - just a pullup resistor.

A USB host identifies the presence of connected devices by a the use of a pullup resistor on the D+ or D- line, depending on device speed. This is detected by the core USB driver, which attempts to query the device and load (or install) an appropriate device-specific driver. However, if there is in fact no device connected, the operating system will log this as an error, in ways that can be seen by software making the right operating-system-specific inquiries (for example, the linux command dmesg will show the kernel log of this failed connection, in other systems a notification may pop up).

Interfacing to the telephone line is a subject in itself, and deserves it's own research. Essentially though, you would construct a suitable and isolated off-hook detection circuit, and have this drive some sort of switch to place the pullup resistor between one of the USB data lines and USB VBUS.

That said, the cost of a true USB interface is relatively low (in any reasonable analysis, lower than the time you'd spend encapsulating detection of phony resistor-only devices), and would enable a more traditional driver interface.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.