ALSA sound card connected to PSTN

I’ve read many docs and I remember that there was one that could use a full-duplex sound card to do asterisk.

I’m doing a lot of hardware hacking and I’d like to use my sound card with Asterisk. I currently have a “chat cord” that links the phone line to standard 8mm audio plugs. I have a second sound card that Asterisk could use.

I’m wondering if this is possible. I’ll hack together a device with a relay so the computer can control when its on or off hook and be able to detect rings.

Is it easy to modify an existing driver to support it?

If I didn’t have Asterisk, I could still write PHP scripts to hack stuff together. But Asterisk would be useful.

-Dave