[PD] Pd + asterisk?
lists at proquariat.de
Wed Dec 19 13:12:52 CET 2007
thanks for this, I just tried it, it works (kind of)...
> 1) Install my branch of Asterisk that contains app_jack.
> $ svn co http://svn.digium.com/svn/asterisk/team/russell/jack asterisk-jack
> $ cd asterisk-jack
> $ ./configure && make
> $ sudo make install
> The jack interface is in apps/app_jack.c in case anyone cares.
There was the first problem, app_jack somehow didn't build without any
errors, configure said jack...h was there, but there was no app_jack.so
build. I had to do a 'make menuconfig' and disable+reenable app_jack.
> 3) Make sure jackd is running. For the sake of efficiency, specify 8 kHz,
> because for most codecs used for phone calls, that's all you get. Also, specify
> 160 frames per period. For 8 kHz audio, this comes out to 20 ms periods, which
> is generally the packet size used for Voice over IP.
> $ sudo jackd -d dummy -r 8000 -p 160
I used 128 frames, this sounded a bit better. But I think it would be
much better if app_jack would adapt to the running jack. I sometimes use
jack for connecting to a firewire-soundcard and with 8KHz it's
impossible to have good sound out of your speakers ;)
> 4) Make a call to the extension created in Asterisk in step 2. You should see
> the two new jack ports become available. In theory, they are available for
> connection to any application that can use Jack. The only thing I have done so
> far is to use the "patchage" application to connect the ports directly together
> to verify that the audio is flowing correctly.
I tried Pd and had some strange problems (I don't know where they come
from) No problem if you connect adc~ from Asterisk to dac~ on Asterisk,
I hear myself with a rather extreme echo. But I can't hear a simple osc~
on the phone, neither can I hear myself on my PC-speakers when I talk
into the phone.
> Now, to figure out how to hook up arbitrary jack ports to Pd ... if anyone has
> any pointers, it would be much appreciated. I'm still very new to Pd. :)
You could do this in Asterisk with a System(jack_connect ...) ;)
Do you think it would be possible to tell app_jack to connect to
jack-server running as Pid x? Jack sometimes screws up your system when
it runs as root, or other software does, because it has to run as root
too. I configured my Asterisk to run as myself, but that's quite complex.
Anyway, it's cool you coded all this, thanks.
More information about the Pd-list