[Freeswitch-users] FreeSWITCH powered Application Server

Thomas Quintana quintana.thomas at gmail.com
Tue Jan 7 07:05:18 MSK 2014


Hi Ken,

Below I have provided what I hope to be enough information to get started
until the project has better documentation.

*Configuration:*
Edit https://github.com/thomasquintana/freepy/blob/master/conf/settings.pyto
connect to your instance of FreeSWITCH. You can also set the log level
and log format.

Edit https://github.com/thomasquintana/freepy/blob/master/conf/rules.py to
define the messages of interest and how to appropriately route them. As an
example, by default the HEARTBEAT event is delivered to
switchlets.heartbeat.example.Monitor<https://github.com/thomasquintana/freepy/blob/master/switchlets/heartbeat/example.py>.
Matching can be based on an exact header value or using regular
expressions. If the persistent flag is set then the switchlet (Actor) is
instantiated as a singleton so the switchlet state is preserved between
events or if the persistent flag is omitted or set to False a new instance
is created to handle new inbound events of the matching type.

*Switchlets:*
Switchlets are Pykka actors that handle events, responses, etc. as they
arrive. The only required method is on_receive(self, message) and should be
considered the entry point for every switchlet (Actor). In
https://github.com/thomasquintana/freepy/blob/master/lib/commands.py I have
used the command pattern to expose all the commands in the mod_commands
module. If you send those to the dispatcher from your actor as per the
example you will receive any responses for the command and furthermore you
can use the predefined Job-UUID to listen for any events related to that
specific command.

I am currently adding unit test coverage which will be followed by thorough
documentation over the next two weeks but I figured I would make the code
available immediately for those not faint of heart :)

Best,
Thomas Quintana


On Mon, Jan 6, 2014 at 5:36 PM, Ken Rice <krice at freeswitch.org> wrote:

>  You have any demo apps to go along with this?
>
>
>
> On 1/6/14 3:31 PM, "Thomas Quintana" <quintana.thomas at gmail.com> wrote:
>
> Hi Guys,
>
> I have been an avid user of FreeSWITCH for quite sometime and have been
> fortunate enough to attend a ClueCon convention. Recently, I had the need
> to use Python for building communications software but could not find any
> solutions that were 100% async on top of ESL and that really exposed the
> full power of the platform in an intuitive manner. This has led me to
> create an actor based framework coupled with a declarative FSM library for
> building FreeSWITCH powered Python apps. I'm still polishing the project
> but it is now in a very usable state. I hope it may be as useful to others
> as FreeSWITCH has been to me. Thank You!
>
> https://github.com/thomasquintana/freepy
>
> Best,
> Thomas Quintana
>
> P.S. Sorry for the lack of creativity in the name.
>
> ------------------------------
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> --
> Ken
>
>
>
> *http://www.FreeSWITCH.org <http://www.FreeSWITCH.org>
> http://www.ClueCon.com <http://www.ClueCon.com> http://www.OSTAG.org
> <http://www.OSTAG.org> *irc.freenode.net #freeswitch
> Twitter: @FreeSWITCH
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140106/5805345d/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list