Mod_Example outline
mod_example
has been written to be, huh, an example, so I tried to stuff in it many useful features, in the simplest way. You can use it as a base, adding and subtracting features:
mod_example.c
code layout:
- Declarations:
- The module's mandatory three functions (
example_load
,example_runtime
,example_shutdown
) - Module definition
- A data structure (
globals
) we'll use to keep state and configuration - The function (
example_on_state_change
) we'll execute when channel state changes - The table (
example_state_handler
) describing which function to execute at which state change
- The module's mandatory three functions (
- Implementations:
- The function (
example_on_state_change
) we'll execute when channel state changes - The function (
do_config
) we use to read values fromconfig
file and initialize ...
- The function (
Get Mastering FreeSWITCH now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.