[PEAK] Trellis+Twisted example code

Phillip J. Eby pje at telecommunity.com
Sat Mar 1 21:36:41 EST 2008


If you're curious about using the Trellis with Twisted, especially 
for doing client/server protocols, you may want to check out the 
FreeSwytch library from SVN:

    svn co svn://svn.eby-sarna.com/svnroot/FreeSwytch

or browse it on the web:

    http://svn.eby-sarna.com/FreeSwytch/

It's a library for talking to the FreeSWITCH VoIP server, but it's 
also an example of wiring up a socket protocol to a trellis 
component, and doing interesting things with it.  :)

I expect to make an official first release of this library within a 
couple of weeks, after I finish testing the Conference and Member 
objects I'm working on, and I implement a curses-based (or wx-based, 
I haven't really decided yet) VoIP conference manager with it.

(I'm developing FreeSwytch in order to have a better tool for 
managing my self-improvement group's teleconferences, which are done 
over VoIP using FreeSWITCH.  I've recently gotten a lot more members 
attending the conferences, and my current management tool doesn't 
show me who's speaking at any given moment.  But FreeSWITCH keeps 
track of that information internally, and I want a good way to view 
it, and to mute/unmute lines, etc.)

But anyway, the interesting bit from the Twisted+Trellis perspective 
is the idea of a trellis "pipe": a simple class that lets you put 
data in one end, and get it out the other.  The FreeSwytch library 
makes extensive use of pipes to connect its components together, and 
to communicate with a Twisted socket transport.

I plan to backport FreeSwytch's "Pipe" class and make it a part of 
the core Trellis library, as it has proven to be extremely useful in 
the development of FreeSwytch.  Anyway, at the moment, the FreeSwytch 
code base is pretty small, so check it out if you'd like to see a 
bigger example of real-life Trellis use, before it gets bogged down 
in a bunch more FreeSWITCH-specific details.  :)




More information about the PEAK mailing list