Authoring Freeswitch Modules
From FreeSWITCH Wiki
(work in progress)
[edit]
Before You Begin...
- Start with a fresh trunk checkout
- Ensure that the functionality you're looking for has not already been implemented somewhere else
- Collaborate with the original authors if there is something very close that just needs a minor change to accommodate what you need
- Review the bundled modules in freeswitch.trunk/src/mod/applications, particularly mod_skel and mod_ivrtest
[edit]
Creating Your Module
- Create your own module directory under freeswitch.trunk/src/mod/applications
- Copy the skeleton from freeswitch.trunk/src/mod/applications/mod_skel/mod_skel.c to mod_yourmodule.c
- Edit as appropriate
- Add your module to the list of available modules in freeswitch.trunk/modules.conf
[edit]
Customizing Include/Library Flags
The first time you perform a 'make' from freeswitch.trunk, a Makefile will be generated for your module
If you wish to use functionality from the libraries bundled with FreeSwitch, you might add something like this to your module's Makefile:
LOCAL_CFLAGS=-I$(switch_srcdir)/libs/libteletone/src LOCAL_LDFLAGS=$(switch_srcdir)/libs/libteletone/libteletone.la
(/work in progress)
See Also: Developer Potpourri
