ast_channel Struct Reference

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

Collaboration diagram for ast_channel:

Collaboration graph
[legend]

Data Fields

struct ast_string_field_mgr __field_mgr
struct ast_string_field_pool__field_mgr_pool
const ast_string_field accountcode
enum ast_channel_adsicpe adsicpe
int alertpipe [2]
int amaflags
struct timeval answertime
const char * appl
struct ast_audiohook_listaudiohooks
struct ast_autochan_list autochans
pthread_t blocker
const char * blockproc
struct ast_bridgebridge
struct ast_bridge_channelbridge_channel
const ast_string_field call_forward
struct ast_party_caller caller
 Channel Caller ID information.
ast_group_t callgroup
ast_callid callid
struct ast_cdrcdr
struct ast_party_connected_line connected
 Channel Connected Line ID information.
struct ast_party_connected_line connected_indicated
 Channel Connected Line ID information that was last indicated.
char context [AST_MAX_CONTEXT]
struct timeval creationtime
const char * data
struct ast_datastore_list datastores
const ast_string_field dialcontext
struct ast_party_dialed dialed
 Dialed/Called information.
struct ao2_containerdialed_causes
char dtmf_digit_to_emulate
struct timeval dtmf_tv
struct ast_frame dtmff
unsigned int emulate_dtmf_duration
struct stasis_forwardendpoint_cache_forward
struct stasis_forwardendpoint_forward
char exten [AST_MAX_EXTENSION]
int fdno
int fds [AST_MAX_FDS]
unsigned int fin
unsigned int finalized:1
struct ast_flags flags
unsigned int fout
struct ast_framehook_listframehooks
struct ast_generatorgenerator
void * generatordata
struct ast_hangup_handler_list hangup_handlers
int hangupcause
const ast_string_field hangupsource
int hold_state
unsigned long insmpl
struct ast_jb jb
const ast_string_field language
const ast_string_field latest_musicclass
struct ast_channel_id linkedid
char macrocontext [AST_MAX_CONTEXT]
char macroexten [AST_MAX_EXTENSION]
int macropriority
struct ast_channelmasq
struct ast_channelmasqr
struct ast_channel_monitormonitor
void * music_state
const ast_string_field musicclass
const ast_string_field name
struct ast_namedgroups * named_callgroups
struct ast_namedgroups * named_pickupgroups
struct ast_format_capnativeformats
struct ast_formatoldwriteformat
unsigned long outsmpl
const ast_string_field parkinglot
struct ast_pbxpbx
const ast_string_field peeraccount
ast_group_t pickupgroup
int priority
struct ast_formatrawreadformat
struct ast_formatrawwriteformat
struct ast_formatreadformat
struct ast_readq_list readq
struct ast_trans_pvtreadtrans
struct ast_party_redirecting redirecting
 Redirecting/Diversion information.
int rings
struct ast_sched_contextsched
char sending_dtmf_digit
struct timeval sending_dtmf_tv
int softhangup
enum ast_channel_state state
struct ast_filestreamstream
int streamid
struct ast_channel_techtech
void * tech_pvt
struct ast_timertimer
void * timingdata
int timingfd
ast_timing_func_t timingfunc
struct stasis_cp_singletopics
unsigned short transfercapability
int unbridged
struct ast_channel_id uniqueid
const ast_string_field userfield
struct varshead varshead
int visible_indication
struct ast_filestreamvstream
int vstreamid
struct timeval whentohangup
struct ast_formatwriteformat
struct ast_trans_pvtwritetrans
char x
struct ast_tone_zonezone

Detailed Description

Main Channel structure associated with a channel.

Note:
When adding fields to this structure, it is important to add the field 'in position' with like-aligned fields, so as to keep the compiler from having to add padding to align fields. The structure's fields are sorted in this order: pointers, structures, long, int/enum, short, char. This is especially important on 64-bit architectures, where mixing 4-byte and 8-byte fields causes 4 bytes of padding to be added before many 8-byte fields.
Examples:

/tmp/asterisk-trunk/trunk/main/app.c.

Definition at line 74 of file channel_internal_api.c.


Field Documentation

Definition at line 117 of file channel_internal_api.c.

Default parking lot, if empty, default parking lot

Who is responsible for hanging up this channel

< Dial: Extension context that we were called from

Definition at line 117 of file channel_internal_api.c.

Definition at line 117 of file channel_internal_api.c.

Whether or not ADSI is detected on CPE

Definition at line 188 of file channel_internal_api.c.

Referenced by ast_channel_adsicpe(), and ast_channel_adsicpe_set().

int alertpipe[2]

int amaflags

Set BEFORE PBX is started to determine AMA flags

Definition at line 187 of file channel_internal_api.c.

Referenced by ast_channel_amaflags(), ast_channel_amaflags_set(), and ast_channel_yank().

struct timeval answertime [read]

The time the channel was answered

Definition at line 161 of file channel_internal_api.c.

Referenced by ast_channel_answertime_set().

const char* appl

Current application

Definition at line 83 of file channel_internal_api.c.

Referenced by ast_channel_appl(), and ast_channel_appl_set().

Definition at line 93 of file channel_internal_api.c.

Referenced by ast_channel_audiohooks(), and ast_channel_audiohooks_set().

Autochans on the channel

Definition at line 167 of file channel_internal_api.c.

Referenced by ast_channel_autochans().

pthread_t blocker

If anyone is blocking, this is them

Definition at line 123 of file channel_internal_api.c.

Referenced by ast_channel_blocker(), and ast_channel_blocker_set().

const char* blockproc

Procedure causing blocking

Definition at line 82 of file channel_internal_api.c.

Referenced by ast_channel_blockproc(), and ast_channel_blockproc_set().

struct ast_bridge* bridge [read]

The bridge_channel this channel is linked with.

Definition at line 212 of file channel_internal_api.c.

Referenced by ast_channel_internal_bridge_channel(), ast_channel_internal_bridge_channel_set(), and bridge_channel_control_thread().

Definition at line 117 of file channel_internal_api.c.

struct ast_party_caller caller [read]

Channel Caller ID information.

Note:
The caller id information is the caller id of this channel when it is used to initiate a call.

Definition at line 137 of file channel_internal_api.c.

Referenced by app_exec(), ast_channel_caller(), ast_channel_caller_set(), AST_TEST_DEFINE(), and channel_do_masquerade().

Call group for call pickups

Definition at line 156 of file channel_internal_api.c.

Referenced by ast_channel_callgroup(), and ast_channel_callgroup_set().

struct ast_cdr* cdr [read]

Call Detail Record

Definition at line 95 of file channel_internal_api.c.

Referenced by ast_channel_cdr(), and ast_channel_cdr_set().

Channel Connected Line ID information.

Note:
The connected line information identifies the channel connected/bridged to this channel.

Definition at line 144 of file channel_internal_api.c.

Referenced by ast_channel_connected(), ast_channel_connected_set(), and channel_do_masquerade().

Channel Connected Line ID information that was last indicated.

Definition at line 149 of file channel_internal_api.c.

Referenced by ast_channel_connected_indicated().

char context[AST_MAX_CONTEXT]

Dialplan: Current extension context

Definition at line 215 of file channel_internal_api.c.

Referenced by ast_channel_context(), ast_channel_context_set(), mgcp_ss(), pbx_outgoing_exec(), and readexten_exec().

struct timeval creationtime [read]

The time of channel creation

Definition at line 160 of file channel_internal_api.c.

Referenced by ast_channel_creationtime_set().

const char* data

Data passed to current application

Definition at line 84 of file channel_internal_api.c.

Referenced by ast_channel_data(), ast_channel_data_set(), cdr_read(), and func_channel_write().

Data stores on the channel

Definition at line 166 of file channel_internal_api.c.

Referenced by ast_channel_datastores().

Definition at line 117 of file channel_internal_api.c.

struct ast_party_dialed dialed [read]

Dialed/Called information.

Note:
Set on incoming channels to indicate the originally dialed party.

Dialed Number Identifier (DNID)

Definition at line 130 of file channel_internal_api.c.

Referenced by ast_channel_dialed(), ast_channel_dialed_set(), channel_do_masquerade(), jingle_request(), and pbx_outgoing_attempt().

struct ao2_container* dialed_causes [read]

Contains tech-specific and Asterisk cause data from dialed channels ASCII unique channel name Language requested for voice prompts Default music class Latest active music class Account code for billing Peer account code for billing Userfield for CEL billing Where to forward to if asked to dial on this interface

Definition at line 103 of file channel_internal_api.c.

Referenced by __ast_channel_internal_alloc(), ast_channel_dialed_causes_add(), ast_channel_dialed_causes_channels(), ast_channel_dialed_causes_clear(), ast_channel_dialed_causes_find(), and ast_channel_internal_cleanup().

Digit being emulated

Definition at line 219 of file channel_internal_api.c.

Referenced by ast_channel_dtmf_digit_to_emulate(), and ast_channel_dtmf_digit_to_emulate_set().

struct timeval dtmf_tv [read]

The time that an in process digit began, or the last digit ended

Definition at line 164 of file channel_internal_api.c.

Referenced by ast_channel_dtmf_tv(), and ast_channel_dtmf_tv_set().

struct ast_frame dtmff [read]

DTMF frame

Definition at line 154 of file channel_internal_api.c.

Referenced by ast_channel_dtmff(), and ast_channel_dtmff_set().

unsigned int emulate_dtmf_duration

Number of ms left to emulate DTMF for

Definition at line 202 of file channel_internal_api.c.

Referenced by ast_channel_emulate_dtmf_duration(), and ast_channel_emulate_dtmf_duration_set().

Subscription for cache updates to endpoint's topic

Definition at line 224 of file channel_internal_api.c.

Referenced by ast_channel_forward_endpoint(), and ast_channel_internal_cleanup().

Subscription for event forwarding to endpoint's topic

Definition at line 223 of file channel_internal_api.c.

Referenced by ast_channel_forward_endpoint(), and ast_channel_internal_cleanup().

char exten[AST_MAX_EXTENSION]

int fdno

Which fd had an event detected on

Definition at line 178 of file channel_internal_api.c.

Referenced by ast_channel_fdno(), and ast_channel_fdno_set().

int fds[AST_MAX_FDS]

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

Definition at line 171 of file channel_internal_api.c.

Referenced by ast_channel_fd(), and ast_channel_internal_fd_set().

unsigned int fin

Frames in counters. The high bit is a debug mask, so the counter is only in the remaining bits

Definition at line 189 of file channel_internal_api.c.

Referenced by ast_channel_fin(), and ast_channel_fin_set().

unsigned int finalized

Whether or not the channel has been successfully allocated

Definition at line 194 of file channel_internal_api.c.

Referenced by ast_channel_internal_finalize(), and ast_channel_internal_is_finalized().

struct ast_flags flags [read]

channel flags of AST_FLAG_ type

Definition at line 195 of file channel_internal_api.c.

Referenced by __analog_ss_thread(), and ast_channel_flags().

unsigned int fout

Frames out counters. The high bit is a debug mask, so the counter is only in the remaining bits

Definition at line 191 of file channel_internal_api.c.

Referenced by ast_channel_fout(), and ast_channel_fout_set().

Definition at line 94 of file channel_internal_api.c.

Referenced by ast_channel_framehooks(), and ast_channel_framehooks_set().

struct ast_generator* generator [read]

Current active data generator

Definition at line 79 of file channel_internal_api.c.

Referenced by ast_channel_generator(), and ast_channel_generator_set().

Current generator data if there is any

Definition at line 78 of file channel_internal_api.c.

Referenced by ast_activate_generator(), ast_channel_generatordata(), and ast_channel_generatordata_set().

Hangup handlers on the channel.

Definition at line 165 of file channel_internal_api.c.

Referenced by ast_channel_hangup_handlers().

Why is the channel hanged up. See causes.h

Definition at line 193 of file channel_internal_api.c.

Referenced by ast_channel_hangupcause(), and ast_channel_hangupcause_set().

Definition at line 117 of file channel_internal_api.c.

Current Hold/Unhold state

Definition at line 207 of file channel_internal_api.c.

Referenced by ast_channel_hold_state(), and ast_channel_hold_state_set().

unsigned long insmpl

Track the read/written samples for monitor use

Definition at line 168 of file channel_internal_api.c.

Referenced by ast_channel_insmpl(), and ast_channel_insmpl_set().

struct ast_jb jb [read]

The jitterbuffer state

Definition at line 163 of file channel_internal_api.c.

Referenced by ast_channel_jb(), and ast_channel_jb_set().

Definition at line 117 of file channel_internal_api.c.

Definition at line 117 of file channel_internal_api.c.

struct ast_channel_id linkedid [read]

char macrocontext[AST_MAX_CONTEXT]

Macro: Current non-macro context. See app_macro.c

Definition at line 217 of file channel_internal_api.c.

Referenced by ast_channel_macrocontext(), and ast_channel_macrocontext_set().

char macroexten[AST_MAX_EXTENSION]

Macro: Current non-macro extension. See app_macro.c

Definition at line 218 of file channel_internal_api.c.

Referenced by ast_channel_macroexten(), and ast_channel_macroexten_set().

Macro: Current non-macro priority. See app_macro.c

Definition at line 186 of file channel_internal_api.c.

Referenced by ast_channel_macropriority(), and ast_channel_macropriority_set().

struct ast_channel* masq [read]

Channel that will masquerade as us

Definition at line 80 of file channel_internal_api.c.

Referenced by ast_channel_masq(), and ast_channel_masq_set().

struct ast_channel* masqr [read]

Who we are masquerading as

Definition at line 81 of file channel_internal_api.c.

Referenced by ast_channel_masqr(), and ast_channel_masqr_set().

struct ast_channel_monitor* monitor [read]

Channel monitoring

Definition at line 98 of file channel_internal_api.c.

Referenced by ast_channel_monitor(), and ast_channel_monitor_set().

void* music_state

Music State

Definition at line 77 of file channel_internal_api.c.

Referenced by ast_channel_music_state(), and ast_channel_music_state_set().

Definition at line 117 of file channel_internal_api.c.

struct ast_namedgroups* named_callgroups [read]

Named call group for call pickups

Definition at line 158 of file channel_internal_api.c.

Referenced by ast_channel_named_callgroups(), and ast_channel_named_callgroups_set().

struct ast_namedgroups* named_pickupgroups [read]

Named pickup group - which call groups can be picked up?

Definition at line 159 of file channel_internal_api.c.

Referenced by ast_channel_named_pickupgroups(), and ast_channel_named_pickupgroups_set().

struct ast_format_cap* nativeformats [read]

Kinds of data this channel can natively handle

Definition at line 197 of file channel_internal_api.c.

Referenced by ast_channel_nativeformats(), and ast_channel_nativeformats_set().

struct ast_format* oldwriteformat [read]

Original writer format

Definition at line 181 of file channel_internal_api.c.

Referenced by ast_channel_oldwriteformat(), and ast_channel_set_oldwriteformat().

unsigned long outsmpl

Track the read/written samples for monitor use

Definition at line 169 of file channel_internal_api.c.

Referenced by ast_channel_outsmpl(), and ast_channel_outsmpl_set().

Definition at line 117 of file channel_internal_api.c.

struct ast_pbx* pbx [read]

PBX private structure for this channel

Definition at line 90 of file channel_internal_api.c.

Referenced by ast_channel_pbx(), and ast_channel_pbx_set().

Definition at line 117 of file channel_internal_api.c.

Pickup group - which calls groups can be picked up?

Definition at line 157 of file channel_internal_api.c.

Referenced by ast_channel_pickupgroup(), and ast_channel_pickupgroup_set().

int priority

struct ast_format* rawreadformat [read]

Raw read format (before translation)

Definition at line 200 of file channel_internal_api.c.

Referenced by ast_channel_rawreadformat(), and ast_channel_set_rawreadformat().

struct ast_format* rawwriteformat [read]

Raw write format (after translation)

Definition at line 201 of file channel_internal_api.c.

Referenced by ast_channel_rawwriteformat(), and ast_channel_set_rawwriteformat().

struct ast_format* readformat [read]

Requested read format (after translation)

Definition at line 198 of file channel_internal_api.c.

Referenced by ast_channel_readformat(), ast_channel_set_readformat(), and ast_channel_yank().

struct ast_readq_list readq [read]

Definition at line 162 of file channel_internal_api.c.

Referenced by ast_channel_readq().

struct ast_trans_pvt* readtrans [read]

Read translation path

Definition at line 92 of file channel_internal_api.c.

Referenced by ast_channel_readtrans(), and ast_channel_readtrans_set().

Redirecting/Diversion information.

Definition at line 152 of file channel_internal_api.c.

Referenced by ast_channel_redirecting(), ast_channel_redirecting_set(), and channel_do_masquerade().

int rings

Number of rings so far

Definition at line 184 of file channel_internal_api.c.

Referenced by ast_channel_rings(), ast_channel_rings_set(), and mgcp_ss().

struct ast_sched_context* sched [read]

Schedule context

Definition at line 85 of file channel_internal_api.c.

Referenced by ast_channel_sched(), and ast_channel_sched_set().

Digit this channel is currently sending out. (zero if not sending)

Definition at line 220 of file channel_internal_api.c.

Referenced by ast_channel_sending_dtmf_digit(), and ast_channel_sending_dtmf_digit_set().

struct timeval sending_dtmf_tv [read]

The time this channel started sending the current digit. (Invalid if sending_dtmf_digit is zero.)

Definition at line 221 of file channel_internal_api.c.

Referenced by ast_channel_sending_dtmf_tv_set().

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

Definition at line 183 of file channel_internal_api.c.

Referenced by ast_channel_state(), and ast_channel_state_set().

struct ast_filestream* stream [read]

Stream itself.

Definition at line 86 of file channel_internal_api.c.

Referenced by ast_channel_stream(), and ast_channel_stream_set().

int streamid

For streaming playback, the schedule ID

Definition at line 179 of file channel_internal_api.c.

Referenced by ast_channel_streamid(), and ast_channel_streamid_set().

struct ast_channel_tech* tech [read]

Technology (point to channel driver)

Definition at line 75 of file channel_internal_api.c.

Referenced by ast_channel_tech(), ast_channel_tech_set(), and wait_for_answer().

void* tech_pvt

Private data used by the technology driver

Definition at line 76 of file channel_internal_api.c.

Referenced by ast_channel_tech_pvt(), ast_channel_tech_pvt_set(), and skinny_senddigit_end().

struct ast_timer* timer [read]

timer object that provided timingfd

Definition at line 213 of file channel_internal_api.c.

Referenced by ast_channel_timer(), and ast_channel_timer_set().

void* timingdata

Definition at line 89 of file channel_internal_api.c.

Referenced by ast_channel_timingdata(), and ast_channel_timingdata_set().

int timingfd

Timing fd

Definition at line 182 of file channel_internal_api.c.

Referenced by ast_channel_timingfd(), and ast_channel_timingfd_set().

Definition at line 88 of file channel_internal_api.c.

Referenced by ast_channel_timingfunc(), and ast_channel_timingfunc_set().

struct stasis_cp_single* topics [read]

unsigned short transfercapability

ISDN Transfer Capability - AST_FLAG_DIGITAL is not enough

Definition at line 209 of file channel_internal_api.c.

Referenced by ast_channel_transfercapability(), and ast_channel_transfercapability_set().

int unbridged

If non-zero, the bridge core needs to re-evaluate the current bridging technology which is in use by this channel's bridge.

Definition at line 176 of file channel_internal_api.c.

Referenced by ast_channel_set_unbridged_nolock(), and ast_channel_unbridged_nolock().

struct ast_channel_id uniqueid [read]

Definition at line 117 of file channel_internal_api.c.

struct varshead varshead [read]

A linked list for channel variables. See Asterisk Dialplan Variables

Definition at line 155 of file channel_internal_api.c.

Referenced by ast_channel_varshead(), and ast_channel_varshead_set().

Indication currently playing on the channel

Definition at line 206 of file channel_internal_api.c.

Referenced by ast_channel_visible_indication(), and ast_channel_visible_indication_set().

struct ast_filestream* vstream [read]

Video Stream itself.

Definition at line 87 of file channel_internal_api.c.

Referenced by ast_channel_vstream(), and ast_channel_vstream_set().

int vstreamid

For streaming video playback, the schedule ID

Definition at line 180 of file channel_internal_api.c.

Referenced by ast_channel_vstreamid(), and ast_channel_vstreamid_set().

struct timeval whentohangup [read]

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

Definition at line 122 of file channel_internal_api.c.

Referenced by ast_channel_whentohangup(), and ast_channel_whentohangup_set().

struct ast_format* writeformat [read]

Requested write format (before translation)

Definition at line 199 of file channel_internal_api.c.

Referenced by ast_channel_set_writeformat(), ast_channel_writeformat(), and ast_channel_yank().

struct ast_trans_pvt* writetrans [read]

Write translation path

Definition at line 91 of file channel_internal_api.c.

Referenced by ast_channel_writetrans(), and ast_channel_writetrans_set().

char x

struct ast_tone_zone* zone [read]

Tone zone as set in indications.conf or in the CHANNEL dialplan function

Definition at line 96 of file channel_internal_api.c.

Referenced by ast_channel_zone(), and ast_channel_zone_set().


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

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