int load_parking_manager(void) { int res; const struct ast_module_info *module = parking_get_module_info(); res = ast_manager_register2("Parkinglots", EVENT_FLAG_CALL, manager_parking_lot_list, module->self, NULL, NULL); res |= ast_manager_register2("ParkedCalls", EVENT_FLAG_CALL, manager_parking_status, module->self, NULL, NULL); res |= ast_manager_register2("Park", EVENT_FLAG_CALL, manager_park, module->self, NULL, NULL); parking_manager_enable_stasis(); return res ? -1 : 0; }
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; }
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; }
static int load_module(void) { int res; res = ast_custom_function_register(&mute_function); res |= ast_manager_register2("MuteAudio", EVENT_FLAG_SYSTEM, manager_mutestream, "Mute an audio stream", mandescr_mutestream); return (res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS); }
int ast_res_pjsip_init_options_handling(int reload) { static const pj_str_t STR_OPTIONS = { "OPTIONS", 7 }; if (reload) { qualify_and_schedule_all(); return 0; } sched_qualifies = ao2_t_container_alloc(QUALIFIED_BUCKETS, sched_qualifies_hash_fn, sched_qualifies_cmp_fn, "Create container for scheduled qualifies"); if (!sched_qualifies) { return -1; } if (pjsip_endpt_register_module(ast_sip_get_pjsip_endpoint(), &options_module) != PJ_SUCCESS) { ao2_cleanup(sched_qualifies); sched_qualifies = NULL; return -1; } if (pjsip_endpt_add_capability(ast_sip_get_pjsip_endpoint(), NULL, PJSIP_H_ALLOW, NULL, 1, &STR_OPTIONS) != PJ_SUCCESS) { pjsip_endpt_unregister_module(ast_sip_get_pjsip_endpoint(), &options_module); ao2_cleanup(sched_qualifies); sched_qualifies = NULL; return -1; } internal_sip_register_endpoint_formatter(&contact_status_formatter); ast_manager_register2("PJSIPQualify", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, ami_sip_qualify, NULL, NULL, NULL); ast_cli_register_multiple(cli_options, ARRAY_LEN(cli_options)); qualify_and_schedule_all(); return 0; }