提交 d6f0cec8 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7094 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 83d45244
......@@ -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];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论