Exemplo n.º 1
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);
}
Exemplo n.º 2
0
static void endpoints_stasis_cleanup(void)
{
	STASIS_MESSAGE_TYPE_CLEANUP(ast_endpoint_snapshot_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_endpoint_state_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_endpoint_contact_state_type);

	ao2_cleanup(endpoint_cache_all);
	endpoint_cache_all = NULL;
}
static int unload_module(void)
{
	ao2_cleanup(recordings);
	recordings = NULL;
	STASIS_MESSAGE_TYPE_CLEANUP(stasis_app_recording_snapshot_type);
	return 0;
}
Exemplo n.º 4
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);
}
Exemplo n.º 5
0
static int unload_module(void)
{
	RAII_VAR(struct stasis_message_router *, router, ast_cdr_message_router(), ao2_cleanup);

	if (router) {
		stasis_message_router_remove(router, appcdr_message_type());
	}
	STASIS_MESSAGE_TYPE_CLEANUP(appcdr_message_type);
	ast_unregister_application(nocdr_app);
	ast_unregister_application(resetcdr_app);
	return 0;
}
Exemplo n.º 6
0
void manager_confbridge_shutdown(void) {
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_start_type);
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_end_type);
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_join_type);
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_leave_type);
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_start_record_type);
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_stop_record_type);
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_mute_type);
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_unmute_type);
	STASIS_MESSAGE_TYPE_CLEANUP(confbridge_talking_type);

	if (bridge_state_router) {
		stasis_message_router_unsubscribe(bridge_state_router);
		bridge_state_router = NULL;
	}

	if (channel_state_router) {
		stasis_message_router_unsubscribe(channel_state_router);
		channel_state_router = NULL;
	}
}
Exemplo n.º 7
0
static void wait_cleanup(void)
{
	STASIS_MESSAGE_TYPE_CLEANUP(cache_guarantee_type);
}
Exemplo n.º 8
0
static int unload_module(void)
{
	STASIS_MESSAGE_TYPE_CLEANUP(stasis_test_message_type);
	return 0;
}
Exemplo n.º 9
0
static void stasis_channels_cleanup(void)
{
	stasis_caching_unsubscribe_and_join(channel_by_name_topic);
	channel_by_name_topic = NULL;
	ao2_cleanup(channel_cache_by_name);
	channel_cache_by_name = NULL;
	ao2_cleanup(channel_cache_all);
	channel_cache_all = NULL;

	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_snapshot_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_dial_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_varset_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_user_event_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_hangup_request_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_dtmf_begin_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_dtmf_end_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_hold_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_unhold_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_chanspy_start_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_chanspy_stop_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_fax_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_hangup_handler_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_moh_start_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_moh_stop_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_monitor_start_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_monitor_stop_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_agent_login_type);
	STASIS_MESSAGE_TYPE_CLEANUP(ast_channel_agent_logoff_type);
}
Exemplo n.º 10
0
/*! \brief Cleanup the \ref stasis system level items */
static void stasis_system_cleanup(void)
{
    ao2_cleanup(system_topic);
    system_topic = NULL;
    STASIS_MESSAGE_TYPE_CLEANUP(ast_network_change_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_system_registry_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_available_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_offertimerstart_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_requested_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_requestacknowledged_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_callerstopmonitoring_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_callerstartmonitoring_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_callerrecalling_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_recallcomplete_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_failure_type);
    STASIS_MESSAGE_TYPE_CLEANUP(ast_cc_monitorfailed_type);
}
Exemplo n.º 11
0
static void stasis_cache_cleanup(void)
{
	STASIS_MESSAGE_TYPE_CLEANUP(stasis_cache_clear_type);
	STASIS_MESSAGE_TYPE_CLEANUP(stasis_cache_update_type);
}
Exemplo n.º 12
0
/*!
 * \internal
 * \brief Clean up resources on Asterisk shutdown
 */
static void pickup_shutdown(void)
{
	STASIS_MESSAGE_TYPE_CLEANUP(ast_call_pickup_type);
}