mod_freetdm: Expose new ringback E&M parameters in the XML config
This commit is contained in:
parent
95a2c11b0d
commit
a55b5347ba
|
@ -3785,7 +3785,10 @@ static switch_status_t load_config(void)
|
|||
char *hold_music = NULL;
|
||||
char *fail_dial_regex = NULL;
|
||||
char str_false[] = "false";
|
||||
char str_empty[] = "";
|
||||
char *answer_supervision = str_false;
|
||||
char *ringback_during_collect = str_false;
|
||||
char *ringback_file = str_empty;
|
||||
uint32_t span_id = 0, to = 0, max = 0, dial_timeout_int = 0;
|
||||
ftdm_span_t *span = NULL;
|
||||
analog_option_t analog_options = ANALOG_OPTION_NONE;
|
||||
|
@ -3814,6 +3817,10 @@ static switch_status_t load_config(void)
|
|||
max_digits = val;
|
||||
} else if (!strcasecmp(var, "answer-supervision")) {
|
||||
answer_supervision = val;
|
||||
} else if (!strcasecmp(var, "ringback-during-collect")) {
|
||||
ringback_during_collect = val;
|
||||
} else if (!strcasecmp(var, "ringback-file")) {
|
||||
ringback_file = val;
|
||||
} else if (!strcasecmp(var, "enable-analog-option")) {
|
||||
analog_options = enable_analog_option(val, analog_options);
|
||||
}
|
||||
|
@ -3867,6 +3874,8 @@ static switch_status_t load_config(void)
|
|||
if (ftdm_configure_span(span, "analog_em", on_analog_signal,
|
||||
"tonemap", tonegroup,
|
||||
"answer_supervision", answer_supervision,
|
||||
"ringback_during_collect", ringback_during_collect,
|
||||
"ringback_file", ringback_file,
|
||||
"digit_timeout", &to,
|
||||
"dial_timeout", &dial_timeout_int,
|
||||
"max_dialstr", &max,
|
||||
|
|
|
@ -738,7 +738,7 @@ read_try:
|
|||
rlen = fread(frame, 1, len, ringback_f);
|
||||
if (rlen != len) {
|
||||
if (!feof(ringback_f)) {
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error reading from ringback file");
|
||||
ftdm_log(FTDM_LOG_ERROR, "Error reading from ringback file: %zd != %zd\n", rlen, len);
|
||||
}
|
||||
if (failed_read) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue