FS-10608: Change 60 second timeout value to a global #define SWITCH_DEFAULT_TIMEOUT

This commit is contained in:
Marc Olivier Chouinard 2017-08-23 23:01:22 -04:00
parent fd3c2fd3bf
commit 348c2c42bb
4 changed files with 8 additions and 7 deletions

View File

@ -113,6 +113,7 @@ SWITCH_BEGIN_EXTERN_C
#define SWITCH_DEFAULT_CLID_NAME ""
#define SWITCH_DEFAULT_CLID_NUMBER "0000000000"
#define SWITCH_DEFAULT_DTMF_DURATION 2000
#define SWITCH_DEFAULT_TIMEOUT 60
#define SWITCH_MIN_DTMF_DURATION 400
#define SWITCH_MAX_DTMF_DURATION 192000
#define SWITCH_DEFAULT_DIR_PERMS SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE | SWITCH_FPROT_UEXECUTE | SWITCH_FPROT_GREAD | SWITCH_FPROT_GEXECUTE

View File

@ -4095,7 +4095,7 @@ static switch_call_cause_t group_outgoing_channel(switch_core_session_t *session
char *cid_num_override = NULL;
char *domain = NULL, *dup_domain = NULL;
switch_channel_t *new_channel = NULL;
unsigned int timelimit = 60;
unsigned int timelimit = SWITCH_DEFAULT_TIMEOUT;
const char *skip, *var;
group = strdup(outbound_profile->destination_number);
@ -4211,7 +4211,7 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
char *user = NULL, *domain = NULL, *dup_domain = NULL, *dialed_user = NULL;
const char *dest = NULL;
switch_call_cause_t cause = SWITCH_CAUSE_NONE;
unsigned int timelimit = 60;
unsigned int timelimit = SWITCH_DEFAULT_TIMEOUT;
switch_channel_t *new_channel = NULL;
switch_event_t *params = NULL, *var_event_orig = var_event;
char stupid[128] = "";
@ -5617,7 +5617,7 @@ void *SWITCH_THREAD_FUNC page_thread(switch_thread_t *thread, void *obj)
switch_memory_pool_t *pool = pd->pool;
if (switch_ivr_originate(NULL, &session, &cause, pd->dial_str, 60, NULL, NULL, NULL, NULL, pd->var_event, SOF_NONE, NULL) == SWITCH_STATUS_SUCCESS) {
if (switch_ivr_originate(NULL, &session, &cause, pd->dial_str, SWITCH_DEFAULT_TIMEOUT, NULL, NULL, NULL, NULL, pd->var_event, SOF_NONE, NULL) == SWITCH_STATUS_SUCCESS) {
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_channel_set_variable(channel, "page_file", pd->path);

View File

@ -872,7 +872,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
ringback_t ringback = { 0 };
switch_frame_t *read_frame = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS;
int timelimit = 60;
int timelimit = SWITCH_DEFAULT_TIMEOUT;
const char *var;
switch_time_t start = 0;
const char *cancel_key = NULL;
@ -898,7 +898,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
if (caller_channel && (var = switch_channel_get_variable(caller_channel, SWITCH_CALL_TIMEOUT_VARIABLE))) {
timelimit = atoi(var);
if (timelimit < 0) {
timelimit = 60;
timelimit = SWITCH_DEFAULT_TIMEOUT;
}
}
@ -2084,7 +2084,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
}
if (timelimit_sec <= 0) {
timelimit_sec = 60;
timelimit_sec = SWITCH_DEFAULT_TIMEOUT;
}

View File

@ -226,7 +226,7 @@ int fs_switch_ivr_originate(switch_core_session_t *session, switch_core_session_
switch_channel_t *caller_channel;
switch_core_session_t *peer_session;
unsigned int timelimit = 60;
unsigned int timelimit = SWITCH_DEFAULT_TIMEOUT;
char *var;
switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;