alexd <
trof...@hotmail.com> wrote:
> Theo Markettos (for it is he) wrote:
>
> > I was hoping there was a way to use a USB Winmodem as an FXO port, but I
> > failed to find anything...
>
> If you could, you'd probably be pushing the limits of the CPU.
Not really, if you chose your codec carefully. A Winmodem is essentially a
DAC/ADC in a box, with a relay for switching on/off hook. So all you need
to do is keep it filled with 8KHz audio - that's 64kbps in each direction.
If you're encoding simple formats like a-law or u-law you should be fine - I
agree that trying to do GSM or ADPCM could be more CPU intensive (but the
GPU may come in handy here). I've done a-law/u-law on a 233MHz 32MB MIPS
router, while GSM transcoding was a bit much.
The trouble seems to be the relative paucity of USB modems these days -
there are plenty of PCI winmodems, but not so many USB.
<further digging ensues>
It looks like Smartlink USB modems, like this one (probably vendor:product
0483:7554):
http://www.tmart.com/56K-USB-2.0-Fax-Modem-External-Dial-Up-PCI-Voice-V.92_p97534.html
have a Linux USB driver (sl-modem-source package in Debian/Ubuntu).
Some Smartlink AMR/PCI drivers support ALSA, but this one doesn't. However
it makes a very simple device /dev/slusb0 to which you can read and write
audio samples, with an ioctl for setting sample rate and on/off hook.
So it probably wouldn't be hard to plumb this into a console channel in
Asterisk to get a cheap FXO port. Echo cancellation might be an issue, I
don't know if Asterisk handles that. I'd hope Asterisk would do DTMF
en/decode, but worst case you could pulse dial with little effort (or simply
play back stored samples for proper DTMF).
There might be a way to hack it into an FXS port too (use the hookswitch
relay to switch ring current, or something).
Theo