コード例 #1
0
ファイル: app_pickup2.c プロジェクト: sipwise/asterisk
static int unload_module(void)
{
  	ast_module_user_hangup_all();
	ast_unregister_application(app3);
	ast_unregister_application(app2);
	return ast_unregister_application(app);
}
コード例 #2
0
int unload_module(void)
{
	int res;
	res = ast_unregister_application(app_detectfax);
	res |= ast_unregister_application(app_background_detect);
	ast_module_user_hangup_all();
	return res;
}
コード例 #3
0
ファイル: app_waitforsilence.c プロジェクト: mtulio/mtulio
static int unload_module(void)
{
	int res;
	res = ast_unregister_application(app_silence);
	res |= ast_unregister_application(app_noise);

	return res;
}
コード例 #4
0
ファイル: app_test.c プロジェクト: hewu2008/asterisk
static int unload_module(void)
{
    int res;

    res = ast_unregister_application(testc_app);
    res |= ast_unregister_application(tests_app);

    return res;
}
コード例 #5
0
ファイル: app_db.c プロジェクト: mtulio/mtulio
static int unload_module(void)
{
	int retval;

	retval = ast_unregister_application(dt_app);
	retval |= ast_unregister_application(d_app);

	return retval;
}
コード例 #6
0
int unload_module(void)
{
	STANDARD_HANGUP_LOCALUSERS;
	ast_cli_unregister(&cli_show_confs);
	ast_cli_unregister(&cli_conf);
	ast_unregister_application(app3);
	ast_unregister_application(app2);
	return ast_unregister_application(app);
}
コード例 #7
0
ファイル: app_playtones.c プロジェクト: GGGO/asterisk
static int unload_module(void)
{
	int res;

	res = ast_unregister_application(playtones_app);
	res |= ast_unregister_application(stopplaytones_app);

	return res;
}
int unload_module(void)
{
	ast_unregister_application("Monitor");
	ast_unregister_application("StopMonitor");
	ast_unregister_application("ChangeMonitor");
	ast_manager_unregister("Monitor");
	ast_manager_unregister("StopMonitor");
	ast_manager_unregister("ChangeMonitor");
	return 0;
}
コード例 #9
0
static int unload_module(void *mod)
{
	int res;

	res = ast_unregister_application(testc_app);
	res |= ast_unregister_application(tests_app);

	STANDARD_HANGUP_LOCALUSERS;

	return res;	
}
コード例 #10
0
static int unload_module(void *mod)
{
	int res;

	res = ast_unregister_application(app_verbose);
	res |= ast_unregister_application(app_log);

	STANDARD_HANGUP_LOCALUSERS;

	return res;	
}
コード例 #11
0
ファイル: app_system.c プロジェクト: OPSF/uClinux
static int unload_module(void)
{
	int res;

	res = ast_unregister_application(app);
	res |= ast_unregister_application(app2);
	
	ast_module_user_hangup_all();

	return res;
}
コード例 #12
0
int sqlite_unload_module(void)
{
	int res;
	if (db)
		sqlite_close(db);
	res = ast_unregister_application (dt_app);
	res |= ast_unregister_application (d_app);
	res |= ast_unregister_application (p_app);
	res |= ast_unregister_application (g_app);
	return res;
}
コード例 #13
0
int unload_module(void)
{
	ast_unregister_application(app_return);
	ast_unregister_application(app_pop);
	ast_unregister_application(app_gosubif);
	ast_unregister_application(app_gosub);

	STANDARD_HANGUP_LOCALUSERS;

	return 0;
}
コード例 #14
0
ファイル: app_macro.c プロジェクト: bugrahantopall/asterisk
static int unload_module(void)
{
	int res;

	res = ast_unregister_application(if_app);
	res |= ast_unregister_application(exit_app);
	res |= ast_unregister_application(app);
	res |= ast_unregister_application(exclusive_app);

	return res;
}
コード例 #15
0
int unload_module(void)
{
	int res;

	res = ast_unregister_application(app2);
	res |= ast_unregister_application(app);

	STANDARD_HANGUP_LOCALUSERS;

	return res;
}
コード例 #16
0
ファイル: app_while.c プロジェクト: bklang/asterisk
static int unload_module(void)
{
	int res;
	
	res = ast_unregister_application(start_app);
	res |= ast_unregister_application(stop_app);
	res |= ast_unregister_application(exit_app);
	res |= ast_unregister_application(continue_app);

	return res;
}
コード例 #17
0
/*
 * Standard module functions ...
 */
static int unload_module(void)
{
	/* remove the registed indications... */
	ast_unregister_indication_country(NULL);

	/* and the functions */
	ast_cli_unregister_multiple(cli_indications, sizeof(cli_indications) / sizeof(struct ast_cli_entry));
	ast_unregister_application("PlayTones");
	ast_unregister_application("StopPlayTones");
	return 0;
}
コード例 #18
0
ファイル: app_cdr.c プロジェクト: huangjingpei/asterisk
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;
}
コード例 #19
0
static int unload_module(void *mod)
{
	int res;
	
	res = ast_unregister_application(setcdruserfield_app);
	res |= ast_unregister_application(appendcdruserfield_app);
	res |= ast_manager_unregister("SetCDRUserField");

	STANDARD_HANGUP_LOCALUSERS;

	return res;
}
コード例 #20
0
static int unload_module(void *mod)
{
	int res;

	res = ast_unregister_application(app_exec);
	res |= ast_unregister_application(app_tryexec);
	res |= ast_unregister_application(app_execif);

	STANDARD_HANGUP_LOCALUSERS;

	return res;
}
コード例 #21
0
int unload_module(void)
{
	int res;

	res = ast_custom_function_unregister(&acf_cut);
	res |= ast_custom_function_unregister(&acf_sort);
	res |= ast_unregister_application(app_sort);
	res |= ast_unregister_application(app_cut);

	STANDARD_HANGUP_LOCALUSERS;

	return res;
}
コード例 #22
0
/*
 * Standard module functions ...
 */
int unload_module(void)
{
	/* remove the registed indications... */
	ast_unregister_indication_country(NULL);

	/* and the functions */
	ast_cli_unregister(&add_indication_cli);
	ast_cli_unregister(&remove_indication_cli);
	ast_cli_unregister(&show_indications_cli);
	ast_unregister_application("PlayTones");
	ast_unregister_application("StopPlayTones");
	return 0;
}
コード例 #23
0
ファイル: app_dahdibarge.c プロジェクト: axiatp/asterisk
static int unload_module(void) 
{
	int res = 0;

	if (*dahdi_chan_mode == CHAN_DAHDI_PLUS_ZAP_MODE) {
		res |= ast_unregister_application(dahdi_app);
	}

	res |= ast_unregister_application(zap_app);
	
	ast_module_user_hangup_all();

	return res;
}
コード例 #24
0
ファイル: app_chanspy.c プロジェクト: litnimax/asterisk
static int dahdiscan_exec(struct ast_channel *chan, const char *data)
{
	const char *spec = "DAHDI";
	struct ast_flags flags;
	struct spy_dtmf_options user_options = {
		.cycle = '#',
		.volume = '\0',
		.exit = '*',
	};
	struct ast_format *oldwf;
	int res;
	char *mygroup = NULL;

	/* Coverity - This uninit_use should be ignored since this macro initializes the flags */
	ast_clear_flag(&flags, AST_FLAGS_ALL);

	if (!ast_strlen_zero(data)) {
		mygroup = ast_strdupa(data);
	}
	ast_set_flag(&flags, OPTION_DTMF_EXIT);
	ast_set_flag(&flags, OPTION_DTMF_CYCLE);
	ast_set_flag(&flags, OPTION_DAHDI_SCAN);

	oldwf = ao2_bump(ast_channel_writeformat(chan));
	if (ast_set_write_format(chan, ast_format_slin) < 0) {
		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
		ao2_cleanup(oldwf);
		return -1;
	}

	res = common_exec(chan, &flags, 0, 0, &user_options, mygroup, NULL, spec, NULL, NULL, NULL, NULL);

	if (oldwf && ast_set_write_format(chan, oldwf) < 0)
		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
	ao2_cleanup(oldwf);

	return res;
}

static int unload_module(void)
{
	int res = 0;

	res |= ast_unregister_application(app_chan);
	res |= ast_unregister_application(app_ext);
	res |= ast_unregister_application(app_dahdiscan);

	return res;
}
コード例 #25
0
int unload_module(void)
{
	STANDARD_HANGUP_LOCALUSERS;
	if (sound > -1)
		close(sound);
	return ast_unregister_application(app);
}
コード例 #26
0
int unload_module( void ) {
	ast_log( LOG_NOTICE, "unloading " APP_CONFERENCE_NAME " module\n" );
	STANDARD_HANGUP_LOCALUSERS;
	unregister_conference_cli();
	ast_custom_function_unregister(&acf_nconfcount);
	return ast_unregister_application( app ) ;
}
コード例 #27
0
static int unload_module(void *mod)
{
	int res;

	res = ast_unregister_application(app);
	
	return res;
}
コード例 #28
0
static int unload_module( void )
{
	int res = 0;

	ast_log( LOG_NOTICE, "Unloading app_vonference module\n" ) ;

	ast_module_user_hangup_all();

	unregister_conference_cli() ;

	res |= ast_unregister_application( app ) ;
	res |= ast_unregister_application( app2 ) ;

	dealloc_conference() ;
	
	return res ;
}
コード例 #29
0
ファイル: app_chanspy.c プロジェクト: RoyalG41/Asterisk
static int dahdiscan_exec(struct ast_channel *chan, const char *data)
{
	const char *spec = "DAHDI";
	struct ast_flags flags;
	struct spy_dtmf_options user_options = {
		.cycle = '#',
		.volume = '\0',
		.exit = '*',
	};
	int oldwf = 0;
	int res;
	char *mygroup = NULL;

	ast_clear_flag(&flags, AST_FLAGS_ALL);

	if (!ast_strlen_zero(data)) {
		mygroup = ast_strdupa(data);
	}
	ast_set_flag(&flags, OPTION_DTMF_EXIT);
	ast_set_flag(&flags, OPTION_DTMF_CYCLE);
	ast_set_flag(&flags, OPTION_DAHDI_SCAN);

	oldwf = chan->writeformat;
	if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
		return -1;
	}

	res = common_exec(chan, &flags, 0, 0, &user_options, mygroup, NULL, spec, NULL, NULL, NULL, NULL);

	if (oldwf && ast_set_write_format(chan, oldwf) < 0)
		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");

	return res;
}

static int unload_module(void)
{
	int res = 0;

	res |= ast_unregister_application(app_chan);
	res |= ast_unregister_application(app_ext);
	res |= ast_unregister_application(app_dahdiscan);

	return res;
}
コード例 #30
0
ファイル: app_echo.c プロジェクト: asterisk/asterisk
static int echo_exec(struct ast_channel *chan, const char *data)
{
	int res = -1;
	int fir_sent = 0;

	while (ast_waitfor(chan, -1) > -1) {
		struct ast_frame *f = ast_read(chan);
		if (!f) {
			break;
		}
		f->delivery.tv_sec = 0;
		f->delivery.tv_usec = 0;
		if (f->frametype == AST_FRAME_CONTROL
			&& f->subclass.integer == AST_CONTROL_VIDUPDATE
			&& !fir_sent) {
			if (ast_write(chan, f) < 0) {
				ast_frfree(f);
				goto end;
			}
			fir_sent = 1;
		}
		if (!fir_sent && f->frametype == AST_FRAME_VIDEO) {
			struct ast_frame frame = {
				.frametype = AST_FRAME_CONTROL,
				.subclass.integer = AST_CONTROL_VIDUPDATE,
			};
			ast_write(chan, &frame);
			fir_sent = 1;
		}
		if (f->frametype != AST_FRAME_CONTROL
			&& f->frametype != AST_FRAME_MODEM
			&& f->frametype != AST_FRAME_NULL
			&& ast_write(chan, f)) {
			ast_frfree(f);
			goto end;
		}
		if ((f->frametype == AST_FRAME_DTMF) && (f->subclass.integer == '#')) {
			res = 0;
			ast_frfree(f);
			goto end;
		}
		ast_frfree(f);
	}
end:
	return res;
}

static int unload_module(void)
{
	return ast_unregister_application(app);
}

static int load_module(void)
{
	return ast_register_application_xml(app, echo_exec);
}

AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Simple Echo Application");