forked from Mirrors/freeswitch
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7094 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
83d4524460
commit
d6f0cec8f7
@ -549,7 +549,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
char *var_val, *vars = NULL;
|
||||
const char *ringback_data = NULL;
|
||||
switch_codec_t *read_codec = NULL;
|
||||
uint8_t sent_ring = 0, early_ok = 1;
|
||||
uint8_t sent_ring = 0, early_ok = 1, return_ring_ready = 0;
|
||||
switch_core_session_message_t *message = NULL;
|
||||
switch_event_t *var_event = NULL;
|
||||
uint8_t fail_on_single_reject = 0;
|
||||
@ -627,6 +627,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
ok = 1;
|
||||
} else if (!strcasecmp((char *)hi->name, "ignore_early_media")) {
|
||||
ok = 1;
|
||||
} else if (!strcasecmp((char *)hi->name, "return_ring_ready")) {
|
||||
ok = 1;
|
||||
} else if (!strcasecmp((char *)hi->name, "originate_retries")) {
|
||||
ok = 1;
|
||||
} else if (!strcasecmp((char *)hi->name, "originate_retry_sleep_ms")) {
|
||||
@ -708,6 +710,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
early_ok = 0;
|
||||
}
|
||||
|
||||
if ((var_val = switch_event_get_header(var_event, "return_ring_ready")) && switch_true(var_val)) {
|
||||
return_ring_ready = 1;
|
||||
}
|
||||
|
||||
if ((var_val = switch_event_get_header(var_event, "originate_retries")) && switch_true(var_val)) {
|
||||
int32_t tmp;
|
||||
tmp = atoi(var_val);
|
||||
@ -1108,6 +1114,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
break;
|
||||
}
|
||||
|
||||
if (ring_ready && return_ring_ready) {
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (ring_ready && read_frame && !pass) {
|
||||
if (ringback.fh) {
|
||||
uint8_t abuf[1024];
|
||||
|
Loading…
Reference in New Issue
Block a user