Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

ast_channel Struct Reference

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

#include <channel.h>


Public Methods

 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
ast_generatorgenerator
int writeinterrupt
ast_channel * bridge
ast_channel * dialed
ast_channel * dialing
int reversedialed
ast_channel * masq
ast_channel * masqr
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
sched_contextsched
int streamid
ast_filestreamstream
int vstreamid
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
void * app [AST_CHANNEL_MAX_STACK]
char dtmfq [AST_MAX_EXTENSION]
int deferdtmf
ast_frame dtmff
ast_channel_pvtpvt
jmp_buf jmp [AST_CHANNEL_MAX_STACK]
ast_pbxpbx
int amaflags
char accountcode [20]
ast_cdrcdr
int adsicpe
char call_forward [AST_MAX_EXTENSION]
tone_zonezone
ast_channel_monitormonitor
unsigned long insmpl
unsigned long outsmpl
unsigned int fin
unsigned int fout
char uniqueid [32]
int hangupcause
ast_var_tvars
unsigned int callgroup
unsigned int pickupgroup
int flag
ast_channel * next


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 55 of file channel.h.


Member Function Documentation

AST_LIST_HEAD varshead   ,
ast_var_t   
 


Field Documentation

int _softhangup
 

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

Definition at line 93 of file channel.h.

Referenced by ast_autoservice_stop(), ast_check_hangup(), ast_do_masquerade(), ast_pbx_run(), ast_queue_hangup(), ast_rtp_bridge(), ast_softhangup_nolock(), ast_waitfor_nandfds(), ast_waitstream(), ast_waitstream_fr(), ast_waitstream_full(), and ast_write().

int _state
 

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

Definition at line 133 of file channel.h.

Referenced by __ast_request_and_dial(), ast_answer(), ast_async_goto(), ast_cdr_init(), ast_channel_alloc(), ast_control_streamfile(), ast_do_masquerade(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_prod(), ast_request(), and ast_setstate().

char accountcode[20]
 

Account code for billing

Definition at line 193 of file channel.h.

Referenced by ast_cdr_init(), ast_cdr_setaccount(), ast_cdr_update(), and ast_channel_alloc().

int adsicpe
 

Whether or not ADSI is detected on CPE

Definition at line 197 of file channel.h.

Referenced by ast_do_masquerade().

int amaflags
 

Set BEFORE PBX is started to determine AMA flags

Definition at line 191 of file channel.h.

Referenced by ast_cdr_init(), ast_channel_alloc(), and ast_pbx_run().

char* ani
 

Malloc'd ANI

Definition at line 153 of file channel.h.

Referenced by ast_cdr_init(), ast_cdr_setcid(), ast_cdr_update(), ast_channel_free(), and ast_set_callerid().

void* app[AST_CHANNEL_MAX_STACK]
 

Application information -- see assigned numbers

Definition at line 175 of file channel.h.

char* appl
 

Current application

Definition at line 106 of file channel.h.

Referenced by ast_channel_alloc().

pthread_t blocker
 

If anyone is blocking, this is them

Definition at line 99 of file channel.h.

Referenced by ast_do_masquerade(), ast_hangup(), ast_queue_frame(), and ast_softhangup_nolock().

int blocking
 

Whether or not we're blocking

Definition at line 90 of file channel.h.

Referenced by ast_autoservice_stop(), ast_do_masquerade(), ast_hangup(), ast_queue_frame(), ast_sendtext(), ast_softhangup_nolock(), ast_waitfor_nandfds(), and ast_write().

const char* blockproc
 

Procedure causing blocking

Definition at line 103 of file channel.h.

Referenced by ast_hangup().

struct ast_channel* bridge
 

Who are we bridged to, if we're bridged

Definition at line 76 of file channel.h.

Referenced by ast_channel_bridge().

char call_forward[AST_MAX_EXTENSION]
 

Where to forward to if asked to dial on this interface

Definition at line 199 of file channel.h.

char* callerid
 

Malloc'd Caller ID

Definition at line 151 of file channel.h.

Referenced by __ast_request_and_dial(), ast_cdr_init(), ast_cdr_setcid(), ast_cdr_update(), ast_channel_free(), ast_do_masquerade(), ast_pbx_run(), ast_request(), ast_set_callerid(), and ast_setstate().

unsigned int callgroup
 

Definition at line 225 of file channel.h.

int callingpres
 

Callerid presentation/screening

Definition at line 159 of file channel.h.

struct ast_cdr* cdr
 

Call Detail Record

Definition at line 195 of file channel.h.

Referenced by __ast_request_and_dial(), ast_answer(), ast_cdr_appenduserfield(), ast_cdr_setaccount(), ast_cdr_setamaflags(), ast_cdr_setuserfield(), ast_cdr_update(), ast_hangup(), ast_pbx_run(), and ast_set_callerid().

int cdrflags
 

Call Detail Record Flags

Definition at line 88 of file channel.h.

char context[AST_MAX_EXTENSION]
 

Current extension context

Definition at line 163 of file channel.h.

Referenced by __ast_request_and_dial(), ast_async_goto(), ast_cdr_init(), ast_cdr_update(), ast_channel_alloc(), ast_pbx_outgoing_exten(), and ast_pbx_run().

char* data
 

Data passed to current application

Definition at line 108 of file channel.h.

Referenced by ast_channel_alloc().

int deferdtmf
 

Are DTMF digits being deferred

Definition at line 179 of file channel.h.

Referenced by ast_channel_defer_dtmf(), and ast_channel_undefer_dtmf().

struct ast_channel* dialed
 

Who did we call?

Definition at line 78 of file channel.h.

struct ast_channel* dialing
 

Who called us?

Definition at line 80 of file channel.h.

char* dnid
 

Malloc'd Dialed Number Identifier

Definition at line 149 of file channel.h.

Referenced by ast_channel_free(), and ast_do_masquerade().

struct ast_frame dtmff
 

DTMF frame

Definition at line 181 of file channel.h.

char dtmfq[AST_MAX_EXTENSION]
 

Any/all queued DTMF characters

Definition at line 177 of file channel.h.

int exception
 

Has an exception been detected

Definition at line 111 of file channel.h.

Referenced by ast_do_masquerade(), and ast_waitfor_nandfds().

char exten[AST_MAX_EXTENSION]
 

Current extension number

Definition at line 171 of file channel.h.

Referenced by __ast_request_and_dial(), ast_async_goto(), ast_cdr_init(), ast_cdr_update(), ast_channel_alloc(), ast_pbx_outgoing_exten(), and ast_pbx_run().

int fdno
 

Which fd had an event detected on

Definition at line 113 of file channel.h.

Referenced by ast_do_masquerade(), and ast_waitfor_nandfds().

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 63 of file channel.h.

Referenced by ast_channel_alloc(), ast_do_masquerade(), and ast_waitfor_nandfds().

unsigned int fin
 

Definition at line 212 of file channel.h.

Referenced by ast_channel_alloc().

int flag
 

channel flags of AST_FLAG_ type

Definition at line 229 of file channel.h.

unsigned int fout
 

Definition at line 213 of file channel.h.

Referenced by ast_channel_alloc(), and ast_write().

struct ast_generator* generator
 

Current active data generator

Definition at line 71 of file channel.h.

Referenced by ast_activate_generator(), ast_channel_bridge(), ast_deactivate_generator(), ast_hangup(), and ast_read().

void* generatordata
 

Current generator data if there is any

Definition at line 69 of file channel.h.

Referenced by ast_activate_generator(), ast_deactivate_generator(), ast_hangup(), ast_read(), ast_tonepair(), and ast_write().

int hangupcause
 

Definition at line 219 of file channel.h.

Referenced by __ast_request_and_dial(), and ast_hangup().

unsigned long insmpl
 

Track the read/written samples for monitor use

Definition at line 208 of file channel.h.

Referenced by ast_write().

jmp_buf jmp[AST_CHANNEL_MAX_STACK]
 

Jump buffer used for returning from applications

Definition at line 187 of file channel.h.

char language[MAX_LANGUAGE]
 

Language requested

Definition at line 59 of file channel.h.

Referenced by ast_app_getdata(), ast_app_getdata_full(), ast_app_getvoice(), ast_channel_alloc(), ast_control_streamfile(), ast_play_and_prepend(), ast_play_and_record(), ast_play_and_wait(), and ast_send_image().

ast_mutex_t lock
 

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

Definition at line 101 of file channel.h.

Referenced by ast_activate_generator(), ast_answer(), ast_async_goto(), ast_async_goto_by_name(), ast_call(), ast_channel_alloc(), ast_channel_free(), ast_channel_make_compatible(), ast_channel_masquerade(), ast_channel_walk_locked(), ast_deactivate_generator(), ast_do_masquerade(), ast_get_channel_by_name_locked(), ast_hangup(), ast_indicate(), ast_parse_device_state(), ast_queue_frame(), ast_rtp_bridge(), ast_set_read_format(), ast_set_write_format(), ast_softhangup(), ast_transfer(), ast_waitfor_nandfds(), and ast_write().

char macrocontext[AST_MAX_EXTENSION]
 

Current non-macro context

Definition at line 165 of file channel.h.

Referenced by ast_cdr_update().

char macroexten[AST_MAX_EXTENSION]
 

Current non-macro extension

Definition at line 167 of file channel.h.

Referenced by ast_cdr_update().

int macropriority
 

Current non-macro priority

Definition at line 169 of file channel.h.

struct ast_channel* masq
 

Channel that will masquerade as us

Definition at line 84 of file channel.h.

Referenced by ast_channel_masquerade(), ast_do_masquerade(), ast_hangup(), ast_rtp_bridge(), ast_waitfor_nandfds(), and ast_write().

struct ast_channel* masqr
 

Who we are masquerading as

Definition at line 86 of file channel.h.

Referenced by ast_channel_masquerade(), ast_do_masquerade(), ast_hangup(), ast_rtp_bridge(), and ast_write().

struct ast_channel_monitor* monitor
 

Definition at line 205 of file channel.h.

Referenced by ast_channel_bridge(), ast_channel_free(), and ast_write().

char musicclass[MAX_LANGUAGE]
 

Default music class

Definition at line 66 of file channel.h.

char name[AST_CHANNEL_NAME]
 

ASCII Description of channel name

Definition at line 57 of file channel.h.

Referenced by ast_app_getvoice(), ast_async_goto(), ast_async_goto_by_name(), ast_cdr_init(), ast_change_name(), ast_channel_alloc(), ast_channel_bridge(), ast_channel_free(), ast_channel_make_compatible(), ast_channel_masquerade(), ast_channel_walk_locked(), ast_do_masquerade(), ast_get_channel_by_name_locked(), ast_hangup(), ast_indicate(), ast_parse_device_state(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pbx_run(), ast_play_and_prepend(), ast_play_and_record(), ast_playtones_start(), ast_prod(), ast_queue_frame(), ast_request(), ast_rtp_bridge(), ast_set_callerid(), ast_set_read_format(), ast_set_write_format(), ast_setstate(), ast_softhangup_nolock(), and ast_write().

int nativeformats
 

Kinds of data this channel can natively handle

Definition at line 141 of file channel.h.

Referenced by ast_channel_bridge(), ast_channel_make_compatible(), ast_do_masquerade(), ast_set_read_format(), ast_set_write_format(), and ast_streamfile().

struct ast_channel* next
 

For easy linking

Definition at line 232 of file channel.h.

Referenced by ast_active_channels(), ast_begin_shutdown(), ast_channel_alloc(), ast_channel_free(), and ast_channel_walk_locked().

int oldwriteformat
 

Original writer format

Definition at line 125 of file channel.h.

Referenced by ast_stopstream().

unsigned long outsmpl
 

Definition at line 209 of file channel.h.

Referenced by ast_write().

struct ast_pbx* pbx
 

Definition at line 189 of file channel.h.

Referenced by ast_app_getdata(), ast_async_goto(), ast_channel_free(), and ast_pbx_run().

unsigned int pickupgroup
 

Definition at line 226 of file channel.h.

int priority
 

Definition at line 173 of file channel.h.

Referenced by __ast_request_and_dial(), ast_async_goto(), ast_channel_alloc(), ast_pbx_outgoing_exten(), and ast_pbx_run().

struct ast_channel_pvt* pvt
 

Private channel implementation details

Definition at line 183 of file channel.h.

Referenced by ast_answer(), ast_call(), ast_channel_alloc(), ast_channel_bridge(), ast_channel_free(), ast_channel_sendhtml(), ast_channel_sendurl(), ast_channel_setoption(), ast_channel_supports_html(), ast_check_hangup(), ast_do_masquerade(), ast_hangup(), ast_indicate(), ast_prod(), ast_queue_frame(), ast_rtp_bridge(), ast_send_image(), ast_sendtext(), ast_set_read_format(), ast_set_write_format(), ast_supports_images(), ast_transfer(), ast_write(), and ast_write_video().

char* rdnis
 

Malloc'd RDNIS

Definition at line 155 of file channel.h.

Referenced by ast_channel_free().

int readformat
 

Requested read format

Definition at line 143 of file channel.h.

Referenced by ast_app_getvoice(), ast_async_goto(), ast_channel_bridge(), ast_do_masquerade(), ast_play_and_prepend(), ast_play_and_record(), and ast_set_read_format().

int restrictcid
 

Hide callerid from user

Definition at line 157 of file channel.h.

int reversedialed
 

Reverse the dialed link (0 false, 1 true)

Definition at line 82 of file channel.h.

int rings
 

Number of rings so far

Definition at line 135 of file channel.h.

struct sched_context* sched
 

Schedule context

Definition at line 115 of file channel.h.

Referenced by ast_channel_alloc(), ast_closestream(), ast_hangup(), ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full().

int stack
 

Current level of application

Definition at line 137 of file channel.h.

Referenced by ast_channel_alloc().

struct ast_filestream* stream
 

Stream itself.

Definition at line 119 of file channel.h.

Referenced by ast_closestream(), ast_control_streamfile(), ast_hangup(), ast_readstring(), ast_readstring_full(), ast_stopstream(), ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full().

int streamid
 

For streaming playback, the schedule ID

Definition at line 117 of file channel.h.

Referenced by ast_channel_alloc(), and ast_closestream().

void* timingdata
 

Definition at line 130 of file channel.h.

Referenced by ast_settimeout().

int timingfd
 

Timing fd

Definition at line 128 of file channel.h.

Referenced by ast_channel_alloc(), ast_channel_free(), ast_do_masquerade(), ast_queue_frame(), and ast_settimeout().

int(* timingfunc)(void *data)
 

Referenced by ast_read(), ast_settimeout(), ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full().

char* type
 

Type of channel

Definition at line 61 of file channel.h.

Referenced by ast_do_masquerade().

char uniqueid[32]
 

Definition at line 216 of file channel.h.

Referenced by ast_cdr_init(), ast_change_name(), ast_channel_alloc(), ast_channel_bridge(), ast_do_masquerade(), ast_hangup(), ast_request(), ast_set_callerid(), and ast_setstate().

struct ast_var_t* vars
 

Definition at line 222 of file channel.h.

Referenced by ast_channel_alloc().

struct ast_filestream* vstream
 

Stream itself.

Definition at line 123 of file channel.h.

Referenced by ast_closestream(), ast_hangup(), and ast_stopstream().

int vstreamid
 

For streaming playback, the schedule ID

Definition at line 121 of file channel.h.

Referenced by ast_closestream().

time_t whentohangup
 

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

Definition at line 97 of file channel.h.

Referenced by ast_channel_setwhentohangup(), ast_check_hangup(), ast_pbx_run(), and ast_waitfor_nandfds().

int writeformat
 

Requested write format

Definition at line 145 of file channel.h.

Referenced by ast_async_goto(), ast_channel_bridge(), ast_do_masquerade(), and ast_set_write_format().

int writeinterrupt
 

Whether or not the generator should be interrupted by write

Definition at line 73 of file channel.h.

Referenced by ast_deactivate_generator(), and ast_write().

int zombie
 

Non-zero if this is a zombie channel

Definition at line 95 of file channel.h.

Referenced by ast_answer(), ast_call(), ast_channel_bridge(), ast_do_masquerade(), ast_hangup(), ast_indicate(), ast_readstring(), ast_readstring_full(), ast_sendtext(), ast_transfer(), ast_waitfordigit(), ast_waitfordigit_full(), and ast_write().

struct tone_zone* zone
 

Tone zone

Definition at line 202 of file channel.h.

Referenced by ast_indicate().


The documentation for this struct was generated from the following file:
Generated on Thu Oct 28 11:33:07 2004 for Asterisk by doxygen1.2.15