From personal experience I can say that it makes sense to start at the outer levels and work your way in. A gentle way to get into what the source code does is to look at the source code for API commands or dialplan applications with which you are very familiar or that have very simple functions.
I would start with mod_commands.c and look at simple commands like "version" and "banner". Once you get the hang of those then try digging a little deeper, like with the "show" API. That API is a great example of how the FS devs handle argument parsing and use the occasional "really large" case block. If you would rather start with the dialplan stuff then check out mod_dptools.c. Look at really simple apps like "log". You'll see lots of references to the "session" which you MUST learn about if you want to do anything with a live call. One thing you'll see is that the functions in the "outer" layers will make calls to "core" functions. As homework I recommend you look in mod_dptools.c for the definition of the "playback" app. Hint: to get the whole picture you'll need to also look in switch_ivr_play_say.c. ;) Have fun and don't be afraid to ask questions here or in the IRC channel. -MC On Sun, Feb 17, 2013 at 4:42 PM, Steven Ayre <steveayre@gmail.com> wrote:
Use the source, Luke.
Digging around in the source is one way to explore how FS works. Some is easier to understand than others. Threading is heavily used so understanding mutexes etc is useful.
I'd highly recommend that you read this site though: http://docs.freeswitch.org/
That documents the core API. A lot is based on APR, plus some extra stuff like the module interfaces.
Steve
On 18 Feb 2013, at 00:00, Brian Foster <bdfoster@endigotech.com> wrote:
I think I've come to a stage in my life where I'm more interested than ever in learning the internals of FreeSWITCH and start contributing code to it. I've been following the project for a few years, but I've never touched the code. It's time to change that.
Is there a place on the wiki someone can point me to so I can start understanding the FS core? I'm talking fairly basic, beginner level stuff.
Sent from my iPhone _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org