blob: 17b38e797f9ec69bc47e89aa00f73a91eaa11b6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2013, Digium, Inc.
*
* Matt Jordan <mjordan@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*!
* \file
* \brief Call Pickup API
*
* Includes code and algorithms from the Zapata library.
*
*/
#ifndef _AST_PICKUP_H
#define _AST_PICKUP_H
/*!
* \brief Test if a channel can be picked up.
*
* \param chan Channel to test if can be picked up.
*
* \note This function assumes that chan is locked.
*
* \return TRUE if channel can be picked up.
*/
int ast_can_pickup(struct ast_channel *chan);
/*!
* \brief Find a pickup channel target by group.
*
* \param chan channel that initiated pickup.
*
* \retval target on success. The returned channel is locked and reffed.
* \retval NULL on error.
*/
struct ast_channel *ast_pickup_find_by_group(struct ast_channel *chan);
/*!
* \brief Pickup a call
*
* \param chan The channel that initiated the pickup
*
* \retval 0 on success
* \retval -1 on failure
*/
int ast_pickup_call(struct ast_channel *chan);
/*!
* \brief Pickup a call target.
*
* \param chan channel that initiated pickup.
* \param target channel to be picked up.
*
* \note This function assumes that target is locked.
*
* \retval 0 on success.
* \retval -1 on failure.
*/
int ast_do_pickup(struct ast_channel *chan, struct ast_channel *target);
/*!
* \brief accessor for call pickup message type
* \since 12.0.0
*
* \retval pointer to the stasis message type
* \retval NULL if not initialized
*/
struct stasis_message_type *ast_call_pickup_type(void);
/*!
* \brief Initialize pickup
*
* \retval 0 on success
* \retval non-zero on failure
*/
int ast_pickup_init(void);
#endif /* _AST_PICKUP_H */
|