Sat Apr 26 2014 22:03:23

Asterisk developer's documentation


ast_channel Struct Reference

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

Collaboration diagram for ast_channel:

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
const char * appl
struct ast_audiohook_listaudiohooks
struct ast_autochan_list autochans
pthread_t blocker
const char * blockproc
struct ast_bridgebridge
struct ast_channelbridged_channel
const ast_string_field call_forward
struct ast_party_caller caller
 Channel Caller ID information.
ast_group_t callgroup
struct ast_callidcallid
struct ast_cdrcdr
struct ast_party_connected_line connected
 Channel Connected Line ID information.
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
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
unsigned long insmpl
struct ast_jb jb
const ast_string_field language
const ast_string_field 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_format oldwriteformat
unsigned long outsmpl
const ast_string_field parkinglot
struct ast_pbxpbx
const ast_string_field peeraccount
ast_group_t pickupgroup
int priority
struct ast_format rawreadformat
struct ast_format rawwriteformat
struct ast_format readformat
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
unsigned short transfercapability
const ast_string_field uniqueid
const ast_string_field userfield
struct varshead varshead
int visible_indication
struct ast_filestreamvstream
int vstreamid
struct timeval whentohangup
struct ast_format writeformat
struct ast_trans_pvtwritetrans
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.

Definition at line 59 of file channel_internal_api.c.


Field Documentation

Definition at line 106 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 106 of file channel_internal_api.c.

Definition at line 106 of file channel_internal_api.c.

Referenced by sip_new().

Whether or not ADSI is detected on CPE

Definition at line 166 of file channel_internal_api.c.

Referenced by ast_channel_adsicpe(), and ast_channel_adsicpe_set().

int amaflags

Set BEFORE PBX is started to determine AMA flags

Definition at line 165 of file channel_internal_api.c.

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

const char* appl

Current application

Definition at line 71 of file channel_internal_api.c.

Referenced by ast_channel_appl(), and ast_channel_appl_set().

Autochans on the channel

Definition at line 147 of file channel_internal_api.c.

Referenced by ast_channel_autochans().

pthread_t blocker

If anyone is blocking, this is them

Definition at line 109 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 70 of file channel_internal_api.c.

Referenced by ast_channel_blockproc(), and ast_channel_blockproc_set().

Who are we bridged to, if we're bridged. Who is proxying for us, if we are proxied (i.e. chan_agent). Do not access directly, use ast_bridged_channel(chan)

Definition at line 65 of file channel_internal_api.c.

Referenced by ast_bridged_channel(), ast_channel_internal_bridged_channel(), and ast_channel_internal_bridged_channel_set().

Definition at line 106 of file channel_internal_api.c.

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 123 of file channel_internal_api.c.

Referenced by app_exec(), ast_channel_caller(), ast_channel_caller_set(), and ast_do_masquerade().

Call group for call pickups

Definition at line 137 of file channel_internal_api.c.

Referenced by ast_channel_callgroup(), ast_channel_callgroup_set(), and sip_new().

struct ast_callid* callid

Bound call identifier pointer

Definition at line 87 of file channel_internal_api.c.

Referenced by ast_channel_callid(), ast_channel_callid_cleanup(), ast_channel_callid_set(), and sip_new().

struct ast_cdr* cdr

Call Detail Record

Definition at line 83 of file channel_internal_api.c.

Referenced by ast_async_goto(), 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 130 of file channel_internal_api.c.

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

struct timeval creationtime

The time of channel creation

Definition at line 141 of file channel_internal_api.c.

Referenced by ast_channel_creationtime_set().

Data stores on the channel

Definition at line 146 of file channel_internal_api.c.

Referenced by ast_channel_datastores().

Definition at line 106 of file channel_internal_api.c.

Dialed/Called information.

Note:
Set on incoming channels to indicate the originally dialed party.
Dialed Number Identifier (DNID)

Definition at line 116 of file channel_internal_api.c.

Referenced by ast_channel_dialed(), ast_channel_dialed_set(), ast_do_masquerade(), and jingle_request().

Contains tech-specific and Asterisk cause data from dialed channels ASCII unique channel name Language requested for voice prompts Default 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 Unique Channel Identifier Linked Channel Identifier -- gets propagated by linkage

Definition at line 91 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 195 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

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

Definition at line 144 of file channel_internal_api.c.

Referenced by ast_channel_dtmf_tv(), and ast_channel_dtmf_tv_set().

struct ast_frame dtmff

DTMF frame

Definition at line 135 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 180 of file channel_internal_api.c.

Referenced by ast_channel_emulate_dtmf_duration(), and ast_channel_emulate_dtmf_duration_set().

Dialplan: Current extension number

Definition at line 192 of file channel_internal_api.c.

Referenced by ast_channel_exten(), ast_channel_exten_set(), handle_request_invite(), and mgcp_ss().

int fdno

Which fd had an event detected on

Definition at line 156 of file channel_internal_api.c.

Referenced by ast_channel_fdno(), and ast_channel_fdno_set().

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

Definition at line 151 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 167 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 172 of file channel_internal_api.c.

Referenced by ast_channel_internal_finalize(), and ast_channel_internal_is_finalized().

struct ast_flags flags

channel flags of AST_FLAG_ type

Definition at line 173 of file channel_internal_api.c.

Referenced by 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 169 of file channel_internal_api.c.

Referenced by ast_channel_fout(), and ast_channel_fout_set().

Current active data generator

Definition at line 64 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 63 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 145 of file channel_internal_api.c.

Referenced by ast_channel_hangup_handlers().

Why is the channel hanged up. See causes.h

Definition at line 171 of file channel_internal_api.c.

Referenced by ast_channel_hangupcause(), and ast_channel_hangupcause_set().

Definition at line 106 of file channel_internal_api.c.

unsigned long insmpl

Track the read/written samples for monitor use

Definition at line 148 of file channel_internal_api.c.

Referenced by ast_channel_insmpl(), and ast_channel_insmpl_set().

struct ast_jb jb

The jitterbuffer state

Definition at line 143 of file channel_internal_api.c.

Referenced by ast_channel_jb(), ast_channel_jb_set(), and log_jitterstats().

Definition at line 106 of file channel_internal_api.c.

Referenced by sip_new().

Definition at line 106 of file channel_internal_api.c.

Referenced by ast_cel_report_event().

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

Definition at line 193 of file channel_internal_api.c.

Referenced by ast_channel_macrocontext(), and ast_channel_macrocontext_set().

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

Definition at line 194 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 164 of file channel_internal_api.c.

Referenced by ast_channel_macropriority(), and ast_channel_macropriority_set().

struct ast_channel* masq

Channel that will masquerade as us

Definition at line 68 of file channel_internal_api.c.

Referenced by ast_channel_masq(), and ast_channel_masq_set().

struct ast_channel* masqr

Who we are masquerading as

Definition at line 69 of file channel_internal_api.c.

Referenced by ast_channel_masqr(), and ast_channel_masqr_set().

Channel monitoring

Definition at line 86 of file channel_internal_api.c.

Referenced by ast_channel_monitor(), and ast_channel_monitor_set().

void* music_state

Music State

Definition at line 62 of file channel_internal_api.c.

Referenced by ast_channel_music_state(), and ast_channel_music_state_set().

Definition at line 106 of file channel_internal_api.c.

struct ast_namedgroups* named_callgroups

Named call group for call pickups

Definition at line 139 of file channel_internal_api.c.

Referenced by ast_channel_named_callgroups(), ast_channel_named_callgroups_set(), and sip_new().

struct ast_namedgroups* named_pickupgroups

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

Definition at line 140 of file channel_internal_api.c.

Referenced by ast_channel_named_pickupgroups(), ast_channel_named_pickupgroups_set(), and sip_new().

Kinds of data this channel can natively handle

Definition at line 175 of file channel_internal_api.c.

Referenced by ast_channel_nativeformats(), and ast_channel_nativeformats_set().

Original writer format

Definition at line 159 of file channel_internal_api.c.

Referenced by ast_channel_oldwriteformat().

unsigned long outsmpl

Track the read/written samples for monitor use

Definition at line 149 of file channel_internal_api.c.

Referenced by ast_channel_outsmpl(), and ast_channel_outsmpl_set().

Definition at line 106 of file channel_internal_api.c.

Referenced by sip_new().

struct ast_pbx* pbx

PBX private structure for this channel

Definition at line 78 of file channel_internal_api.c.

Referenced by ast_channel_pbx(), and ast_channel_pbx_set().

Definition at line 106 of file channel_internal_api.c.

Pickup group - which calls groups can be picked up?

Definition at line 138 of file channel_internal_api.c.

Referenced by ast_channel_pickupgroup(), ast_channel_pickupgroup_set(), and sip_new().

int priority

Dialplan: Current extension priority

Definition at line 163 of file channel_internal_api.c.

Referenced by __ast_goto_if_exists(), action_redirect(), ast_channel_priority(), and ast_channel_priority_set().

Raw read format (before translation)

Definition at line 178 of file channel_internal_api.c.

Referenced by ast_channel_rawreadformat().

Raw write format (before translation)

Definition at line 179 of file channel_internal_api.c.

Referenced by ast_channel_rawwriteformat().

Requested read format (after translation)

Definition at line 176 of file channel_internal_api.c.

Referenced by ast_channel_readformat().

Definition at line 142 of file channel_internal_api.c.

Referenced by ast_channel_readq().

Read translation path

Definition at line 80 of file channel_internal_api.c.

Referenced by ast_channel_readtrans(), and ast_channel_readtrans_set().

Redirecting/Diversion information.

Definition at line 133 of file channel_internal_api.c.

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

int rings

Number of rings so far

Definition at line 162 of file channel_internal_api.c.

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

Schedule context

Definition at line 73 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 196 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

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

Definition at line 197 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 161 of file channel_internal_api.c.

Referenced by ast_channel_state(), and ast_channel_state_set().

Stream itself.

Definition at line 74 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 157 of file channel_internal_api.c.

Referenced by ast_channel_streamid(), and ast_channel_streamid_set().

Technology (point to channel driver)

Definition at line 60 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 61 of file channel_internal_api.c.

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

struct ast_timer* timer

timer object that provided timingfd

Definition at line 189 of file channel_internal_api.c.

Referenced by ast_channel_timer(), and ast_channel_timer_set().

void* timingdata

Definition at line 77 of file channel_internal_api.c.

Referenced by ast_channel_timingdata(), and ast_channel_timingdata_set().

int timingfd

Timing fd

Definition at line 160 of file channel_internal_api.c.

Referenced by ast_channel_timingfd(), and ast_channel_timingfd_set().

unsigned short transfercapability

ISDN Transfer Capability - AST_FLAG_DIGITAL is not enough

Definition at line 186 of file channel_internal_api.c.

Referenced by ast_channel_transfercapability(), and ast_channel_transfercapability_set().

Definition at line 106 of file channel_internal_api.c.

Referenced by ast_channel_by_uniqueid_cb().

Definition at line 106 of file channel_internal_api.c.

Referenced by ast_bridge_call().

A linked list for channel variables. See Asterisk Dialplan Variables

Definition at line 136 of file channel_internal_api.c.

Referenced by ast_channel_varshead(), ast_channel_varshead_set(), and shared_write().

Indication currently playing on the channel

Definition at line 184 of file channel_internal_api.c.

Referenced by ast_channel_visible_indication(), and ast_channel_visible_indication_set().

Video Stream itself.

Definition at line 75 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 158 of file channel_internal_api.c.

Referenced by ast_channel_vstreamid(), and ast_channel_vstreamid_set().

struct timeval whentohangup

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

Definition at line 108 of file channel_internal_api.c.

Referenced by ast_channel_whentohangup(), and ast_channel_whentohangup_set().

Requested write format (after translation)

Definition at line 177 of file channel_internal_api.c.

Referenced by ast_channel_writeformat(), and oh323_set_rtp_peer().

Write translation path

Definition at line 79 of file channel_internal_api.c.

Referenced by ast_channel_writetrans(), and ast_channel_writetrans_set().

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

Definition at line 84 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 file: