Merge "parking: Fall back to parker channel name even if it matches parkee." into 16

This commit is contained in:
Kevin Harwell 2019-12-04 17:34:46 -06:00 committed by Gerrit Code Review
commit 7f843116d3
1 changed files with 9 additions and 4 deletions

View File

@ -274,10 +274,15 @@ static int bridge_parking_push(struct ast_bridge_parking *self, struct ast_bridg
blind_transfer = ast_strdupa(S_OR(blind_transfer, ""));
ast_channel_unlock(bridge_channel->chan);
if (!parker || !strcmp(parker->name, ast_channel_name(bridge_channel->chan))) {
/* Even if there is no BLINDTRANSFER dialplan variable then blind_transfer will
* be an empty string.
*/
parker_channel_name = blind_transfer;
if (ast_strlen_zero(blind_transfer) && parker) {
/* If no BLINDTRANSFER exists but the parker does then use their channel name */
parker_channel_name = parker->name;
} else {
/* Even if there is no BLINDTRANSFER dialplan variable then blind_transfer will
* be an empty string.
*/
parker_channel_name = blind_transfer;
}
} else {
parker_channel_name = parker->name;
}