[Asterisk-code-review] parking: Fall back to parker channel name even if it matches parkee. (asterisk[17])
Joshua Colp
asteriskteam at digium.com
Mon Nov 25 06:56:52 CST 2019
Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/13308 )
Change subject: parking: Fall back to parker channel name even if it matches parkee.
......................................................................
parking: Fall back to parker channel name even if it matches parkee.
ASTERISK-28631
Change-Id: Ia74d084799fbb9bee3403e30d2391aacd46243cc
---
M res/parking/parking_bridge.c
1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/08/13308/1
diff --git a/res/parking/parking_bridge.c b/res/parking/parking_bridge.c
index b92a44b..0a46d79 100644
--- a/res/parking/parking_bridge.c
+++ b/res/parking/parking_bridge.c
@@ -274,10 +274,15 @@
blind_transfer = ast_strdupa(S_OR(blind_transfer, ""));
ast_channel_unlock(bridge_channel->chan);
if (!parker || !strcmp(parker->base->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->base->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->base->name;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13308
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: Ia74d084799fbb9bee3403e30d2391aacd46243cc
Gerrit-Change-Number: 13308
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191125/d3cdf53c/attachment-0001.html>
More information about the asterisk-code-review
mailing list