Asterisk - The Open Source Telephony Project
21.4.1
|
Channel Accessor API. More...
#include "asterisk.h"
#include <unistd.h>
#include <fcntl.h>
#include "asterisk/alertpipe.h"
#include "asterisk/paths.h"
#include "asterisk/channel.h"
#include "asterisk/channel_internal.h"
#include "asterisk/endpoints.h"
#include "asterisk/indications.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/stasis_endpoints.h"
#include "asterisk/stringfields.h"
#include "asterisk/stream.h"
#include "asterisk/test.h"
#include "asterisk/vector.h"
Go to the source code of this file.
Data Structures | |
struct | ast_channel |
Main Channel structure associated with a channel. More... | |
struct | ast_channel_id |
Channel UniqueId structure. More... | |
Functions | |
struct ast_channel * | __ast_channel_internal_alloc (void(*destructor)(void *obj), const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *file, int line, const char *function) |
static void | __init_channel_errno (void) |
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) |
enum ama_flags | ast_channel_amaflags (const struct ast_channel *chan) |
void | ast_channel_amaflags_set (struct ast_channel *chan, enum ama_flags value) |
struct timeval | ast_channel_answertime (struct ast_channel *chan) |
void | ast_channel_answertime_set (struct ast_channel *chan, struct timeval *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) |
void | ast_channel_audiohooks_set (struct ast_channel *chan, struct ast_audiohook_list *value) |
struct ast_autochan_list * | ast_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) |
int | ast_channel_blocker_tid (const struct ast_channel *chan) |
void | ast_channel_blocker_tid_set (struct ast_channel *chan, int 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_caller * | ast_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) |
ast_callid | ast_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, ast_callid callid) |
struct ast_cdr * | ast_channel_cdr (const struct ast_channel *chan) |
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) |
struct ast_party_id | ast_channel_connected_effective_id (struct ast_channel *chan) |
struct ast_party_connected_line * | ast_channel_connected_indicated (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) |
void | ast_channel_data_set (struct ast_channel *chan, const char *value) |
struct ast_datastore_list * | ast_channel_datastores (struct ast_channel *chan) |
struct ast_party_dialed * | ast_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. More... | |
struct ast_str * | ast_channel_dialed_causes_channels (const struct ast_channel *chan) |
Retrieve a comma-separated list of channels for which dialed cause information is available. More... | |
void | ast_channel_dialed_causes_clear (const struct ast_channel *chan) |
Clear all cause information from the channel. More... | |
struct ast_control_pvt_cause_code * | ast_channel_dialed_causes_find (const struct ast_channel *chan, const char *chan_name) |
Retrieve a ref-counted cause code information structure. More... | |
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_frame * | ast_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_add (struct ast_channel *chan, int value) |
Add a file descriptor to the channel without a fixed position. More... | |
int | ast_channel_fd_count (const struct ast_channel *chan) |
Retrieve the number of file decriptor positions present on the channel. More... | |
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_flags * | ast_channel_flags (struct ast_channel *chan) |
int | ast_channel_forward_endpoint (struct ast_channel *chan, struct ast_endpoint *endpoint) |
Forward channel stasis messages to the given endpoint. More... | |
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_list * | ast_channel_framehooks (const struct ast_channel *chan) |
void | ast_channel_framehooks_set (struct ast_channel *chan, struct ast_framehook_list *value) |
struct ast_generator * | ast_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_stream * | ast_channel_get_default_stream (struct ast_channel *chan, enum ast_media_type type) |
Retrieve the default stream of a specific media type on a channel. More... | |
struct ast_stream_topology * | ast_channel_get_stream_topology (const struct ast_channel *chan) |
Retrieve the topology of streams on a channel. More... | |
void * | ast_channel_get_stream_topology_change_source (struct ast_channel *chan) |
Retrieve the source that initiated the last stream topology change. More... | |
struct ast_hangup_handler_list * | ast_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) |
int | ast_channel_hold_state (const struct ast_channel *chan) |
void | ast_channel_hold_state_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_flush (struct ast_channel *chan) |
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. More... | |
struct ast_bridge * | ast_channel_internal_bridge (const struct ast_channel *chan) |
struct ast_bridge_channel * | ast_channel_internal_bridge_channel (const struct ast_channel *chan) |
void | ast_channel_internal_bridge_channel_set (struct ast_channel *chan, struct ast_bridge_channel *value) |
void | ast_channel_internal_bridge_set (struct ast_channel *chan, struct ast_bridge *value) |
void | ast_channel_internal_cleanup (struct ast_channel *chan) |
void | ast_channel_internal_copy_linkedid (struct ast_channel *dest, struct ast_channel *source) |
Copy the full linkedid channel id structure from one channel to another. More... | |
enum ast_channel_error | ast_channel_internal_errno (void) |
void | ast_channel_internal_errno_set (enum ast_channel_error error) |
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_channel * | ast_channel_internal_oldest_linkedid (struct ast_channel *a, struct ast_channel *b) |
Determine which channel has an older linkedid. More... | |
void | ast_channel_internal_set_fake_ids (struct ast_channel *chan, const char *uniqueid, const char *linkedid) |
Set uniqueid and linkedid string value only (not time) More... | |
void | ast_channel_internal_set_stream_topology (struct ast_channel *chan, struct ast_stream_topology *topology) |
void | ast_channel_internal_set_stream_topology_change_source (struct ast_channel *chan, void *change_source) |
int | ast_channel_internal_setup_topics (struct ast_channel *chan) |
void | ast_channel_internal_swap_endpoint_forward (struct ast_channel *a, struct ast_channel *b) |
Swap endpoint_forward between two channels. More... | |
void | ast_channel_internal_swap_snapshots (struct ast_channel *a, struct ast_channel *b) |
Swap snapshots beteween two channels. More... | |
void | ast_channel_internal_swap_stream_topology (struct ast_channel *chan1, struct ast_channel *chan2) |
void | ast_channel_internal_swap_topics (struct ast_channel *a, struct ast_channel *b) |
Swap topics beteween two channels. More... | |
void | ast_channel_internal_swap_uniqueid_and_linkedid (struct ast_channel *a, struct ast_channel *b) |
Swap uniqueid and linkedid beteween two channels. More... | |
int | ast_channel_is_multistream (struct ast_channel *chan) |
Determine if a channel is multi-stream capable. More... | |
int | ast_channel_is_t38_active (struct ast_channel *chan) |
This function will check if T.38 is active on the channel. More... | |
int | ast_channel_is_t38_active_nolock (struct ast_channel *chan) |
ast_channel_is_t38_active variant. Use this if the channel is already locked prior to calling. More... | |
struct ast_jb * | ast_channel_jb (struct ast_channel *chan) |
void | ast_channel_jb_set (struct ast_channel *chan, struct ast_jb *value) |
const char * | ast_channel_lastcontext (const struct ast_channel *chan) |
const char * | ast_channel_lastexten (const struct ast_channel *chan) |
const char * | ast_channel_linkedid (const struct ast_channel *chan) |
struct ast_channel * | ast_channel_masq (const struct ast_channel *chan) |
void | ast_channel_masq_set (struct ast_channel *chan, struct ast_channel *value) |
struct ast_channel * | ast_channel_masqr (const struct ast_channel *chan) |
void | ast_channel_masqr_set (struct ast_channel *chan, struct ast_channel *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_cap * | ast_channel_nativeformats (const struct ast_channel *chan) |
void | ast_channel_nativeformats_set (struct ast_channel *chan, struct ast_format_cap *value) |
struct ast_format * | ast_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_pbx * | ast_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_format * | ast_channel_rawreadformat (struct ast_channel *chan) |
struct ast_format * | ast_channel_rawwriteformat (struct ast_channel *chan) |
struct ast_format * | ast_channel_readformat (struct ast_channel *chan) |
struct ast_readq_list * | ast_channel_readq (struct ast_channel *chan) |
struct ast_trans_pvt * | ast_channel_readtrans (const struct ast_channel *chan) |
void | ast_channel_readtrans_set (struct ast_channel *chan, struct ast_trans_pvt *value) |
struct ast_party_redirecting * | ast_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_context * | ast_channel_sched (const struct ast_channel *chan) |
void | ast_channel_sched_set (struct ast_channel *chan, struct ast_sched_context *value) |
char | ast_channel_sending_dtmf_digit (const struct ast_channel *chan) |
void | ast_channel_sending_dtmf_digit_set (struct ast_channel *chan, char value) |
struct timeval | ast_channel_sending_dtmf_tv (const struct ast_channel *chan) |
void | ast_channel_sending_dtmf_tv_set (struct ast_channel *chan, struct timeval value) |
void | ast_channel_set_is_t38_active (struct ast_channel *chan, int is_t38_active) |
Sets the is_t38_active flag. More... | |
void | ast_channel_set_is_t38_active_nolock (struct ast_channel *chan, int is_t38_active) |
Variant of ast_channel_set_is_t38_active. Use this if the channel is already locked prior to calling. More... | |
void | ast_channel_set_oldwriteformat (struct ast_channel *chan, struct ast_format *format) |
void | ast_channel_set_rawreadformat (struct ast_channel *chan, struct ast_format *format) |
void | ast_channel_set_rawwriteformat (struct ast_channel *chan, struct ast_format *format) |
void | ast_channel_set_readformat (struct ast_channel *chan, struct ast_format *format) |
struct ast_stream_topology * | ast_channel_set_stream_topology (struct ast_channel *chan, struct ast_stream_topology *topology) |
Set the topology of streams on a channel. More... | |
void | ast_channel_set_unbridged (struct ast_channel *chan, int value) |
Sets the unbridged flag and queues a NULL frame on the channel to trigger a check by bridge_channel_wait. More... | |
void | ast_channel_set_unbridged_nolock (struct ast_channel *chan, int value) |
Variant of ast_channel_set_unbridged. Use this if the channel is already locked prior to calling. More... | |
void | ast_channel_set_writeformat (struct ast_channel *chan, struct ast_format *format) |
struct ast_channel_snapshot * | ast_channel_snapshot (const struct ast_channel *chan) |
struct ast_flags * | ast_channel_snapshot_segment_flags (struct ast_channel *chan) |
void | ast_channel_snapshot_set (struct ast_channel *chan, struct ast_channel_snapshot *snapshot) |
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_filestream * | ast_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) |
const struct ast_channel_tech * | ast_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_timer * | ast_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) |
struct stasis_topic * | ast_channel_topic (struct ast_channel *chan) |
A topic which publishes the events for a particular channel. More... | |
unsigned short | ast_channel_transfercapability (const struct ast_channel *chan) |
void | ast_channel_transfercapability_set (struct ast_channel *chan, unsigned short value) |
int | ast_channel_unbridged (struct ast_channel *chan) |
This function will check if the bridge needs to be re-evaluated due to external changes. More... | |
int | ast_channel_unbridged_nolock (struct ast_channel *chan) |
ast_channel_unbridged variant. Use this if the channel is already locked prior to calling. More... | |
const char * | ast_channel_uniqueid (const struct ast_channel *chan) |
struct varshead * | ast_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_filestream * | ast_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_format * | ast_channel_writeformat (struct ast_channel *chan) |
struct ast_trans_pvt * | ast_channel_writetrans (const struct ast_channel *chan) |
void | ast_channel_writetrans_set (struct ast_channel *chan, struct ast_trans_pvt *value) |
struct ast_tone_zone * | ast_channel_zone (const struct ast_channel *chan) |
void | ast_channel_zone_set (struct ast_channel *chan, struct ast_tone_zone *value) |
static void | channel_set_default_streams (struct ast_channel *chan) |
static int | collect_names_cb (void *obj, void *arg, int flags) |
DEFINE_STRINGFIELD_GETTER_FOR (name) | |
DEFINE_STRINGFIELD_GETTER_FOR (language) | |
DEFINE_STRINGFIELD_GETTER_FOR (musicclass) | |
DEFINE_STRINGFIELD_GETTER_FOR (latest_musicclass) | |
DEFINE_STRINGFIELD_GETTER_FOR (accountcode) | |
DEFINE_STRINGFIELD_GETTER_FOR (peeraccount) | |
DEFINE_STRINGFIELD_GETTER_FOR (userfield) | |
DEFINE_STRINGFIELD_GETTER_FOR (call_forward) | |
DEFINE_STRINGFIELD_GETTER_FOR (parkinglot) | |
DEFINE_STRINGFIELD_GETTER_FOR (hangupsource) | |
DEFINE_STRINGFIELD_GETTER_FOR (dialcontext) | |
DEFINE_STRINGFIELD_SETTERS_AND_INVALIDATE_FOR (name, 0, 1, AST_CHANNEL_SNAPSHOT_INVALIDATE_BASE) | |
DEFINE_STRINGFIELD_SETTERS_AND_INVALIDATE_FOR (language, 1, 0, AST_CHANNEL_SNAPSHOT_INVALIDATE_BASE) | |
DEFINE_STRINGFIELD_SETTERS_AND_INVALIDATE_FOR (accountcode, 1, 0, AST_CHANNEL_SNAPSHOT_INVALIDATE_BASE) | |
DEFINE_STRINGFIELD_SETTERS_AND_INVALIDATE_FOR (peeraccount, 1, 0, AST_CHANNEL_SNAPSHOT_INVALIDATE_PEER) | |
DEFINE_STRINGFIELD_SETTERS_AND_INVALIDATE_FOR (userfield, 0, 0, AST_CHANNEL_SNAPSHOT_INVALIDATE_BASE) | |
DEFINE_STRINGFIELD_SETTERS_AND_INVALIDATE_FOR (hangupsource, 0, 0, AST_CHANNEL_SNAPSHOT_INVALIDATE_HANGUP) | |
DEFINE_STRINGFIELD_SETTERS_FOR (musicclass, 0) | |
DEFINE_STRINGFIELD_SETTERS_FOR (latest_musicclass, 0) | |
DEFINE_STRINGFIELD_SETTERS_FOR (call_forward, 0) | |
DEFINE_STRINGFIELD_SETTERS_FOR (parkinglot, 0) | |
DEFINE_STRINGFIELD_SETTERS_FOR (dialcontext, 0) | |
static int | pvt_cause_cmp_fn (void *obj, void *vstr, int flags) |
Comparison function for pvt cause code frames. | |
static int | pvt_cause_hash_fn (const void *vpc, const int flags) |
Hash function for pvt cause code frames. | |
Variables | |
static struct ast_threadstorage | channel_errno = { .once = PTHREAD_ONCE_INIT , .key_init = __init_channel_errno , .custom_init = NULL , } |
static int | uniqueint |
The monotonically increasing integer counter for channel uniqueids. | |
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.
Definition in file channel_internal_api.c.
#define DEFINE_STRINGFIELD_GETTER_FOR | ( | field | ) |
Definition at line 286 of file channel_internal_api.c.
void ast_channel_amaflags_set | ( | struct ast_channel * | chan, |
enum ama_flags | value | ||
) |
Definition at line 409 of file channel_internal_api.c.
References ast_channel::amaflags, and ast_channel_publish_snapshot().
Referenced by __ast_channel_alloc_ap(), ast_cel_fabricate_channel_from_event(), and ast_iax2_new().
void ast_channel_callgroup_set | ( | struct ast_channel * | chan, |
ast_group_t | value | ||
) |
Definition at line 1063 of file channel_internal_api.c.
References ast_channel::callgroup.
Referenced by chan_pjsip_new(), jingle_new(), and unistim_new().
void ast_channel_callid_set | ( | struct ast_channel * | chan, |
ast_callid | value | ||
) |
Definition at line 782 of file channel_internal_api.c.
References ast_callid_strnprint(), ast_debug, ast_test_suite_event_notify, and ast_channel::callid.
Referenced by __ast_pbx_run(), ast_iax2_new(), ast_unreal_channel_push_to_bridge(), ast_unreal_new_channels(), and jingle_new().
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.
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.
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 |
0 | on success |
-1 | on error |
Definition at line 1278 of file channel_internal_api.c.
References 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().
struct ast_str* ast_channel_dialed_causes_channels | ( | const struct ast_channel * | chan | ) |
Retrieve a comma-separated list of channels for which dialed cause information is available.
This function makes use of datastore operations on the channel, so it is important to lock the channel before calling this function.
chan | The channel from which to retrieve information |
NULL | on allocation failure |
Pointer | to an ast_str object containing the desired information which must be freed |
Definition at line 1260 of file channel_internal_api.c.
References ao2_callback, ast_str_create, and ast_channel::dialed_causes.
void ast_channel_dialed_causes_clear | ( | const struct ast_channel * | chan | ) |
Clear all cause information from the channel.
This function makes use of datastore operations on the channel, so it is important to lock the channel before calling this function.
chan | The channel from which to clear information |
Definition at line 1294 of file channel_internal_api.c.
References ao2_callback, ast_channel::dialed_causes, OBJ_MULTIPLE, OBJ_NODATA, and OBJ_UNLINK.
struct ast_control_pvt_cause_code* ast_channel_dialed_causes_find | ( | const struct ast_channel * | chan, |
const char * | chan_name | ||
) |
Retrieve a ref-counted cause code information structure.
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.
chan | The channel from which to retrieve information |
chan_name | The name of the channel about which to retrieve information |
NULL | on search failure |
Pointer | to a ref-counted ast_control_pvt_cause_code object containing the desired information |
Definition at line 1273 of file channel_internal_api.c.
References ast_channel::dialed_causes, and OBJ_KEY.
Referenced by hangupcause_read().
int ast_channel_fd_add | ( | struct ast_channel * | chan, |
int | value | ||
) |
Add a file descriptor to the channel without a fixed position.
chan | The channel to add the file descriptor to |
value | The file descriptor |
Definition at line 1185 of file channel_internal_api.c.
References AST_EXTENDED_FDS, AST_VECTOR_REPLACE, and ast_channel::fds.
int ast_channel_fd_count | ( | const struct ast_channel * | chan | ) |
Retrieve the number of file decriptor positions present on the channel.
chan | The channel to get the count of |
Definition at line 1180 of file channel_internal_api.c.
References AST_VECTOR_SIZE, and ast_channel::fds.
Referenced by ast_waitfor_nandfds(), and channel_do_masquerade().
int ast_channel_forward_endpoint | ( | struct ast_channel * | chan, |
struct ast_endpoint * | endpoint | ||
) |
Forward channel stasis messages to the given endpoint.
chan | The channel to forward from |
endpoint | The endpoint to forward to |
0 | Success |
non-zero | Failure |
Definition at line 1497 of file channel_internal_api.c.
References ast_channel_topic(), ast_endpoint_topic(), ast_channel::endpoint_forward, and stasis_forward_all().
Referenced by ast_endpoint_add_channel().
struct ast_stream* ast_channel_get_default_stream | ( | struct ast_channel * | chan, |
enum ast_media_type | type | ||
) |
Retrieve the default stream of a specific media type on a channel.
chan | The channel to get the stream from |
type | The media type of the default stream |
non-NULL | success |
NULL | failure |
Definition at line 1605 of file channel_internal_api.c.
References ast_channel::default_streams, and ast_stream::type.
Referenced by __ast_read(), ast_unreal_write_stream(), and ast_write_stream().
struct ast_stream_topology* ast_channel_get_stream_topology | ( | const struct ast_channel * | chan | ) |
Retrieve the topology of streams on a channel.
chan | The channel to get the stream topology of |
non-NULL | success |
NULL | failure |
Definition at line 1569 of file channel_internal_api.c.
References ast_channel::stream_topology.
Referenced by __ast_read(), ast_bridge_channel_stream_map(), ast_channel_request_stream_topology_change(), ast_unreal_indicate(), ast_write_stream(), dial_exec_full(), do_forward(), handle_showchan(), map_source_to_destinations(), native_rtp_bridge_join(), sfu_topologies_on_join(), and softmix_bridge_stream_topology_changed().
void* ast_channel_get_stream_topology_change_source | ( | struct ast_channel * | chan | ) |
Retrieve the source that initiated the last stream topology change.
chan | The channel |
The | channel's stream topology change source |
Definition at line 657 of file channel_internal_api.c.
References ast_channel::stream_topology_change_source.
void ast_channel_internal_alertpipe_swap | ( | struct ast_channel * | chan1, |
struct ast_channel * | chan2 | ||
) |
Swap the interal alertpipe between two channels.
Definition at line 1140 of file channel_internal_api.c.
Referenced by channel_do_masquerade().
void ast_channel_internal_bridge_set | ( | struct ast_channel * | chan, |
struct ast_bridge * | value | ||
) |
Definition at line 1229 of file channel_internal_api.c.
References ast_channel_publish_snapshot(), AST_CHANNEL_SNAPSHOT_INVALIDATE_BRIDGE, ast_channel_snapshot_invalidate_segment(), and ast_channel::bridge.
void ast_channel_internal_copy_linkedid | ( | struct ast_channel * | dest, |
struct ast_channel * | source | ||
) |
Copy the full linkedid channel id structure from one channel to another.
dest | Destination to copy linkedid to |
source | Source channel to copy linkedid from |
Definition at line 1390 of file channel_internal_api.c.
References ast_channel_publish_snapshot(), AST_CHANNEL_SNAPSHOT_INVALIDATE_PEER, ast_channel_snapshot_invalidate_segment(), ast_channel_id::creation_time, ast_channel_id::creation_unique, ast_channel::linkedid, and ast_channel_id::unique_id.
struct ast_channel* ast_channel_internal_oldest_linkedid | ( | struct ast_channel * | a, |
struct ast_channel * | b | ||
) |
Determine which channel has an older linkedid.
a | First channel |
b | Second channel |
Definition at line 1373 of file channel_internal_api.c.
References ast_channel_id::creation_time, ast_channel_id::creation_unique, and ast_channel::linkedid.
void ast_channel_internal_set_fake_ids | ( | struct ast_channel * | chan, |
const char * | uniqueid, | ||
const char * | linkedid | ||
) |
Set uniqueid and linkedid string value only (not time)
chan | The channel to set the uniqueid to |
uniqueid | The uniqueid to set |
linkedid | The linkedid to set |
Definition at line 1451 of file channel_internal_api.c.
References ast_copy_string(), ast_channel::linkedid, ast_channel_id::unique_id, and ast_channel::uniqueid.
Referenced by ast_cel_fabricate_channel_from_event().
void ast_channel_internal_swap_endpoint_forward | ( | struct ast_channel * | a, |
struct ast_channel * | b | ||
) |
Swap endpoint_forward between two channels.
a | First channel |
b | Second channel |
Definition at line 1433 of file channel_internal_api.c.
References ast_channel::endpoint_forward.
Referenced by channel_do_masquerade().
void ast_channel_internal_swap_snapshots | ( | struct ast_channel * | a, |
struct ast_channel * | b | ||
) |
Swap snapshots beteween two channels.
a | First channel |
b | Second channel |
Definition at line 1442 of file channel_internal_api.c.
References ast_channel::snapshot.
Referenced by channel_do_masquerade().
void ast_channel_internal_swap_topics | ( | struct ast_channel * | a, |
struct ast_channel * | b | ||
) |
Swap topics beteween two channels.
a | First channel |
b | Second channel |
Definition at line 1419 of file channel_internal_api.c.
References ast_channel::channel_forward, and ast_channel::topic.
Referenced by channel_do_masquerade().
void ast_channel_internal_swap_uniqueid_and_linkedid | ( | struct ast_channel * | a, |
struct ast_channel * | b | ||
) |
Swap uniqueid and linkedid beteween two channels.
a | First channel |
b | Second channel |
Definition at line 1402 of file channel_internal_api.c.
References ast_channel::linkedid, and ast_channel::uniqueid.
Referenced by channel_do_masquerade().
int ast_channel_is_multistream | ( | struct ast_channel * | chan | ) |
Determine if a channel is multi-stream capable.
chan | The channel to test |
true | if the channel is multi-stream capable. |
Definition at line 1629 of file channel_internal_api.c.
References ast_channel_tech::read_stream, ast_channel::tech, and ast_channel_tech::write_stream.
Referenced by ast_channel_request_stream_topology_change(), ast_channel_set_stream_topology(), ast_channel_stream_topology_changed(), ast_channel_stream_topology_changed_externally(), ast_unreal_indicate(), and ast_unreal_new_channels().
int ast_channel_is_t38_active | ( | struct ast_channel * | chan | ) |
This function will check if T.38 is active on the channel.
chan | Channel on which to check the unbridge_eval flag |
Definition at line 1031 of file channel_internal_api.c.
References ast_channel_is_t38_active_nolock().
int ast_channel_is_t38_active_nolock | ( | struct ast_channel * | chan | ) |
ast_channel_is_t38_active variant. Use this if the channel is already locked prior to calling.
chan | Channel on which to check the is_t38_active flag |
Definition at line 1026 of file channel_internal_api.c.
References ast_channel::is_t38_active.
Referenced by ast_channel_is_t38_active().
void ast_channel_pickupgroup_set | ( | struct ast_channel * | chan, |
ast_group_t | value | ||
) |
Definition at line 1071 of file channel_internal_api.c.
References ast_channel::pickupgroup.
Referenced by chan_pjsip_new(), jingle_new(), and unistim_new().
void ast_channel_set_is_t38_active | ( | struct ast_channel * | chan, |
int | is_t38_active | ||
) |
Sets the is_t38_active flag.
chan | Which channel is having its is_t38_active value set |
is_t38_active | Non-zero if T.38 is active |
Definition at line 1046 of file channel_internal_api.c.
References ast_channel_set_is_t38_active_nolock().
void ast_channel_set_is_t38_active_nolock | ( | struct ast_channel * | chan, |
int | is_t38_active | ||
) |
Variant of ast_channel_set_is_t38_active. Use this if the channel is already locked prior to calling.
chan | Which channel is having its is_t38_active value set |
is_t38_active | Non-zero if T.38 is active |
Definition at line 1041 of file channel_internal_api.c.
References ast_channel::is_t38_active.
Referenced by ast_channel_set_is_t38_active(), and indicate_data_internal().
struct ast_stream_topology* ast_channel_set_stream_topology | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology | ||
) |
Set the topology of streams on a channel.
chan | The channel to set the stream topology on |
topology | The stream topology to set |
non-NULL | Success |
NULL | failure |
Definition at line 1577 of file channel_internal_api.c.
References ast_channel_is_multistream(), ast_str_tmp, ast_stream_topology_alloc(), and ast_stream_topology_to_str().
Referenced by ast_unreal_indicate(), ast_unreal_new_channels(), and chan_pjsip_new().
void ast_channel_set_unbridged | ( | struct ast_channel * | chan, |
int | value | ||
) |
Sets the unbridged flag and queues a NULL frame on the channel to trigger a check by bridge_channel_wait.
chan | Which channel is having its unbridged value set |
value | What the unbridge value is being set to |
Definition at line 1019 of file channel_internal_api.c.
References ast_channel_set_unbridged_nolock().
Referenced by ast_bridge_setup_after_goto(), and t38_change_state().
void ast_channel_set_unbridged_nolock | ( | struct ast_channel * | chan, |
int | value | ||
) |
Variant of ast_channel_set_unbridged. Use this if the channel is already locked prior to calling.
chan | Which channel is having its unbridged value set |
value | What the unbridge value is being set to |
Definition at line 1013 of file channel_internal_api.c.
References ast_null_frame, ast_queue_frame(), and ast_channel::unbridged.
Referenced by ast_audiohook_attach(), ast_audiohook_remove(), ast_channel_set_unbridged(), ast_framehook_attach(), ast_framehook_detach(), ast_framehook_list_fixup(), audio_audiohook_write_list(), chan_pjsip_read_stream(), and dtmf_audiohook_write_list().
struct stasis_topic* ast_channel_topic | ( | struct ast_channel * | chan | ) |
A topic which publishes the events for a particular channel.
NULL
, ast_channel_topic_all() is returned.chan | Channel, or NULL . |
Topic | for channel's events. |
ast_channel_topic_all() | if chan is NULL . |
Definition at line 1488 of file channel_internal_api.c.
References ast_channel_topic_all(), and ast_channel::topic.
Referenced by ast_ari_bridges_record(), ast_channel_forward_endpoint(), ast_channel_publish_blob(), ast_channel_publish_cached_blob(), ast_channel_publish_final_snapshot(), ast_channel_publish_snapshot(), ast_multi_object_blob_single_channel_publish(), forwards_create_channel(), local_optimization_finished_cb(), local_optimization_started_cb(), manager_mute_mixmonitor(), report_fax_status(), report_receive_fax_status(), report_send_fax_status(), and stasis_app_control_publish().
int ast_channel_unbridged | ( | struct ast_channel * | chan | ) |
This function will check if the bridge needs to be re-evaluated due to external changes.
chan | Channel on which to check the unbridge_eval flag |
Definition at line 1004 of file channel_internal_api.c.
References ast_channel_unbridged_nolock().
Referenced by ast_channel_is_leaving_bridge().
int ast_channel_unbridged_nolock | ( | struct ast_channel * | chan | ) |
ast_channel_unbridged variant. Use this if the channel is already locked prior to calling.
chan | Channel on which to check the unbridge flag |
Definition at line 999 of file channel_internal_api.c.
References ast_channel::unbridged.
Referenced by ast_channel_unbridged().
void ast_channel_whentohangup_set | ( | struct ast_channel * | chan, |
struct timeval * | value | ||
) |
Definition at line 953 of file channel_internal_api.c.
References ast_channel::whentohangup.
Referenced by ast_channel_setwhentohangup_tv(), and dial_exec_full().