[asterisk-dev] loading modules help

Boehm, Matthew mboehm at theplanet.com
Fri Aug 21 13:29:59 CDT 2009


Hello,

I'm trying to understand how the modules are loaded in asterisk. I can
see that every module has a "load_module" and "unload_module" function.
And I can see in main/loader.c in the load_dynamic_module() function the
call to dlopen() on the module.so file path.

 

But what I am not seeing is where the just-loaded-module's "load_module"
function is called, which registers the module and its functions to the
main core lists.

 

Take, for example, app_mp3. I type "module load app_mp3.so" which calls
main/cli:handle_load(), which passes to main/loader:ast_load_resource(),
then main/loader:load_resource then main/loader:load_dynamic_module()
which then calls the dlopen().

 

But again, nowhere along that path do I see anything calling app_mp3's
load_module() function.


What am I missing?

 

Many thanks,

Matthew

 

Matthew Boehm,

Senior MySQL DBA, The Planet

E: mboehm at theplanet.com

C: 832-253-8258

O: 281-714-4018

Certified MySQL 5.0 DBA, #226735534

Certified MySQL Cluster 5.1 DBA, #227094842

RedHat Certified Engineer, #805009324738628

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090821/9f135dcc/attachment.htm 


More information about the asterisk-dev mailing list