-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Mastering FreeSWITCH
By :
Each FreeSWITCH module must at least declare three functions, LOAD, RUNTIME, and SHUTDOWN:

The LOAD and SHUTDOWN functions must be implemented, and are called at startup and when unloading the module. In LOAD you create and initialize the module's data structures, get values from the configuration file, and get your module ready for work. In SHUTDOWN you do any housekeeping needed to happily forget about your module, and in particular you release any resources you may have locked or allocated during module initialization and lifespan.
RUNTIME function implementation is not mandatory. For example, you must declare it, but you can avoid implementing it. If you implement it, the RUNTIME function will be executed in its own thread after the LOAD function has finished execution, for example, when the module has been successfully loaded by FreeSWITCH.
RUNTIME is often (not always) implemented as a looping function that will continue to run until module unloads.
Let...