FS-4191 --resolve

This commit is contained in:
Anthony Minessale 2012-05-07 08:17:41 -05:00
parent ffc4c83bfa
commit 7f76b67f5d
3 changed files with 9 additions and 1 deletions

View File

@ -1212,6 +1212,7 @@ typedef enum {
CF_ZRTP_HASH,
CF_ZRTP_PASS,
CF_CHANNEL_SWAP,
CF_PICKUP,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
CF_FLAG_MAX

View File

@ -3490,6 +3490,7 @@ static switch_call_cause_t pickup_outgoing_channel(switch_core_session_t *sessio
switch_channel_set_name(nchannel, name);
switch_channel_set_variable(nchannel, "process_cdr", "false");
pickup_add_session(nsession, pickup);
switch_channel_set_flag(nchannel, CF_PICKUP);
goto done;

View File

@ -429,6 +429,7 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat
char bug_key[256] = "";
int send_ringback = 0;
uint8_t ring_ready_val = 0;
int pickups = 0;
oglobals->hups = 0;
oglobals->idx = IDX_NADA;
@ -462,6 +463,11 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat
}
}
if (originate_status[i].peer_channel && switch_channel_test_flag(originate_status[i].peer_channel, CF_PICKUP)) {
pickups++;
}
if (!(originate_status[i].peer_channel && originate_status[i].peer_session)) {
oglobals->hups++;
continue;
@ -719,7 +725,7 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat
}
}
if (oglobals->hups == len) {
if (oglobals->hups + pickups == len) {
rval = 0;
} else {
rval = 1;