f5c31f88c36483f4b77f826cf847882da92f1c35
[asterisk/asterisk.git] / include / asterisk / features.h
1 /*
2  * Asterisk -- A telephony toolkit for Linux.
3  *
4  * Call Parking and Pickup API 
5  * 
6  * Copyright (C) 1999, Mark Spencer
7  *
8  * Mark Spencer <markster@linux-support.net>
9  *
10  * This program is free software, distributed under the terms of
11  * the GNU General Public License.
12  *
13  * Includes code and algorithms from the Zapata library.
14  *
15  */
16
17 #ifndef _AST_FEATURES_H
18 #define _AST_FEATURES_H
19
20 //! Park a call and read back parked location
21 /*! \param chan the channel to actually be parked
22     \param host the channel which will have the parked location read to
23         Park the channel chan, and read back the parked location to the
24         host.  If the call is not picked up within a specified period of
25         time, then the call will return to the last step that it was in 
26         (in terms of exten, priority and context)
27         \param timeout is a timeout in milliseconds
28         \param extout is a parameter to an int that will hold the parked location, or NULL if you want
29 */
30 extern int ast_park_call(struct ast_channel *chan, struct ast_channel *host, int timeout, int *extout);
31 //! Park a call via a masqueraded channel
32 /*! \param rchan the real channel to be parked
33     \param host the channel to have the parking read to
34         Masquerade the channel rchan into a new, empty channel which is then
35         parked with ast_park_call
36         \param timeout is a timeout in milliseconds
37         \param extout is a parameter to an int that will hold the parked location, or NULL if you want
38 */
39 extern int ast_masq_park_call(struct ast_channel *rchan, struct ast_channel *host, int timeout, int *extout);
40
41 //! Determine system parking extension
42 /*! Returns the call parking extension for drivers that provide special
43     call parking help */
44 extern char *ast_parking_ext(void);
45 extern char *ast_pickup_ext(void);
46
47 //! Bridge a call, optionally allowing redirection
48
49 extern int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer,struct ast_bridge_config *config);
50
51 extern int ast_pickup_call(struct ast_channel *chan);
52
53
54 #endif /* _AST_FEATURES_H */