summaryrefslogtreecommitdiff
path: root/res/res_parking.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-08-01 20:55:17 +0000
committerMatthew Jordan <mjordan@digium.com>2013-08-01 20:55:17 +0000
commit5c4b482471edb8a839d754dd654dc72605caac66 (patch)
treed164a3ebd03e7101a39929283b75d2318a2f6761 /res/res_parking.c
parentc8a91b5b013c568f3f99e8fb7abc662775c60520 (diff)
Support externally initiated parking requests; remove some dead code
This patch does the following: * It adds support for externally initiated parking requests. In particular, chan_skinny has a protocol level message that initiates a call park. This patch now supports that option, as well as the protocol specific mechanisms in chan_dahdi/sig_analog and chan_mgcp. * A parking bridge features virtual table has been added that provides access to the parking functionality that the Bridging API needs. This includes requests to park an entire 'call' (with little or no additional information, thank you chan_skinny), perform a blind transfer to a parking extension, determine if an extension is a parking extension, as well as the actual "do the parking" request from the Bridging API. * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new functions * The removal of some - but not all - dead parking code from features.c This also fixed blind transferring a multi-party bridge to a parking lot (which was implemented, but had at least one code path where using the parking features kK might not have worked) Review: https://reviewboard.asterisk.org/r/2710 (closes issue ASTERISK-22134) Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_parking.c')
-rw-r--r--res/res_parking.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/res/res_parking.c b/res/res_parking.c
index 9a13db098..6efb79543 100644
--- a/res/res_parking.c
+++ b/res/res_parking.c
@@ -1140,19 +1140,18 @@ static void link_configured_disable_marked_lots(void)
static int load_module(void)
{
- if (aco_info_init(&cfg_info)) {
- goto error;
- }
-
parking_lot_container = ao2_container_alloc_list(AO2_ALLOC_OPT_LOCK_MUTEX,
AO2_CONTAINER_ALLOC_OPT_DUPS_REJECT,
parking_lot_sort_fn,
NULL);
-
if (!parking_lot_container) {
goto error;
}
+ if (aco_info_init(&cfg_info)) {
+ goto error;
+ }
+
/* Global options */
aco_option_register(&cfg_info, "parkeddynamic", ACO_EXACT, global_options, "no", OPT_BOOL_T, 1, FLDSET(struct parking_global_config, parkeddynamic));