Subject: Re: ISDN programming
To: Wojciech Puchar <wojtek@chylonia.3miasto.net>
From: Gavan Fantom <gavan@coolfactor.org>
List: netbsd-users
Date: 05/26/2002 11:28:27
On Sun, 26 May 2002, Wojciech Puchar wrote:
> i'm completely new to it, searching docs but can't find anything about
> possibility of using it as audio interface. i mean calling/answering calls
> from user level program and then reading/writing 8Khz ulaw sound?
>
> is it possible?
Yes it is. isdnd cann run a script when an incoming call is received,
which takes as a parameter the raw isdntel device the call is routed to.
You have to be a bit careful with the sizes of your read/writes, but it's
good enough to carefully dd messages to/from, and some other programs are
happy with it. dtmfdecode springs to mind (especially if you modify it to
print a newline after every character - makes it nicer for shell scripts
to deal with) and
mpg123 -s -m -r 44100 "$MP3" | sox -s -w -c 1 -r 44100 -t raw - -r 8000 -c
1 -A -b -t raw - resample >$DEVICE
Not like I've done anything like this, oh no. :)
This might have changed with the import of isdn4bsd into -current (I used
the isdn4bsd release with the 1.4 branch and the 1.5 branch) but I doubt
it's too much different.
--
Gillette - the best a man can forget