static int unload_module(void) { ast_channel_unregister(&announce_tech); ast_channel_unregister(&record_tech); cleanup_capabilities(); return 0; }
/*! \brief Function called when our module is unloaded */ static int unload_module(void) { ast_channel_unregister(&multicast_rtp_tech); multicast_rtp_tech.capabilities = ast_format_cap_destroy(multicast_rtp_tech.capabilities); return 0; }
/*! * \internal * \brief Shutdown the local proxy channel. * \since 12.0.0 * * \return Nothing */ static void local_shutdown(void) { struct local_pvt *p; struct ao2_iterator it; /* First, take us out of the channel loop */ ast_cli_unregister_multiple(cli_local, ARRAY_LEN(cli_local)); ast_manager_unregister("LocalOptimizeAway"); ast_channel_unregister(&local_tech); it = ao2_iterator_init(locals, 0); while ((p = ao2_iterator_next(&it))) { if (p->base.owner) { ast_softhangup(p->base.owner, AST_SOFTHANGUP_APPUNLOAD); } ao2_ref(p, -1); } ao2_iterator_destroy(&it); ao2_ref(locals, -1); locals = NULL; ao2_cleanup(local_tech.capabilities); local_tech.capabilities = NULL; STASIS_MESSAGE_TYPE_CLEANUP(ast_local_optimization_begin_type); STASIS_MESSAGE_TYPE_CLEANUP(ast_local_optimization_end_type); STASIS_MESSAGE_TYPE_CLEANUP(ast_local_bridge_type); }
static int unload_module(void) { AST_TEST_UNREGISTER(test_features_channel_dtmf); AST_TEST_UNREGISTER(test_features_channel_interval); ast_channel_unregister(&test_features_chan_tech); return 0; }
static int __unload_module(void) { struct phone_pvt *p, *pl; /* First, take us out of the channel loop */ ast_channel_unregister(type); if (!ast_mutex_lock(&iflock)) { /* Hangup all interfaces if they have an owner */ p = iflist; while(p) { if (p->owner) ast_softhangup(p->owner, AST_SOFTHANGUP_APPUNLOAD); p = p->next; } iflist = NULL; ast_mutex_unlock(&iflock); } else { ast_log(LOG_WARNING, "Unable to lock the monitor\n"); return -1; } if (!ast_mutex_lock(&monlock)) { if (monitor_thread > AST_PTHREADT_NULL) { pthread_cancel(monitor_thread); pthread_join(monitor_thread, NULL); } monitor_thread = AST_PTHREADT_STOP; ast_mutex_unlock(&monlock); } else { ast_log(LOG_WARNING, "Unable to lock the monitor\n"); return -1; } if (!ast_mutex_lock(&iflock)) { /* Destroy all the interfaces and free their memory */ p = iflist; while(p) { /* Close the socket, assuming it's real */ if (p->fd > -1) close(p->fd); pl = p; p = p->next; /* Free associated memory */ free(pl); } iflist = NULL; ast_mutex_unlock(&iflock); } else { ast_log(LOG_WARNING, "Unable to lock the monitor\n"); return -1; } return 0; }
/*! * \internal * \brief Shutdown the local proxy channel. * \since 12.0.0 * * \return Nothing */ static void local_shutdown(void) { /* First, take us out of the channel loop */ ast_cli_unregister_multiple(cli_local, ARRAY_LEN(cli_local)); ast_manager_unregister("LocalOptimizeAway"); ast_channel_unregister(&local_tech); ao2_ref(locals, -1); locals = NULL; ao2_cleanup(local_tech.capabilities); local_tech.capabilities = NULL; STASIS_MESSAGE_TYPE_CLEANUP(ast_local_optimization_begin_type); STASIS_MESSAGE_TYPE_CLEANUP(ast_local_optimization_end_type); STASIS_MESSAGE_TYPE_CLEANUP(ast_local_bridge_type); }
/*! \brief Unload the bridge interaction channel from Asterisk */ static int unload_module(void) { ast_channel_unregister(&bridge_tech); bridge_tech.capabilities = ast_format_cap_destroy(bridge_tech.capabilities); return 0; }
/*! \brief Function called when our module is unloaded */ static int unload_module(void) { ast_channel_unregister(&multicast_rtp_tech); return 0; }
/*! \brief Unload the bridge interaction channel from Asterisk */ static int unload_module(void) { ast_channel_unregister(&bridge_tech); return 0; }