Thu Oct 11 06:35:31 2012

Asterisk developer's documentation


channel_internal_api.c File Reference

Channel Accessor API. More...

#include "asterisk.h"
#include <unistd.h>
#include <fcntl.h>
#include "asterisk/channel.h"
#include "asterisk/stringfields.h"
#include "asterisk/data.h"
#include "asterisk/indications.h"
#include "asterisk/channel_internal.h"
#include "asterisk/test.h"

Include dependency graph for channel_internal_api.c:

Go to the source code of this file.

Data Structures

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

Defines

#define DATA_EXPORT_CHANNEL(MEMBER)
#define DEFINE_STRINGFIELD_GETTER_FOR(field)
#define DEFINE_STRINGFIELD_SETTERS_FOR(field)
#define DIALED_CAUSES_BUCKETS   37

Functions

struct ast_channel__ast_channel_internal_alloc (void(*destructor)(void *obj), const char *file, int line, const char *function)
enum ast_channel_adsicpe ast_channel_adsicpe (const struct ast_channel *chan)
void ast_channel_adsicpe_set (struct ast_channel *chan, enum ast_channel_adsicpe value)
int ast_channel_alert_writable (struct ast_channel *chan)
int ast_channel_alert_write (struct ast_channel *chan)
int ast_channel_amaflags (const struct ast_channel *chan)
void ast_channel_amaflags_set (struct ast_channel *chan, int value)
const char * ast_channel_appl (const struct ast_channel *chan)
void ast_channel_appl_set (struct ast_channel *chan, const char *value)
struct ast_audiohook_listast_channel_audiohooks (const struct ast_channel *chan)
void ast_channel_audiohooks_set (struct ast_channel *chan, struct ast_audiohook_list *value)
struct ast_autochan_listast_channel_autochans (struct ast_channel *chan)
pthread_t ast_channel_blocker (const struct ast_channel *chan)
void ast_channel_blocker_set (struct ast_channel *chan, pthread_t value)
const char * ast_channel_blockproc (const struct ast_channel *chan)
void ast_channel_blockproc_set (struct ast_channel *chan, const char *value)
struct ast_party_callerast_channel_caller (struct ast_channel *chan)
void ast_channel_caller_set (struct ast_channel *chan, struct ast_party_caller *value)
ast_group_t ast_channel_callgroup (const struct ast_channel *chan)
void ast_channel_callgroup_set (struct ast_channel *chan, ast_group_t value)
struct ast_callidast_channel_callid (const struct ast_channel *chan)
void ast_channel_callid_cleanup (struct ast_channel *chan)
void ast_channel_callid_set (struct ast_channel *chan, struct ast_callid *callid)
struct ast_cdrast_channel_cdr (const struct ast_channel *chan)
void ast_channel_cdr_set (struct ast_channel *chan, struct ast_cdr *value)
struct ast_party_connected_lineast_channel_connected (struct ast_channel *chan)
struct ast_party_id ast_channel_connected_effective_id (struct ast_channel *chan)
void ast_channel_connected_set (struct ast_channel *chan, struct ast_party_connected_line *value)
const char * ast_channel_context (const struct ast_channel *chan)
void ast_channel_context_set (struct ast_channel *chan, const char *value)
struct timeval ast_channel_creationtime (struct ast_channel *chan)
void ast_channel_creationtime_set (struct ast_channel *chan, struct timeval *value)
const char * ast_channel_data (const struct ast_channel *chan)
int ast_channel_data_add_structure (struct ast_data *tree, struct ast_channel *chan, int add_bridged)
 Insert into an astdata tree, the channel structure.
int ast_channel_data_cmp_structure (const struct ast_data_search *tree, struct ast_channel *chan, const char *structure_name)
 Compare to channel structures using the data api.
void ast_channel_data_set (struct ast_channel *chan, const char *value)
struct ast_datastore_listast_channel_datastores (struct ast_channel *chan)
struct ast_party_dialedast_channel_dialed (struct ast_channel *chan)
int ast_channel_dialed_causes_add (const struct ast_channel *chan, const struct ast_control_pvt_cause_code *cause_code, int datalen)
 Add cause code information to the channel.
struct ast_strast_channel_dialed_causes_channels (const struct ast_channel *chan)
 Retreive a comma-separated list of channels for which dialed cause information is available.
void ast_channel_dialed_causes_clear (const struct ast_channel *chan)
 Clear all cause information from the channel.
struct ast_control_pvt_cause_codeast_channel_dialed_causes_find (const struct ast_channel *chan, const char *chan_name)
 Retreive a ref-counted cause code information structure.
void ast_channel_dialed_set (struct ast_channel *chan, struct ast_party_dialed *value)
char ast_channel_dtmf_digit_to_emulate (const struct ast_channel *chan)
void ast_channel_dtmf_digit_to_emulate_set (struct ast_channel *chan, char value)
struct timeval * ast_channel_dtmf_tv (struct ast_channel *chan)
void ast_channel_dtmf_tv_set (struct ast_channel *chan, struct timeval *value)
struct ast_frameast_channel_dtmff (struct ast_channel *chan)
void ast_channel_dtmff_set (struct ast_channel *chan, struct ast_frame *value)
unsigned int ast_channel_emulate_dtmf_duration (const struct ast_channel *chan)
void ast_channel_emulate_dtmf_duration_set (struct ast_channel *chan, unsigned int value)
const char * ast_channel_exten (const struct ast_channel *chan)
void ast_channel_exten_set (struct ast_channel *chan, const char *value)
int ast_channel_fd (const struct ast_channel *chan, int which)
int ast_channel_fd_isset (const struct ast_channel *chan, int which)
int ast_channel_fdno (const struct ast_channel *chan)
void ast_channel_fdno_set (struct ast_channel *chan, int value)
unsigned int ast_channel_fin (const struct ast_channel *chan)
void ast_channel_fin_set (struct ast_channel *chan, unsigned int value)
struct ast_flagsast_channel_flags (struct ast_channel *chan)
unsigned int ast_channel_fout (const struct ast_channel *chan)
void ast_channel_fout_set (struct ast_channel *chan, unsigned int value)
struct ast_framehook_listast_channel_framehooks (const struct ast_channel *chan)
void ast_channel_framehooks_set (struct ast_channel *chan, struct ast_framehook_list *value)
struct ast_generatorast_channel_generator (const struct ast_channel *chan)
void ast_channel_generator_set (struct ast_channel *chan, struct ast_generator *value)
void * ast_channel_generatordata (const struct ast_channel *chan)
void ast_channel_generatordata_set (struct ast_channel *chan, void *value)
struct ast_hangup_handler_listast_channel_hangup_handlers (struct ast_channel *chan)
int ast_channel_hangupcause (const struct ast_channel *chan)
void ast_channel_hangupcause_set (struct ast_channel *chan, int value)
unsigned long ast_channel_insmpl (const struct ast_channel *chan)
void ast_channel_insmpl_set (struct ast_channel *chan, unsigned long value)
ast_alert_status_t ast_channel_internal_alert_read (struct ast_channel *chan)
int ast_channel_internal_alert_readable (struct ast_channel *chan)
int ast_channel_internal_alert_readfd (struct ast_channel *chan)
void ast_channel_internal_alertpipe_clear (struct ast_channel *chan)
void ast_channel_internal_alertpipe_close (struct ast_channel *chan)
int ast_channel_internal_alertpipe_init (struct ast_channel *chan)
void ast_channel_internal_alertpipe_swap (struct ast_channel *chan1, struct ast_channel *chan2)
 Swap the interal alertpipe between two channels.
struct ast_bridgeast_channel_internal_bridge (const struct ast_channel *chan)
void ast_channel_internal_bridge_set (struct ast_channel *chan, struct ast_bridge *value)
struct ast_channelast_channel_internal_bridged_channel (const struct ast_channel *chan)
void ast_channel_internal_bridged_channel_set (struct ast_channel *chan, struct ast_channel *value)
void ast_channel_internal_cleanup (struct ast_channel *chan)
void ast_channel_internal_fd_clear (struct ast_channel *chan, int which)
void ast_channel_internal_fd_clear_all (struct ast_channel *chan)
void ast_channel_internal_fd_set (struct ast_channel *chan, int which, int value)
void ast_channel_internal_finalize (struct ast_channel *chan)
int ast_channel_internal_is_finalized (struct ast_channel *chan)
struct ast_jbast_channel_jb (struct ast_channel *chan)
void ast_channel_jb_set (struct ast_channel *chan, struct ast_jb *value)
void ast_channel_linkedid_set (struct ast_channel *chan, const char *value)
const char * ast_channel_macrocontext (const struct ast_channel *chan)
void ast_channel_macrocontext_set (struct ast_channel *chan, const char *value)
const char * ast_channel_macroexten (const struct ast_channel *chan)
void ast_channel_macroexten_set (struct ast_channel *chan, const char *value)
int ast_channel_macropriority (const struct ast_channel *chan)
void ast_channel_macropriority_set (struct ast_channel *chan, int value)
struct ast_channelast_channel_masq (const struct ast_channel *chan)
void ast_channel_masq_set (struct ast_channel *chan, struct ast_channel *value)
struct ast_channelast_channel_masqr (const struct ast_channel *chan)
void ast_channel_masqr_set (struct ast_channel *chan, struct ast_channel *value)
struct ast_channel_monitorast_channel_monitor (const struct ast_channel *chan)
void ast_channel_monitor_set (struct ast_channel *chan, struct ast_channel_monitor *value)
void * ast_channel_music_state (const struct ast_channel *chan)
void ast_channel_music_state_set (struct ast_channel *chan, void *value)
struct ast_namedgroups * ast_channel_named_callgroups (const struct ast_channel *chan)
void ast_channel_named_callgroups_set (struct ast_channel *chan, struct ast_namedgroups *value)
struct ast_namedgroups * ast_channel_named_pickupgroups (const struct ast_channel *chan)
void ast_channel_named_pickupgroups_set (struct ast_channel *chan, struct ast_namedgroups *value)
struct ast_format_capast_channel_nativeformats (const struct ast_channel *chan)
void ast_channel_nativeformats_set (struct ast_channel *chan, struct ast_format_cap *value)
struct ast_formatast_channel_oldwriteformat (struct ast_channel *chan)
unsigned long ast_channel_outsmpl (const struct ast_channel *chan)
void ast_channel_outsmpl_set (struct ast_channel *chan, unsigned long value)
struct ast_pbxast_channel_pbx (const struct ast_channel *chan)
void ast_channel_pbx_set (struct ast_channel *chan, struct ast_pbx *value)
ast_group_t ast_channel_pickupgroup (const struct ast_channel *chan)
void ast_channel_pickupgroup_set (struct ast_channel *chan, ast_group_t value)
int ast_channel_priority (const struct ast_channel *chan)
void ast_channel_priority_set (struct ast_channel *chan, int value)
struct ast_formatast_channel_rawreadformat (struct ast_channel *chan)
struct ast_formatast_channel_rawwriteformat (struct ast_channel *chan)
struct ast_formatast_channel_readformat (struct ast_channel *chan)
struct ast_readq_listast_channel_readq (struct ast_channel *chan)
struct ast_trans_pvtast_channel_readtrans (const struct ast_channel *chan)
void ast_channel_readtrans_set (struct ast_channel *chan, struct ast_trans_pvt *value)
struct ast_party_redirectingast_channel_redirecting (struct ast_channel *chan)
struct ast_party_id ast_channel_redirecting_effective_from (struct ast_channel *chan)
struct ast_party_id ast_channel_redirecting_effective_orig (struct ast_channel *chan)
struct ast_party_id ast_channel_redirecting_effective_to (struct ast_channel *chan)
void ast_channel_redirecting_set (struct ast_channel *chan, struct ast_party_redirecting *value)
int ast_channel_rings (const struct ast_channel *chan)
void ast_channel_rings_set (struct ast_channel *chan, int value)
struct ast_sched_contextast_channel_sched (const struct ast_channel *chan)
void ast_channel_sched_set (struct ast_channel *chan, struct ast_sched_context *value)
int ast_channel_softhangup_internal_flag (struct ast_channel *chan)
void ast_channel_softhangup_internal_flag_add (struct ast_channel *chan, int value)
void ast_channel_softhangup_internal_flag_clear (struct ast_channel *chan, int value)
void ast_channel_softhangup_internal_flag_set (struct ast_channel *chan, int value)
enum ast_channel_state ast_channel_state (const struct ast_channel *chan)
void ast_channel_state_set (struct ast_channel *chan, enum ast_channel_state value)
struct ast_filestreamast_channel_stream (const struct ast_channel *chan)
void ast_channel_stream_set (struct ast_channel *chan, struct ast_filestream *value)
int ast_channel_streamid (const struct ast_channel *chan)
void ast_channel_streamid_set (struct ast_channel *chan, int value)
struct ast_channel_techast_channel_tech (const struct ast_channel *chan)
void * ast_channel_tech_pvt (const struct ast_channel *chan)
void ast_channel_tech_pvt_set (struct ast_channel *chan, void *value)
void ast_channel_tech_set (struct ast_channel *chan, const struct ast_channel_tech *value)
struct ast_timerast_channel_timer (const struct ast_channel *chan)
void ast_channel_timer_set (struct ast_channel *chan, struct ast_timer *value)
void * ast_channel_timingdata (const struct ast_channel *chan)
void ast_channel_timingdata_set (struct ast_channel *chan, void *value)
int ast_channel_timingfd (const struct ast_channel *chan)
void ast_channel_timingfd_set (struct ast_channel *chan, int value)
ast_timing_func_t ast_channel_timingfunc (const struct ast_channel *chan)
void ast_channel_timingfunc_set (struct ast_channel *chan, ast_timing_func_t value)
unsigned short ast_channel_transfercapability (const struct ast_channel *chan)
void ast_channel_transfercapability_set (struct ast_channel *chan, unsigned short value)
struct varsheadast_channel_varshead (struct ast_channel *chan)
void ast_channel_varshead_set (struct ast_channel *chan, struct varshead *value)
int ast_channel_visible_indication (const struct ast_channel *chan)
void ast_channel_visible_indication_set (struct ast_channel *chan, int value)
struct ast_filestreamast_channel_vstream (const struct ast_channel *chan)
void ast_channel_vstream_set (struct ast_channel *chan, struct ast_filestream *value)
int ast_channel_vstreamid (const struct ast_channel *chan)
void ast_channel_vstreamid_set (struct ast_channel *chan, int value)
struct timeval * ast_channel_whentohangup (struct ast_channel *chan)
void ast_channel_whentohangup_set (struct ast_channel *chan, struct timeval *value)
struct ast_formatast_channel_writeformat (struct ast_channel *chan)
struct ast_trans_pvtast_channel_writetrans (const struct ast_channel *chan)
void ast_channel_writetrans_set (struct ast_channel *chan, struct ast_trans_pvt *value)
struct ast_tone_zoneast_channel_zone (const struct ast_channel *chan)
void ast_channel_zone_set (struct ast_channel *chan, struct ast_tone_zone *value)
 AST_DATA_STRUCTURE (ast_channel, DATA_EXPORT_CHANNEL)
static void channel_data_add_flags (struct ast_data *tree, struct ast_channel *chan)
static int collect_names_cb (void *obj, void *arg, int flags)
 DEFINE_STRINGFIELD_GETTER_FOR (dialcontext)
 DEFINE_STRINGFIELD_GETTER_FOR (hangupsource)
 DEFINE_STRINGFIELD_GETTER_FOR (parkinglot)
 DEFINE_STRINGFIELD_GETTER_FOR (linkedid)
 DEFINE_STRINGFIELD_GETTER_FOR (uniqueid)
 DEFINE_STRINGFIELD_GETTER_FOR (call_forward)
 DEFINE_STRINGFIELD_GETTER_FOR (userfield)
 DEFINE_STRINGFIELD_GETTER_FOR (peeraccount)
 DEFINE_STRINGFIELD_GETTER_FOR (accountcode)
 DEFINE_STRINGFIELD_GETTER_FOR (musicclass)
 DEFINE_STRINGFIELD_GETTER_FOR (language)
 DEFINE_STRINGFIELD_GETTER_FOR (name)
 DEFINE_STRINGFIELD_SETTERS_FOR (dialcontext)
 DEFINE_STRINGFIELD_SETTERS_FOR (hangupsource)
 DEFINE_STRINGFIELD_SETTERS_FOR (parkinglot)
 DEFINE_STRINGFIELD_SETTERS_FOR (uniqueid)
 DEFINE_STRINGFIELD_SETTERS_FOR (call_forward)
 DEFINE_STRINGFIELD_SETTERS_FOR (userfield)
 DEFINE_STRINGFIELD_SETTERS_FOR (peeraccount)
 DEFINE_STRINGFIELD_SETTERS_FOR (accountcode)
 DEFINE_STRINGFIELD_SETTERS_FOR (musicclass)
 DEFINE_STRINGFIELD_SETTERS_FOR (language)
 DEFINE_STRINGFIELD_SETTERS_FOR (name)
static int pvt_cause_cmp_fn (void *obj, void *vstr, int flags)
static int pvt_cause_hash_fn (const void *vpc, const int flags)


Detailed Description

Channel Accessor API.

This file is intended to be the only file that ever accesses the internals of an ast_channel. All other files should use the accessor functions defined here.

Author:
Terry Wilson

Definition in file channel_internal_api.c.


Define Documentation

#define DATA_EXPORT_CHANNEL ( MEMBER   ) 

Definition at line 213 of file channel_internal_api.c.

#define DEFINE_STRINGFIELD_GETTER_FOR ( field   ) 

Value:

const char *ast_channel_##field(const struct ast_channel *chan) \
{ \
   return chan->field; \
}

Definition at line 436 of file channel_internal_api.c.

#define DEFINE_STRINGFIELD_SETTERS_FOR ( field   ) 

Definition at line 406 of file channel_internal_api.c.

#define DIALED_CAUSES_BUCKETS   37

Definition at line 1310 of file channel_internal_api.c.

Referenced by __ast_channel_internal_alloc().


Function Documentation

struct ast_channel* __ast_channel_internal_alloc ( void(*)(void *obj)  destructor,
const char *  file,
int  line,
const char *  function 
) [read]

Definition at line 1312 of file channel_internal_api.c.

References __ao2_alloc_debug(), ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc, ast_channel_unref, ast_string_field_init, ast_channel::dialed_causes, DIALED_CAUSES_BUCKETS, pvt_cause_cmp_fn(), and pvt_cause_hash_fn().

01313 {
01314    struct ast_channel *tmp;
01315 #if defined(REF_DEBUG)
01316    tmp = __ao2_alloc_debug(sizeof(*tmp), destructor,
01317       AO2_ALLOC_OPT_LOCK_MUTEX, "", file, line, function, 1);
01318 #elif defined(__AST_DEBUG_MALLOC)
01319    tmp = __ao2_alloc_debug(sizeof(*tmp), destructor,
01320       AO2_ALLOC_OPT_LOCK_MUTEX, "", file, line, function, 0);
01321 #else
01322    tmp = ao2_alloc(sizeof(*tmp), destructor);
01323 #endif
01324 
01325    if ((ast_string_field_init(tmp, 128))) {
01326       return ast_channel_unref(tmp);
01327    }
01328 
01329    if (!(tmp->dialed_causes = ao2_container_alloc(DIALED_CAUSES_BUCKETS, pvt_cause_hash_fn, pvt_cause_cmp_fn))) {
01330            return ast_channel_unref(tmp);
01331    }
01332 
01333    return tmp;
01334 }

enum ast_channel_adsicpe ast_channel_adsicpe ( const struct ast_channel chan  ) 

Definition at line 832 of file channel_internal_api.c.

References ast_channel::adsicpe.

00833 {
00834    return chan->adsicpe;
00835 }

void ast_channel_adsicpe_set ( struct ast_channel chan,
enum ast_channel_adsicpe  value 
)

int ast_channel_alert_writable ( struct ast_channel chan  ) 

Definition at line 1111 of file channel_internal_api.c.

References ast_channel::alertpipe.

Referenced by __ast_queue_frame(), ast_channel_alert_write(), and ast_channel_internal_alertpipe_close().

01112 {
01113    return chan->alertpipe[1] > -1;
01114 }

int ast_channel_alert_write ( struct ast_channel chan  ) 

Definition at line 1076 of file channel_internal_api.c.

References ast_channel::alertpipe, and ast_channel_alert_writable().

Referenced by __ast_queue_frame(), __ast_read(), and ast_do_masquerade().

01077 {
01078    char blah = 0x7F;
01079    return ast_channel_alert_writable(chan) && write(chan->alertpipe[1], &blah, sizeof(blah)) != sizeof(blah);
01080 }

int ast_channel_amaflags ( const struct ast_channel chan  ) 

void ast_channel_amaflags_set ( struct ast_channel chan,
int  value 
)

const char* ast_channel_appl ( const struct ast_channel chan  ) 

void ast_channel_appl_set ( struct ast_channel chan,
const char *  value 
)

struct ast_audiohook_list* ast_channel_audiohooks ( const struct ast_channel chan  )  [read]

void ast_channel_audiohooks_set ( struct ast_channel chan,
struct ast_audiohook_list value 
)

Definition at line 700 of file channel_internal_api.c.

References ast_channel::audiohooks.

Referenced by __ast_read(), ast_audiohook_attach(), ast_write(), check_bridge(), and destroy_hooks().

00701 {
00702    chan->audiohooks = value;
00703 }

struct ast_autochan_list* ast_channel_autochans ( struct ast_channel chan  )  [read]

Definition at line 909 of file channel_internal_api.c.

References ast_channel::autochans.

Referenced by __ast_channel_alloc_ap(), ast_autochan_destroy(), ast_autochan_new_channel(), and ast_autochan_setup().

00910 {
00911    return &chan->autochans;
00912 }

pthread_t ast_channel_blocker ( const struct ast_channel chan  ) 

Definition at line 1205 of file channel_internal_api.c.

References ast_channel::blocker.

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

01206 {
01207    return chan->blocker;
01208 }

void ast_channel_blocker_set ( struct ast_channel chan,
pthread_t  value 
)

Definition at line 1209 of file channel_internal_api.c.

References ast_channel::blocker.

Referenced by __ast_read().

01210 {
01211    chan->blocker = value;
01212 }

const char* ast_channel_blockproc ( const struct ast_channel chan  ) 

Definition at line 468 of file channel_internal_api.c.

References ast_channel::blockproc.

Referenced by ast_hangup(), handle_showchan(), and serialize_showchan().

00469 {
00470    return chan->blockproc;
00471 }

void ast_channel_blockproc_set ( struct ast_channel chan,
const char *  value 
)

Definition at line 472 of file channel_internal_api.c.

References ast_channel::blockproc.

00473 {
00474    chan->blockproc = value;
00475 }

struct ast_party_caller* ast_channel_caller ( struct ast_channel chan  )  [read]

Definition at line 925 of file channel_internal_api.c.

References ast_channel::caller.

Referenced by __analog_handle_event(), __analog_ss_thread(), __ast_channel_alloc_ap(), __ast_goto_if_exists(), __ast_pbx_run(), __oh323_new(), _macro_exec(), acf_isexten_exec(), action_agents(), action_confbridgelist(), action_coreshowchannels(), action_meetmelist(), action_status(), agentmonitoroutgoing_exec(), analog_ss_thread(), app_exec(), ast_app_dtget(), ast_bridge_call(), ast_cel_fabricate_channel_from_event(), ast_cel_report_event(), ast_channel_destructor(), ast_channel_set_caller(), ast_channel_set_caller_event(), ast_do_masquerade(), ast_do_pickup(), ast_dummy_channel_destructor(), ast_hangup(), ast_iax2_new(), ast_pbx_h_exten_run(), ast_set_callerid(), ast_setstate(), ast_str_retrieve_variable(), ast_var_channels_table(), background_detect_exec(), begin_dial_channel(), blacklist_read(), builtin_atxfer(), builtin_automixmonitor(), builtin_automonitor(), callerid_read(), callerid_write(), callerpres_read(), callerpres_write(), cb_events(), cc_generic_agent_init(), check_bridge(), collect_digits(), conf_run(), console_call(), console_transfer(), copy_message(), dahdi_handle_dtmf(), dahdi_handle_event(), dahdi_new(), dial_exec_full(), dial_transfer(), dial_trunk(), disa_exec(), do_forward(), do_immediate_setup(), fax_detect_framehook(), feature_request_and_dial(), find_matching_endwhile(), findmeexec(), forward_message(), get_pai(), get_rpid(), gosub_exec(), gosub_run(), gtalk_new(), handle_chanlist(), handle_cli_confbridge_list(), handle_cli_misdn_show_channels(), handle_gosub(), handle_setpriority(), handle_showchan(), isAnsweringMachine(), isexten_function_read(), jingle_new(), join_queue(), leave_voicemail(), local_call(), local_indicate(), manager_bridge_event(), manager_parking_status(), manager_queues_status(), meetme_show_cmd(), mgcp_hangup(), mgcp_new(), mgcp_ss(), minivm_greet_exec(), minivm_notify_exec(), misdn_call(), misdn_hangup(), misdn_new(), misdn_update_caller_id(), misdn_write(), my_handle_dtmf(), ospauth_exec(), osplookup_exec(), oss_call(), oss_new(), park_call_full(), parkandannounce_exec(), parked_call_exec(), parse_oli(), pbx_builtin_background(), pbx_builtin_waitexten(), pbx_parseable_goto(), phase_e_handler(), phone_new(), post_manager_event(), print_bc_info(), privacy_exec(), process_ast_dsp(), process_sdp(), push_callinfo(), queue_exec(), readexten_exec(), release_chan(), report_new_callerid(), ring_entry(), run_externnotify(), send_callinfo(), send_join_event(), send_leave_event(), senddialevent(), serialize_showchan(), set_one_cid(), setcallerid_pres_exec(), setup_env(), setup_privacy_args(), sip_call(), sip_new(), sip_read(), skinny_new(), skinny_newcall(), skinny_ss(), sla_ring_station(), sms_exec(), socket_process_helper(), state_notify_build_xml(), try_calling(), unistim_new(), update_connectedline(), valid_exit(), vm_authenticate(), wait_for_answer(), waitstream_core(), write_metadata(), and zapateller_exec().

00926 {
00927    return &chan->caller;
00928 }

void ast_channel_caller_set ( struct ast_channel chan,
struct ast_party_caller value 
)

Definition at line 977 of file channel_internal_api.c.

References ast_channel::caller.

Referenced by ast_do_masquerade(), dial_trunk(), and sla_ring_station().

00978 {
00979    chan->caller = *value;
00980 }

ast_group_t ast_channel_callgroup ( const struct ast_channel chan  ) 

Definition at line 1040 of file channel_internal_api.c.

References ast_channel::callgroup.

Referenced by ast_var_channels_table(), find_channel_by_group(), func_channel_read(), handle_showchan(), and serialize_showchan().

01041 {
01042    return chan->callgroup;
01043 }

void ast_channel_callgroup_set ( struct ast_channel chan,
ast_group_t  value 
)

struct ast_callid* ast_channel_callid ( const struct ast_channel chan  )  [read]

Definition at line 844 of file channel_internal_api.c.

References ast_callid_ref, and ast_channel::callid.

Referenced by __analog_ss_thread(), __ast_pbx_run(), ast_channel_destructor(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_request(), async_wait(), autoservice_run(), and handle_showchan().

00845 {
00846    if (chan->callid) {
00847       ast_callid_ref(chan->callid);
00848       return chan->callid;
00849    }
00850    return NULL;
00851 }

void ast_channel_callid_cleanup ( struct ast_channel chan  ) 

Definition at line 1032 of file channel_internal_api.c.

References ast_callid_unref, and ast_channel::callid.

Referenced by ast_channel_destructor().

01033 {
01034    if (chan->callid) {
01035       chan->callid = ast_callid_unref(chan->callid);
01036    }
01037 }

void ast_channel_callid_set ( struct ast_channel chan,
struct ast_callid callid 
)

Definition at line 852 of file channel_internal_api.c.

References AST_CALLID_BUFFER_LENGTH, ast_callid_ref, ast_callid_strnprint(), ast_callid_unref, ast_channel_name(), ast_debug, ast_test_suite_event_notify, and ast_channel::callid.

Referenced by __ast_pbx_run(), agent_new(), ast_iax2_new(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_request(), dahdi_new(), iax2_request(), jingle_new(), local_new(), parked_call_exec(), and sip_new().

00853 {
00854    char call_identifier_from[AST_CALLID_BUFFER_LENGTH];
00855    char call_identifier_to[AST_CALLID_BUFFER_LENGTH];
00856    call_identifier_from[0] = '\0';
00857    ast_callid_strnprint(call_identifier_to, sizeof(call_identifier_to), callid);
00858    if (chan->callid) {
00859       ast_callid_strnprint(call_identifier_from, sizeof(call_identifier_from), chan->callid);
00860       ast_debug(3, "Channel Call ID changing from %s to %s\n", call_identifier_from, call_identifier_to);
00861       /* unbind if already set */
00862       ast_callid_unref(chan->callid);
00863    }
00864 
00865    chan->callid = ast_callid_ref(callid);
00866 
00867    ast_test_suite_event_notify("CallIDChange",
00868       "State: CallIDChange\r\n"
00869       "Channel: %s\r\n"
00870       "CallID: %s\r\n"
00871       "PriorCallID: %s",
00872       ast_channel_name(chan),
00873       call_identifier_to,
00874       call_identifier_from);
00875 
00876 }

struct ast_cdr* ast_channel_cdr ( const struct ast_channel chan  )  [read]

void ast_channel_cdr_set ( struct ast_channel chan,
struct ast_cdr value 
)

struct ast_party_connected_line* ast_channel_connected ( struct ast_channel chan  )  [read]

struct ast_party_id ast_channel_connected_effective_id ( struct ast_channel chan  )  [read]

Definition at line 933 of file channel_internal_api.c.

References ast_party_id_merge().

Referenced by add_rpid(), handle_showchan(), initreqprep(), misdn_call(), misdn_get_connected_line(), and update_connectedline().

00934 {
00935    return ast_party_id_merge(&chan->connected.id, &chan->connected.priv);
00936 }

void ast_channel_connected_set ( struct ast_channel chan,
struct ast_party_connected_line value 
)

Definition at line 981 of file channel_internal_api.c.

References ast_channel::connected.

Referenced by ast_do_masquerade().

00982 {
00983    chan->connected = *value;
00984 }

const char* ast_channel_context ( const struct ast_channel chan  ) 

Definition at line 485 of file channel_internal_api.c.

References ast_channel::context.

Referenced by __analog_ss_thread(), __ast_goto_if_exists(), __ast_pbx_run(), _macro_exec(), _while_exec(), acf_isexten_exec(), action_coreshowchannels(), action_dialplan_exec(), action_status(), agent_new(), analog_ss_thread(), ast_app_exec_macro(), ast_async_goto(), ast_bridge_call(), ast_call_forward(), ast_cc_call_init(), ast_cdr_init(), ast_cdr_update(), ast_cel_report_event(), ast_channel_by_exten_cb(), ast_channel_log(), ast_pbx_h_exten_run(), ast_str_retrieve_variable(), ast_var_channels_table(), ast_waitstream_exten(), background_detect_exec(), bridge_exec(), builtin_atxfer(), cc_generic_agent_init(), cc_interfaces_datastore_init(), check_availability(), collect_digits(), common_exec(), conf_run(), console_transfer(), dahdi_handle_dtmf(), dial_exec_full(), dialout(), do_bridge_masquerade(), do_forward(), do_immediate_setup(), expand_gosub_args(), extenspy_exec(), fax_detect_framehook(), feature_attended_transfer(), feature_blind_transfer(), find_matching_endwhile(), forward_message(), func_channel_read(), get_cid_name(), gosub_exec(), gosub_run(), goto_exten(), handle_chanlist(), handle_gosub(), handle_setpriority(), handle_showchan(), iax2_call(), iax_park(), launch_monitor_thread(), leave_voicemail(), local_call(), log_exec(), lua_pbx_exec(), manage_parked_call(), masq_park_call(), mgcp_ss(), minivm_greet_exec(), misdn_call(), misdn_hangup(), my_handle_dtmf(), onedigit_goto(), park_call_full(), parkandannounce_exec(), pbx_builtin_background(), pbx_builtin_goto(), pbx_builtin_setvar_multiple(), pbx_builtin_waitexten(), pbx_extension_helper(), pbx_parseable_goto(), pickup_exec(), print_bc_info(), process_ast_dsp(), process_sdp(), queue_transfer_fixup(), raise_exception(), readexten_exec(), real_ctx(), realtime_exec(), release_chan(), ring_entry(), serialize_showchan(), setsubstate(), setup_env(), sip_park(), sip_read(), skinny_newcall(), skinny_ss(), try_calling(), vm_authenticate(), vm_execmain(), vmauthenticate(), and wait_for_answer().

00486 {
00487    return chan->context;
00488 }

void ast_channel_context_set ( struct ast_channel chan,
const char *  value 
)

struct timeval ast_channel_creationtime ( struct ast_channel chan  )  [read]

void ast_channel_creationtime_set ( struct ast_channel chan,
struct timeval *  value 
)

Definition at line 1009 of file channel_internal_api.c.

References ast_channel::creationtime.

Referenced by __ast_channel_alloc_ap().

01010 {
01011    chan->creationtime = *value;
01012 }

const char* ast_channel_data ( const struct ast_channel chan  ) 

int ast_channel_data_add_structure ( struct ast_data tree,
struct ast_channel chan,
int  add_bridged 
)

Insert into an astdata tree, the channel structure.

Parameters:
[in] tree The ast data tree.
[in] chan The channel structure to add to tree.
[in] add_bridged Add the bridged channel to the structure.
Return values:
<0 on error.
0 on success.

Definition at line 266 of file channel_internal_api.c.

References ast_bridged_channel(), ast_cause2str(), ast_cdr_data_add_structure(), ast_cdr_flags2str(), ast_channel_amaflags(), ast_channel_cdr(), ast_channel_data_add_structure(), ast_channel_hangupcause(), ast_channel_nativeformats(), ast_channel_oldwriteformat(), ast_channel_rawreadformat(), ast_channel_rawwriteformat(), ast_channel_readformat(), ast_channel_softhangup_internal_flag(), ast_channel_transfercapability(), ast_channel_whentohangup(), ast_channel_writeformat(), ast_channel_zone(), ast_data_add_bool(), ast_data_add_codec(), ast_data_add_codecs(), ast_data_add_int(), ast_data_add_node(), ast_data_add_str(), ast_data_add_structure, ast_data_add_uint(), AST_SOFTHANGUP_APPUNLOAD, AST_SOFTHANGUP_ASYNCGOTO, AST_SOFTHANGUP_DEV, AST_SOFTHANGUP_EXPLICIT, AST_SOFTHANGUP_SHUTDOWN, AST_SOFTHANGUP_TIMEOUT, AST_SOFTHANGUP_UNBRIDGE, ast_state2str(), ast_tone_zone_data_add_structure(), ast_transfercapability2str(), and channel_data_add_flags().

Referenced by agents_data_provider_get(), ast_channel_data_add_structure(), data_channels_provider_handler(), queues_data_provider_get_helper(), and user_add_provider_cb().

00268 {
00269    struct ast_channel *bc;
00270    struct ast_data *data_bridged;
00271    struct ast_data *data_cdr;
00272    struct ast_data *data_flags;
00273    struct ast_data *data_zones;
00274    struct ast_data *enum_node;
00275    struct ast_data *data_softhangup;
00276 #if 0 /* XXX AstData: ast_callerid no longer exists. (Equivalent code not readily apparent.) */
00277    struct ast_data *data_callerid;
00278    char value_str[100];
00279 #endif
00280 
00281    if (!tree) {
00282       return -1;
00283    }
00284 
00285    ast_data_add_structure(ast_channel, tree, chan);
00286 
00287    if (add_bridged) {
00288       bc = ast_bridged_channel(chan);
00289       if (bc) {
00290          data_bridged = ast_data_add_node(tree, "bridged");
00291          if (!data_bridged) {
00292             return -1;
00293          }
00294          ast_channel_data_add_structure(data_bridged, bc, 0);
00295       }
00296    }
00297 
00298    ast_data_add_codec(tree, "oldwriteformat", ast_channel_oldwriteformat(chan));
00299    ast_data_add_codec(tree, "readformat", ast_channel_readformat(chan));
00300    ast_data_add_codec(tree, "writeformat", ast_channel_writeformat(chan));
00301    ast_data_add_codec(tree, "rawreadformat", ast_channel_rawreadformat(chan));
00302    ast_data_add_codec(tree, "rawwriteformat", ast_channel_rawwriteformat(chan));
00303    ast_data_add_codecs(tree, "nativeformats", ast_channel_nativeformats(chan));
00304 
00305    /* state */
00306    enum_node = ast_data_add_node(tree, "state");
00307    if (!enum_node) {
00308       return -1;
00309    }
00310    ast_data_add_str(enum_node, "text", ast_state2str(ast_channel_state(chan)));
00311    ast_data_add_int(enum_node, "value", ast_channel_state(chan));
00312 
00313    /* hangupcause */
00314    enum_node = ast_data_add_node(tree, "hangupcause");
00315    if (!enum_node) {
00316       return -1;
00317    }
00318    ast_data_add_str(enum_node, "text", ast_cause2str(ast_channel_hangupcause(chan)));
00319    ast_data_add_int(enum_node, "value", ast_channel_hangupcause(chan));
00320 
00321    /* amaflags */
00322    enum_node = ast_data_add_node(tree, "amaflags");
00323    if (!enum_node) {
00324       return -1;
00325    }
00326    ast_data_add_str(enum_node, "text", ast_cdr_flags2str(ast_channel_amaflags(chan)));
00327    ast_data_add_int(enum_node, "value", ast_channel_amaflags(chan));
00328 
00329    /* transfercapability */
00330    enum_node = ast_data_add_node(tree, "transfercapability");
00331    if (!enum_node) {
00332       return -1;
00333    }
00334    ast_data_add_str(enum_node, "text", ast_transfercapability2str(ast_channel_transfercapability(chan)));
00335    ast_data_add_int(enum_node, "value", ast_channel_transfercapability(chan));
00336 
00337    /* _softphangup */
00338    data_softhangup = ast_data_add_node(tree, "softhangup");
00339    if (!data_softhangup) {
00340       return -1;
00341    }
00342    ast_data_add_bool(data_softhangup, "dev", ast_channel_softhangup_internal_flag(chan) & AST_SOFTHANGUP_DEV);
00343    ast_data_add_bool(data_softhangup, "asyncgoto", ast_channel_softhangup_internal_flag(chan) & AST_SOFTHANGUP_ASYNCGOTO);
00344    ast_data_add_bool(data_softhangup, "shutdown", ast_channel_softhangup_internal_flag(chan) & AST_SOFTHANGUP_SHUTDOWN);
00345    ast_data_add_bool(data_softhangup, "timeout", ast_channel_softhangup_internal_flag(chan) & AST_SOFTHANGUP_TIMEOUT);
00346    ast_data_add_bool(data_softhangup, "appunload", ast_channel_softhangup_internal_flag(chan) & AST_SOFTHANGUP_APPUNLOAD);
00347    ast_data_add_bool(data_softhangup, "explicit", ast_channel_softhangup_internal_flag(chan) & AST_SOFTHANGUP_EXPLICIT);
00348    ast_data_add_bool(data_softhangup, "unbridge", ast_channel_softhangup_internal_flag(chan) & AST_SOFTHANGUP_UNBRIDGE);
00349 
00350    /* channel flags */
00351    data_flags = ast_data_add_node(tree, "flags");
00352    if (!data_flags) {
00353       return -1;
00354    }
00355    channel_data_add_flags(data_flags, chan);
00356 
00357    ast_data_add_uint(tree, "timetohangup", ast_channel_whentohangup(chan)->tv_sec);
00358 
00359 #if 0 /* XXX AstData: ast_callerid no longer exists. (Equivalent code not readily apparent.) */
00360    /* callerid */
00361    data_callerid = ast_data_add_node(tree, "callerid");
00362    if (!data_callerid) {
00363       return -1;
00364    }
00365    ast_data_add_structure(ast_callerid, data_callerid, &(chan->cid));
00366    /* insert the callerid ton */
00367    enum_node = ast_data_add_node(data_callerid, "cid_ton");
00368    if (!enum_node) {
00369       return -1;
00370    }
00371    ast_data_add_int(enum_node, "value", chan->cid.cid_ton);
00372    snprintf(value_str, sizeof(value_str), "TON: %s/Plan: %s",
00373       party_number_ton2str(chan->cid.cid_ton),
00374       party_number_plan2str(chan->cid.cid_ton));
00375    ast_data_add_str(enum_node, "text", value_str);
00376 #endif
00377 
00378    /* tone zone */
00379    if (ast_channel_zone(chan)) {
00380       data_zones = ast_data_add_node(tree, "zone");
00381       if (!data_zones) {
00382          return -1;
00383       }
00384       ast_tone_zone_data_add_structure(data_zones, ast_channel_zone(chan));
00385    }
00386 
00387    /* insert cdr */
00388    data_cdr = ast_data_add_node(tree, "cdr");
00389    if (!data_cdr) {
00390       return -1;
00391    }
00392 
00393    ast_cdr_data_add_structure(data_cdr, ast_channel_cdr(chan), 1);
00394 
00395    return 0;
00396 }

int ast_channel_data_cmp_structure ( const struct ast_data_search tree,
struct ast_channel chan,
const char *  structure_name 
)

Compare to channel structures using the data api.

Parameters:
[in] tree The search tree generated by the data api.
[in] chan The channel to compare.
[in] structure_name The name of the node of the channel structure.
Return values:
0 The structure matches.
1 The structure doesn't matches.

Definition at line 398 of file channel_internal_api.c.

References ast_data_search_cmp_structure.

00400 {
00401    return ast_data_search_cmp_structure(tree, ast_channel, chan, structure_name);
00402 }

void ast_channel_data_set ( struct ast_channel chan,
const char *  value 
)

struct ast_datastore_list* ast_channel_datastores ( struct ast_channel chan  )  [read]

struct ast_party_dialed* ast_channel_dialed ( struct ast_channel chan  )  [read]

int ast_channel_dialed_causes_add ( const struct ast_channel chan,
const struct ast_control_pvt_cause_code cause_code,
int  datalen 
)

Add cause code information to the channel.

Since:
11
This function makes use of datastore operations on the channel, so it is important to lock the channel before calling this function. The passed in data is copied and so is still owned by the caller.

Parameters:
chan The channel on which to add information
cause_code The cause information to be added to the channel
datalen The total length of the structure since its length is variable
Return values:
0 on success
-1 on error

Definition at line 1273 of file channel_internal_api.c.

References ao2_alloc, ao2_find, ao2_link, ao2_ref, ast_control_pvt_cause_code::chan_name, ast_channel::dialed_causes, OBJ_KEY, OBJ_NODATA, and OBJ_UNLINK.

Referenced by ast_channel_hangupcause_hash_set().

01274 {
01275    struct ast_control_pvt_cause_code *ao2_cause_code;
01276    ao2_find(chan->dialed_causes, cause_code->chan_name, OBJ_KEY | OBJ_UNLINK | OBJ_NODATA);
01277    ao2_cause_code = ao2_alloc(datalen, NULL);
01278 
01279    if (ao2_cause_code) {
01280       memcpy(ao2_cause_code, cause_code, datalen);
01281       ao2_link(chan->dialed_causes, ao2_cause_code);
01282       ao2_ref(ao2_cause_code, -1);
01283       return 0;
01284    } else {
01285       return -1;
01286    }
01287 }

struct ast_str* ast_channel_dialed_causes_channels ( const struct ast_channel chan  )  [read]

Retreive a comma-separated list of channels for which dialed cause information is available.

Since:
11
This function makes use of datastore operations on the channel, so it is important to lock the channel before calling this function.

Parameters:
chan The channel from which to retreive information
Return values:
NULL on allocation failure
Pointer to an ast_str object containing the desired information which must be freed

Definition at line 1255 of file channel_internal_api.c.

References ao2_callback, ast_str_create(), collect_names_cb(), and ast_channel::dialed_causes.

Referenced by hangupcause_keys_read().

01256 {
01257    struct ast_str *chanlist = ast_str_create(128);
01258 
01259    if (!chanlist) {
01260       return NULL;
01261    }
01262 
01263    ao2_callback(chan->dialed_causes, 0, collect_names_cb, &chanlist);
01264 
01265    return chanlist;
01266 }

void ast_channel_dialed_causes_clear ( const struct ast_channel chan  ) 

Clear all cause information from the channel.

Since:
11
This function makes use of datastore operations on the channel, so it is important to lock the channel before calling this function.

Parameters:
chan The channel from which to clear information

Definition at line 1289 of file channel_internal_api.c.

References ao2_callback, ast_channel::dialed_causes, OBJ_MULTIPLE, OBJ_NODATA, and OBJ_UNLINK.

Referenced by hangupcause_clear_exec().

01290 {
01291    ao2_callback(chan->dialed_causes, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
01292 }

struct ast_control_pvt_cause_code* ast_channel_dialed_causes_find ( const struct ast_channel chan,
const char *  chan_name 
) [read]

Retreive a ref-counted cause code information structure.

Since:
11
This function makes use of datastore operations on the channel, so it is important to lock the channel before calling this function. This function increases the ref count of the returned object, so the calling function must decrease the reference count when it is finished with the object.

Parameters:
chan The channel from which to retreive information
chan_name The name of the channel about which to retreive information
Return values:
NULL on search failure
Pointer to a ref-counted ast_control_pvt_cause_code object containing the desired information

Definition at line 1268 of file channel_internal_api.c.

References ao2_find, ast_channel::dialed_causes, and OBJ_KEY.

Referenced by hangupcause_read().

01269 {
01270    return ao2_find(chan->dialed_causes, chan_name, OBJ_KEY);
01271 }

void ast_channel_dialed_set ( struct ast_channel chan,
struct ast_party_dialed value 
)

Definition at line 985 of file channel_internal_api.c.

References ast_channel::dialed.

Referenced by ast_do_masquerade().

00986 {
00987    chan->dialed = *value;
00988 }

char ast_channel_dtmf_digit_to_emulate ( const struct ast_channel chan  ) 

Definition at line 518 of file channel_internal_api.c.

References ast_channel::dtmf_digit_to_emulate.

Referenced by __ast_read().

00519 {
00520    return chan->dtmf_digit_to_emulate;
00521 }

void ast_channel_dtmf_digit_to_emulate_set ( struct ast_channel chan,
char  value 
)

Definition at line 522 of file channel_internal_api.c.

References ast_channel::dtmf_digit_to_emulate.

Referenced by __ast_read().

00523 {
00524    chan->dtmf_digit_to_emulate = value;
00525 }

struct timeval* ast_channel_dtmf_tv ( struct ast_channel chan  )  [read]

Definition at line 957 of file channel_internal_api.c.

References ast_channel::dtmf_tv.

Referenced by __ast_read(), and should_skip_dtmf().

00958 {
00959    return &chan->dtmf_tv;
00960 }

void ast_channel_dtmf_tv_set ( struct ast_channel chan,
struct timeval *  value 
)

Definition at line 993 of file channel_internal_api.c.

References ast_channel::dtmf_tv.

Referenced by __ast_read().

00994 {
00995    chan->dtmf_tv = *value;
00996 }

struct ast_frame* ast_channel_dtmff ( struct ast_channel chan  )  [read]

Definition at line 917 of file channel_internal_api.c.

References ast_channel::dtmff.

Referenced by __ast_read(), jingle_digit(), and queue_dtmf_readq().

00918 {
00919    return &chan->dtmff;
00920 }

void ast_channel_dtmff_set ( struct ast_channel chan,
struct ast_frame value 
)

Definition at line 969 of file channel_internal_api.c.

References ast_channel::dtmff.

00970 {
00971    chan->dtmff = *value;
00972 }

unsigned int ast_channel_emulate_dtmf_duration ( const struct ast_channel chan  ) 

Definition at line 624 of file channel_internal_api.c.

References ast_channel::emulate_dtmf_duration.

Referenced by __ast_read().

00625 {
00626    return chan->emulate_dtmf_duration;
00627 }

void ast_channel_emulate_dtmf_duration_set ( struct ast_channel chan,
unsigned int  value 
)

Definition at line 628 of file channel_internal_api.c.

References ast_channel::emulate_dtmf_duration.

Referenced by __ast_read().

00629 {
00630    chan->emulate_dtmf_duration = value;
00631 }

const char* ast_channel_exten ( const struct ast_channel chan  ) 

Definition at line 493 of file channel_internal_api.c.

References ast_channel::exten.

Referenced by __ast_goto_if_exists(), __ast_pbx_run(), _macro_exec(), _while_exec(), action_coreshowchannels(), action_dialplan_exec(), action_status(), agent_new(), ast_app_exec_macro(), ast_async_goto(), ast_bridge_call(), ast_cc_call_init(), ast_cdr_init(), ast_cdr_update(), ast_cel_report_event(), ast_channel_by_exten_cb(), ast_channel_log(), ast_pbx_h_exten_run(), ast_str_retrieve_variable(), ast_var_channels_table(), bridge_exec(), builtin_atxfer(), cb_events(), cc_generic_agent_init(), cc_interfaces_datastore_init(), dahdi_handle_dtmf(), dial_exec_full(), do_bridge_masquerade(), do_forward(), do_immediate_setup(), dundi_exec(), dundi_helper(), expand_gosub_args(), fax_detect_framehook(), feature_request_and_dial(), find_matching_endwhile(), forward_message(), func_channel_read(), get_cid_name(), gosub_exec(), gosub_run(), handle_chanlist(), handle_cli_misdn_show_channels(), handle_frame(), handle_gosub(), handle_setpriority(), handle_showchan(), iax_park(), launch_monitor_thread(), leave_voicemail(), local_call(), log_exec(), lua_pbx_exec(), manage_parked_call(), masq_park_call(), misdn_bridge(), misdn_hangup(), misdn_update_redirecting(), misdn_write(), my_handle_dtmf(), ospauth_exec(), park_call_exec(), park_call_full(), parkandannounce_exec(), pbx_builtin_goto(), pbx_builtin_setvar_multiple(), pbx_builtin_waitexten(), pbx_extension_helper(), pbx_parseable_goto(), phase_e_handler(), print_bc_info(), process_ast_dsp(), process_sdp(), queue_transfer_fixup(), raise_exception(), realtime_exec(), release_chan(), ring_entry(), serialize_showchan(), setup_env(), setup_privacy_args(), sip_park(), sip_read(), skinny_newcall(), try_calling(), and wait_for_answer().

00494 {
00495    return chan->exten;
00496 }

void ast_channel_exten_set ( struct ast_channel chan,
const char *  value 
)

int ast_channel_fd ( const struct ast_channel chan,
int  which 
)

int ast_channel_fd_isset ( const struct ast_channel chan,
int  which 
)

Definition at line 1189 of file channel_internal_api.c.

References ast_channel_fd().

Referenced by __ast_read(), ast_channel_set_fd(), ast_poll_channel_add(), ast_poll_channel_del(), and manage_parked_call().

01190 {
01191    return ast_channel_fd(chan, which) > -1;
01192 }

int ast_channel_fdno ( const struct ast_channel chan  ) 

void ast_channel_fdno_set ( struct ast_channel chan,
int  value 
)

Definition at line 548 of file channel_internal_api.c.

References ast_channel::fdno.

Referenced by __ast_read(), agent_read(), ast_do_masquerade(), ast_settimeout(), ast_waitfor_nandfds(), and manage_parked_call().

00549 {
00550    chan->fdno = value;
00551 }

unsigned int ast_channel_fin ( const struct ast_channel chan  ) 

Definition at line 632 of file channel_internal_api.c.

References ast_channel::fin.

Referenced by __ast_read(), channel_set_debug(), handle_showchan(), and serialize_showchan().

00633 {
00634    return chan->fin;
00635 }

void ast_channel_fin_set ( struct ast_channel chan,
unsigned int  value 
)

Definition at line 636 of file channel_internal_api.c.

References ast_channel::fin.

Referenced by __ast_channel_alloc_ap(), __ast_read(), and channel_set_debug().

00637 {
00638    chan->fin = value;
00639 }

struct ast_flags* ast_channel_flags ( struct ast_channel chan  )  [read]

Definition at line 1241 of file channel_internal_api.c.

References ast_channel::flags.

Referenced by __analog_ss_thread(), __ast_channel_masquerade(), __ast_pbx_run(), __ast_queue_frame(), __ast_read(), _macro_exec(), action_redirect(), agent_read(), analog_ss_thread(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_call(), ast_call(), ast_can_pickup(), ast_channel_bridge(), ast_channel_defer_dtmf(), ast_channel_undefer_dtmf(), ast_deactivate_generator(), ast_do_masquerade(), ast_explicit_goto(), ast_hangup(), ast_indicate_data(), ast_pbx_h_exten_run(), ast_quiet_chan(), ast_raw_answer(), ast_readstring_full(), ast_sendtext(), ast_softhangup_nolock(), ast_streamfile(), ast_transfer(), ast_var_channels_table(), ast_waitfor_nandfds(), ast_waitfordigit_full(), ast_write(), asyncgoto_exec(), bridge_channel_feature(), bridge_exec(), builtin_atxfer(), builtin_blindtransfer(), call_forward_inherit(), channel_data_add_flags(), channel_spy(), check_goto_on_transfer(), common_exec(), dahdi_read(), dial_exec_full(), disa_exec(), eivr_comm(), gosub_exec(), gosub_run(), handle_exec(), handle_gosub(), handle_showchan(), linear_alloc(), local_ast_moh_start(), local_ast_moh_stop(), manage_parked_call(), park_call_full(), parkandannounce_exec(), pbx_builtin_background(), phone_read(), playtones_alloc(), remote_bridge_loop(), retrydial_exec(), return_exec(), serialize_showchan(), should_skip_dtmf(), sip_fixup(), start_spying(), startmon(), tonepair_alloc(), unistim_quiet_chan(), and waitstream_core().

01242 {
01243    return &chan->flags;
01244 }

unsigned int ast_channel_fout ( const struct ast_channel chan  ) 

Definition at line 640 of file channel_internal_api.c.

References ast_channel::fout.

Referenced by ast_write(), channel_set_debug(), handle_showchan(), and serialize_showchan().

00641 {
00642    return chan->fout;
00643 }

void ast_channel_fout_set ( struct ast_channel chan,
unsigned int  value 
)

Definition at line 644 of file channel_internal_api.c.

References ast_channel::fout.

Referenced by __ast_channel_alloc_ap(), ast_write(), and channel_set_debug().

00645 {
00646    chan->fout = value;
00647 }

struct ast_framehook_list* ast_channel_framehooks ( const struct ast_channel chan  )  [read]

void ast_channel_framehooks_set ( struct ast_channel chan,
struct ast_framehook_list value 
)

Definition at line 764 of file channel_internal_api.c.

References ast_channel::framehooks.

Referenced by ast_framehook_attach(), and ast_framehook_list_destroy().

00765 {
00766    chan->framehooks = value;
00767 }

struct ast_generator* ast_channel_generator ( const struct ast_channel chan  )  [read]

void ast_channel_generator_set ( struct ast_channel chan,
struct ast_generator value 
)

Definition at line 772 of file channel_internal_api.c.

References ast_channel::generator.

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

00773 {
00774    chan->generator = value;
00775 }

void* ast_channel_generatordata ( const struct ast_channel chan  ) 

void ast_channel_generatordata_set ( struct ast_channel chan,
void *  value 
)

struct ast_hangup_handler_list* ast_channel_hangup_handlers ( struct ast_channel chan  )  [read]

int ast_channel_hangupcause ( const struct ast_channel chan  ) 

void ast_channel_hangupcause_set ( struct ast_channel chan,
int  value 
)

unsigned long ast_channel_insmpl ( const struct ast_channel chan  ) 

Definition at line 648 of file channel_internal_api.c.

References ast_channel::insmpl.

Referenced by __ast_read(), and ast_write().

00649 {
00650    return chan->insmpl;
00651 }

void ast_channel_insmpl_set ( struct ast_channel chan,
unsigned long  value 
)

Definition at line 652 of file channel_internal_api.c.

References ast_channel::insmpl.

Referenced by __ast_read().

00653 {
00654    chan->insmpl = value;
00655 }

ast_alert_status_t ast_channel_internal_alert_read ( struct ast_channel chan  ) 

Definition at line 1082 of file channel_internal_api.c.

References ast_channel::alertpipe, AST_ALERT_NOT_READABLE, AST_ALERT_READ_FAIL, AST_ALERT_READ_FATAL, AST_ALERT_READ_SUCCESS, ast_channel_internal_alert_readable(), ast_channel_name(), ast_log(), errno, LOG_ERROR, and LOG_WARNING.

Referenced by __ast_read().

01083 {
01084    int flags;
01085    char blah;
01086 
01087    if (!ast_channel_internal_alert_readable(chan)) {
01088       return AST_ALERT_NOT_READABLE;
01089    }
01090 
01091    flags = fcntl(chan->alertpipe[0], F_GETFL);
01092    /* For some odd reason, the alertpipe occasionally loses nonblocking status,
01093     * which immediately causes a deadlock scenario.  Detect and prevent this. */
01094    if ((flags & O_NONBLOCK) == 0) {
01095       ast_log(LOG_ERROR, "Alertpipe on channel %s lost O_NONBLOCK?!!\n", ast_channel_name(chan));
01096       if (fcntl(chan->alertpipe[0], F_SETFL, flags | O_NONBLOCK) < 0) {
01097          ast_log(LOG_WARNING, "Unable to set alertpipe nonblocking! (%d: %s)\n", errno, strerror(errno));
01098          return AST_ALERT_READ_FATAL;
01099       }
01100    }
01101    if (read(chan->alertpipe[0], &blah, sizeof(blah)) < 0) {
01102       if (errno != EINTR && errno != EAGAIN) {
01103          ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
01104          return AST_ALERT_READ_FAIL;
01105       }
01106    }
01107 
01108    return AST_ALERT_READ_SUCCESS;
01109 }

int ast_channel_internal_alert_readable ( struct ast_channel chan  ) 

Definition at line 1116 of file channel_internal_api.c.

References ast_channel::alertpipe.

Referenced by ast_channel_internal_alert_read(), and ast_channel_internal_alertpipe_close().

01117 {
01118    return chan->alertpipe[0] > -1;
01119 }

int ast_channel_internal_alert_readfd ( struct ast_channel chan  ) 

Definition at line 1156 of file channel_internal_api.c.

References ast_channel::alertpipe.

Referenced by __ast_channel_alloc_ap().

01157 {
01158    return chan->alertpipe[0];
01159 }

void ast_channel_internal_alertpipe_clear ( struct ast_channel chan  ) 

Definition at line 1121 of file channel_internal_api.c.

References ast_channel::alertpipe.

Referenced by __ast_channel_alloc_ap(), and ast_dummy_channel_alloc().

01122 {
01123    chan->alertpipe[0] = chan->alertpipe[1] = -1;
01124 }

void ast_channel_internal_alertpipe_close ( struct ast_channel chan  ) 

Definition at line 1126 of file channel_internal_api.c.

References ast_channel::alertpipe, ast_channel_alert_writable(), and ast_channel_internal_alert_readable().

Referenced by ast_channel_destructor().

01127 {
01128    if (ast_channel_internal_alert_readable(chan)) {
01129       close(chan->alertpipe[0]);
01130    }
01131    if (ast_channel_alert_writable(chan)) {
01132       close(chan->alertpipe[1]);
01133    }
01134 }

int ast_channel_internal_alertpipe_init ( struct ast_channel chan  ) 

Definition at line 1136 of file channel_internal_api.c.

References ast_channel::alertpipe, ast_log(), errno, and LOG_WARNING.

Referenced by __ast_channel_alloc_ap().

01137 {
01138    if (pipe(chan->alertpipe)) {
01139       ast_log(LOG_WARNING, "Channel allocation failed: Can't create alert pipe! Try increasing max file descriptors with ulimit -n\n");
01140       return -1;
01141    } else {
01142       int flags = fcntl(chan->alertpipe[0], F_GETFL);
01143       if (fcntl(chan->alertpipe[0], F_SETFL, flags | O_NONBLOCK) < 0) {
01144          ast_log(LOG_WARNING, "Channel allocation failed: Unable to set alertpipe nonblocking! (%d: %s)\n", errno, strerror(errno));
01145          return -1;
01146       }
01147       flags = fcntl(chan->alertpipe[1], F_GETFL);
01148       if (fcntl(chan->alertpipe[1], F_SETFL, flags | O_NONBLOCK) < 0) {
01149          ast_log(LOG_WARNING, "Channel allocation failed: Unable to set alertpipe nonblocking! (%d: %s)\n", errno, strerror(errno));
01150          return -1;
01151       }
01152    }
01153    return 0;
01154 }

void ast_channel_internal_alertpipe_swap ( struct ast_channel chan1,
struct ast_channel chan2 
)

Swap the interal alertpipe between two channels.

Note:
Handle all of the necessary locking before calling this

Definition at line 1161 of file channel_internal_api.c.

References ast_channel::alertpipe, ARRAY_LEN, and SWAP.

Referenced by ast_do_masquerade().

01162 {
01163    int i;
01164    for (i = 0; i < ARRAY_LEN(chan1->alertpipe); i++) {
01165       SWAP(chan1->alertpipe[i], chan2->alertpipe[i]);
01166    }
01167 }

struct ast_bridge* ast_channel_internal_bridge ( const struct ast_channel chan  )  [read]

Definition at line 1223 of file channel_internal_api.c.

References ast_channel::bridge.

Referenced by bridge_call(), conf_mute_only_active(), and multiplexed_thread_function().

01224 {
01225    return chan->bridge;
01226 }

void ast_channel_internal_bridge_set ( struct ast_channel chan,
struct ast_bridge value 
)

Definition at line 1227 of file channel_internal_api.c.

References ast_channel::bridge.

Referenced by alloc_playback_chan(), and bridge_channel_join().

01228 {
01229    chan->bridge = value;
01230 }

struct ast_channel* ast_channel_internal_bridged_channel ( const struct ast_channel chan  )  [read]

void ast_channel_internal_bridged_channel_set ( struct ast_channel chan,
struct ast_channel value 
)

Definition at line 1236 of file channel_internal_api.c.

References ast_channel::bridged_channel.

Referenced by agent_hangup(), agent_read(), ast_channel_bridge(), and ast_generic_bridge().

01237 {
01238    chan->bridged_channel = value;
01239 }

void ast_channel_internal_cleanup ( struct ast_channel chan  ) 

Definition at line 1336 of file channel_internal_api.c.

References ao2_t_ref, ast_string_field_free_memory, and ast_channel::dialed_causes.

Referenced by ast_channel_destructor(), and ast_dummy_channel_destructor().

01337 {
01338    if (chan->dialed_causes) {
01339       ao2_t_ref(chan->dialed_causes, -1,
01340          "done with dialed causes since the channel is going away");
01341       chan->dialed_causes = NULL;
01342    }
01343 
01344    ast_string_field_free_memory(chan);
01345 }

void ast_channel_internal_fd_clear ( struct ast_channel chan,
int  which 
)

Definition at line 1174 of file channel_internal_api.c.

References ast_channel_internal_fd_set().

Referenced by ast_channel_internal_fd_clear_all().

01175 {
01176    ast_channel_internal_fd_set(chan, which, -1);
01177 }

void ast_channel_internal_fd_clear_all ( struct ast_channel chan  ) 

Definition at line 1178 of file channel_internal_api.c.

References ast_channel_internal_fd_clear(), and AST_MAX_FDS.

Referenced by __ast_channel_alloc_ap(), and ast_dummy_channel_alloc().

01179 {
01180    int i;
01181    for (i = 0; i < AST_MAX_FDS; i++) {
01182       ast_channel_internal_fd_clear(chan, i);
01183    }
01184 }

void ast_channel_internal_fd_set ( struct ast_channel chan,
int  which,
int  value 
)

Definition at line 1170 of file channel_internal_api.c.

References ast_channel::fds.

Referenced by ast_channel_internal_fd_clear(), ast_channel_set_fd(), start_rtp(), swap_subs(), and unistim_new().

01171 {
01172    chan->fds[which] = value;
01173 }

void ast_channel_internal_finalize ( struct ast_channel chan  ) 

Definition at line 1347 of file channel_internal_api.c.

References ast_channel::finalized.

Referenced by __ast_channel_alloc_ap().

01348 {
01349    chan->finalized = 1;
01350 }

int ast_channel_internal_is_finalized ( struct ast_channel chan  ) 

Definition at line 1352 of file channel_internal_api.c.

References ast_channel::finalized.

Referenced by ast_channel_destructor().

01353 {
01354    return chan->finalized;
01355 }

struct ast_jb* ast_channel_jb ( struct ast_channel chan  )  [read]

void ast_channel_jb_set ( struct ast_channel chan,
struct ast_jb value 
)

Definition at line 973 of file channel_internal_api.c.

References ast_channel::jb.

00974 {
00975    chan->jb = *value;
00976 }

void ast_channel_linkedid_set ( struct ast_channel chan,
const char *  value 
)

const char* ast_channel_macrocontext ( const struct ast_channel chan  ) 

void ast_channel_macrocontext_set ( struct ast_channel chan,
const char *  value 
)

Definition at line 505 of file channel_internal_api.c.

References ast_copy_string(), and ast_channel::macrocontext.

Referenced by _macro_exec(), and masq_park_call().

00506 {
00507    ast_copy_string(chan->macrocontext, value, sizeof(chan->macrocontext));
00508 }

const char* ast_channel_macroexten ( const struct ast_channel chan  ) 

void ast_channel_macroexten_set ( struct ast_channel chan,
const char *  value 
)

Definition at line 513 of file channel_internal_api.c.

References ast_copy_string(), and ast_channel::macroexten.

Referenced by _macro_exec(), and masq_park_call().

00514 {
00515    ast_copy_string(chan->macroexten, value, sizeof(chan->macroexten));
00516 }

int ast_channel_macropriority ( const struct ast_channel chan  ) 

Definition at line 560 of file channel_internal_api.c.

References ast_channel::macropriority.

Referenced by ast_channel_log(), ast_var_channels_table(), masq_park_call(), and park_call_full().

00561 {
00562    return chan->macropriority;
00563 }

void ast_channel_macropriority_set ( struct ast_channel chan,
int  value 
)

Definition at line 564 of file channel_internal_api.c.

References ast_channel::macropriority.

Referenced by _macro_exec(), and masq_park_call().

00565 {
00566    chan->macropriority = value;
00567 }

struct ast_channel* ast_channel_masq ( const struct ast_channel chan  )  [read]

void ast_channel_masq_set ( struct ast_channel chan,
struct ast_channel value 
)

Definition at line 716 of file channel_internal_api.c.

References ast_channel::masq.

Referenced by __ast_channel_masquerade(), and ast_do_masquerade().

00717 {
00718    chan->masq = value;
00719 }

struct ast_channel* ast_channel_masqr ( const struct ast_channel chan  )  [read]

void ast_channel_masqr_set ( struct ast_channel chan,
struct ast_channel value 
)

Definition at line 724 of file channel_internal_api.c.

References ast_channel::masqr.

Referenced by __ast_channel_masquerade(), and ast_do_masquerade().

00725 {
00726    chan->masqr = value;
00727 }

struct ast_channel_monitor* ast_channel_monitor ( const struct ast_channel chan  )  [read]

void ast_channel_monitor_set ( struct ast_channel chan,
struct ast_channel_monitor value 
)

Definition at line 732 of file channel_internal_api.c.

References ast_channel::monitor.

Referenced by ast_do_masquerade(), ast_monitor_start(), ast_monitor_stop(), and check_bridge().

00733 {
00734    chan->monitor = value;
00735 }

void* ast_channel_music_state ( const struct ast_channel chan  ) 

void ast_channel_music_state_set ( struct ast_channel chan,
void *  value 
)

Definition at line 676 of file channel_internal_api.c.

References ast_channel::music_state.

Referenced by local_ast_moh_cleanup(), moh_alloc(), and moh_files_alloc().

00677 {
00678    chan->music_state = value;
00679 }

struct ast_namedgroups* ast_channel_named_callgroups ( const struct ast_channel chan  )  [read]

Definition at line 1056 of file channel_internal_api.c.

References ast_channel::named_callgroups.

Referenced by find_channel_by_group(), and func_channel_read().

01057 {
01058    return chan->named_callgroups;
01059 }

void ast_channel_named_callgroups_set ( struct ast_channel chan,
struct ast_namedgroups *  value 
)

struct ast_namedgroups* ast_channel_named_pickupgroups ( const struct ast_channel chan  )  [read]

Definition at line 1065 of file channel_internal_api.c.

References ast_channel::named_pickupgroups.

Referenced by find_channel_by_group(), and func_channel_read().

01066 {
01067    return chan->named_pickupgroups;
01068 }

void ast_channel_named_pickupgroups_set ( struct ast_channel chan,
struct ast_namedgroups *  value 
)

struct ast_format_cap* ast_channel_nativeformats ( const struct ast_channel chan  )  [read]

Definition at line 752 of file channel_internal_api.c.

References ast_channel::nativeformats.

Referenced by __ast_read(), __oh323_new(), __oh323_update_info(), agent_call(), agent_new(), alsa_new(), ast_bridge_update_talker_src_video_mode(), ast_channel_bridge(), ast_channel_data_add_structure(), ast_channel_destructor(), ast_channel_make_compatible_helper(), ast_do_masquerade(), ast_generic_bridge(), ast_iax2_new(), ast_openvstream(), ast_sendtext(), ast_streamfile(), ast_write(), begin_dial_channel(), bridge_request(), builtin_atxfer(), chanavail_exec(), console_new(), create_addr(), dahdi_new(), dial_exec_full(), dial_transfer(), do_forward(), do_notify(), echo_exec(), findmeexec(), free_translation(), func_channel_read(), gtalk_new(), gtalk_rtp_read(), gtalk_write(), handle_showchan(), iax2_bridge(), iax2_call(), iax2_request(), jingle_interpret_content(), jingle_new(), jingle_read(), jingle_rtp_read(), jingle_write(), local_new(), login_exec(), mgcp_new(), mgcp_rtp_read(), mgcp_write(), misdn_new(), multicast_rtp_request(), multiplexed_bridge_join(), nbs_new(), oh323_rtp_read(), oh323_write(), oss_new(), phone_new(), process_sdp(), rec_request(), ring_entry(), serialize_showchan(), set_format(), setup_rtp_connection(), show_channels_cb(), simple_bridge_join(), sip_new(), sip_rtp_read(), sip_show_channel(), sip_write(), skinny_new(), skinny_rtp_read(), skinny_write(), socket_process_helper(), speech_create(), start_rtp(), unistim_new(), unistim_rtp_read(), unistim_write(), and wait_for_answer().

00753 {
00754    return chan->nativeformats;
00755 }

void ast_channel_nativeformats_set ( struct ast_channel chan,
struct ast_format_cap value 
)

Definition at line 756 of file channel_internal_api.c.

References ast_channel::nativeformats.

Referenced by __ast_channel_alloc_ap(), and ast_channel_destructor().

00757 {
00758    chan->nativeformats = value;
00759 }

struct ast_format* ast_channel_oldwriteformat ( struct ast_channel chan  )  [read]

Definition at line 881 of file channel_internal_api.c.

References ast_channel::oldwriteformat.

Referenced by ast_channel_data_add_structure(), ast_openstream_full(), and ast_stopstream().

00882 {
00883    return &chan->oldwriteformat;
00884 }

unsigned long ast_channel_outsmpl ( const struct ast_channel chan  ) 

Definition at line 656 of file channel_internal_api.c.

References ast_channel::outsmpl.

Referenced by __ast_read(), and ast_write().

00657 {
00658    return chan->outsmpl;
00659 }

void ast_channel_outsmpl_set ( struct ast_channel chan,
unsigned long  value 
)

Definition at line 660 of file channel_internal_api.c.

References ast_channel::outsmpl.

Referenced by ast_write().

00661 {
00662    chan->outsmpl = value;
00663 }

struct ast_pbx* ast_channel_pbx ( const struct ast_channel chan  )  [read]

void ast_channel_pbx_set ( struct ast_channel chan,
struct ast_pbx value 
)

Definition at line 780 of file channel_internal_api.c.

References ast_channel::pbx.

Referenced by __ast_pbx_run(), action_dialplan_exec(), and handle_gosub().

00781 {
00782    chan->pbx = value;
00783 }

ast_group_t ast_channel_pickupgroup ( const struct ast_channel chan  ) 

void ast_channel_pickupgroup_set ( struct ast_channel chan,
ast_group_t  value 
)

int ast_channel_priority ( const struct ast_channel chan  ) 

void ast_channel_priority_set ( struct ast_channel chan,
int  value 
)

struct ast_format* ast_channel_rawreadformat ( struct ast_channel chan  )  [read]

struct ast_format* ast_channel_rawwriteformat ( struct ast_channel chan  )  [read]

struct ast_format* ast_channel_readformat ( struct ast_channel chan  )  [read]

Definition at line 893 of file channel_internal_api.c.

References ast_channel::readformat.

Referenced by __ast_play_and_record(), adsi_transmit_message_full(), agent_new(), alsa_new(), ast_async_goto(), ast_channel_bridge(), ast_channel_data_add_structure(), ast_channel_make_compatible_helper(), ast_do_masquerade(), ast_iax2_new(), ast_set_read_format(), ast_set_read_format_by_id(), ast_set_read_format_from_cap(), background_detect_exec(), bridge_channel_join(), bridge_make_compatible(), bridge_request(), builtin_atxfer(), check_goto_on_transfer(), console_new(), dahdi_new(), dictate_exec(), do_bridge_masquerade(), do_notify(), do_waiting(), eagi_exec(), fax_detect_framehook(), fax_gateway_framehook(), func_channel_read(), generic_fax_exec(), gtalk_new(), gtalk_rtp_read(), gtalk_show_channels(), gtalk_write(), handle_recordfile(), handle_showchan(), handle_speechrecognize(), iax2_request(), iax_park(), ices_exec(), isAnsweringMachine(), jingle_new(), jingle_read(), jingle_rtp_read(), jingle_show_channels(), jingle_write(), local_new(), login_exec(), masq_park_call(), measurenoise(), mgcp_new(), mgcp_rtp_read(), mgcp_write(), misdn_new(), multicast_rtp_request(), multiplexed_bridge_join(), nbs_new(), oss_new(), process_sdp(), rec_request(), record_exec(), send_start_rtp(), serialize_showchan(), simple_bridge_join(), sip_new(), sip_park(), sip_rtp_read(), sip_write(), skinny_new(), skinny_rtp_read(), skinny_write(), socket_process_helper(), speech_background(), start_rtp(), transmit_audio(), unistim_new(), unistim_rtp_read(), and unistim_write().

00894 {
00895    return &chan->readformat;
00896 }

struct ast_readq_list* ast_channel_readq ( struct ast_channel chan  )  [read]

Definition at line 913 of file channel_internal_api.c.

References ast_channel::readq.

Referenced by __ast_queue_frame(), __ast_read(), ast_channel_clear_softhangup(), ast_channel_destructor(), ast_do_masquerade(), and check_bridge().

00914 {
00915    return &chan->readq;
00916 }

struct ast_trans_pvt* ast_channel_readtrans ( const struct ast_channel chan  )  [read]

void ast_channel_readtrans_set ( struct ast_channel chan,
struct ast_trans_pvt value 
)

Definition at line 812 of file channel_internal_api.c.

References ast_channel::readtrans.

Referenced by free_translation().

00813 {
00814    chan->readtrans = value;
00815 }

struct ast_party_redirecting* ast_channel_redirecting ( struct ast_channel chan  )  [read]

struct ast_party_id ast_channel_redirecting_effective_from ( struct ast_channel chan  )  [read]

Definition at line 949 of file channel_internal_api.c.

References ast_party_id_merge().

Referenced by add_diversion(), and misdn_copy_redirecting_from_ast().

00950 {
00951    return ast_party_id_merge(&chan->redirecting.from, &chan->redirecting.priv_from);
00952 }

struct ast_party_id ast_channel_redirecting_effective_orig ( struct ast_channel chan  )  [read]

Definition at line 945 of file channel_internal_api.c.

References ast_party_id_merge().

00946 {
00947    return ast_party_id_merge(&chan->redirecting.orig, &chan->redirecting.priv_orig);
00948 }

struct ast_party_id ast_channel_redirecting_effective_to ( struct ast_channel chan  )  [read]

Definition at line 953 of file channel_internal_api.c.

References ast_party_id_merge().

Referenced by misdn_copy_redirecting_from_ast().

00954 {
00955    return ast_party_id_merge(&chan->redirecting.to, &chan->redirecting.priv_to);
00956 }

void ast_channel_redirecting_set ( struct ast_channel chan,
struct ast_party_redirecting value 
)

Definition at line 989 of file channel_internal_api.c.

References ast_channel::redirecting.

Referenced by ast_do_masquerade().

00990 {
00991    chan->redirecting = *value;
00992 }

int ast_channel_rings ( const struct ast_channel chan  ) 

Definition at line 576 of file channel_internal_api.c.

References ast_channel::rings.

Referenced by __analog_handle_event(), ast_var_channels_table(), handle_showchan(), and serialize_showchan().

00577 {
00578    return chan->rings;
00579 }

void ast_channel_rings_set ( struct ast_channel chan,
int  value 
)

struct ast_sched_context* ast_channel_sched ( const struct ast_channel chan  )  [read]

void ast_channel_sched_set ( struct ast_channel chan,
struct ast_sched_context value 
)

Definition at line 788 of file channel_internal_api.c.

References ast_channel::sched.

Referenced by __ast_channel_alloc_ap(), and ast_hangup().

00789 {
00790    chan->sched = value;
00791 }

int ast_channel_softhangup_internal_flag ( struct ast_channel chan  ) 

void ast_channel_softhangup_internal_flag_add ( struct ast_channel chan,
int  value 
)

void ast_channel_softhangup_internal_flag_clear ( struct ast_channel chan,
int  value 
)

Definition at line 1027 of file channel_internal_api.c.

References ast_channel::softhangup.

Referenced by ast_channel_clear_softhangup().

01028 {
01029    chan ->softhangup &= ~value;
01030 }

void ast_channel_softhangup_internal_flag_set ( struct ast_channel chan,
int  value 
)

Definition at line 1019 of file channel_internal_api.c.

References ast_channel::softhangup.

Referenced by ast_do_masquerade().

01020 {
01021    chan->softhangup = value;
01022 }

enum ast_channel_state ast_channel_state ( const struct ast_channel chan  ) 

Definition at line 840 of file channel_internal_api.c.

References ast_channel::state.

00841 {
00842    return chan->state;
00843 }

void ast_channel_state_set ( struct ast_channel chan,
enum ast_channel_state  value 
)

Definition at line 877 of file channel_internal_api.c.

References ast_channel::state.

Referenced by __ast_channel_alloc_ap(), ast_do_masquerade(), ast_setstate(), builtin_atxfer(), and check_goto_on_transfer().

00878 {
00879    chan->state = value;
00880 }

struct ast_filestream* ast_channel_stream ( const struct ast_channel chan  )  [read]

void ast_channel_stream_set ( struct ast_channel chan,
struct ast_filestream value 
)

int ast_channel_streamid ( const struct ast_channel chan  ) 

Definition at line 584 of file channel_internal_api.c.

References ast_channel::streamid.

Referenced by filestream_close(), handle_speechrecognize(), and speech_background().

00585 {
00586    return chan->streamid;
00587 }

void ast_channel_streamid_set ( struct ast_channel chan,
int  value 
)

Definition at line 588 of file channel_internal_api.c.

References ast_channel::streamid.

Referenced by __ast_channel_alloc_ap(), ast_readaudio_callback(), and filestream_close().

00589 {
00590    chan->streamid = value;
00591 }

struct ast_channel_tech* ast_channel_tech ( const struct ast_channel chan  )  [read]

Definition at line 824 of file channel_internal_api.c.

References ast_channel::tech.

Referenced by __ast_channel_masquerade(), __ast_read(), acf_channel_read(), agent_indicate(), agent_read(), analog_ss_thread(), ast_bridged_channel(), ast_call(), ast_channel_bridge(), ast_channel_early_bridge(), ast_channel_make_compatible_helper(), ast_channel_queryoption(), ast_channel_sendhtml(), ast_channel_setoption(), ast_channel_supports_html(), ast_do_masquerade(), ast_hangup(), ast_indicate_data(), ast_jb_do_usecheck(), ast_pre_call(), ast_raw_answer(), ast_rtp_dtmf_compatible(), ast_rtp_instance_bridge(), ast_rtp_instance_early_bridge(), ast_rtp_instance_early_bridge_make_compatible(), ast_rtp_instance_make_compatible(), ast_send_image(), ast_senddigit(), ast_senddigit_begin(), ast_senddigit_end(), ast_sendtext(), ast_sipinfo_send(), ast_supports_images(), ast_transfer(), ast_var_channel_types_table(), ast_var_channels_table(), ast_write(), ast_write_video(), conf_run(), dahdi_setoption(), dahdiras_exec(), destroy_conference_bridge(), flash_exec(), func_channel_read(), func_channel_write_real(), func_header_read(), function_iaxpeer(), function_sipchaninfo_read(), handle_request_bye(), handle_showchan(), iax2_bridge(), iax2_prov_app(), misdn_facility_exec(), misdn_set_opt_exec(), my_get_sigpvt_bridged_channel(), park_call_full(), play_sound_helper(), remote_bridge_loop(), sendtext_exec(), serialize_showchan(), setup_env(), sip_acf_channel_read(), sip_cc_agent_init(), sip_dtmfmode(), sip_hangup(), softhangup_exec(), transfer_exec(), try_calling(), and update_bridge_vars().

00825 {
00826    return chan->tech;
00827 }

void* ast_channel_tech_pvt ( const struct ast_channel chan  ) 

Definition at line 680 of file channel_internal_api.c.

References ast_channel::tech_pvt.

Referenced by __analog_ss_thread(), __dahdi_exception(), acf_channel_read(), agent_bridgedchannel(), agent_call(), agent_digit_begin(), agent_digit_end(), agent_fixup(), agent_get_base_channel(), agent_hangup(), agent_indicate(), agent_read(), agent_sendhtml(), agent_sendtext(), agent_set_base_channel(), agent_start_monitoring(), agent_write(), alsa_fixup(), analog_hangup(), analog_ss_thread(), ast_channel_destructor(), ast_do_masquerade(), ast_generic_bridge(), ast_rtp_instance_bridge(), ast_sipinfo_send(), ast_udptl_bridge(), bridge_bridgedchannel(), bridge_call(), bridge_hangup(), bridge_write(), channel_to_session(), console_answer(), console_call(), console_fixup(), console_hangup(), console_indicate(), console_write(), dahdi_answer(), dahdi_bridge(), dahdi_call(), dahdi_callwait(), dahdi_digit_begin(), dahdi_digit_end(), dahdi_exception(), dahdi_fixup(), dahdi_func_read(), dahdi_func_write(), dahdi_handle_dtmf(), dahdi_handle_event(), dahdi_hangup(), dahdi_indicate(), dahdi_queryoption(), dahdi_read(), dahdi_sendtext(), dahdi_setoption(), dahdi_write(), dialog_unlink_all(), func_header_read(), function_iaxpeer(), function_sipchaninfo_read(), get_video_desc(), gtalk_answer(), gtalk_call(), gtalk_digit_begin(), gtalk_digit_end(), gtalk_fixup(), gtalk_get_codec(), gtalk_get_rtp_peer(), gtalk_hangup(), gtalk_read(), gtalk_sendtext(), gtalk_set_rtp_peer(), gtalk_write(), handle_enbloc_call_message(), handle_invite_replaces(), handle_offhook_message(), handle_request_bye(), handle_soft_key_event_message(), handle_stimulus_message(), handle_transfer_button(), iax2_answer(), iax2_bridge(), iax2_call(), iax2_digit_begin(), iax2_digit_end(), iax2_fixup(), iax2_hangup(), iax2_indicate(), iax2_prov_app(), iax2_queryoption(), iax2_sendhtml(), iax2_sendimage(), iax2_sendtext(), iax2_setoption(), iax2_transfer(), iax2_write(), jingle_answer(), jingle_call(), jingle_digit(), jingle_digit_begin(), jingle_digit_end(), jingle_fixup(), jingle_get_codec(), jingle_get_rtp_peer(), jingle_hangup(), jingle_indicate(), jingle_read(), jingle_sendtext(), jingle_set_rtp_peer(), jingle_write(), local_answer(), local_bridge_loop(), local_bridgedchannel(), local_call(), local_digit_begin(), local_digit_end(), local_fixup(), local_hangup(), local_indicate(), local_queryoption(), local_sendhtml(), local_sendtext(), local_setoption(), local_write(), manager_optimize_away(), mgcp_answer(), mgcp_call(), mgcp_fixup(), mgcp_get_codec(), mgcp_get_rtp_peer(), mgcp_hangup(), mgcp_indicate(), mgcp_read(), mgcp_senddigit_begin(), mgcp_senddigit_end(), mgcp_set_rtp_peer(), mgcp_ss(), mgcp_write(), multicast_rtp_call(), multicast_rtp_hangup(), multicast_rtp_write(), my_get_sigpvt_bridged_channel(), nbs_call(), nbs_hangup(), nbs_xread(), nbs_xwrite(), oh323_answer(), oh323_call(), oh323_digit_begin(), oh323_digit_end(), oh323_fixup(), oh323_get_rtp_peer(), oh323_hangup(), oh323_indicate(), oh323_read(), oh323_set_rtp_peer(), oh323_update_info(), oh323_write(), oss_answer(), oss_call(), oss_fixup(), oss_hangup(), oss_indicate(), oss_read(), oss_write(), phone_answer(), phone_call(), phone_digit_end(), phone_exception(), phone_fixup(), phone_hangup(), phone_indicate(), phone_read(), phone_send_text(), phone_setup(), phone_write(), remote_bridge_loop(), sip_acf_channel_read(), sip_allow_anyrtp_remote(), sip_answer(), sip_call(), sip_cc_agent_init(), sip_dtmfmode(), sip_fixup(), sip_get_callid(), sip_get_codec(), sip_get_rtp_peer(), sip_get_trtp_peer(), sip_get_udptl_peer(), sip_get_vrtp_peer(), sip_hangup(), sip_indicate(), sip_park_thread(), sip_queryoption(), sip_read(), sip_senddigit_begin(), sip_senddigit_end(), sip_sendhtml(), sip_sendtext(), sip_set_rtp_peer(), sip_set_udptl_peer(), sip_setoption(), sip_transfer(), sip_write(), skinny_answer(), skinny_call(), skinny_fixup(), skinny_get_rtp_peer(), skinny_get_vrtp_peer(), skinny_hangup(), skinny_indicate(), skinny_newcall(), skinny_read(), skinny_request(), skinny_set_rtp_peer(), skinny_ss(), skinny_write(), unistim_answer(), unistim_call(), unistim_fixup(), unistim_get_rtp_peer(), unistim_hangup(), unistim_indicate(), unistim_read(), unistim_ss(), and unistim_write().

00681 {
00682    return chan->tech_pvt;
00683 }

void ast_channel_tech_pvt_set ( struct ast_channel chan,
void *  value 
)

void ast_channel_tech_set ( struct ast_channel chan,
const struct ast_channel_tech value 
)

struct ast_timer* ast_channel_timer ( const struct ast_channel chan  )  [read]

Definition at line 792 of file channel_internal_api.c.

References ast_channel::timer.

Referenced by __ast_channel_alloc_ap(), __ast_queue_frame(), __ast_read(), ast_channel_destructor(), and ast_settimeout().

00793 {
00794    return chan->timer;
00795 }

void ast_channel_timer_set ( struct ast_channel chan,
struct ast_timer value 
)

Definition at line 796 of file channel_internal_api.c.

References ast_channel::timer.

Referenced by __ast_channel_alloc_ap().

00797 {
00798    chan->timer = value;
00799 }

void* ast_channel_timingdata ( const struct ast_channel chan  ) 

Definition at line 688 of file channel_internal_api.c.

References ast_channel::timingdata.

Referenced by __ast_read().

00689 {
00690    return chan->timingdata;
00691 }

void ast_channel_timingdata_set ( struct ast_channel chan,
void *  value 
)

Definition at line 692 of file channel_internal_api.c.

References ast_channel::timingdata.

Referenced by ast_settimeout().

00693 {
00694    chan->timingdata = value;
00695 }

int ast_channel_timingfd ( const struct ast_channel chan  ) 

void ast_channel_timingfd_set ( struct ast_channel chan,
int  value 
)

Definition at line 596 of file channel_internal_api.c.

References ast_channel::timingfd.

Referenced by __ast_channel_alloc_ap(), and ast_dummy_channel_alloc().

00597 {
00598    chan->timingfd = value;
00599 }

ast_timing_func_t ast_channel_timingfunc ( const struct ast_channel chan  ) 

void ast_channel_timingfunc_set ( struct ast_channel chan,
ast_timing_func_t  value 
)

Definition at line 1218 of file channel_internal_api.c.

References ast_channel::timingfunc.

Referenced by ast_settimeout().

01219 {
01220    chan->timingfunc = value;
01221 }

unsigned short ast_channel_transfercapability ( const struct ast_channel chan  ) 

void ast_channel_transfercapability_set ( struct ast_channel chan,
unsigned short  value 
)

struct varshead* ast_channel_varshead ( struct ast_channel chan  )  [read]

void ast_channel_varshead_set ( struct ast_channel chan,
struct varshead value 
)

Definition at line 1001 of file channel_internal_api.c.

References ast_channel::varshead.

01002 {
01003    chan->varshead = *value;
01004 }

int ast_channel_visible_indication ( const struct ast_channel chan  ) 

Definition at line 600 of file channel_internal_api.c.

References ast_channel::visible_indication.

Referenced by ast_bridge_call(), and ast_do_masquerade().

00601 {
00602    return chan->visible_indication;
00603 }

void ast_channel_visible_indication_set ( struct ast_channel chan,
int  value 
)

Definition at line 604 of file channel_internal_api.c.

References ast_channel::visible_indication.

Referenced by ast_indicate_data(), builtin_atxfer(), and dial_exec_full().

00605 {
00606    chan->visible_indication = value;
00607 }

struct ast_filestream* ast_channel_vstream ( const struct ast_channel chan  )  [read]

Definition at line 744 of file channel_internal_api.c.

References ast_channel::vstream.

Referenced by ast_hangup(), ast_openvstream(), ast_stopstream(), and filehelper().

00745 {
00746    return chan->vstream;
00747 }

void ast_channel_vstream_set ( struct ast_channel chan,
struct ast_filestream value 
)

Definition at line 748 of file channel_internal_api.c.

References ast_channel::vstream.

Referenced by ast_hangup(), ast_stopstream(), filehelper(), and filestream_close().

00749 {
00750    chan->vstream = value;
00751 }

int ast_channel_vstreamid ( const struct ast_channel chan  ) 

Definition at line 608 of file channel_internal_api.c.

References ast_channel::vstreamid.

Referenced by filestream_close().

00609 {
00610    return chan->vstreamid;
00611 }

void ast_channel_vstreamid_set ( struct ast_channel chan,
int  value 
)

Definition at line 612 of file channel_internal_api.c.

References ast_channel::vstreamid.

Referenced by ast_readvideo_callback(), and filestream_close().

00613 {
00614    chan->vstreamid = value;
00615 }

struct timeval* ast_channel_whentohangup ( struct ast_channel chan  )  [read]

void ast_channel_whentohangup_set ( struct ast_channel chan,
struct timeval *  value 
)

Definition at line 997 of file channel_internal_api.c.

References ast_channel::whentohangup.

Referenced by ast_channel_setwhentohangup_tv(), and dial_exec_full().

00998 {
00999    chan->whentohangup = *value;
01000 }

struct ast_format* ast_channel_writeformat ( struct ast_channel chan  )  [read]

Definition at line 897 of file channel_internal_api.c.

References ast_channel::writeformat.

Referenced by adsi_transmit_message_full(), agent_new(), agent_write(), alsa_new(), ast_async_goto(), ast_channel_bridge(), ast_channel_data_add_structure(), ast_channel_make_compatible_helper(), ast_channel_start_silence_generator(), ast_do_masquerade(), ast_iax2_new(), ast_openstream_full(), ast_read_generator_actions(), ast_set_write_format(), ast_set_write_format_by_id(), ast_set_write_format_from_cap(), ast_streamfile(), ast_write(), bridge_channel_join(), bridge_make_compatible(), bridge_request(), builtin_atxfer(), chanspy_exec(), check_goto_on_transfer(), console_new(), dahdi_new(), dahdiscan_exec(), do_bridge_masquerade(), do_notify(), extenspy_exec(), filehelper(), func_channel_read(), generator_force(), generic_fax_exec(), gtalk_new(), gtalk_rtp_read(), gtalk_show_channels(), gtalk_write(), handle_showchan(), iax2_request(), iax_park(), jingle_new(), jingle_read(), jingle_rtp_read(), jingle_show_channels(), jingle_write(), linear_alloc(), local_new(), login_exec(), masq_park_call(), mgcp_new(), mgcp_rtp_read(), mgcp_write(), misdn_new(), moh_alloc(), moh_files_alloc(), moh_files_write_format_change(), mp3_exec(), multicast_rtp_request(), multiplexed_bridge_join(), nbs_new(), NBScat_exec(), oss_new(), playtones_alloc(), process_sdp(), rec_request(), send_waveform_to_channel(), serialize_showchan(), simple_bridge_join(), sip_new(), sip_park(), sip_rtp_read(), sip_write(), skinny_new(), skinny_rtp_read(), skinny_write(), socket_process_helper(), start_rtp(), tonepair_alloc(), transmit_audio(), unistim_new(), unistim_rtp_read(), and unistim_write().

00898 {
00899    return &chan->writeformat;
00900 }

struct ast_trans_pvt* ast_channel_writetrans ( const struct ast_channel chan  )  [read]

Definition at line 816 of file channel_internal_api.c.

References ast_channel::writetrans.

Referenced by ast_channel_destructor(), ast_write(), free_translation(), handle_showchan(), and serialize_showchan().

00817 {
00818    return chan->writetrans;
00819 }

void ast_channel_writetrans_set ( struct ast_channel chan,
struct ast_trans_pvt value 
)

Definition at line 820 of file channel_internal_api.c.

References ast_channel::writetrans.

Referenced by free_translation().

00821 {
00822    chan->writetrans = value;
00823 }

struct ast_tone_zone* ast_channel_zone ( const struct ast_channel chan  )  [read]

void ast_channel_zone_set ( struct ast_channel chan,
struct ast_tone_zone value 
)

Definition at line 804 of file channel_internal_api.c.

References ast_channel::zone.

Referenced by ast_channel_destructor(), func_channel_write_real(), and sip_new().

00805 {
00806    chan->zone = value;
00807 }

AST_DATA_STRUCTURE ( ast_channel  ,
DATA_EXPORT_CHANNEL   
)

static void channel_data_add_flags ( struct ast_data tree,
struct ast_channel chan 
) [static]

Definition at line 244 of file channel_internal_api.c.

References ast_channel_flags(), ast_data_add_bool(), AST_FLAG_BLOCKING, AST_FLAG_BRIDGE_HANGUP_DONT, AST_FLAG_BRIDGE_HANGUP_RUN, AST_FLAG_DEFER_DTMF, AST_FLAG_DISABLE_WORKAROUNDS, AST_FLAG_EMULATE_DTMF, AST_FLAG_END_DTMF_ONLY, AST_FLAG_EXCEPTION, AST_FLAG_IN_AUTOLOOP, AST_FLAG_IN_DTMF, AST_FLAG_MASQ_NOSTREAM, AST_FLAG_MOH, AST_FLAG_NBRIDGE, AST_FLAG_OUTGOING, AST_FLAG_SPYING, AST_FLAG_WRITE_INT, AST_FLAG_ZOMBIE, and ast_test_flag.

Referenced by ast_channel_data_add_structure().

00246 {
00247    ast_data_add_bool(tree, "DEFER_DTMF", ast_test_flag(ast_channel_flags(chan), AST_FLAG_DEFER_DTMF));
00248    ast_data_add_bool(tree, "WRITE_INT", ast_test_flag(ast_channel_flags(chan), AST_FLAG_WRITE_INT));
00249    ast_data_add_bool(tree, "BLOCKING", ast_test_flag(ast_channel_flags(chan), AST_FLAG_BLOCKING));
00250    ast_data_add_bool(tree, "ZOMBIE", ast_test_flag(ast_channel_flags(chan), AST_FLAG_ZOMBIE));
00251    ast_data_add_bool(tree, "EXCEPTION", ast_test_flag(ast_channel_flags(chan), AST_FLAG_EXCEPTION));
00252    ast_data_add_bool(tree, "MOH", ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH));
00253    ast_data_add_bool(tree, "SPYING", ast_test_flag(ast_channel_flags(chan), AST_FLAG_SPYING));
00254    ast_data_add_bool(tree, "NBRIDGE", ast_test_flag(ast_channel_flags(chan), AST_FLAG_NBRIDGE));
00255    ast_data_add_bool(tree, "IN_AUTOLOOP", ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP));
00256    ast_data_add_bool(tree, "OUTGOING", ast_test_flag(ast_channel_flags(chan), AST_FLAG_OUTGOING));
00257    ast_data_add_bool(tree, "IN_DTMF", ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_DTMF));
00258    ast_data_add_bool(tree, "EMULATE_DTMF", ast_test_flag(ast_channel_flags(chan), AST_FLAG_EMULATE_DTMF));
00259    ast_data_add_bool(tree, "END_DTMF_ONLY", ast_test_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY));
00260    ast_data_add_bool(tree, "MASQ_NOSTREAM", ast_test_flag(ast_channel_flags(chan), AST_FLAG_MASQ_NOSTREAM));
00261    ast_data_add_bool(tree, "BRIDGE_HANGUP_RUN", ast_test_flag(ast_channel_flags(chan), AST_FLAG_BRIDGE_HANGUP_RUN));
00262    ast_data_add_bool(tree, "BRIDGE_HANGUP_DONT", ast_test_flag(ast_channel_flags(chan), AST_FLAG_BRIDGE_HANGUP_DONT));
00263    ast_data_add_bool(tree, "DISABLE_WORKAROUNDS", ast_test_flag(ast_channel_flags(chan), AST_FLAG_DISABLE_WORKAROUNDS));
00264 }

static int collect_names_cb ( void *  obj,
void *  arg,
int  flags 
) [static]

Definition at line 1246 of file channel_internal_api.c.

References ast_str_append(), ast_str_strlen(), ast_control_pvt_cause_code::chan_name, and str.

Referenced by ast_channel_dialed_causes_channels().

01246                                                              {
01247    struct ast_control_pvt_cause_code *cause_code = obj;
01248    struct ast_str **str = arg;
01249 
01250    ast_str_append(str, 0, "%s%s", (ast_str_strlen(*str) ? "," : ""), cause_code->chan_name);
01251 
01252    return 0;
01253 }

DEFINE_STRINGFIELD_GETTER_FOR ( dialcontext   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( hangupsource   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( parkinglot   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( linkedid   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( uniqueid   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( call_forward   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( userfield   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( peeraccount   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( accountcode   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( musicclass   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( language   ) 

DEFINE_STRINGFIELD_GETTER_FOR ( name   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( dialcontext   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( hangupsource   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( parkinglot   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( uniqueid   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( call_forward   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( userfield   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( peeraccount   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( accountcode   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( musicclass   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( language   ) 

DEFINE_STRINGFIELD_SETTERS_FOR ( name   ) 

static int pvt_cause_cmp_fn ( void *  obj,
void *  vstr,
int  flags 
) [static]

Definition at line 1302 of file channel_internal_api.c.

References ast_strdupa, ast_tech_to_upper(), ast_control_pvt_cause_code::chan_name, CMP_MATCH, CMP_STOP, and str.

Referenced by __ast_channel_internal_alloc().

01303 {
01304    struct ast_control_pvt_cause_code *pc = obj;
01305    char *str = ast_tech_to_upper(ast_strdupa(vstr));
01306    char *pc_str = ast_tech_to_upper(ast_strdupa(pc->chan_name));
01307    return !strcmp(pc_str, str) ? CMP_MATCH | CMP_STOP : 0;
01308 }

static int pvt_cause_hash_fn ( const void *  vpc,
const int  flags 
) [static]

Definition at line 1295 of file channel_internal_api.c.

References ast_str_hash(), ast_strdupa, ast_tech_to_upper(), and ast_control_pvt_cause_code::chan_name.

Referenced by __ast_channel_internal_alloc().

01296 {
01297    const struct ast_control_pvt_cause_code *pc = vpc;
01298    return ast_str_hash(ast_tech_to_upper(ast_strdupa(pc->chan_name)));
01299 }


Generated on Thu Oct 11 06:35:31 2012 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6