ast_channel Struct Reference

Main Channel structure associated with a channel. More...

#include <channel.h>

Collaboration diagram for ast_channel:

Collaboration graph

Public Member Functions

 AST_LIST_HEAD (varshead, ast_var_t) varshead

Data Fields

char name [AST_CHANNEL_NAME]
char language [MAX_LANGUAGE]
char * type
int fds [AST_MAX_FDS]
char musicclass [MAX_LANGUAGE]
void * generatordata
struct ast_generatorgenerator
int writeinterrupt
struct ast_channelbridge
struct ast_channeldialed
struct ast_channeldialing
int reversedialed
struct ast_channelmasq
struct ast_channelmasqr
int cdrflags
int blocking
int _softhangup
int zombie
time_t whentohangup
pthread_t blocker
ast_mutex_t lock
const char * blockproc
char * appl
char * data
int exception
int fdno
struct sched_contextsched
int streamid
struct ast_filestreamstream
int vstreamid
struct ast_filestreamvstream
int oldwriteformat
int timingfd
int(* timingfunc )(void *data)
void * timingdata
int _state
int rings
int stack
int nativeformats
int readformat
int writeformat
char * dnid
char * callerid
char * ani
char * rdnis
int restrictcid
int callingpres
char context [AST_MAX_EXTENSION]
char macrocontext [AST_MAX_EXTENSION]
char macroexten [AST_MAX_EXTENSION]
int macropriority
char exten [AST_MAX_EXTENSION]
int priority
char dtmfq [AST_MAX_EXTENSION]
int deferdtmf
struct ast_frame dtmff
struct ast_channel_pvtpvt
struct ast_pbxpbx
int amaflags
char accountcode [20]
struct ast_cdrcdr
int adsicpe
char call_forward [AST_MAX_EXTENSION]
struct tone_zonezone
struct ast_channel_monitormonitor
unsigned long insmpl
unsigned long outsmpl
unsigned int fin
unsigned int fout
char uniqueid [32]
int hangupcause
struct ast_var_tvars
unsigned int callgroup
unsigned int pickupgroup
int flag
struct ast_channelnext

Detailed Description

Main Channel structure associated with a channel.

This is the side of it mostly used by the pbx and call management.

Definition at line 59 of file channel.h.

Member Function Documentation

AST_LIST_HEAD ( varshead  ,

Field Documentation


ASCII Description of channel name

Definition at line 61 of file channel.h.

char language[MAX_LANGUAGE]

Language requested

Definition at line 63 of file channel.h.

char* type

Type of channel

Definition at line 65 of file channel.h.

int fds[AST_MAX_FDS]

File descriptor for channel -- Drivers will poll on these file descriptors, so at least one must be non -1.

Definition at line 67 of file channel.h.

char musicclass[MAX_LANGUAGE]

Default music class

Definition at line 70 of file channel.h.

Current generator data if there is any

Definition at line 73 of file channel.h.

struct ast_generator* generator [read]

Current active data generator

Definition at line 75 of file channel.h.

Whether or not the generator should be interrupted by write

Definition at line 77 of file channel.h.

struct ast_channel* bridge [read]

Who are we bridged to, if we're bridged

Definition at line 80 of file channel.h.

struct ast_channel* dialed [read]

Who did we call?

Definition at line 82 of file channel.h.

struct ast_channel* dialing [read]

Who called us?

Definition at line 84 of file channel.h.

Reverse the dialed link (0 false, 1 true)

Definition at line 86 of file channel.h.

struct ast_channel* masq [read]

Channel that will masquerade as us

Definition at line 88 of file channel.h.

struct ast_channel* masqr [read]

Who we are masquerading as

Definition at line 90 of file channel.h.

int cdrflags

Call Detail Record Flags

Definition at line 92 of file channel.h.

int blocking

Whether or not we're blocking

Definition at line 94 of file channel.h.

Whether or not we have been hung up... Do not set this value directly, use ast_softhangup

Definition at line 97 of file channel.h.

int zombie

Non-zero if this is a zombie channel

Definition at line 99 of file channel.h.

time_t whentohangup

Non-zero, set to actual time when channel is to be hung up

Definition at line 101 of file channel.h.

pthread_t blocker

If anyone is blocking, this is them

Definition at line 103 of file channel.h.

Lock, can be used to lock a channel for some operations

Definition at line 105 of file channel.h.

const char* blockproc

Procedure causing blocking

Definition at line 107 of file channel.h.

char* appl

Current application

Definition at line 110 of file channel.h.

char* data

Data passed to current application

Definition at line 112 of file channel.h.

int exception

Has an exception been detected

Definition at line 115 of file channel.h.

int fdno

Which fd had an event detected on

Definition at line 117 of file channel.h.

struct sched_context* sched [read]

Schedule context

Definition at line 119 of file channel.h.

int streamid

For streaming playback, the schedule ID

Definition at line 121 of file channel.h.

struct ast_filestream* stream [read]

Stream itself.

Definition at line 123 of file channel.h.

int vstreamid

For streaming playback, the schedule ID

Definition at line 125 of file channel.h.

struct ast_filestream* vstream [read]

Stream itself.

Definition at line 127 of file channel.h.

Original writer format

Definition at line 129 of file channel.h.

int timingfd

Timing fd

Definition at line 132 of file channel.h.

int(* timingfunc)(void *data)

void* timingdata

Definition at line 134 of file channel.h.

int _state

State of line -- Don't write directly, use ast_setstate

Definition at line 137 of file channel.h.

int rings

Number of rings so far

Definition at line 139 of file channel.h.

int stack

Current level of application

Definition at line 141 of file channel.h.

Kinds of data this channel can natively handle

Definition at line 145 of file channel.h.

Requested read format

Definition at line 147 of file channel.h.

Requested write format

Definition at line 149 of file channel.h.

char* dnid

Malloc'd Dialed Number Identifier

Definition at line 153 of file channel.h.

char* callerid

Malloc'd Caller ID

Definition at line 155 of file channel.h.

char* ani

Malloc'd ANI

Definition at line 157 of file channel.h.

char* rdnis

Malloc'd RDNIS

Definition at line 159 of file channel.h.

Hide callerid from user

Definition at line 161 of file channel.h.

Callerid presentation/screening

Definition at line 163 of file channel.h.

char context[AST_MAX_EXTENSION]

Current extension context

Definition at line 167 of file channel.h.

char macrocontext[AST_MAX_EXTENSION]

Current non-macro context

Definition at line 169 of file channel.h.

char macroexten[AST_MAX_EXTENSION]

Current non-macro extension

Definition at line 171 of file channel.h.

Current non-macro priority

Definition at line 173 of file channel.h.


Current extension number

Definition at line 175 of file channel.h.

int priority

Definition at line 177 of file channel.h.


Application information -- see assigned numbers

Definition at line 179 of file channel.h.


Any/all queued DTMF characters

Definition at line 181 of file channel.h.

int deferdtmf

Are DTMF digits being deferred

Definition at line 183 of file channel.h.

struct ast_frame dtmff [read]

DTMF frame

Definition at line 185 of file channel.h.

struct ast_channel_pvt* pvt [read]

Private channel implementation details

Definition at line 187 of file channel.h.


Jump buffer used for returning from applications

Definition at line 191 of file channel.h.

struct ast_pbx* pbx [read]

Definition at line 193 of file channel.h.

int amaflags

Set BEFORE PBX is started to determine AMA flags

Definition at line 195 of file channel.h.

char accountcode[20]

Account code for billing

Definition at line 197 of file channel.h.

struct ast_cdr* cdr [read]

Call Detail Record

Definition at line 199 of file channel.h.

int adsicpe

Whether or not ADSI is detected on CPE

Definition at line 201 of file channel.h.

char call_forward[AST_MAX_EXTENSION]

Where to forward to if asked to dial on this interface

Definition at line 203 of file channel.h.

struct tone_zone* zone [read]

Tone zone

Definition at line 206 of file channel.h.

struct ast_channel_monitor* monitor [read]

Definition at line 209 of file channel.h.

unsigned long insmpl

Track the read/written samples for monitor use

Definition at line 212 of file channel.h.

unsigned long outsmpl

Definition at line 213 of file channel.h.

unsigned int fin

Definition at line 216 of file channel.h.

unsigned int fout

Definition at line 217 of file channel.h.

char uniqueid[32]

Definition at line 220 of file channel.h.

Definition at line 223 of file channel.h.

struct ast_var_t* vars [read]

Definition at line 226 of file channel.h.

unsigned int callgroup

Definition at line 229 of file channel.h.

unsigned int pickupgroup

Definition at line 230 of file channel.h.

int flag

channel flags of AST_FLAG_ type

Definition at line 233 of file channel.h.

struct ast_channel* next [read]

For easy linking

Definition at line 236 of file channel.h.

The documentation for this struct was generated from the following file:

Generated on Wed Oct 28 17:01:04 2009 for Asterisk by  doxygen 1.5.6