diff --git a/src/include/switch_types.h b/src/include/switch_types.h index c5cd77584f..652836b17c 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -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 diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 3f28d3ba04..184b73e393 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -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); diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 1b4b1f34b7..3794ba73b4 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -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; } } @@ -2086,7 +2086,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; } diff --git a/src/switch_swig.c b/src/switch_swig.c index db4277fee7..bf2ce479fd 100644 --- a/src/switch_swig.c +++ b/src/switch_swig.c @@ -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;