예제 #1
0
int load_module(void)
{
	int res = 0;
	res = ast_register_application(app_detectfax, nv_detectfax_exec, synopsis_detectfax, descrip_detectfax);
	res |= ast_register_application(app_background_detect, nv_background_detect_exec, synopsis_background_detect, descrip_background_detect);
	return res;
}
예제 #2
0
static int load_module(void)
{
	int res = ast_register_application(app_exec, exec_exec, exec_synopsis, exec_descrip);
	res |= ast_register_application(app_tryexec, tryexec_exec, tryexec_synopsis, tryexec_descrip);
	res |= ast_register_application(app_execif, execif_exec, execif_synopsis, execif_descrip);
	return res;
}
예제 #3
0
int load_module(void)
{
	ast_cli_register(&cli_show_confs);
	ast_cli_register(&cli_conf);
	ast_register_application(app3, admin_exec, synopsis3, descrip3);
	ast_register_application(app2, count_exec, synopsis2, descrip2);
	return ast_register_application(app, conf_exec, synopsis, descrip);
}
예제 #4
0
파일: app_db.c 프로젝트: axiatp/asterisk
static int load_module(void)
{
	int retval;

	retval = ast_register_application(d_app, del_exec, d_synopsis, d_descrip);
	retval |= ast_register_application(dt_app, deltree_exec, dt_synopsis, dt_descrip);
	
	return retval;
}
예제 #5
0
파일: app_system.c 프로젝트: OPSF/uClinux
static int load_module(void)
{
	int res;

	res = ast_register_application(app2, trysystem_exec, synopsis2, descrip2);
	res |= ast_register_application(app, system_exec, synopsis, descrip);

	return res;
}
int load_module(void)
{
	int res;
	
	res = ast_register_application(app2, setcallerid_pres_exec, synopsis2, descrip2);
	res |= ast_register_application(app, setcallerid_exec, synopsis, descrip);

	return res;
}
예제 #7
0
static int load_module(void *mod)
{
	int res;

	res = ast_register_application(app_log, log_exec, log_synopsis, log_descrip);
	res |= ast_register_application(app_verbose, verbose_exec, verbose_synopsis, verbose_descrip);

	return res;
}
예제 #8
0
파일: app_test.c 프로젝트: axiatp/asterisk
static int load_module(void)
{
	int res;

	res = ast_register_application(testc_app, testclient_exec, testc_synopsis, testc_descrip);
	res |= ast_register_application(tests_app, testserver_exec, tests_synopsis, tests_descrip);

	return res;
}
예제 #9
0
static int load_module(void)
{
	int res = 0;

	res |= ast_register_application(app_chan, chanspy_exec, tdesc, desc_chan);
	res |= ast_register_application(app_ext, extenspy_exec, tdesc, desc_ext);

	return res;
}
예제 #10
0
int load_module(void)
{
	ast_register_application(app_pop, pop_exec, pop_synopsis, pop_descrip);
	ast_register_application(app_return, return_exec, return_synopsis, return_descrip);
	ast_register_application(app_gosubif, gosubif_exec, gosubif_synopsis, gosubif_descrip);
	ast_register_application(app_gosub, gosub_exec, gosub_synopsis, gosub_descrip);

	return 0;
}
예제 #11
0
int load_module(void)
{
	int res;

	res = ast_register_application(start_app, while_start_exec, start_synopsis, start_desc);
	res |= ast_register_application(exec_app, execif_exec, exec_synopsis, exec_desc);
	res |= ast_register_application(stop_app, while_end_exec, stop_synopsis, stop_desc);

	return res;
}
int load_module(void)
{
	int res;

	res = ast_register_application(exit_app, macro_exit_exec, exit_synopsis, exit_descrip);
	res |= ast_register_application(if_app, macroif_exec, if_synopsis, if_descrip);
	res |= ast_register_application(app, macro_exec, synopsis, descrip);

	return res;
}
예제 #13
0
static int load_module(void)
{
	if (ind_load_module())
		return AST_MODULE_LOAD_DECLINE; 
	ast_cli_register_multiple(cli_indications, sizeof(cli_indications) / sizeof(struct ast_cli_entry));
	ast_register_application("PlayTones", handle_playtones, "Play a tone list", playtones_desc);
	ast_register_application("StopPlayTones", handle_stopplaytones, "Stop playing a tone list","Stop playing a tone list");

	return 0;
}
static int load_module(void *mod)
{
	int res;

	res = ast_register_application(setcdruserfield_app, setcdruserfield_exec, setcdruserfield_synopsis, setcdruserfield_descrip);
	res |= ast_register_application(appendcdruserfield_app, appendcdruserfield_exec, appendcdruserfield_synopsis, appendcdruserfield_descrip);
	res |= ast_manager_register("SetCDRUserField", EVENT_FLAG_CALL, action_setcdruserfield, "Set the CDR UserField");
	
	return res;
}
예제 #15
0
int load_module(void)
{
	int res;

	res = ast_custom_function_register(&acf_cut);
	res |= ast_custom_function_register(&acf_sort);
	res |= ast_register_application(app_sort, sort_exec, app_sort_synopsis, app_sort_descrip);
	res |= ast_register_application(app_cut, cut_exec, cut_synopsis, cut_descrip);

	return res;
}
int load_module(void)
{
	ast_register_application("Monitor", start_monitor_exec, monitor_synopsis, monitor_descrip);
	ast_register_application("StopMonitor", stop_monitor_exec, stopmonitor_synopsis, stopmonitor_descrip);
	ast_register_application("ChangeMonitor", change_monitor_exec, changemonitor_synopsis, changemonitor_descrip);
	ast_manager_register2("Monitor", EVENT_FLAG_CALL, start_monitor_action, monitor_synopsis, start_monitor_action_help);
	ast_manager_register2("StopMonitor", EVENT_FLAG_CALL, stop_monitor_action, stopmonitor_synopsis, stop_monitor_action_help);
	ast_manager_register2("ChangeMonitor", EVENT_FLAG_CALL, change_monitor_action, changemonitor_synopsis, change_monitor_action_help);

	return 0;
}
int load_module(void)
{
	if (ind_load_module()) return -1;
 
	ast_cli_register(&add_indication_cli);
	ast_cli_register(&remove_indication_cli);
	ast_cli_register(&show_indications_cli);
	ast_register_application("PlayTones", handle_playtones, "Play a tone list", playtones_desc);
	ast_register_application("StopPlayTones", handle_stopplaytones, "Stop playing a tone list","Stop playing a tone list");

	return 0;
}
예제 #18
0
static int load_module(void)
{
	int res = 0;

	if (*dahdi_chan_mode == CHAN_DAHDI_PLUS_ZAP_MODE) {
		res |= ast_register_application(dahdi_app, exec_dahdi, dahdi_synopsis, dahdi_descrip);
	}

	res |= ast_register_application(zap_app, exec_zap, zap_synopsis, zap_descrip);

	return res;
}
예제 #19
0
static int load_module( void )
{
	int res = 0;

	ast_log( LOG_NOTICE, "Loading app_vonference module, revision=%s\n", revision) ;

	init_conference() ;

	res |= ast_register_application( app, app_vonference_main, synopsis, descrip ) ;
	res |= ast_register_application( app2, app_vonferencecount_main, synopsis2, descrip2 ) ;

	register_conference_cli(ast_module_info) ;

	return res ;
}
int load_module( void ) {
	ast_log( LOG_NOTICE, "Loading " APP_CONFERENCE_NAME " module\n" );
	init_conference() ;
	register_conference_cli();
	ast_custom_function_register(&acf_nconfcount);
	return ast_register_application( app, app_conference_main, synopsis, descrip ) ;
}
예제 #21
0
static int sqlite_load_module(void)
{
	char *zErr;
	char fn[PATH_MAX];
	int res;

	/* is the database there? */
	snprintf(fn, sizeof(fn), "%s/astdb.db", ast_config_AST_LOG_DIR);
	db = sqlite_open(fn, 0660, &zErr);
	if (!db) {
		ast_log(LOG_ERROR, "app_dbsqlite: %s\n", zErr);
		free(zErr);
		return -1;
	}

	/* is the table there? */
	res = sqlite_exec(db, "SELECT COUNT(Id) FROM astdb;", NULL, NULL, &zErr);
	if (res) {
		res = sqlite_exec(db, sql_create_table, NULL, NULL, &zErr);
		if (res) {
			ast_log(LOG_ERROR, "app_dbsqlite: Unable to create table 'astdb': %s\n", zErr);
			free(zErr);
			goto err;
		}

		/* TODO: here we should probably create an index */
	}
	res = ast_register_application (g_app, sqliteget_exec, g_synopsis, g_descrip);
	if (!res)
		res = ast_register_application (p_app, sqliteput_exec, p_synopsis, p_descrip);
	if (!res)
		res = ast_register_application (d_app, sqlitedel_exec, d_synopsis, d_descrip);
	if (!res)
		res = ast_register_application (dt_app, sqlitedeltree_exec, dt_synopsis, dt_descrip);

	if (res) {
		ast_log(LOG_ERROR, "Unable to register app_dbsqlite\n");
		return -1;
	}
	return 0;

err:
	if (db)
		sqlite_close(db);
	return -1;
}
예제 #22
0
static int load_module(void)
{
	int res;

	res = ast_manager_register2( "PlayDTMF", EVENT_FLAG_CALL, manager_play_dtmf, "Play DTMF signal on a specific channel.", mandescr_playdtmf );
	res |= ast_register_application(app, senddtmf_exec, synopsis, descrip);

	return res;
}
int load_module(void)
{
	int res;

	res = ast_custom_function_register(&acf_curl);
	res |= ast_register_application(app, curl_exec, synopsis, descrip);

	return res;
}
예제 #24
0
int load_module(void)
{
	int res;

	curl_global_init(CURL_GLOBAL_ALL);
	res = ast_custom_function_register(&acf_curl);
	res |= ast_register_application(app, curl_exec, synopsis, descrip);

	return res;
}
예제 #25
0
static int load_module( void )
{
	ast_log( LOG_NOTICE, "Loading app_conference module, revision=%s\n", revision) ;

	init_conference() ;

	register_conference_cli() ;

	return ast_register_application( app, app_conference_main, synopsis, descrip ) ;
}
예제 #26
0
static int load_module(void)
{
	int res;
	
	if (!load_config())
		return AST_MODULE_LOAD_DECLINE;

	res = ast_cli_register_multiple(cli_cbmysql, ARRAY_LEN(cli_cbmysql));
	res |= ast_register_application(app, cb_exec, synopsis, tdesc);
	
	return res;
}
int load_module(void)
{
	int res = 0;
	do_reload = 1;
	load_config(1);
	do_reload = 0;

	ast_config_engine_register(&sqlite_engine);
	ast_verbose(VERBOSE_PREFIX_2 "SQLite Config Handler Registered.\n");


	if (has_cdr) {
		ast_verbose(VERBOSE_PREFIX_2 "Loading SQLite CDR\n");
		res = ast_cdr_register(cdr_name, "RES SQLite CDR", sqlite_log);
	}
	else 
		ast_verbose(VERBOSE_PREFIX_2 "SQLite CDR Disabled\n");



	ast_register_application(app, sqlite_execapp, synopsis, tdesc);


	if (has_switch) {
		if (ast_register_switch(&sqlite_switch))
			ast_log(LOG_ERROR, "Unable to register SQLite Switch\n");
		else {
			sqlite3HashInit(&extens,SQLITE_HASH_STRING,COPY_KEYS);
			ast_verbose(VERBOSE_PREFIX_2 "Registered SQLite Switch\n");
		}
	}
	else 
		ast_verbose(VERBOSE_PREFIX_2 "Sqlite Switch Disabled\n");

	if (has_cli) {
		ast_verbose(VERBOSE_PREFIX_2 "Activating SQLite CLI Command Set.\n");
		ast_cli_register(&cli_sqlite1); 
		ast_cli_register(&cli_sqlite2);	 
		ast_cli_register(&cli_sqlite3);	 
		ast_cli_register(&cli_sqlite4);	 
		ast_cli_register(&cli_sqlite5);	 
		ast_cli_register(&cli_sqlite6);
		ast_cli_register(&cli_sqlite7);
		ast_cli_register(&cli_sqlite8);
		ast_cli_register(&cli_sqlite9);
	}
	else 
		ast_verbose(VERBOSE_PREFIX_2 "SQLite CLI Command Set Not Configured.\n");

	return res;
}
예제 #28
0
static int load_module(void)
{
	int res = 0;

	res = ast_register_application("SpeechCreate", speech_create, "Create a Speech Structure", speechcreate_descrip);
	res |= ast_register_application("SpeechLoadGrammar", speech_load, "Load a Grammar", speechload_descrip);
	res |= ast_register_application("SpeechUnloadGrammar", speech_unload, "Unload a Grammar", speechunload_descrip);
	res |= ast_register_application("SpeechActivateGrammar", speech_activate, "Activate a Grammar", speechactivategrammar_descrip);
        res |= ast_register_application("SpeechDeactivateGrammar", speech_deactivate, "Deactivate a Grammar", speechdeactivategrammar_descrip);
	res |= ast_register_application("SpeechStart", speech_start, "Start recognizing voice in the audio stream", speechstart_descrip);
	res |= ast_register_application("SpeechBackground", speech_background, "Play a sound file and wait for speech to be recognized", speechbackground_descrip);
	res |= ast_register_application("SpeechDestroy", speech_destroy, "End speech recognition", speechdestroy_descrip);
	res |= ast_register_application("SpeechProcessingSound", speech_processing_sound, "Change background processing sound", speechprocessingsound_descrip);
	res |= ast_custom_function_register(&speech_function);
	res |= ast_custom_function_register(&speech_score_function);
	res |= ast_custom_function_register(&speech_text_function);
	res |= ast_custom_function_register(&speech_grammar_function);
	res |= ast_custom_function_register(&speech_engine_function);
	res |= ast_custom_function_register(&speech_results_type_function);

	return res;
}
예제 #29
0
static int load_module(void)
{
	int res = 0;
	const char *val = NULL;
	struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
	struct ast_config *cfg;

	/* Set some defaults */
	cfg_buffer_size = 65535;
	cfg_goto_exten = 0;
	samplerate = 8000; /* G711a/G711u  */

	ast_copy_string(cfg_voice, "Allison-8kHz", sizeof(cfg_voice));

	res = ast_register_application(app, app_exec, synopsis, descrip) ?
		AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;

	cfg = ast_config_load(SWIFT_CONFIG_FILE, config_flags);

	if (cfg) {
		if ((val = ast_variable_retrieve(cfg, "general", "buffer_size"))) {
			cfg_buffer_size = atoi(val);
			ast_log(LOG_DEBUG, "Config buffer_size is %d\n", cfg_buffer_size);
		}
		if ((val = ast_variable_retrieve(cfg, "general", "goto_exten"))) {
			if (!strcmp(val, "yes")) {
				cfg_goto_exten = 1;
			} else {
				cfg_goto_exten = 0;
				ast_log(LOG_DEBUG, "Config goto_exten is %d\n", cfg_goto_exten);
			}
		}
		if ((val = ast_variable_retrieve(cfg, "general", "voice"))) {
			ast_copy_string(cfg_voice, val, sizeof(cfg_voice));
			ast_log(LOG_DEBUG, "Config voice is %s\n", cfg_voice);
		}

		ast_config_destroy(cfg);
	} else {
		ast_log(LOG_NOTICE, "Failed to load config\n");
	}
	return res;
}
예제 #30
0
int load_module(void)
{
#ifdef USE_ODBC_STORAGE
	struct ast_config *cfg = ast_config_load(VOICEMAIL_CONFIG);
	char *tmp;

	if (cfg) {
		if ((tmp = ast_variable_retrieve(cfg, "general", "odbcstorage"))) {
			ast_copy_string(odbc_database, tmp, sizeof(odbc_database));
		}
		if ((tmp = ast_variable_retrieve(cfg, "general", "odbctable"))) {
			ast_copy_string(odbc_table, tmp, sizeof(odbc_table));
		}
		if ((tmp = ast_variable_retrieve(cfg, "general", "format"))) {
			ast_copy_string(vmfmts, tmp, sizeof(vmfmts));
		}
		ast_config_destroy(cfg);
	} else
		ast_log(LOG_WARNING, "Unable to load " VOICEMAIL_CONFIG " - ODBC defaults will be used\n");
#endif

	return ast_register_application(app, directory_exec, synopsis, descrip);
}