channelstate.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 1999 - 2010, Digium, Inc.
00005  *
00006  * See http://www.asterisk.org for more information about
00007  * the Asterisk project. Please do not directly contact
00008  * any of the maintainers of this project for assistance;
00009  * the project provides a web site, mailing lists and IRC
00010  * channels for your use.
00011  *
00012  * This program is free software, distributed under the terms of
00013  * the GNU General Public License Version 2. See the LICENSE file
00014  * at the top of the source tree.
00015  */
00016 
00017 /*! \file
00018  * \brief Channel states
00019  * \par See also:
00020  *  \arg \ref Def_Channel
00021  *  \arg \ref channel_drivers
00022  */
00023 
00024 #ifndef __AST_CHANNELSTATE_H__
00025 #define __AST_CHANNELSTATE_H__
00026 
00027 #include "asterisk.h"
00028 
00029 /*!
00030  * \brief ast_channel states
00031  *
00032  * \note Bits 0-15 of state are reserved for the state (up/down) of the line
00033  *       Bits 16-32 of state are reserved for flags
00034  */
00035 enum ast_channel_state {
00036    AST_STATE_DOWN,         /*!< Channel is down and available */
00037    AST_STATE_RESERVED,     /*!< Channel is down, but reserved */
00038    AST_STATE_OFFHOOK,      /*!< Channel is off hook */
00039    AST_STATE_DIALING,      /*!< Digits (or equivalent) have been dialed */
00040    AST_STATE_RING,         /*!< Line is ringing */
00041    AST_STATE_RINGING,      /*!< Remote end is ringing */
00042    AST_STATE_UP,        /*!< Line is up */
00043    AST_STATE_BUSY,         /*!< Line is busy */
00044    AST_STATE_DIALING_OFFHOOK, /*!< Digits (or equivalent) have been dialed while offhook */
00045    AST_STATE_PRERING,      /*!< Channel has detected an incoming call and is waiting for ring */
00046 
00047    AST_STATE_MUTE = (1 << 16),   /*!< Do not transmit voice data */
00048 };
00049 
00050 /*!
00051  * \brief Change the state of a channel
00052  * \pre chan is locked
00053  */
00054 int ast_setstate(struct ast_channel *chan, enum ast_channel_state);
00055 
00056 #endif /* __AST_CHANNELSTATE_H__ */

Generated on Thu Apr 16 06:27:30 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6