forked from Mirrors/freeswitch
changed my mind i think the confirm option is cool even when you call 1 dest
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2313 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
78d060c6a7
commit
afdaac9b22
@ -1196,13 +1196,6 @@ static uint8_t check_channel_status(switch_channel_t **peer_channels,
|
|||||||
|
|
||||||
int32_t i;
|
int32_t i;
|
||||||
*idx = -1;
|
*idx = -1;
|
||||||
|
|
||||||
if (len == 1) {
|
|
||||||
*idx = 0;
|
|
||||||
return (switch_channel_get_state(peer_channels[0]) < CS_HANGUP &&
|
|
||||||
!switch_channel_test_flag(peer_channels[0], CF_ANSWERED) &&
|
|
||||||
!switch_channel_test_flag(peer_channels[0], CF_EARLY_MEDIA)) ? 1 : 0;
|
|
||||||
} else {
|
|
||||||
int32_t hups = 0;
|
int32_t hups = 0;
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
@ -1211,7 +1204,8 @@ static uint8_t check_channel_status(switch_channel_t **peer_channels,
|
|||||||
}
|
}
|
||||||
if (switch_channel_get_state(peer_channels[i]) >= CS_HANGUP) {
|
if (switch_channel_get_state(peer_channels[i]) >= CS_HANGUP) {
|
||||||
hups++;
|
hups++;
|
||||||
} else if (switch_channel_test_flag(peer_channels[i], CF_ANSWERED) && !switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
|
} else if ((switch_channel_test_flag(peer_channels[i], CF_ANSWERED) || (len == 1 && switch_channel_test_flag(peer_channels[0], CF_EARLY_MEDIA))) &&
|
||||||
|
!switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
|
||||||
|
|
||||||
if (key) {
|
if (key) {
|
||||||
struct key_collect *collect;
|
struct key_collect *collect;
|
||||||
@ -1241,7 +1235,7 @@ static uint8_t check_channel_status(switch_channel_t **peer_channels,
|
|||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_PEERS 256
|
#define MAX_PEERS 256
|
||||||
@ -1266,7 +1260,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
switch_memory_pool_t *pool;
|
switch_memory_pool_t *pool;
|
||||||
char *data = NULL;
|
char *data = NULL;
|
||||||
int i, argc;
|
int i, argc;
|
||||||
int32_t idx = -1, ccount = 0;
|
int32_t idx = -1;
|
||||||
switch_codec_t write_codec = {0};
|
switch_codec_t write_codec = {0};
|
||||||
switch_frame_t write_frame = {0};
|
switch_frame_t write_frame = {0};
|
||||||
uint8_t err = 0, fdata[1024];
|
uint8_t err = 0, fdata[1024];
|
||||||
@ -1302,8 +1296,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
caller_channel = switch_core_session_get_channel(session);
|
caller_channel = switch_core_session_get_channel(session);
|
||||||
assert(caller_channel != NULL);
|
assert(caller_channel != NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ((var = switch_channel_get_variable(caller_channel, "group_confirm_key"))) {
|
if ((var = switch_channel_get_variable(caller_channel, "group_confirm_key"))) {
|
||||||
key = switch_core_session_strdup(session, var);
|
key = switch_core_session_strdup(session, var);
|
||||||
if ((var = switch_channel_get_variable(caller_channel, "group_confirm_file"))) {
|
if ((var = switch_channel_get_variable(caller_channel, "group_confirm_file"))) {
|
||||||
@ -1414,15 +1406,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
}
|
}
|
||||||
|
|
||||||
time(&start);
|
time(&start);
|
||||||
for (i = 0; i < argc; i++) {
|
|
||||||
if (peer_channels[i]) {
|
|
||||||
ccount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ccount == 1) {
|
|
||||||
key = file = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user