What is the proper way of cleaning up after application module at asterisk shutdown? unload_module does not seem to be called, register_atexit doesn't work(or at least I can't make it to call functions from a module). Maciej Kaminski