Robert Rozman
2004-Oct-09 08:43 UTC
[Asterisk-Users] Howtos on writting applications or modules ?
Hi, I'm particularly interested in extending some of existing modules, like cdr_csv for example. I've taken a closer look at the source and I see, that it registers subroutine to get called to deal with CDR data. I have following more general questions regarding app or modules API: - where could I find more info on modules API ? - what types of modules exist (like maybe modules that are called only on certain events, then modules that are called in certain time intervals etc...) - what existing modules are good examples of different types to start at ? - if I open tcp port in one module - can I use it in another module ? Thanks in advance, Robert.
Matthew Boehm
2004-Oct-09 12:19 UTC
[Asterisk-Users] Howtos on writting applications or modules ?
> - where could I find more info on modules API ?There isn't really any hard core documentation, but I think you can run 'make progdocs' and get some stuff. Everything I've learned/needed to learn about the API I have learned from reading the code to other modules/apps.> - what types of modules exist (like maybe modules that are called only on > certain events, then modules that are called in certain time intervals > etc...)Got no clue on that. Most of the modules/apps I've written/patched are loaded by issuing 'load <mod name>.so" on the CLI. Most modules/apps are loaded and then something triggers asterisk to execute the main routine of that module/app (the name of that routine is set when the mod/app is registered).> - what existing modules are good examples of different types to start at ?everything inside apps/> - if I open tcp port in one module - can I use it in another module ?I don't believe you can share resources across modules like that. For instance, if I have two seperate apps that both connect to database, I do not believe (nor think it wise) to share a connection handler between them. Matthew