Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch

This commit is contained in:
David Yat Sin 2012-09-12 13:15:16 -04:00
commit ffc9102e34
2 changed files with 4 additions and 4 deletions

View File

@ -1747,7 +1747,8 @@ typedef enum {
SWITCH_CAUSE_INVALID_GATEWAY = 608,
SWITCH_CAUSE_GATEWAY_DOWN = 609,
SWITCH_CAUSE_INVALID_URL = 610,
SWITCH_CAUSE_INVALID_PROFILE = 611
SWITCH_CAUSE_INVALID_PROFILE = 611,
SWITCH_CAUSE_NO_PICKUP = 612
} switch_call_cause_t;
typedef enum {

View File

@ -781,11 +781,10 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat
end:
if (rval == 0 && pickups) {
*force_reason = SWITCH_CAUSE_NO_ANSWER;
for (i = 0; i < len; i++) {
if (originate_status[i].peer_channel && switch_channel_test_flag(originate_status[i].peer_channel, CF_PICKUP) &&
switch_channel_up(originate_status[i].peer_channel)) {
switch_channel_hangup(originate_status[i].peer_channel, SWITCH_CAUSE_NO_ANSWER);
switch_channel_hangup(originate_status[i].peer_channel, SWITCH_CAUSE_NO_PICKUP);
}
}
}
@ -1632,7 +1631,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess
}
switch_mutex_unlock(handles[i].mutex);
if (getcause && *cause != handles[i].cause && handles[i].cause != SWITCH_CAUSE_LOSE_RACE) {
if (getcause && *cause != handles[i].cause && handles[i].cause != SWITCH_CAUSE_LOSE_RACE && handles[i].cause != SWITCH_CAUSE_NO_PICKUP) {
*cause = handles[i].cause;
getcause++;
}