Greetings,
I have been working on Jack support in Asterisk this weekend and I have it working, as far as I can tell. I have a Jack Asterisk dialplan application which when executed, creates two jack ports; one port is input and the other is output. These ports let you access the audio that comes from the caller, as well as control what audio gets sent back to the caller. Once I have this working well, I will extend the Jack interface to allow you to do fancier things. Right now, the jack interface is the endpoint of the phone call, but it would be even more interesting to be able to hook into the audio path of a phone call to another destination.
Anyway, the way that I have tested this is simply by using an application called "Patchage". It is a graphical jack port manager. When I make a call, I see my two jack ports appear. I can connect them together and everything I say gets sent back to me as expected.
My next step is that I want to figure out how to hook up my ports to a Pd patch, but I haven't quite figured out how to use Jack in Pd yet. I'm going to keep working on it, but I figured I would post what I have in case anyone else was curious and interested in trying it out.
Here is what I'm doing to test what I have ...
$ 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.
exten => 500,1,Answer() exten => 500,n,Jack()
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
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.
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. :)
-- Russell Bryant