Skip to content

Commit

Permalink
FS-5402 revert wait till tomorrow
Browse files Browse the repository at this point in the history
  • Loading branch information
anthmFS committed May 21, 2013
1 parent b6561f2 commit b73e2c5
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/switch_ivr_originate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1861,7 +1861,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
const char *ringback_data = NULL;
switch_event_t *var_event = NULL;
int8_t fail_on_single_reject = 0;
int8_t hangup_on_single_reject = 0;
char *fail_on_single_reject_var = NULL;
char *loop_data = NULL;
uint32_t progress_timelimit_sec = 0;
Expand Down Expand Up @@ -2120,8 +2119,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
ok = 1;
} else if (!strcasecmp((char *) hi->name, "fail_on_single_reject")) {
ok = 1;
} else if (!strcasecmp((char *) hi->name, "hangup_on_single_reject")) {
ok = 1;
} else if (!strcasecmp((char *) hi->name, "ignore_early_media")) {
ok = 1;
} else if (!strcasecmp((char *) hi->name, "bridge_early_media")) {
Expand Down Expand Up @@ -2219,11 +2216,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
If the value is set to 'true' any fail cause will end the attempt otherwise it can contain a comma (,) separated
list of cause names which should be considered fatal
*/
if ((var = switch_event_get_header(var_event, "hangup_on_single_reject"))) {
hangup_on_single_reject = 1;
}

if (hangup_on_single_reject || (var = switch_event_get_header(var_event, "fail_on_single_reject"))) {
if ((var = switch_event_get_header(var_event, "fail_on_single_reject"))) {
fail_on_single_reject_var = strdup(var);
if (switch_true(var)) {
fail_on_single_reject = 1;
Expand Down Expand Up @@ -3814,23 +3807,18 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
switch_safe_free(write_frame.data);
switch_safe_free(fail_on_single_reject_var);

if (force_reason != SWITCH_CAUSE_NONE) {
*cause = force_reason;
}

if (caller_channel) {

switch_channel_execute_on(caller_channel, SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE);
switch_channel_api_on(caller_channel, SWITCH_CHANNEL_API_ON_POST_ORIGINATE_VARIABLE);

switch_channel_clear_flag(caller_channel, CF_ORIGINATOR);
switch_channel_clear_flag(caller_channel, CF_XFER_ZOMBIE);

if (hangup_on_single_reject) {
switch_channel_hangup(caller_channel, *cause);
}
}

if (force_reason != SWITCH_CAUSE_NONE) {
*cause = force_reason;
}

switch_core_destroy_memory_pool(&oglobals.pool);

Expand Down

0 comments on commit b73e2c5

Please sign in to comment.