Asterisk - The Open Source Telephony Project  GIT-master-1f78ee9
channelstate.h
Go to the documentation of this file.
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 1999 - 2010, Digium, Inc.
5  *
6  * See http://www.asterisk.org for more information about
7  * the Asterisk project. Please do not directly contact
8  * any of the maintainers of this project for assistance;
9  * the project provides a web site, mailing lists and IRC
10  * channels for your use.
11  *
12  * This program is free software, distributed under the terms of
13  * the GNU General Public License Version 2. See the LICENSE file
14  * at the top of the source tree.
15  */
16 
17 /*! \file
18  * \brief Channel states
19  * \par See also:
20  * \arg \ref Def_Channel
21  * \arg \ref channel_drivers
22  */
23 
24 #ifndef __AST_CHANNELSTATE_H__
25 #define __AST_CHANNELSTATE_H__
26 
27 #include "asterisk.h"
28 
29 /*!
30  * \brief ast_channel states
31  *
32  * \note Bits 0-15 of state are reserved for the state (up/down) of the line
33  * Bits 16-32 of state are reserved for flags
34  */
36  AST_STATE_DOWN, /*!< Channel is down and available */
37  AST_STATE_RESERVED, /*!< Channel is down, but reserved */
38  AST_STATE_OFFHOOK, /*!< Channel is off hook */
39  AST_STATE_DIALING, /*!< Digits (or equivalent) have been dialed */
40  AST_STATE_RING, /*!< Line is ringing */
41  AST_STATE_RINGING, /*!< Remote end is ringing */
42  AST_STATE_UP, /*!< Line is up */
43  AST_STATE_BUSY, /*!< Line is busy */
44  AST_STATE_DIALING_OFFHOOK, /*!< Digits (or equivalent) have been dialed while offhook */
45  AST_STATE_PRERING, /*!< Channel has detected an incoming call and is waiting for ring */
46 
47  AST_STATE_MUTE = (1 << 16), /*!< Do not transmit voice data */
48 };
49 
50 /*!
51  * \brief Change the state of a channel
52  * \pre chan is locked
53  */
54 int ast_setstate(struct ast_channel *chan, enum ast_channel_state);
55 
56 #endif /* __AST_CHANNELSTATE_H__ */
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
ast_channel_state
ast_channel states
Definition: channelstate.h:35
int ast_setstate(struct ast_channel *chan, enum ast_channel_state)
Change the state of a channel.
Definition: channel.c:7325