[core] Fix wrong reason code for group call

This commit is contained in:
Zvonimir Bužanić 2022-10-26 19:53:01 +02:00 committed by GitHub
parent fee17e1480
commit 92caab3647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -1795,7 +1795,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess
if (cancel_cause && *cancel_cause > 0) { if (cancel_cause && *cancel_cause > 0) {
handles[i].cancel_cause = *cancel_cause; handles[i].cancel_cause = *cancel_cause;
} else { } else {
handles[i].cancel_cause = SWITCH_CAUSE_LOSE_RACE; /* Was this call taken by another destination? */
if (hp != NULL && hp->cause == SWITCH_CAUSE_SUCCESS) {
/* Yes, the race was lost */
handles[i].cancel_cause = SWITCH_CAUSE_LOSE_RACE;
} else {
/* No, something else happened, probably Originator Cancel */
handles[i].cancel_cause = SWITCH_CAUSE_ORIGINATOR_CANCEL;
}
} }
} }