]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10608: Change 60 second timeout value to a global #define SWITCH_DEFAULT_TIMEOUT
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Thu, 24 Aug 2017 03:01:22 +0000 (23:01 -0400)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Tue, 29 Aug 2017 17:54:34 +0000 (13:54 -0400)
src/include/switch_types.h
src/mod/applications/mod_dptools/mod_dptools.c
src/switch_ivr_originate.c
src/switch_swig.c

index c5cd77584f7fde6c085561a5925b38d8e46acfa2..652836b17cf5b9eb17a004ae8aaa3585f8860e40 100644 (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
index 3f28d3ba04da528239693dc48f009b2e9b5888bd..184b73e393c92dfbb5723ea562352fbf42440e2b 100644 (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);
index e3944e7cb984d55c8ce08bbce5a229810695a947..f308ad1cd19db071d0508cf0d8bc0b023b7bf1c5 100644 (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;
        }
 
 
index db4277fee7d9ae05af67bd4174e57da6b7337e2c..bf2ce479fdcc73dad7bf15cd09d01e97450e3943 100644 (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;