<div dir="ltr">Hi Ken,<div><br></div><div>Below I have provided what I hope to be enough information to get started until the project has better documentation.</div><div><br></div>
<div><b>Configuration:</b></div><div>Edit <a href="https://github.com/thomasquintana/freepy/blob/master/conf/settings.py" target="_blank">https://github.com/thomasquintana/freepy/blob/master/conf/settings.py</a> to connect to your instance of FreeSWITCH. You can also set the log level and log format.</div>
<div><br></div><div>Edit <a href="https://github.com/thomasquintana/freepy/blob/master/conf/rules.py">https://github.com/thomasquintana/freepy/blob/master/conf/rules.py</a> to define the messages of interest and how to appropriately route them. As an example, by default the HEARTBEAT event is delivered to <a href="https://github.com/thomasquintana/freepy/blob/master/switchlets/heartbeat/example.py">switchlets.heartbeat.example.Monitor</a>. 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.</div>
<div><br></div><div><b>Switchlets:</b></div><div>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 <a href="https://github.com/thomasquintana/freepy/blob/master/lib/commands.py">https://github.com/thomasquintana/freepy/blob/master/lib/commands.py</a> 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.</div>
<div><br></div><div>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 :)</div>
<div><br></div><div>Best,</div><div>Thomas Quintana</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 6, 2014 at 5:36 PM, Ken Rice <span dir="ltr"><<a href="mailto:krice@freeswitch.org" target="_blank">krice@freeswitch.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<font face="Monaco, Courier New"><span style="font-size:11pt">You have any demo apps to go along with this?<div><div class="h5"><br>
<br>
<br>
On 1/6/14 3:31 PM, "Thomas Quintana" <<a href="http://quintana.thomas@gmail.com" target="_blank">quintana.thomas@gmail.com</a>> wrote:<br>
<br>
</div></div></span></font><blockquote><font face="Monaco, Courier New"><span style="font-size:11pt"><div><div class="h5">Hi Guys,<br>
<br>
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!<br>
<br>
<a href="https://github.com/thomasquintana/freepy" target="_blank">https://github.com/thomasquintana/freepy</a><br>
<br>
Best,<br>
Thomas Quintana<br>
<br>
P.S. Sorry for the lack of creativity in the name.<br>
<br>
</div></div><hr align="CENTER" size="3" width="95%"></span></font><font><font face="Consolas, Courier New, Courier"><span style="font-size:10pt">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="http://consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="http://FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></span></font></font></blockquote><span class="HOEnZb"><font color="#888888"><font><font face="Consolas, Courier New, Courier"><span style="font-size:10pt"><br>
</span></font></font><font face="Monaco, Courier New"><span style="font-size:11pt">-- <br>
Ken<br>
<font color="#0000FF"><u><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br>
<a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br>
</u></font><a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
Twitter: @FreeSWITCH<br>
<br>
</span></font>
</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>