[PD] Pd + asterisk?

Russell Bryant russell at russellbryant.net
Sun Dec 2 21:45:00 CET 2007


I've been an Asterisk developer for a few years.  I now lead the software team
in charge of Asterisk at Digium, Inc.  I just learned about Pd a few weeks ago
when I met Hans.  I think Pd is very cool, and I'm really excited to see what we
can come up with to combine Pd and Asterisk.

I have been diving in head first to learn about how Pd works, and what the
possibilities could be.  However, I would like to discuss what the goals of "Pd
+ Asterisk" are.

Coming up with the most powerful integration between the two will take two parts:

1) What are the potential applications that we can dream up?  I can provide
access to any aspect of a phone call.  That includes the media streams and
various bits of meta-deta, such as the digits that have been pressed.  What can
those of you that have the real knowledge about Pd think of that would be cool
to do with a phone call?

2) Given the applications above, what are the primitives required to accomplish
them?  Both Asterisk and Pd are toolkits.  It's all about breaking things down
to a general solution that is the most flexible to accomplish current and future

Hans-Christoph Steiner wrote:
> Fun stuff, three of these.  I had been vaguely thing of making some  
> kind of AGI object for Pd.  It would be nice to easily tap into  
> Asterisk from Pd.

Just a quick bit of background.  AGI is an interface that exists in Asterisk to
use the programming language of your choice to control phone calls.  It uses
stdin/stdout or a TCP socket to send/receive text commands and responses.

I'm not sure that this interface makes sense for Pd.  It's tempting to see if we
can fit into something that exists, but my gut is telling me that Pd is a
different animal that should be approached in a different way.

> A softphone that uses Jack would be handy too... on that note, I  
> wonder how hard it would be to make a softphone in Pd :)

A softphone in Pd?  Ha ... I suppose it's possible.  We can come back to this
one.  ;)

For now, I think I'd rather start with hooking Pd into Asterisk so that it
becomes a part of a larger system.  Asterisk can handle the phone calls part,
and Pd gets to do what it is good at already.

I've been looking at [streamin~]/[streamout~] a bit this weekend.  I am thinking
of using that as an initial proof of concept to get audio from a phone call in
and out of Pd.  But, please yell at me if there is something else I should start
with.  In the end, I want to provide a couple of different things in regards to
phone audio.

1) I want to make it possible to develop interactive phone applications using
Pd.  Basically, I want the audio from a call to go into Pd, and to get audio
back out that is sent back in the caller.

2) I also want to be able to hook Pd into the audio path of a call.  So, the
audio coming from one side of the call is processed through a Pd patch before
sent out to the other side of the call.

Finally, aside from the audio of a call, I want to be able to pass events into
the Pd patch, as well.  The first part of this would be any digits pressed on
the phone, but there could be other things.  Some telephony technologies allow
text messages to be sent within a call, for example.

Anyway, those are just some initial thoughts.  Let your mind wander, though.
Telephones are everywhere, especially now that so many people carry cell phones.
 What could that mean for people using Pd in performances?  interactive art
projects?  If you have some ideas, what can I do to make it possible?  Just let
me know.  :)

Russell Bryant

More information about the Pd-list mailing list