apps/app_selective.c
static void profile_set_param(struct selective_proc *f, const char *param, const char *val, int linenum, int failunknown)
{
	/* val[0] = simple mandatory attribute, 1 = can be empty */
	LOAD_INT_PARAM(empty_list_allowed, !strcasecmp(val, "yes") || !strcasecmp(val, "no"));
	LOAD_STR_PARAM(astdb_active, val[0]);
	LOAD_STR_PARAM(astdb_entries, val[0]);
	LOAD_STR_PARAM(astdb_featnum, 1);
	LOAD_STR_PARAM(sub_numvalid, val[0]);
	LOAD_STR_PARAM(sub_numaddable, val[0]);
	LOAD_STR_PARAM(sub_featnumcheck, val[0]);
	LOAD_STR_PARAM(last_caller_num, val[0]);
	LOAD_STR_PARAM(last_caller_pres, val[0]);
	LOAD_STR_PARAM(saytelnum_dir, val[0]);
	LOAD_STR_PARAM(saytelnum_args, val[0]);

	/* Prompts: Status */
	LOAD_STR_PARAM(prompt_on, val[0]);
	LOAD_STR_PARAM(prompt_off, val[0]);

	/* Prompts: Main Menu */
	LOAD_STR_PARAM(prompt_dial_during_instr, val[0]);
	LOAD_STR_PARAM(prompt_to_reject_last, val[0]);
	LOAD_STR_PARAM(prompt_to_reject_last_dtmf, val[0]);
	LOAD_STR_PARAM(prompt_to_turn_off, val[0]);
	LOAD_STR_PARAM(prompt_to_turn_on, val[0]);
	LOAD_STR_PARAM(prompt_add_delete, val[0]);
	LOAD_STR_PARAM(prompt_instructions_1, val[0]);
	LOAD_STR_PARAM(prompt_instructions_1_dtmf, val[0]);
	LOAD_STR_PARAM(prompt_instructions_2_on, val[0]);
	LOAD_STR_PARAM(prompt_instructions_2_off, val[0]);
	LOAD_STR_PARAM(prompt_instructions_3, val[0]);

	/* Prompts: List Contents */
	LOAD_STR_PARAM(prompt_there_is, val[0]);
	LOAD_STR_PARAM(prompt_there_are, val[0]);
	LOAD_STR_PARAM(prompt_no_entries, val[0]);
	LOAD_STR_PARAM(prompt_on_your_list, val[0]);
	LOAD_STR_PARAM(prompt_one, val[0]);
	LOAD_STR_PARAM(prompt_ten, val[0]);
	LOAD_STR_PARAM(prompt_dial_remove, val[0]);
	LOAD_STR_PARAM(prompt_sorry_no_entries, val[0]);
	LOAD_STR_PARAM(prompt_no_more_private, val[0]);
	LOAD_STR_PARAM(prompt_no_more, val[0]);
	LOAD_STR_PARAM(prompt_private_entries, val[0]);
	LOAD_STR_PARAM(prompt_one_private_entry, val[0]);
	LOAD_STR_PARAM(prompt_one_private_entry_down, val[0]);
	LOAD_STR_PARAM(prompt_private_entries_down, val[0]);
	LOAD_STR_PARAM(prompt_one_entry, val[0]);
	LOAD_STR_PARAM(prompt_entries_on_your_list, val[0]);
	LOAD_STR_PARAM(prompt_including, val[0]);

	/* Prompts: Activation Caveats */
	LOAD_STR_PARAM(prompt_entry_required, val[0]);
	LOAD_STR_PARAM(prompt_entry_required_dtmf, val[0]);

	/* Prompts: List Management */
	LOAD_STR_PARAM(prompt_beep, val[0]);
	LOAD_STR_PARAM(prompt_dial_number_to_add, val[0]);
	LOAD_STR_PARAM(prompt_dial_number_to_add_dtmf, val[0]);
	LOAD_STR_PARAM(prompt_dial_remove, val[0]);
	LOAD_STR_PARAM(prompt_must_dial_number, val[0]);
	LOAD_STR_PARAM(prompt_start_again, val[0]);
	LOAD_STR_PARAM(prompt_number_dialed, val[0]);
	LOAD_STR_PARAM(prompt_not_permitted, val[0]);
	LOAD_STR_PARAM(prompt_too_few_digits_start_again, val[0]);
	LOAD_STR_PARAM(prompt_too_many_digits_start_again, val[0]);
	LOAD_STR_PARAM(prompt_last_caller_not_available, val[0]);
	LOAD_STR_PARAM(prompt_number_incorrect, val[0]);
	LOAD_STR_PARAM(prompt_number_not_available_svc, val[0]);
	LOAD_STR_PARAM(prompt_already_on_list, val[0]);
	LOAD_STR_PARAM(prompt_as_a_private_entry, val[0]);
	LOAD_STR_PARAM(prompt_list_full, val[0]);
	LOAD_STR_PARAM(prompt_number_to_remove_not_on_list, val[0]);
	LOAD_STR_PARAM(prompt_confirm_entry, val[0]);

	/* Prompts: Feature Number */
	LOAD_STR_PARAM(prompt_dial_featnum, 1);
	LOAD_STR_PARAM(prompt_active_featnum, 1);

	/* Prompts: List Management Egress */
	LOAD_STR_PARAM(prompt_number_added_is, val[0]);
	LOAD_STR_PARAM(prompt_number_removed_is, val[0]);
	LOAD_STR_PARAM(prompt_a_private_entry, val[0]);
	LOAD_STR_PARAM(prompt_please_continue, val[0]);
	LOAD_STR_PARAM(prompt_try_again_later, val[0]);
	LOAD_STR_PARAM(prompt_hangup, val[0]);
	LOAD_STR_PARAM(prompt_invalid_command, val[0]);

	/* Prompts: Hear & Manage Entries */
	LOAD_STR_PARAM(prompt_to_delete_dial_07, val[0]);
	LOAD_STR_PARAM(prompt_first_entry_is, val[0]);
	LOAD_STR_PARAM(prompt_next, val[0]);
	LOAD_STR_PARAM(prompt_end_of_list, val[0]);

	if (0) {
		if (contains_whitespace(val))
			exit(1);
	}

	if (failunknown) {
		if (linenum >= 0) {
			ast_log(LOG_WARNING, "Unknown keyword in profile '%s': %s at line %d of %s\n", f->name, param, linenum, CONFIG_FILE);
		} else {
			ast_log(LOG_WARNING, "Unknown keyword in profile '%s': %s\n", f->name, param);
		}
	}
}
/*! \brief Set parameter in profile from configuration file */
\brief Set parameter in profile from configuration file
\ brief Set parameter in profile from configuration file
static void profile_set_param(struct selective_proc *f, const char *param, const char *val, int linenum, int failunknown)
{
	LOAD_INT_PARAM(empty_list_allowed, !strcasecmp(val, "yes") || !strcasecmp(val, "no"));
	LOAD_STR_PARAM(astdb_active, val[0]);
	LOAD_STR_PARAM(astdb_entries, val[0]);
	LOAD_STR_PARAM(astdb_featnum, 1);
	LOAD_STR_PARAM(sub_numvalid, val[0]);
	LOAD_STR_PARAM(sub_numaddable, val[0]);
	LOAD_STR_PARAM(sub_featnumcheck, val[0]);
	LOAD_STR_PARAM(last_caller_num, val[0]);
	LOAD_STR_PARAM(last_caller_pres, val[0]);
	LOAD_STR_PARAM(saytelnum_dir, val[0]);
	LOAD_STR_PARAM(saytelnum_args, val[0]);
	LOAD_STR_PARAM(prompt_on, val[0]);
	LOAD_STR_PARAM(prompt_off, val[0]);
	LOAD_STR_PARAM(prompt_dial_during_instr, val[0]);
	LOAD_STR_PARAM(prompt_to_reject_last, val[0]);
	LOAD_STR_PARAM(prompt_to_reject_last_dtmf, val[0]);
	LOAD_STR_PARAM(prompt_to_turn_off, val[0]);
	LOAD_STR_PARAM(prompt_to_turn_on, val[0]);
	LOAD_STR_PARAM(prompt_add_delete, val[0]);
	LOAD_STR_PARAM(prompt_instructions_1, val[0]);
	LOAD_STR_PARAM(prompt_instructions_1_dtmf, val[0]);
	LOAD_STR_PARAM(prompt_instructions_2_on, val[0]);
	LOAD_STR_PARAM(prompt_instructions_2_off, val[0]);
	LOAD_STR_PARAM(prompt_instructions_3, val[0]);
	LOAD_STR_PARAM(prompt_there_is, val[0]);
	LOAD_STR_PARAM(prompt_there_are, val[0]);
	LOAD_STR_PARAM(prompt_no_entries, val[0]);
	LOAD_STR_PARAM(prompt_on_your_list, val[0]);
	LOAD_STR_PARAM(prompt_one, val[0]);
	LOAD_STR_PARAM(prompt_ten, val[0]);
	LOAD_STR_PARAM(prompt_dial_remove, val[0]);
	LOAD_STR_PARAM(prompt_sorry_no_entries, val[0]);
	LOAD_STR_PARAM(prompt_no_more_private, val[0]);
	LOAD_STR_PARAM(prompt_no_more, val[0]);
	LOAD_STR_PARAM(prompt_private_entries, val[0]);
	LOAD_STR_PARAM(prompt_one_private_entry, val[0]);
	LOAD_STR_PARAM(prompt_one_private_entry_down, val[0]);
	LOAD_STR_PARAM(prompt_private_entries_down, val[0]);
	LOAD_STR_PARAM(prompt_one_entry, val[0]);
	LOAD_STR_PARAM(prompt_entries_on_your_list, val[0]);
	LOAD_STR_PARAM(prompt_including, val[0]);
	LOAD_STR_PARAM(prompt_entry_required, val[0]);
	LOAD_STR_PARAM(prompt_entry_required_dtmf, val[0]);
	LOAD_STR_PARAM(prompt_beep, val[0]);
	LOAD_STR_PARAM(prompt_dial_number_to_add, val[0]);
	LOAD_STR_PARAM(prompt_dial_number_to_add_dtmf, val[0]);
	LOAD_STR_PARAM(prompt_dial_remove, val[0]);
	LOAD_STR_PARAM(prompt_must_dial_number, val[0]);
	LOAD_STR_PARAM(prompt_start_again, val[0]);
	LOAD_STR_PARAM(prompt_number_dialed, val[0]);
	LOAD_STR_PARAM(prompt_not_permitted, val[0]);
	LOAD_STR_PARAM(prompt_too_few_digits_start_again, val[0]);
	LOAD_STR_PARAM(prompt_too_many_digits_start_again, val[0]);
	LOAD_STR_PARAM(prompt_last_caller_not_available, val[0]);
	LOAD_STR_PARAM(prompt_number_incorrect, val[0]);
	LOAD_STR_PARAM(prompt_number_not_available_svc, val[0]);
	LOAD_STR_PARAM(prompt_already_on_list, val[0]);
	LOAD_STR_PARAM(prompt_as_a_private_entry, val[0]);
	LOAD_STR_PARAM(prompt_list_full, val[0]);
	LOAD_STR_PARAM(prompt_number_to_remove_not_on_list, val[0]);
	LOAD_STR_PARAM(prompt_confirm_entry, val[0]);
	LOAD_STR_PARAM(prompt_dial_featnum, 1);
	LOAD_STR_PARAM(prompt_active_featnum, 1);
	LOAD_STR_PARAM(prompt_number_added_is, val[0]);
	LOAD_STR_PARAM(prompt_number_removed_is, val[0]);
	LOAD_STR_PARAM(prompt_a_private_entry, val[0]);
	LOAD_STR_PARAM(prompt_please_continue, val[0]);
	LOAD_STR_PARAM(prompt_try_again_later, val[0]);
	LOAD_STR_PARAM(prompt_hangup, val[0]);
	LOAD_STR_PARAM(prompt_invalid_command, val[0]);
	LOAD_STR_PARAM(prompt_to_delete_dial_07, val[0]);
	LOAD_STR_PARAM(prompt_first_entry_is, val[0]);
	LOAD_STR_PARAM(prompt_next, val[0]);
	LOAD_STR_PARAM(prompt_end_of_list, val[0]);
	if (0) {
		if (contains_whitespace(val))
			exit(1);
	}
	if (failunknown) {
		if (linenum >= 0) {
			ast_log(LOG_WARNING, "Unknown keyword in profile '%s': %s at line %d of %s\n", f->name, param, linenum, CONFIG_FILE);
		} else {
			ast_log(LOG_WARNING, "Unknown keyword in profile '%s': %s\n", f->name, param);
		}
	}
}
static void profile_set_param ( struct selective_proc * f , const char * param , const char * val , int linenum , int failunknown ) { LOAD_INT_PARAM ( empty_list_allowed , ! strcasecmp ( val , " " ) || ! strcasecmp ( val , " " ) ) ; LOAD_STR_PARAM ( astdb_active , val [ 0 ] ) ; LOAD_STR_PARAM ( astdb_entries , val [ 0 ] ) ; LOAD_STR_PARAM ( astdb_featnum , 1 ) ; LOAD_STR_PARAM ( sub_numvalid , val [ 0 ] ) ; LOAD_STR_PARAM ( sub_numaddable , val [ 0 ] ) ; LOAD_STR_PARAM ( sub_featnumcheck , val [ 0 ] ) ; LOAD_STR_PARAM ( last_caller_num , val [ 0 ] ) ; LOAD_STR_PARAM ( last_caller_pres , val [ 0 ] ) ; LOAD_STR_PARAM ( saytelnum_dir , val [ 0 ] ) ; LOAD_STR_PARAM ( saytelnum_args , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_on , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_off , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_dial_during_instr , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_to_reject_last , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_to_reject_last_dtmf , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_to_turn_off , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_to_turn_on , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_add_delete , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_instructions_1 , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_instructions_1_dtmf , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_instructions_2_on , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_instructions_2_off , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_instructions_3 , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_there_is , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_there_are , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_no_entries , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_on_your_list , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_one , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_ten , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_dial_remove , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_sorry_no_entries , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_no_more_private , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_no_more , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_private_entries , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_one_private_entry , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_one_private_entry_down , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_private_entries_down , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_one_entry , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_entries_on_your_list , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_including , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_entry_required , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_entry_required_dtmf , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_beep , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_dial_number_to_add , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_dial_number_to_add_dtmf , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_dial_remove , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_must_dial_number , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_start_again , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_number_dialed , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_not_permitted , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_too_few_digits_start_again , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_too_many_digits_start_again , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_last_caller_not_available , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_number_incorrect , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_number_not_available_svc , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_already_on_list , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_as_a_private_entry , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_list_full , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_number_to_remove_not_on_list , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_confirm_entry , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_dial_featnum , 1 ) ; LOAD_STR_PARAM ( prompt_active_featnum , 1 ) ; LOAD_STR_PARAM ( prompt_number_added_is , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_number_removed_is , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_a_private_entry , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_please_continue , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_try_again_later , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_hangup , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_invalid_command , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_to_delete_dial_07 , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_first_entry_is , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_next , val [ 0 ] ) ; LOAD_STR_PARAM ( prompt_end_of_list , val [ 0 ] ) ; if ( 0 ) { if ( contains_whitespace ( val ) ) exit ( 1 ) ; } if ( failunknown ) { if ( linenum >= 0 ) { ast_log ( LOG_WARNING , " \n " , f -> name , param , linenum , CONFIG_FILE ) ; } else { ast_log ( LOG_WARNING , " \n " , f -> name , param ) ; } } }
\brief Set parameter in profile from configuration file
\ brief Set parameter in profile from configuration file
/* val[0] = simple mandatory attribute, 1 = can be empty */ /* Prompts: Status */ /* Prompts: Main Menu */ /* Prompts: List Contents */ /* Prompts: Activation Caveats */ /* Prompts: List Management */ /* Prompts: Feature Number */ /* Prompts: List Management Egress */ /* Prompts: Hear & Manage Entries */