summaryrefslogtreecommitdiff
path: root/res/parking
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-03-26 14:25:46 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-03-26 14:25:47 -0500
commit77a9272431296772f5930301175bc0832076ac3e (patch)
treea2d7dfa315dc10a5c64a5f4c2370eaae91c6522c /res/parking
parent36347dbc3cc40f3dd5aa646e0f25ef4b92cd3ebc (diff)
parent8e8cf80cea37effcfdc8c82429341f33721a2ee8 (diff)
Merge "res_parking: Fix blind transfer dynamic lots creation."
Diffstat (limited to 'res/parking')
-rw-r--r--res/parking/parking_applications.c2
-rw-r--r--res/parking/parking_bridge_features.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/res/parking/parking_applications.c b/res/parking/parking_applications.c
index 616627a3b..ea7223eac 100644
--- a/res/parking/parking_applications.c
+++ b/res/parking/parking_applications.c
@@ -496,7 +496,7 @@ struct ast_bridge *park_common_setup(struct ast_channel *parkee, struct ast_chan
lot = parking_lot_find_by_name(lot_name);
if (!lot) {
- lot = parking_create_dynamic_lot(lot_name, parkee);
+ lot = parking_create_dynamic_lot(lot_name, parker);
}
if (!lot) {
diff --git a/res/parking/parking_bridge_features.c b/res/parking/parking_bridge_features.c
index 4d1416eb8..e053ed74e 100644
--- a/res/parking/parking_bridge_features.c
+++ b/res/parking/parking_bridge_features.c
@@ -236,6 +236,7 @@ static struct ast_channel *park_local_transfer(struct ast_channel *parker, const
/* Before we actually dial out let's inherit appropriate information. */
ast_channel_lock_both(parker, parkee);
ast_channel_req_accountcodes(parkee, parker, AST_CHANNEL_REQUESTOR_REPLACEMENT);
+ ast_channel_parkinglot_set(parkee, ast_channel_parkinglot(parker));
ast_connected_line_copy_from_caller(ast_channel_connected(parkee), ast_channel_caller(parker));
ast_channel_inherit_variables(parker, parkee);
ast_channel_datastore_inherit(parker, parkee);
@@ -482,6 +483,9 @@ static int parking_park_call(struct ast_bridge_channel *parker, char *exten, siz
lot = parking_lot_find_by_name(lot_name);
if (!lot) {
+ lot = parking_create_dynamic_lot(lot_name, parker->chan);
+ }
+ if (!lot) {
ast_log(AST_LOG_WARNING, "Cannot Park %s: lot %s unknown\n",
ast_channel_name(parker->chan), lot_name);
return -1;
@@ -497,7 +501,8 @@ static int feature_park_call(struct ast_bridge_channel *bridge_channel, void *ho
{
SCOPED_MODULE_USE(AST_MODULE_SELF);
- return parking_park_call(bridge_channel, NULL, 0);
+ parking_park_call(bridge_channel, NULL, 0);
+ return 0;
}
/*!