Asterisk - The Open Source Telephony Project
21.4.1
|
General Asterisk PBX channel definitions. More...
#include "asterisk/alertpipe.h"
#include "asterisk/abstract_jb.h"
#include "asterisk/astobj2.h"
#include "asterisk/poll-compat.h"
#include "asterisk/frame.h"
#include "asterisk/chanvars.h"
#include "asterisk/config.h"
#include "asterisk/lock.h"
#include "asterisk/cdr.h"
#include "asterisk/utils.h"
#include "asterisk/linkedlists.h"
#include "asterisk/stringfields.h"
#include "asterisk/datastore.h"
#include "asterisk/format_cap.h"
#include "asterisk/channelstate.h"
#include "asterisk/ccss.h"
#include "asterisk/framehook.h"
#include "asterisk/stasis.h"
#include "asterisk/endpoints.h"
Go to the source code of this file.
Data Structures | |
struct | ast_assigned_ids |
Structure to pass both assignedid values to channel drivers. More... | |
struct | ast_autochan_list |
struct | ast_bridge_config |
bridge configuration More... | |
struct | ast_chan_write_info_t |
Structure to handle passing func_channel_write info to channels via setoption. More... | |
struct | ast_channel_tech |
Structure to describe a channel "technology", ie a channel driver See for examples: More... | |
struct | ast_datastore_list |
struct | ast_generator |
struct | ast_group_info |
channel group info More... | |
struct | ast_hangup_handler |
struct | ast_hangup_handler_list |
struct | ast_party_caller |
Caller Party information. More... | |
struct | ast_party_connected_line |
Connected Line/Party information. More... | |
struct | ast_party_dialed |
Dialed/Called Party information. More... | |
struct | ast_party_id |
Information needed to identify an endpoint in a call. More... | |
struct | ast_party_name |
Information needed to specify a name in a call. More... | |
struct | ast_party_number |
Information needed to specify a number in a call. More... | |
struct | ast_party_redirecting |
Redirecting Line information. RDNIS (Redirecting Directory Number Information Service) Where a call diversion or transfer was invoked. More... | |
struct | ast_party_redirecting_reason |
Redirecting reason information. More... | |
struct | ast_party_subaddress |
Information needed to specify a subaddress in a call. More... | |
struct | ast_readq_list |
struct | ast_set_party_caller |
Indicate what information in ast_party_caller should be set. More... | |
struct | ast_set_party_connected_line |
Indicate what information in ast_party_connected_line should be set. More... | |
struct | ast_set_party_id |
Indicate what information in ast_party_id should be set. More... | |
struct | ast_set_party_redirecting |
Indicate what information in ast_party_redirecting should be set. More... | |
struct | outgoing_helper |
Macros | |
#define | AST_AGENT_FD (AST_MAX_FDS-3) |
#define | AST_ALERT_FD (AST_MAX_FDS-1) |
#define | AST_BRIDGE_DTMF_CHANNEL_0 (1 << 0) |
Report DTMF on channel 0. | |
#define | AST_BRIDGE_DTMF_CHANNEL_1 (1 << 1) |
Report DTMF on channel 1. | |
#define | AST_CHAN_WRITE_INFO_T_VERSION 1 |
ast_chan_write_info_t version. Must be incremented if structure is changed | |
#define | ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, assignedids, requestor, amaflag, ...) |
Create a channel structure. More... | |
#define | ast_channel_alloc_with_endpoint(needqueue, state, cid_num, cid_name, acctcode, exten, context, assignedids, requestor, amaflag, endpoint, ...) |
#define | ast_channel_cleanup(c) ({ ao2_cleanup(c); (struct ast_channel *) (NULL); }) |
Cleanup a channel reference. More... | |
#define | ast_channel_has_tech_function(chan, function) (ast_channel_tech(chan) ? ast_channel_tech(chan)->function != NULL : 0) |
Checks if a channel's technology implements a particular callback function. More... | |
#define | ast_channel_lock(chan) ao2_lock(chan) |
#define | ast_channel_lock_both(chan1, chan2) |
Lock two channels. | |
#define | AST_CHANNEL_NAME 80 |
#define | ast_channel_ref(c) ({ ao2_ref(c, +1); (c); }) |
Increase channel reference count. More... | |
#define | ast_channel_trylock(chan) ao2_trylock(chan) |
#define | ast_channel_unlock(chan) ao2_unlock(chan) |
#define | ast_channel_unref(c) ({ ao2_ref(c, -1); (struct ast_channel *) (NULL); }) |
Decrease channel reference count. More... | |
#define | ast_dummy_channel_alloc() __ast_dummy_channel_alloc(__FILE__, __LINE__, __PRETTY_FUNCTION__) |
Create a fake channel structure. More... | |
#define | AST_EXTENDED_FDS 12 |
#define | AST_FEATURE_DTMF_MASK |
#define | AST_GENERATOR_FD (AST_MAX_FDS-4) |
#define | AST_JITTERBUFFER_FD (AST_MAX_FDS-5) |
#define | AST_MAX_ACCOUNT_CODE 80 |
#define | AST_MAX_CONTEXT 80 |
#define | AST_MAX_EXTENSION 80 |
#define | AST_MAX_FDS 11 |
#define | AST_MAX_PUBLIC_UNIQUEID 149 |
#define | AST_MAX_UNIQUEID (AST_MAX_PUBLIC_UNIQUEID + 2 + 1) |
#define | AST_MAX_USER_FIELD 256 |
#define | AST_MUTE_DIRECTION_READ (1 << 0) |
#define | AST_MUTE_DIRECTION_WRITE (1 << 1) |
#define | AST_NUM_CHANNEL_BUCKETS 1567 |
#define | AST_TIMING_FD (AST_MAX_FDS-2) |
#define | CHECK_BLOCKING(c) |
Set the blocking indication on the channel. More... | |
#define | DATASTORE_INHERIT_FOREVER INT_MAX |
#define | DEBUGCHAN_FLAG 0x80000000 |
#define | DECLARE_STRINGFIELD_SETTERS_FOR(field) |
#define | FRAMECOUNT_INC(x) ( ((x) & DEBUGCHAN_FLAG) | (((x)+1) & ~DEBUGCHAN_FLAG) ) |
#define | MAX_LANGUAGE 40 |
#define | MAX_MUSICCLASS 80 |
Typedefs | |
typedef int(* | ast_acf_read2_fn_t) (struct ast_channel *chan, const char *cmd, char *data, struct ast_str **str, ssize_t len) |
Typedef for a custom read2 function. More... | |
typedef int(* | ast_acf_read_fn_t) (struct ast_channel *chan, const char *function, char *data, char *buf, size_t len) |
Typedef for a custom read function. More... | |
typedef int(* | ast_acf_write_fn_t) (struct ast_channel *chan, const char *function, char *data, const char *value) |
Typedef for a custom write function. More... | |
typedef unsigned long long | ast_group_t |
typedef int(* | ast_timing_func_t) (const void *data) |
Enumerations | |
enum | { AST_CHAN_TP_WANTSJITTER = (1 << 0), AST_CHAN_TP_CREATESJITTER = (1 << 1), AST_CHAN_TP_INTERNAL = (1 << 2), AST_CHAN_TP_SEND_TEXT_DATA = (1 << 3) } |
ast_channel_tech Properties More... | |
enum | { AST_FLAG_DEFER_DTMF = (1 << 1), AST_FLAG_WRITE_INT = (1 << 2), AST_FLAG_BLOCKING = (1 << 3), AST_FLAG_ZOMBIE = (1 << 4), AST_FLAG_EXCEPTION = (1 << 5), AST_FLAG_MOH = (1 << 6), AST_FLAG_SPYING = (1 << 7), AST_FLAG_IN_AUTOLOOP = (1 << 9), AST_FLAG_OUTGOING = (1 << 10), AST_FLAG_IN_DTMF = (1 << 12), AST_FLAG_EMULATE_DTMF = (1 << 13), AST_FLAG_END_DTMF_ONLY = (1 << 14), AST_FLAG_MASQ_NOSTREAM = (1 << 16), AST_FLAG_BRIDGE_HANGUP_RUN = (1 << 17), AST_FLAG_DISABLE_WORKAROUNDS = (1 << 20), AST_FLAG_DISABLE_DEVSTATE_CACHE = (1 << 21), AST_FLAG_BRIDGE_DUAL_REDIRECT_WAIT = (1 << 22), AST_FLAG_ORIGINATED = (1 << 23), AST_FLAG_DEAD = (1 << 24), AST_FLAG_SNAPSHOT_STAGE = (1 << 25), AST_FLAG_TIMINGDATA_IS_AO2_OBJ = (1 << 26), AST_FLAG_SUBROUTINE_EXEC = (1 << 27) } |
ast_channel flags More... | |
enum | { AST_FEATURE_PLAY_WARNING = (1 << 0), AST_FEATURE_REDIRECT = (1 << 1), AST_FEATURE_DISCONNECT = (1 << 2), AST_FEATURE_ATXFER = (1 << 3), AST_FEATURE_AUTOMON = (1 << 4), AST_FEATURE_PARKCALL = (1 << 5), AST_FEATURE_AUTOMIXMON = (1 << 6) } |
ast_bridge_config flags | |
enum | { AST_SOFTHANGUP_DEV = (1 << 0), AST_SOFTHANGUP_ASYNCGOTO = (1 << 1), AST_SOFTHANGUP_SHUTDOWN = (1 << 2), AST_SOFTHANGUP_TIMEOUT = (1 << 3), AST_SOFTHANGUP_APPUNLOAD = (1 << 4), AST_SOFTHANGUP_EXPLICIT = (1 << 5), AST_SOFTHANGUP_HANGUP_EXEC = (1 << 7), AST_SOFTHANGUP_ALL = (0xFFFFFFFF) } |
enum | ama_flags { AST_AMA_NONE = 0, AST_AMA_OMIT, AST_AMA_BILLING, AST_AMA_DOCUMENTATION } |
Channel AMA Flags. | |
enum | ast_bridge_result { AST_BRIDGE_COMPLETE = 0, AST_BRIDGE_FAILED = -1, AST_BRIDGE_FAILED_NOWARN = -2, AST_BRIDGE_RETRY = -3 } |
enum | ast_channel_adsicpe { AST_ADSI_UNKNOWN, AST_ADSI_AVAILABLE, AST_ADSI_UNAVAILABLE, AST_ADSI_OFFHOOKONLY } |
enum | ast_channel_error { AST_CHANNEL_ERROR_UNKNOWN, AST_CHANNEL_ERROR_ID_EXISTS } |
enum | ast_channel_requestor_relationship { AST_CHANNEL_REQUESTOR_BRIDGE_PEER, AST_CHANNEL_REQUESTOR_REPLACEMENT } |
enum | AST_MONITORING_STATE { AST_MONITOR_RUNNING, AST_MONITOR_PAUSED } |
enum | AST_PARTY_CHAR_SET { AST_PARTY_CHAR_SET_UNKNOWN = 0, AST_PARTY_CHAR_SET_ISO8859_1 = 1, AST_PARTY_CHAR_SET_WITHDRAWN = 2, AST_PARTY_CHAR_SET_ISO8859_2 = 3, AST_PARTY_CHAR_SET_ISO8859_3 = 4, AST_PARTY_CHAR_SET_ISO8859_4 = 5, AST_PARTY_CHAR_SET_ISO8859_5 = 6, AST_PARTY_CHAR_SET_ISO8859_7 = 7, AST_PARTY_CHAR_SET_ISO10646_BMPSTRING = 8, AST_PARTY_CHAR_SET_ISO10646_UTF_8STRING = 9 } |
enum | ast_t38_state { T38_STATE_UNAVAILABLE, T38_STATE_UNKNOWN, T38_STATE_NEGOTIATING, T38_STATE_REJECTED, T38_STATE_NEGOTIATED } |
Possible T38 states on channels. More... | |
enum | channelreloadreason { CHANNEL_MODULE_LOAD, CHANNEL_MODULE_RELOAD, CHANNEL_CLI_RELOAD, CHANNEL_MANAGER_RELOAD, CHANNEL_ACL_RELOAD } |
Channel reload reasons for manager events at load or reload of configuration. | |
Functions | |
int | __ast_answer (struct ast_channel *chan, unsigned int delay) |
Answer a channel, with a selectable delay before returning. More... | |
struct ast_channel * | __ast_channel_alloc (int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, enum ama_flags amaflag, struct ast_endpoint *endpoint, const char *file, int line, const char *function, const char *name_fmt,...) |
Create a channel structure. More... | |
struct ast_channel * | __ast_dummy_channel_alloc (const char *file, int line, const char *function) |
struct ast_channel * | __ast_request_and_dial (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int timeout, int *reason, const char *cid_num, const char *cid_name, struct outgoing_helper *oh) |
Request a channel of a given type, with data as optional information used by the low level module and attempt to place a call on it. More... | |
int | ast_activate_generator (struct ast_channel *chan, struct ast_generator *gen, void *params) |
int | ast_active_channels (void) |
returns number of active/allocated channels More... | |
static int | ast_add_fd (struct pollfd *pfd, int fd) |
if fd is a valid descriptor, set *pfd with the descriptor More... | |
int | ast_answer (struct ast_channel *chan) |
Answer a channel. More... | |
int | ast_auto_answer (struct ast_channel *chan) |
Answer a channel, if it's not already answered. More... | |
void | ast_autoservice_chan_hangup_peer (struct ast_channel *chan, struct ast_channel *peer) |
Put chan into autoservice while hanging up peer. More... | |
int | ast_autoservice_ignore (struct ast_channel *chan, enum ast_frame_type ftype) |
Ignore certain frame types. More... | |
int | ast_autoservice_start (struct ast_channel *chan) |
Automatically service a channel for us... More... | |
int | ast_autoservice_stop (struct ast_channel *chan) |
Stop servicing a channel for us... More... | |
int | ast_call (struct ast_channel *chan, const char *addr, int timeout) |
Make a call. More... | |
struct ast_channel * | ast_call_forward (struct ast_channel *caller, struct ast_channel *orig, int *timeout, struct ast_format_cap *cap, struct outgoing_helper *oh, int *outstate) |
Forwards a call to a new channel specified by the original channel's call_forward str. If possible, the new forwarded channel is created and returned while the original one is terminated. More... | |
const char * | ast_cause2str (int cause) attribute_pure |
Gives the string form of a given cause code. More... | |
void | ast_change_name (struct ast_channel *chan, const char *newname) |
Change channel name. More... | |
struct ast_channel * | ast_channel__bridge (const struct ast_channel *chan) |
void | ast_channel__bridge_set (struct ast_channel *chan, struct ast_channel *value) |
const char * | ast_channel_accountcode (const struct ast_channel *chan) |
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) |
const char * | ast_channel_amaflags2string (enum ama_flags flags) |
Convert the enum representation of an AMA flag to a string representation. More... | |
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 tid) |
const char * | ast_channel_blockproc (const struct ast_channel *chan) |
void | ast_channel_blockproc_set (struct ast_channel *chan, const char *value) |
struct ast_channel * | ast_channel_bridge_peer (struct ast_channel *chan) |
Get the channel's bridge peer only if the bridge is two-party. More... | |
const char * | ast_channel_call_forward (const struct ast_channel *chan) |
struct ast_channel * | ast_channel_callback (ao2_callback_data_fn *cb_fn, void *arg, void *data, int ao2_flags) |
Call a function with every active channel. More... | |
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 value) |
int | ast_channel_cc_params_init (struct ast_channel *chan, const struct ast_cc_config_params *base_params) |
Set up datastore with CCSS parameters for a channel. More... | |
struct ast_cdr * | ast_channel_cdr (const struct ast_channel *chan) |
void | ast_channel_cdr_set (struct ast_channel *chan, struct ast_cdr *value) |
void | ast_channel_clear_flag (struct ast_channel *chan, unsigned int flag) |
Clear a flag on a channel. More... | |
void | ast_channel_clear_softhangup (struct ast_channel *chan, int flag) |
Clear a set of softhangup flags from a channel. More... | |
int | ast_channel_cmpwhentohangup_tv (struct ast_channel *chan, struct timeval offset) |
Compare a offset with the settings of when to hang a channel up. More... | |
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) |
int | ast_channel_connected_line_sub (struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const void *connected_info, int frame) |
Run a connected line interception subroutine and update a channel's connected line information. More... | |
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) |
int | ast_channel_datastore_add (struct ast_channel *chan, struct ast_datastore *datastore) |
Add a datastore to a channel. More... | |
struct ast_datastore * | ast_channel_datastore_find (struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid) |
Find a datastore on a channel. More... | |
int | ast_channel_datastore_inherit (struct ast_channel *from, struct ast_channel *to) |
Inherit datastores from a parent to a child. More... | |
int | ast_channel_datastore_remove (struct ast_channel *chan, struct ast_datastore *datastore) |
Remove a datastore from a channel. More... | |
struct ast_datastore_list * | ast_channel_datastores (struct ast_channel *chan) |
int | ast_channel_defer_dtmf (struct ast_channel *chan) |
Defers DTMF so that you only read things like hangups and audio. More... | |
const char * | ast_channel_dialcontext (const 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) |
int | ast_channel_early_bridge (struct ast_channel *c0, struct ast_channel *c1) |
Bridge two channels together (early) More... | |
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) |
void | ast_channel_end_dtmf (struct ast_channel *chan, char digit, struct timeval start, const char *why) |
Simulate a DTMF end on a broken bridge channel. More... | |
int | ast_channel_epfd (const struct ast_channel *chan) |
void | ast_channel_epfd_set (struct ast_channel *chan, int value) |
enum ast_channel_error | ast_channel_errno (void) |
Get error code for latest channel operation. | |
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) |
int | ast_channel_feature_hooks_append (struct ast_channel *chan, struct ast_bridge_features *features) |
Appends to the channel-attached features a channel has access to upon being bridged. More... | |
struct ast_bridge_features * | ast_channel_feature_hooks_get (struct ast_channel *chan) |
Gets the channel-attached features a channel has access to upon being bridged. More... | |
int | ast_channel_feature_hooks_replace (struct ast_channel *chan, struct ast_bridge_features *features) |
Sets the channel-attached features a channel has access to upon being bridged. More... | |
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 varshead * | ast_channel_get_ari_vars (struct ast_channel *chan) |
Gets the variables for a given channel, as specified by ast_channel_set_ari_vars(). More... | |
struct ast_bridge * | ast_channel_get_bridge (const struct ast_channel *chan) |
Get the bridge associated with a channel. More... | |
struct ast_bridge_channel * | ast_channel_get_bridge_channel (struct ast_channel *chan) |
Get a reference to the channel's bridge pointer. More... | |
int | ast_channel_get_cc_agent_type (struct ast_channel *chan, char *agent_type, size_t size) |
Find the appropriate CC agent type to use given a channel. More... | |
struct ast_cc_config_params * | ast_channel_get_cc_config_params (struct ast_channel *chan) |
Get the CCSS parameters from a channel. More... | |
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... | |
int | ast_channel_get_device_name (struct ast_channel *chan, char *device_name, size_t name_buffer_length) |
Get a device name given its channel structure. More... | |
int | ast_channel_get_duration (struct ast_channel *chan) |
Obtain how long the channel since the channel was created. More... | |
int64_t | ast_channel_get_duration_ms (struct ast_channel *chan) |
Obtain how long it's been, in milliseconds, since the channel was created. More... | |
int | ast_channel_get_intercept_mode (void) |
Am I currently running an intercept dialplan routine. More... | |
struct varshead * | ast_channel_get_manager_vars (struct ast_channel *chan) |
Gets the variables for a given channel, as specified by ast_channel_set_manager_vars(). 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... | |
static enum ast_t38_state | ast_channel_get_t38_state (struct ast_channel *chan) |
Retrieves the current T38 state of a channel. More... | |
int | ast_channel_get_up_time (struct ast_channel *chan) |
Obtain how long it has been since the channel was answered. More... | |
int64_t | ast_channel_get_up_time_ms (struct ast_channel *chan) |
Obtain how long it has been since the channel was answered in ms. More... | |
struct varshead * | ast_channel_get_vars (struct ast_channel *chan) |
Gets the variables for a given channel, as set using pbx_builtin_setvar_helper(). 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_hash_set (struct ast_channel *chan, const struct ast_control_pvt_cause_code *cause_code, int datalen) |
Sets the HANGUPCAUSE hash and optionally the SIP_CAUSE hash on the given channel. More... | |
void | ast_channel_hangupcause_set (struct ast_channel *chan, int value) |
const char * | ast_channel_hangupsource (const struct ast_channel *chan) |
int | ast_channel_has_ari_vars (void) |
Return whether or not any ARI variables have been set. More... | |
int | ast_channel_has_audio_frame_or_monitor (struct ast_channel *chan) |
Check if the channel has active audiohooks, active framehooks, or a monitor. More... | |
int | ast_channel_has_hook_requiring_audio (struct ast_channel *chan) |
Check if the channel has any active hooks that require audio. More... | |
int | ast_channel_has_manager_vars (void) |
Return whether or not any manager variables have been set. More... | |
int | ast_channel_hold_state (const struct ast_channel *chan) |
void | ast_channel_hold_state_set (struct ast_channel *chan, int value) |
void | ast_channel_inherit_variables (const struct ast_channel *parent, struct ast_channel *child) |
Inherits channel variable from parent to child channel. More... | |
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) |
struct ast_channel * | ast_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_copy_linkedid (struct ast_channel *dest, struct ast_channel *source) |
Copy the full linkedid channel id structure from one channel to another. More... | |
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) |
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_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_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_bridged (const struct ast_channel *chan) |
Determine if a channel is in a bridge. More... | |
int | ast_channel_is_leaving_bridge (struct ast_channel *chan) |
Determine if a channel is leaving a bridge, but not hung up. 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_language (const struct ast_channel *chan) |
const char * | ast_channel_lastcontext (const struct ast_channel *chan) |
const char * | ast_channel_lastexten (const struct ast_channel *chan) |
const char * | ast_channel_latest_musicclass (const struct ast_channel *chan) |
const char * | ast_channel_linkedid (const struct ast_channel *chan) |
int | ast_channel_make_compatible (struct ast_channel *chan, struct ast_channel *peer) |
Make the frame formats of two channels compatible. More... | |
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) |
int | ast_channel_move (struct ast_channel *dest, struct ast_channel *source) |
Move a channel from its current location to a new location. More... | |
void * | ast_channel_music_state (const struct ast_channel *chan) |
void | ast_channel_music_state_set (struct ast_channel *chan, void *value) |
const char * | ast_channel_musicclass (const struct ast_channel *chan) |
const char * | ast_channel_name (const struct ast_channel *chan) |
void | ast_channel_name_to_dial_string (char *channel_name) |
Removes the trailing identifiers from a channel name string. More... | |
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) |
const char * | ast_channel_oldest_linkedid (const char *a, const char *b) |
Return the oldest linkedid between two channels. More... | |
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) |
const char * | ast_channel_parkinglot (const struct ast_channel *chan) |
struct ast_pbx * | ast_channel_pbx (const struct ast_channel *chan) |
void | ast_channel_pbx_set (struct ast_channel *chan, struct ast_pbx *value) |
const char * | ast_channel_peeraccount (const struct ast_channel *chan) |
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) |
int | ast_channel_queryoption (struct ast_channel *channel, int option, void *data, int *datalen, int block) |
Checks the value of an option. More... | |
void | ast_channel_queue_connected_line_update (struct ast_channel *chan, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update) |
Queue a connected line update frame on a channel. More... | |
void | ast_channel_queue_redirecting_update (struct ast_channel *chan, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update) |
Queue a redirecting update frame on a channel. More... | |
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) |
const char * | ast_channel_reason2str (int reason) |
return an english explanation of the code returned thru __ast_request_and_dial's 'outstate' argument More... | |
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_redirecting_sub (struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const void *redirecting_info, int is_frame) |
Run a redirecting interception subroutine and update a channel's redirecting information. More... | |
int | ast_channel_register (const struct ast_channel_tech *tech) |
Register a channel technology (a new channel driver) Called by a channel module to register the kind of channels it supports. More... | |
struct ast_channel * | ast_channel_release (struct ast_channel *chan) |
Unlink and release reference to a channel. More... | |
void | ast_channel_req_accountcodes (struct ast_channel *chan, const struct ast_channel *requestor, enum ast_channel_requestor_relationship relationship) |
Setup new channel accountcodes from the requestor channel after ast_request(). More... | |
void | ast_channel_req_accountcodes_precious (struct ast_channel *chan, const struct ast_channel *requestor, enum ast_channel_requestor_relationship relationship) |
Setup new channel accountcodes from the requestor channel after ast_request(). More... | |
int | ast_channel_request_stream_topology_change (struct ast_channel *chan, struct ast_stream_topology *topology, void *change_source) |
Request that the stream topology of a channel change. More... | |
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) |
int | ast_channel_sendhtml (struct ast_channel *channel, int subclass, const char *data, int datalen) |
Sends HTML on given channel Send HTML or URL on link. More... | |
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) |
int | ast_channel_sendurl (struct ast_channel *channel, const char *url) |
Sends a URL on a given link Send URL on link. More... | |
void | ast_channel_set_ari_vars (size_t varc, char **vars) |
Sets the variables to be stored in the ari_vars field of all snapshots. More... | |
void | ast_channel_set_caller (struct ast_channel *chan, const struct ast_party_caller *caller, const struct ast_set_party_caller *update) |
Set the caller id information in the Asterisk channel. More... | |
void | ast_channel_set_caller_event (struct ast_channel *chan, const struct ast_party_caller *caller, const struct ast_set_party_caller *update) |
Set the caller id information in the Asterisk channel and generate an AMI event if the caller id name or number changed. More... | |
void | ast_channel_set_connected_line (struct ast_channel *chan, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update) |
Set the connected line information in the Asterisk channel. More... | |
void | ast_channel_set_fd (struct ast_channel *chan, int which, int fd) |
void | ast_channel_set_flag (struct ast_channel *chan, unsigned int flag) |
Set a flag on a channel. More... | |
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_manager_vars (size_t varc, char **vars) |
Sets the variables to be stored in the manager_vars field of all snapshots. 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) |
void | ast_channel_set_redirecting (struct ast_channel *chan, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update) |
Set the redirecting id information in the Asterisk channel. More... | |
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) |
int | ast_channel_setoption (struct ast_channel *channel, int option, void *data, int datalen, int block) |
Sets an option on a channel. More... | |
void | ast_channel_setwhentohangup_tv (struct ast_channel *chan, struct timeval offset) |
Set when to hang a channel up. More... | |
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) |
void | ast_channel_softhangup_withcause_locked (struct ast_channel *chan, int causecode) |
Lock the given channel, then request softhangup on the channel with the given causecode. More... | |
struct ast_silence_generator * | ast_channel_start_silence_generator (struct ast_channel *chan) |
Starts a silence generator on the given channel. More... | |
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) |
void | ast_channel_stop_silence_generator (struct ast_channel *chan, struct ast_silence_generator *state) |
Stops a previously-started silence generator on the given channel. More... | |
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_stream_topology_changed (struct ast_channel *chan, struct ast_stream_topology *topology) |
Provide notice to a channel that the stream topology has changed. More... | |
int | ast_channel_stream_topology_changed_externally (struct ast_channel *chan) |
Provide notice from a channel that the topology has changed on it as a result of the remote party renegotiating. More... | |
int | ast_channel_streamid (const struct ast_channel *chan) |
void | ast_channel_streamid_set (struct ast_channel *chan, int value) |
enum ama_flags | ast_channel_string2amaflag (const char *flag) |
Convert a string to a detail record AMA flag. More... | |
int | ast_channel_supports_html (struct ast_channel *channel) |
Checks for HTML support on a channel. More... | |
int | ast_channel_suppress (struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype) |
Suppress passing of a frame type on a channel. More... | |
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... | |
void | ast_channel_undefer_dtmf (struct ast_channel *chan) |
Unset defer DTMF flag on channel. More... | |
const char * | ast_channel_uniqueid (const struct ast_channel *chan) |
void | ast_channel_unlink (struct ast_channel *chan) |
Remove a channel from the global channels container. More... | |
void | ast_channel_unregister (const struct ast_channel_tech *tech) |
Unregister a channel technology. More... | |
int | ast_channel_unsuppress (struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype) |
Stop suppressing of a frame type on a channel. More... | |
void | ast_channel_update_connected_line (struct ast_channel *chan, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update) |
Indicate that the connected line information has changed. More... | |
void | ast_channel_update_redirecting (struct ast_channel *chan, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update) |
Indicate that the redirecting id has changed. More... | |
const char * | ast_channel_userfield (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_channel * | ast_channel_yank (struct ast_channel *yankee) |
Gain control of a channel in the system. More... | |
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) |
struct ast_variable * | ast_channeltype_list (void) |
return an ast_variable list of channeltypes | |
int | ast_check_hangup (struct ast_channel *chan) |
Check to see if a channel is needing hang up. More... | |
int | ast_check_hangup_locked (struct ast_channel *chan) |
int | ast_connected_line_build_data (unsigned char *data, size_t datalen, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update) |
Build the connected line information data frame. More... | |
void | ast_connected_line_copy_from_caller (struct ast_party_connected_line *dest, const struct ast_party_caller *src) |
Copy the caller information to the connected line information. More... | |
void | ast_connected_line_copy_to_caller (struct ast_party_caller *dest, const struct ast_party_connected_line *src) |
Copy the connected line information to the caller information. More... | |
int | ast_connected_line_parse_data (const unsigned char *data, size_t datalen, struct ast_party_connected_line *connected) |
Parse connected line indication frame data. More... | |
void | ast_deactivate_generator (struct ast_channel *chan) |
static int | ast_fdisset (struct pollfd *pfds, int fd, int maximum, int *start) |
Helper function for migrating select to poll. | |
const struct ast_channel_tech * | ast_get_channel_tech (const char *name) |
Get a channel technology structure by name. More... | |
ast_group_t | ast_get_group (const char *s) |
struct ast_namedgroups * | ast_get_namedgroups (const char *s) |
Create an ast_namedgroups set with group names from comma separated string. More... | |
void | ast_hangup (struct ast_channel *chan) |
Hang up a channel. More... | |
int | ast_indicate (struct ast_channel *chan, int condition) |
Indicates condition of channel. More... | |
int | ast_indicate_data (struct ast_channel *chan, int condition, const void *data, size_t datalen) |
Indicates condition of channel, with payload. More... | |
int | ast_is_deferrable_frame (const struct ast_frame *frame) |
Should we keep this frame for later? More... | |
int | ast_namedgroups_intersect (struct ast_namedgroups *a, struct ast_namedgroups *b) |
Return TRUE if group a and b contain at least one common groupname. | |
void | ast_party_caller_copy (struct ast_party_caller *dest, const struct ast_party_caller *src) |
Copy the source caller information to the destination caller. More... | |
void | ast_party_caller_free (struct ast_party_caller *doomed) |
Destroy the caller party contents. More... | |
void | ast_party_caller_init (struct ast_party_caller *init) |
Initialize the given caller structure. More... | |
void | ast_party_caller_set (struct ast_party_caller *dest, const struct ast_party_caller *src, const struct ast_set_party_caller *update) |
Set the caller information based on another caller source. More... | |
void | ast_party_caller_set_init (struct ast_party_caller *init, const struct ast_party_caller *guide) |
Initialize the given caller structure using the given guide for a set update operation. More... | |
void | ast_party_connected_line_collect_caller (struct ast_party_connected_line *connected, struct ast_party_caller *caller) |
Collect the caller party information into a connected line structure. More... | |
void | ast_party_connected_line_copy (struct ast_party_connected_line *dest, const struct ast_party_connected_line *src) |
Copy the source connected line information to the destination connected line. More... | |
void | ast_party_connected_line_free (struct ast_party_connected_line *doomed) |
Destroy the connected line information contents. More... | |
void | ast_party_connected_line_init (struct ast_party_connected_line *init) |
Initialize the given connected line structure. More... | |
void | ast_party_connected_line_set (struct ast_party_connected_line *dest, const struct ast_party_connected_line *src, const struct ast_set_party_connected_line *update) |
Set the connected line information based on another connected line source. More... | |
void | ast_party_connected_line_set_init (struct ast_party_connected_line *init, const struct ast_party_connected_line *guide) |
Initialize the given connected line structure using the given guide for a set update operation. More... | |
void | ast_party_dialed_copy (struct ast_party_dialed *dest, const struct ast_party_dialed *src) |
Copy the source dialed party information to the destination dialed party. More... | |
void | ast_party_dialed_free (struct ast_party_dialed *doomed) |
Destroy the dialed party contents. More... | |
void | ast_party_dialed_init (struct ast_party_dialed *init) |
Initialize the given dialed structure. More... | |
void | ast_party_dialed_set (struct ast_party_dialed *dest, const struct ast_party_dialed *src) |
Set the dialed information based on another dialed source. More... | |
void | ast_party_dialed_set_init (struct ast_party_dialed *init, const struct ast_party_dialed *guide) |
Initialize the given dialed structure using the given guide for a set update operation. More... | |
void | ast_party_id_copy (struct ast_party_id *dest, const struct ast_party_id *src) |
Copy the source party id information to the destination party id. More... | |
void | ast_party_id_free (struct ast_party_id *doomed) |
Destroy the party id contents. More... | |
void | ast_party_id_init (struct ast_party_id *init) |
Initialize the given party id structure. More... | |
void | ast_party_id_invalidate (struct ast_party_id *id) |
Invalidate all components of the given party id. More... | |
struct ast_party_id | ast_party_id_merge (struct ast_party_id *base, struct ast_party_id *overlay) |
Merge a given party id into another given party id. More... | |
void | ast_party_id_merge_copy (struct ast_party_id *dest, struct ast_party_id *base, struct ast_party_id *overlay) |
Copy a merge of a given party id into another given party id to a given destination party id. More... | |
int | ast_party_id_presentation (const struct ast_party_id *id) |
Determine the overall presentation value for the given party. More... | |
void | ast_party_id_reset (struct ast_party_id *id) |
Destroy and initialize the given party id structure. More... | |
void | ast_party_id_set (struct ast_party_id *dest, const struct ast_party_id *src, const struct ast_set_party_id *update) |
Set the source party id information into the destination party id. More... | |
void | ast_party_id_set_init (struct ast_party_id *init, const struct ast_party_id *guide) |
Initialize the given party id structure using the given guide for a set update operation. More... | |
void | ast_party_name_copy (struct ast_party_name *dest, const struct ast_party_name *src) |
Copy the source party name information to the destination party name. More... | |
void | ast_party_name_free (struct ast_party_name *doomed) |
Destroy the party name contents. More... | |
void | ast_party_name_init (struct ast_party_name *init) |
Initialize the given name structure. More... | |
void | ast_party_name_set (struct ast_party_name *dest, const struct ast_party_name *src) |
Set the source party name information into the destination party name. More... | |
void | ast_party_name_set_init (struct ast_party_name *init, const struct ast_party_name *guide) |
Initialize the given party name structure using the given guide for a set update operation. More... | |
void | ast_party_number_copy (struct ast_party_number *dest, const struct ast_party_number *src) |
Copy the source party number information to the destination party number. More... | |
void | ast_party_number_free (struct ast_party_number *doomed) |
Destroy the party number contents. More... | |
void | ast_party_number_init (struct ast_party_number *init) |
Initialize the given number structure. More... | |
void | ast_party_number_set (struct ast_party_number *dest, const struct ast_party_number *src) |
Set the source party number information into the destination party number. More... | |
void | ast_party_number_set_init (struct ast_party_number *init, const struct ast_party_number *guide) |
Initialize the given party number structure using the given guide for a set update operation. More... | |
void | ast_party_redirecting_copy (struct ast_party_redirecting *dest, const struct ast_party_redirecting *src) |
Copy the source redirecting information to the destination redirecting. More... | |
void | ast_party_redirecting_free (struct ast_party_redirecting *doomed) |
Destroy the redirecting information contents. More... | |
void | ast_party_redirecting_init (struct ast_party_redirecting *init) |
Initialize the given redirecting structure. More... | |
void | ast_party_redirecting_reason_copy (struct ast_party_redirecting_reason *dest, const struct ast_party_redirecting_reason *src) |
Copy the source redirecting reason information to the destination redirecting reason. More... | |
void | ast_party_redirecting_reason_free (struct ast_party_redirecting_reason *doomed) |
Destroy the redirecting reason contents. More... | |
void | ast_party_redirecting_reason_init (struct ast_party_redirecting_reason *init) |
Initialize the given redirecting reason structure. More... | |
void | ast_party_redirecting_reason_set (struct ast_party_redirecting_reason *dest, const struct ast_party_redirecting_reason *src) |
Set the redirecting reason information based on another redirecting reason source. More... | |
void | ast_party_redirecting_reason_set_init (struct ast_party_redirecting_reason *init, const struct ast_party_redirecting_reason *guide) |
Initialize the given redirecting reason structure using the given guide for a set update operation. More... | |
void | ast_party_redirecting_set (struct ast_party_redirecting *dest, const struct ast_party_redirecting *src, const struct ast_set_party_redirecting *update) |
Set the redirecting information based on another redirecting source. More... | |
void | ast_party_redirecting_set_init (struct ast_party_redirecting *init, const struct ast_party_redirecting *guide) |
Initialize the given redirecting id structure using the given guide for a set update operation. More... | |
void | ast_party_subaddress_copy (struct ast_party_subaddress *dest, const struct ast_party_subaddress *src) |
Copy the source party subaddress information to the destination party subaddress. More... | |
void | ast_party_subaddress_free (struct ast_party_subaddress *doomed) |
Destroy the party subaddress contents. More... | |
void | ast_party_subaddress_init (struct ast_party_subaddress *init) |
Initialize the given subaddress structure. More... | |
void | ast_party_subaddress_set (struct ast_party_subaddress *dest, const struct ast_party_subaddress *src) |
Set the source party subaddress information into the destination party subaddress. More... | |
void | ast_party_subaddress_set_init (struct ast_party_subaddress *init, const struct ast_party_subaddress *guide) |
Initialize the given party subaddress structure using the given guide for a set update operation. More... | |
int | ast_pre_call (struct ast_channel *chan, const char *sub_args) |
Execute a Gosub call on the channel before a call is placed. More... | |
char * | ast_print_group (char *buf, int buflen, ast_group_t group) |
Print call and pickup groups into buffer. More... | |
char * | ast_print_namedgroups (struct ast_str **buf, struct ast_namedgroups *groups) |
Print named call groups and named pickup groups. | |
int | ast_prod (struct ast_channel *chan) |
Send empty audio to prime a channel driver. | |
int | ast_queue_answer (struct ast_channel *chan, const struct ast_stream_topology *topology) |
Queue an ANSWER control frame with topology. More... | |
int | ast_queue_control (struct ast_channel *chan, enum ast_control_frame_type control) |
Queue a control frame without payload. More... | |
int | ast_queue_control_data (struct ast_channel *chan, enum ast_control_frame_type control, const void *data, size_t datalen) |
Queue a control frame with payload. More... | |
int | ast_queue_frame (struct ast_channel *chan, struct ast_frame *f) |
Queue one or more frames to a channel's frame queue. More... | |
int | ast_queue_frame_head (struct ast_channel *chan, struct ast_frame *f) |
Queue one or more frames to the head of a channel's frame queue. More... | |
int | ast_queue_hangup (struct ast_channel *chan) |
Queue a hangup frame. More... | |
int | ast_queue_hangup_with_cause (struct ast_channel *chan, int cause) |
Queue a hangup frame with hangupcause set. More... | |
int | ast_queue_hold (struct ast_channel *chan, const char *musicclass) |
Queue a hold frame. More... | |
int | ast_queue_unhold (struct ast_channel *chan) |
Queue an unhold frame. More... | |
int | ast_raw_answer (struct ast_channel *chan) |
Answer a channel. More... | |
int | ast_raw_answer_with_stream_topology (struct ast_channel *chan, struct ast_stream_topology *topology) |
Answer a channel passing in a stream topology. More... | |
struct ast_frame * | ast_read (struct ast_channel *chan) |
Reads a frame. More... | |
struct ast_frame * | ast_read_noaudio (struct ast_channel *chan) |
Reads a frame, returning AST_FRAME_NULL frame if audio. More... | |
struct ast_frame * | ast_read_stream (struct ast_channel *chan) |
Reads a frame, but does not filter to just the default streams. More... | |
struct ast_frame * | ast_read_stream_noaudio (struct ast_channel *chan) |
Reads a frame, but does not filter to just the default streams, returning AST_FRAME_NULL frame if audio. More... | |
int | ast_readstring (struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders) |
Reads multiple digits. More... | |
int | ast_readstring_full (struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders, int audiofd, int ctrlfd) |
int | ast_recvchar (struct ast_channel *chan, int timeout) |
Receives a text character from a channel. More... | |
char * | ast_recvtext (struct ast_channel *chan, int timeout) |
Receives a text string from a channel Read a string of text from a channel. More... | |
int | ast_redirecting_build_data (unsigned char *data, size_t datalen, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update) |
Build the redirecting id data frame. More... | |
int | ast_redirecting_parse_data (const unsigned char *data, size_t datalen, struct ast_party_redirecting *redirecting) |
Parse redirecting indication frame data. More... | |
struct ast_namedgroups * | ast_ref_namedgroups (struct ast_namedgroups *groups) |
struct ast_channel * | ast_request (const char *type, struct ast_format_cap *request_cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause) |
Requests a channel. More... | |
struct ast_channel * | ast_request_and_dial (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int timeout, int *reason, const char *cid_num, const char *cid_name) |
Request a channel of a given type, with data as optional information used by the low level module and attempt to place a call on it. More... | |
struct ast_channel * | ast_request_with_stream_topology (const char *type, struct ast_stream_topology *topology, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause) |
Requests a channel (specifying stream topology) More... | |
int | ast_safe_sleep (struct ast_channel *chan, int ms) |
Wait for a specified amount of time, looking for hangups. More... | |
int | ast_safe_sleep_conditional (struct ast_channel *chan, int ms, int(*cond)(void *), void *data) |
Wait for a specified amount of time, looking for hangups and a condition argument. More... | |
int | ast_safe_sleep_without_silence (struct ast_channel *chan, int ms) |
Wait for a specified amount of time, looking for hangups, and do not generate silence. More... | |
int | ast_senddigit (struct ast_channel *chan, char digit, unsigned int duration) |
Send a DTMF digit to a channel. More... | |
int | ast_senddigit_begin (struct ast_channel *chan, char digit) |
Send a DTMF digit to a channel. More... | |
int | ast_senddigit_end (struct ast_channel *chan, char digit, unsigned int duration) |
Send a DTMF digit to a channel. More... | |
int | ast_senddigit_external (struct ast_channel *chan, char digit, unsigned int duration) |
Send a DTMF digit to a channel from an external thread. More... | |
int | ast_senddigit_mf (struct ast_channel *chan, char digit, unsigned int duration, unsigned int durationkp, unsigned int durationst, int is_external) |
Send an MF digit to a channel. More... | |
int | ast_senddigit_mf_begin (struct ast_channel *chan, char digit) |
Send an MF digit to a channel. More... | |
int | ast_senddigit_mf_end (struct ast_channel *chan) |
End sending an MF digit to a channel. More... | |
int | ast_sendtext (struct ast_channel *chan, const char *text) |
Sends text to a channel. More... | |
int | ast_sendtext_data (struct ast_channel *chan, struct ast_msg_data *msg) |
Sends text to a channel in an ast_msg_data structure wrapper with ast_sendtext as fallback. More... | |
void | ast_set_callerid (struct ast_channel *chan, const char *cid_num, const char *cid_name, const char *cid_ani) |
Set caller ID number, name and ANI and generate AMI event. More... | |
void | ast_set_hangupsource (struct ast_channel *chan, const char *source, int force) |
Set the source of the hangup in this channel and it's bridge. More... | |
void | ast_set_party_id_all (struct ast_set_party_id *update_id) |
Set the update marker to update all information of a corresponding party id. More... | |
int | ast_set_read_format (struct ast_channel *chan, struct ast_format *format) |
Sets read format on channel chan. More... | |
int | ast_set_read_format_from_cap (struct ast_channel *chan, struct ast_format_cap *formats) |
Sets read format on channel chan from capabilities Set read format for channel to whichever component of "format" is best. More... | |
int | ast_set_read_format_path (struct ast_channel *chan, struct ast_format *raw_format, struct ast_format *core_format) |
Set specific read path on channel. More... | |
void | ast_set_variables (struct ast_channel *chan, struct ast_variable *vars) |
adds a list of channel variables to a channel More... | |
int | ast_set_write_format (struct ast_channel *chan, struct ast_format *format) |
Sets write format on channel chan. More... | |
int | ast_set_write_format_from_cap (struct ast_channel *chan, struct ast_format_cap *formats) |
Sets write format on channel chan Set write format for channel to whichever component of "format" is best. More... | |
int | ast_set_write_format_interleaved_stereo (struct ast_channel *chan, struct ast_format *format) |
Sets write format for a channel. All internal data will than be handled in an interleaved format. (needed by binaural opus) More... | |
int | ast_set_write_format_path (struct ast_channel *chan, struct ast_format *core_format, struct ast_format *raw_format) |
Set specific write path on channel. More... | |
int | ast_settimeout (struct ast_channel *c, unsigned int rate, int(*func)(const void *data), void *data) |
Enable or disable timer ticks for a channel. More... | |
int | ast_settimeout_full (struct ast_channel *c, unsigned int rate, int(*func)(const void *data), void *data, unsigned int is_ao2_obj) |
int | ast_softhangup (struct ast_channel *chan, int cause) |
Softly hangup up a channel. More... | |
void | ast_softhangup_all (void) |
Soft hangup all active channels. More... | |
int | ast_softhangup_nolock (struct ast_channel *chan, int cause) |
Softly hangup up a channel (no channel lock) More... | |
const char * | ast_state2str (enum ast_channel_state state) |
Gives the string form of a given channel state. More... | |
int | ast_str2cause (const char *name) attribute_pure |
Convert the string form of a cause code to a number. More... | |
int | ast_tonepair (struct ast_channel *chan, int freq1, int freq2, int duration, int vol) |
int | ast_tonepair_start (struct ast_channel *chan, int freq1, int freq2, int duration, int vol) |
void | ast_tonepair_stop (struct ast_channel *chan) |
int | ast_transfer (struct ast_channel *chan, char *dest) |
Transfer a channel (if supported). More... | |
int | ast_transfer_protocol (struct ast_channel *chan, char *dest, int *protocol) |
Transfer a channel (if supported) receieve protocol result. More... | |
char * | ast_transfercapability2str (int transfercapability) attribute_const |
Gives the string form of a given transfer capability. More... | |
int | ast_undestroyed_channels (void) |
struct ast_namedgroups * | ast_unref_namedgroups (struct ast_namedgroups *groups) |
int | ast_waitfor (struct ast_channel *chan, int ms) |
Wait for input on a channel. More... | |
struct ast_channel * | ast_waitfor_n (struct ast_channel **chan, int n, int *ms) |
Waits for input on a group of channels Wait for input on an array of channels for a given # of milliseconds. More... | |
int | ast_waitfor_n_fd (int *fds, int n, int *ms, int *exception) |
Waits for input on an fd. More... | |
struct ast_channel * | ast_waitfor_nandfds (struct ast_channel **c, int n, int *fds, int nfds, int *exception, int *outfd, int *ms) |
Waits for activity on a group of channels. More... | |
int | ast_waitfordigit (struct ast_channel *c, int ms) |
Waits for a digit. More... | |
int | ast_waitfordigit_full (struct ast_channel *c, int ms, const char *breakon, int audiofd, int ctrlfd) |
Wait for a digit Same as ast_waitfordigit() with audio fd for outputting read audio and ctrlfd to monitor for reading. More... | |
int | ast_write (struct ast_channel *chan, struct ast_frame *frame) |
Write a frame to a channel This function writes the given frame to the indicated channel. More... | |
int | ast_write_stream (struct ast_channel *chan, int stream_num, struct ast_frame *frame) |
Write a frame to a stream This function writes the given frame to the indicated stream on the channel. More... | |
int | ast_write_text (struct ast_channel *chan, struct ast_frame *frame) |
Write text frame to a channel This function writes the given frame to the indicated channel. More... | |
int | ast_write_video (struct ast_channel *chan, struct ast_frame *frame) |
Write video frame to a channel This function writes the given frame to the indicated channel. More... | |
DECLARE_STRINGFIELD_SETTERS_FOR (name) | |
DECLARE_STRINGFIELD_SETTERS_FOR (language) | |
DECLARE_STRINGFIELD_SETTERS_FOR (musicclass) | |
DECLARE_STRINGFIELD_SETTERS_FOR (latest_musicclass) | |
DECLARE_STRINGFIELD_SETTERS_FOR (accountcode) | |
DECLARE_STRINGFIELD_SETTERS_FOR (peeraccount) | |
DECLARE_STRINGFIELD_SETTERS_FOR (userfield) | |
DECLARE_STRINGFIELD_SETTERS_FOR (call_forward) | |
DECLARE_STRINGFIELD_SETTERS_FOR (uniqueid) | |
DECLARE_STRINGFIELD_SETTERS_FOR (linkedid) | |
DECLARE_STRINGFIELD_SETTERS_FOR (parkinglot) | |
DECLARE_STRINGFIELD_SETTERS_FOR (hangupsource) | |
DECLARE_STRINGFIELD_SETTERS_FOR (dialcontext) | |
struct ast_channel_iterator * | ast_channel_iterator_destroy (struct ast_channel_iterator *i) |
Destroy a channel iterator. More... | |
struct ast_channel_iterator * | ast_channel_iterator_by_exten_new (const char *exten, const char *context) |
Create a new channel iterator based on extension. More... | |
struct ast_channel_iterator * | ast_channel_iterator_by_name_new (const char *name, size_t name_len) |
Create a new channel iterator based on name. More... | |
struct ast_channel_iterator * | ast_channel_iterator_all_new (void) |
Create a new channel iterator. More... | |
struct ast_channel * | ast_channel_iterator_next (struct ast_channel_iterator *i) |
Get the next channel for a channel iterator. More... | |
struct ast_channel * | ast_channel_get_by_name (const char *name) |
Find a channel by name. More... | |
struct ast_channel * | ast_channel_get_by_name_prefix (const char *name, size_t name_len) |
Find a channel by a name prefix. More... | |
struct ast_channel * | ast_channel_get_by_exten (const char *exten, const char *context) |
Find a channel by extension and context. More... | |
Variables | |
const struct ast_channel_tech | ast_kill_tech |
Kill the channel channel driver technology descriptor. More... | |
static const char | ast_stream_topology_changed_external [] = "external" |
Set as the change source reason when a channel stream topology has been changed externally as a result of the remote side renegotiating. | |
unsigned long | global_fin |
unsigned long | global_fout |
General Asterisk PBX channel definitions.
Definition in file channel.h.
#define AST_AGENT_FD (AST_MAX_FDS-3) |
#define AST_ALERT_FD (AST_MAX_FDS-1) |
used for alertpipe
Definition at line 200 of file channel.h.
Referenced by __ast_channel_alloc_ap().
#define ast_channel_alloc | ( | needqueue, | |
state, | |||
cid_num, | |||
cid_name, | |||
acctcode, | |||
exten, | |||
context, | |||
assignedids, | |||
requestor, | |||
amaflag, | |||
... | |||
) |
Create a channel structure.
NULL | failure |
non-NULL | successfully allocated channel |
Definition at line 1258 of file channel.h.
Referenced by ast_channel_yank(), ast_iax2_new(), ast_pbx_outgoing_exten_predial(), ast_unreal_new_channels(), audiosocket_request(), console_new(), handle_exec(), multicast_rtp_request(), stasis_app_control_snoop(), unicast_rtp_request(), and unistim_new().
#define ast_channel_alloc_with_endpoint | ( | needqueue, | |
state, | |||
cid_num, | |||
cid_name, | |||
acctcode, | |||
exten, | |||
context, | |||
assignedids, | |||
requestor, | |||
amaflag, | |||
endpoint, | |||
... | |||
) |
#define ast_channel_cleanup | ( | c | ) | ({ ao2_cleanup(c); (struct ast_channel *) (NULL); }) |
Cleanup a channel reference.
c | the channel (NULL tolerant) |
NULL | always |
Definition at line 2969 of file channel.h.
Referenced by ast_ari_bridges_start_moh(), ast_ari_channels_create(), ast_ari_channels_dial(), ast_ari_channels_get_channel_var(), ast_ari_channels_originate(), ast_ari_channels_originate_with_id(), ast_ari_channels_rtpstatistics(), ast_bridge_transfer_blind(), ast_set_hangupsource(), bridge_exec(), destroy_conference_bridge(), and snoop_destroy().
#define ast_channel_has_tech_function | ( | chan, | |
function | |||
) | (ast_channel_tech(chan) ? ast_channel_tech(chan)->function != NULL : 0) |
Checks if a channel's technology implements a particular callback function.
chan | The channel |
function | The function to look for |
1 | if the channel has a technology set and it implements the function |
0 | if the channel doesn't have a technology set or it doesn't implement the function |
#define AST_CHANNEL_NAME 80 |
Max length of an ast_channel name
Definition at line 171 of file channel.h.
Referenced by __analog_handle_event(), ast_call_forward(), ast_cc_call_failed(), ast_cc_is_recall(), ast_channel_destructor(), ast_parse_device_state(), ast_queue_cc_frame(), ast_setstate(), begin_dial_channel(), chan_pjsip_incoming_response_update_cause(), channel_do_masquerade(), dahdi_cc_callback(), dial_exec_full(), do_forward(), jingle_action_session_terminate(), sig_pri_call(), and wait_for_answer().
#define ast_channel_ref | ( | c | ) | ({ ao2_ref(c, +1); (c); }) |
Increase channel reference count.
c | the channel |
c | always |
Definition at line 2947 of file channel.h.
Referenced by agent_login_exec(), ast_autochan_new_channel(), ast_autochan_setup(), ast_bridge_add_channel(), ast_bridge_peer_nolock(), ast_bridge_set_single_src_video_mode(), ast_bridge_update_talker_src_video_mode(), ast_local_get_peer(), ast_local_setup_bridge(), ast_local_setup_masquerade(), ast_unreal_channel_push_to_bridge(), ast_unreal_lock_all(), ast_unreal_queryoption(), ast_unreal_setoption(), attended_transfer_properties_alloc(), bridge_agent_hold_push(), channel_do_masquerade(), control_create(), feature_attended_transfer(), get_transfer_party_non_transferer_bridge(), stasis_app_control_snoop(), and unreal_queue_frame().
#define ast_channel_unref | ( | c | ) | ({ ao2_ref(c, -1); (struct ast_channel *) (NULL); }) |
Decrease channel reference count.
c | the channel |
NULL | always |
Definition at line 2958 of file channel.h.
Referenced by __ast_channel_alloc_ap(), acf_odbc_write(), action_add_agi_cmd(), action_redirect(), action_status(), ast_add_extension2_lockopt(), ast_async_goto_by_name(), ast_autochan_destroy(), ast_autochan_new_channel(), ast_bridge_add_channel(), ast_bridge_remove_video_src(), ast_bridge_update_talker_src_video_mode(), ast_cel_fabricate_channel_from_event(), ast_channel_release(), ast_hangup(), ast_local_unlock_all(), ast_manager_hangup_helper(), ast_parse_device_state(), ast_pickup_call(), ast_pickup_find_by_group(), ast_rtp_instance_set_stats_vars(), ast_str_substitute_variables_full2(), ast_unreal_channel_push_to_bridge(), ast_unreal_hangup(), ast_unreal_indicate(), ast_unreal_lock_all(), ast_unreal_queryoption(), ast_unreal_setoption(), bridge_agent_hold_push(), bridge_exec(), channel_do_masquerade(), handle_cli_agi_add_cmd(), handle_eval_function(), handle_redirect(), handle_show_chanvar(), handle_show_hangup_all(), handle_show_hangup_channel(), handle_showchan(), jingle_action_session_accept(), jingle_action_session_info(), jingle_action_session_terminate(), jingle_interpret_content(), jingle_outgoing_hook(), jingle_queue_hangup_with_cause(), local_call(), make_email_file(), manager_mute_mixmonitor(), pbx_substitute_variables_helper_full_location(), pickup_by_channel(), pickup_by_exten(), pickup_by_group(), pickup_by_mark(), pickup_by_part(), rtp_check_timeout(), stasis_app_channel_unreal_set_internal(), and unreal_queue_frame().
#define ast_dummy_channel_alloc | ( | ) | __ast_dummy_channel_alloc(__FILE__, __LINE__, __PRETTY_FUNCTION__) |
Create a fake channel structure.
NULL | failure |
non-NULL | successfully allocated channel |
Definition at line 1282 of file channel.h.
Referenced by acf_odbc_write(), ast_add_extension2_lockopt(), ast_cel_fabricate_channel_from_event(), ast_str_substitute_variables_full2(), handle_eval_function(), make_email_file(), and pbx_substitute_variables_helper_full_location().
#define AST_EXTENDED_FDS 12 |
the start of extended file descriptor positions
Definition at line 195 of file channel.h.
Referenced by ast_channel_fd_add(), chan_pjsip_read_stream(), and check_for_rtp_changes().
#define AST_FEATURE_DTMF_MASK |
#define AST_GENERATOR_FD (AST_MAX_FDS-4) |
used by generator
Definition at line 203 of file channel.h.
Referenced by __ast_read(), and channel_do_masquerade().
#define AST_JITTERBUFFER_FD (AST_MAX_FDS-5) |
used by generator
Definition at line 204 of file channel.h.
Referenced by __ast_read(), and ast_jb_create_framehook().
#define AST_MAX_ACCOUNT_CODE 80 |
#define AST_MAX_CONTEXT 80 |
Max length of a context
Definition at line 135 of file channel.h.
Referenced by feature_attended_transfer(), handle_call_forward(), handle_show_hint(), handle_show_hints(), iax2_exec(), and run_externnotify().
#define AST_MAX_EXTENSION 80 |
Max length of an extension
Definition at line 134 of file channel.h.
Referenced by advanced_options(), ast_devstate_changed(), ast_presence_state_changed(), dial_exec_full(), feature_attended_transfer(), feature_blind_transfer(), forward_message(), handle_call_forward(), handle_show_hint(), handle_show_hints(), iax2_exec(), manager_show_dialplan_helper(), parking_lot_cfg_create_extensions(), and speech_background().
#define AST_MAX_FDS 11 |
#define AST_MAX_PUBLIC_UNIQUEID 149 |
Max length of a channel uniqueid reported to the outside world.
149 = 127 (max systemname) + "-" + 10 (epoch timestamp)
#define AST_MAX_UNIQUEID (AST_MAX_PUBLIC_UNIQUEID + 2 + 1) |
Maximum size of an internal Asterisk channel unique ID.
Add two for the Local;2 channel to append a ';2' if needed plus nul terminator.
#define AST_MAX_USER_FIELD 256 |
Max length of the channel user field
Definition at line 174 of file channel.h.
Referenced by ast_rtp_instance_set_stats_vars(), and ast_variable_list_join().
#define AST_NUM_CHANNEL_BUCKETS 1567 |
The number of buckets to store channels or channel information
Definition at line 155 of file channel.h.
Referenced by ast_channels_init(), and ast_stasis_channels_init().
#define AST_TIMING_FD (AST_MAX_FDS-2) |
used for timingfd
Definition at line 201 of file channel.h.
Referenced by __ast_channel_alloc_ap(), __ast_read(), and channel_do_masquerade().
#define CHECK_BLOCKING | ( | c | ) |
Set the blocking indication on the channel.
Indicate that the thread handling the channel is about to do a blocking operation to wait for media on the channel. (poll, read, or write)
Masquerading and ast_queue_frame() use this indication to wake up the thread.
Definition at line 2871 of file channel.h.
Referenced by ast_sendtext_data(), ast_waitfor_nandfds(), and ast_write_stream().
#define DEBUGCHAN_FLAG 0x80000000 |
The high bit of the frame count is used as a debug marker, so increments of the counters must be done with care. Please use c->fin = FRAMECOUNT_INC(c->fin) and the same for c->fout.
Definition at line 857 of file channel.h.
Referenced by __ast_read(), and ast_write_stream().
#define DECLARE_STRINGFIELD_SETTERS_FOR | ( | field | ) |
#define MAX_LANGUAGE 40 |
#define MAX_MUSICCLASS 80 |
typedef int(* ast_acf_read2_fn_t) (struct ast_channel *chan, const char *cmd, char *data, struct ast_str **str, ssize_t len) |
typedef int(* ast_acf_read_fn_t) (struct ast_channel *chan, const char *function, char *data, char *buf, size_t len) |
typedef int(* ast_acf_write_fn_t) (struct ast_channel *chan, const char *function, char *data, const char *value) |
anonymous enum |
ast_channel_tech Properties
Definition at line 955 of file channel.h.
anonymous enum |
ast_channel flags
Enumerator | |
---|---|
AST_FLAG_DEFER_DTMF |
Queue incoming DTMF, to be released when this flag is turned off |
AST_FLAG_WRITE_INT |
write should be interrupt generator |
AST_FLAG_BLOCKING |
a thread is blocking on this channel |
AST_FLAG_ZOMBIE |
This is a zombie channel |
AST_FLAG_EXCEPTION |
There is an exception pending |
AST_FLAG_MOH |
Listening to moh XXX anthm promises me this will disappear XXX |
AST_FLAG_SPYING |
This channel is spying on another channel |
AST_FLAG_IN_AUTOLOOP |
the channel is in an auto-incrementing dialplan processor, so when ->priority is set, it will get incremented before finding the next priority to run |
AST_FLAG_OUTGOING |
This is an outgoing call |
AST_FLAG_IN_DTMF |
A DTMF_BEGIN frame has been read from this channel, but not yet an END |
AST_FLAG_EMULATE_DTMF |
A DTMF_END was received when not IN_DTMF, so the length of the digit is currently being emulated |
AST_FLAG_END_DTMF_ONLY |
This is set to tell the channel not to generate DTMF begin frames, and to instead only generate END frames. |
AST_FLAG_MASQ_NOSTREAM |
This flag indicates that on a masquerade, an active stream should not be carried over |
AST_FLAG_BRIDGE_HANGUP_RUN |
This flag indicates that the hangup exten was run when the bridge terminated, a message aimed at preventing a subsequent hangup exten being run at the pbx_run level |
AST_FLAG_DISABLE_WORKAROUNDS |
Disable certain workarounds. This reintroduces certain bugs, but allows some non-traditional dialplans (like AGI) to continue to function. |
AST_FLAG_DISABLE_DEVSTATE_CACHE |
Disable device state event caching. This allows channel drivers to selectively prevent device state events from being cached by certain channels such as anonymous calls which have no persistent represenatation that can be tracked. |
AST_FLAG_BRIDGE_DUAL_REDIRECT_WAIT |
This flag indicates that a dual channel redirect is in progress. The bridge needs to wait until the flag is cleared to continue. |
AST_FLAG_ORIGINATED |
This flag indicates that the channel was originated. |
AST_FLAG_DEAD |
The channel is well and truly dead. Once this is set and published, no further actions should be taken upon the channel, and no further publications should occur. |
AST_FLAG_SNAPSHOT_STAGE |
Channel snapshot should not be published, it is being staged for an explicit publish. |
AST_FLAG_TIMINGDATA_IS_AO2_OBJ |
The data on chan->timingdata is an astobj2 object. |
AST_FLAG_SUBROUTINE_EXEC |
The channel is executing a subroutine or macro |
Definition at line 979 of file channel.h.
anonymous enum |
Enumerator | |
---|---|
AST_SOFTHANGUP_DEV |
Soft hangup requested by device or other internal reason. Actual hangup needed. |
AST_SOFTHANGUP_ASYNCGOTO |
Used to break the normal frame flow so an async goto can be done instead of actually hanging up. |
AST_SOFTHANGUP_SHUTDOWN |
Soft hangup requested by system shutdown. Actual hangup needed. |
AST_SOFTHANGUP_TIMEOUT |
Used to break the normal frame flow after a timeout so an implicit async goto can be done to the 'T' exten if it exists instead of actually hanging up. If the exten does not exist then actually hangup. |
AST_SOFTHANGUP_APPUNLOAD |
Soft hangup requested by application/channel-driver being unloaded. Actual hangup needed. |
AST_SOFTHANGUP_EXPLICIT |
Soft hangup requested by non-associated party. Actual hangup needed. |
AST_SOFTHANGUP_HANGUP_EXEC |
Used to indicate that the channel is currently executing hangup logic in the dialplan. The channel has been hungup when this is set. |
AST_SOFTHANGUP_ALL |
All softhangup flags. This can be used as an argument to ast_channel_clear_softhangup() to clear all softhangup flags from a channel. |
Definition at line 1116 of file channel.h.
Enumerator | |
---|---|
AST_CHANNEL_REQUESTOR_BRIDGE_PEER |
The requestor is the future bridge peer of the channel. |
AST_CHANNEL_REQUESTOR_REPLACEMENT |
The requestor is to be replaced by the channel. |
Definition at line 1475 of file channel.h.
enum AST_PARTY_CHAR_SET |
enum ast_t38_state |
Possible T38 states on channels.
Definition at line 878 of file channel.h.
int __ast_answer | ( | struct ast_channel * | chan, |
unsigned int | delay | ||
) |
Answer a channel, with a selectable delay before returning.
chan | channel to answer |
delay | maximum amount of time to wait for incoming media |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2695 of file channel.c.
References AST_CONTROL_HANGUP, ast_debug, AST_FRAME_BRIDGE_ACTION, AST_FRAME_BRIDGE_ACTION_SYNC, AST_FRAME_CNG, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_HTML, AST_FRAME_IAX, AST_FRAME_IMAGE, AST_FRAME_MODEM, AST_FRAME_NULL, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_TEXT_DATA, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frisolate, AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_HEAD_NOLOCK, AST_LIST_INSERT_HEAD, AST_LIST_REMOVE_HEAD, ast_queue_frame_head(), ast_raw_answer(), ast_read(), ast_remaining_ms(), AST_STATE_RING, AST_STATE_RINGING, ast_tvnow(), ast_waitfor(), ast_frame::frametype, ast_frame_subclass::integer, and ast_frame::subclass.
Referenced by ast_answer().
struct ast_channel* __ast_channel_alloc | ( | int | needqueue, |
int | state, | ||
const char * | cid_num, | ||
const char * | cid_name, | ||
const char * | acctcode, | ||
const char * | exten, | ||
const char * | context, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
enum ama_flags | amaflag, | ||
struct ast_endpoint * | endpoint, | ||
const char * | file, | ||
int | line, | ||
const char * | function, | ||
const char * | name_fmt, | ||
... | |||
) |
Create a channel structure.
NULL | failure |
non-NULL | successfully allocated channel |
Definition at line 954 of file channel.c.
References __ast_channel_alloc_ap().
struct ast_channel* __ast_request_and_dial | ( | const char * | type, |
struct ast_format_cap * | cap, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | addr, | ||
int | timeout, | ||
int * | reason, | ||
const char * | cid_num, | ||
const char * | cid_name, | ||
struct outgoing_helper * | oh | ||
) |
Request a channel of a given type, with data as optional information used by the low level module and attempt to place a call on it.
type | type of channel to request |
cap | format capabilities for requested channel |
assignedids | Unique Id to assign to channel |
requestor | channel requesting data |
addr | destination of the call |
timeout | maximum amount of time to wait for an answer |
reason | why unsuccessful (if unsuccessful) |
cid_num | Caller-ID Number |
cid_name | Caller-ID Name (ascii) |
oh | Outgoing helper |
Definition at line 5976 of file channel.c.
References ast_call(), ast_call_forward(), ast_channel_datastore_inherit(), ast_channel_hangupcause_hash_set(), ast_channel_inherit_variables(), ast_channel_lock_both, ast_channel_req_accountcodes(), AST_CHANNEL_REQUESTOR_BRIDGE_PEER, ast_channel_set_connected_line(), ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CC, AST_CONTROL_CONGESTION, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_HANGUP, AST_CONTROL_HOLD, AST_CONTROL_INCOMPLETE, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_REDIRECTING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_UNHOLD, AST_CONTROL_VIDUPDATE, AST_FLAG_ORIGINATED, AST_FRAME_CONTROL, ast_hangup(), ast_party_connected_line_set_init(), ast_read(), ast_remaining_ms(), ast_request(), ast_set_callerid(), ast_set_variables(), AST_STATE_UP, ast_tvnow(), ast_waitfor(), ast_frame::data, ast_frame::datalen, ast_frame::frametype, ast_party_connected_line::id, ast_frame_subclass::integer, ast_party_id::name, ast_party_id::number, ast_party_name::presentation, ast_party_number::presentation, ast_party_name::str, ast_party_number::str, ast_frame::subclass, ast_party_name::valid, and ast_party_number::valid.
Referenced by ast_request_and_dial().
int ast_activate_generator | ( | struct ast_channel * | chan, |
struct ast_generator * | gen, | ||
void * | params | ||
) |
Activate a given generator
Definition at line 2951 of file channel.c.
References ast_prod(), ast_settimeout(), ast_channel::generatordata, and ast_generator::release.
Referenced by ast_channel_start_silence_generator(), ast_linear_stream(), ast_playtones_start(), ast_tonepair_start(), and spandsp_fax_gateway_start().
int ast_active_channels | ( | void | ) |
returns number of active/allocated channels
Definition at line 499 of file channel.c.
References ao2_container_count().
Referenced by action_corestatus(), handle_show_settings(), and really_quit().
|
inlinestatic |
if fd is a valid descriptor, set *pfd with the descriptor
Definition at line 2819 of file channel.h.
Referenced by ast_waitfor_nandfds().
int ast_answer | ( | struct ast_channel * | chan | ) |
Answer a channel.
chan | channel to answer |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2805 of file channel.c.
References __ast_answer().
Referenced by agent_login_exec(), alarmreceiver_exec(), ast_auto_answer(), ast_bridge_add_channel(), ast_do_pickup(), ast_pickup_call(), conf_exec(), confbridge_exec(), count_exec(), dial_exec_full(), leave_voicemail(), local_call(), minivm_accmess_exec(), receivefax_exec(), sendfax_exec(), setup_privacy_args(), and speech_background().
|
inline |
Answer a channel, if it's not already answered.
chan | channel to answer |
See ast_answer()
0 | on success |
non-zero | on failure |
Definition at line 2811 of file channel.c.
References ast_answer(), and AST_STATE_UP.
void ast_autoservice_chan_hangup_peer | ( | struct ast_channel * | chan, |
struct ast_channel * | peer | ||
) |
Put chan into autoservice while hanging up peer.
chan | Chan to put into autoservice. |
peer | Chan to run hangup handlers and hangup. |
Definition at line 342 of file autoservice.c.
References ast_autoservice_start(), ast_autoservice_stop(), and ast_hangup().
Referenced by dial_exec_full().
int ast_autoservice_ignore | ( | struct ast_channel * | chan, |
enum ast_frame_type | ftype | ||
) |
Ignore certain frame types.
0 | success |
-1 | channel is not in autoservice |
Definition at line 352 of file autoservice.c.
References AST_LIST_LOCK, AST_LIST_TRAVERSE, and AST_LIST_UNLOCK.
int ast_autoservice_start | ( | struct ast_channel * | chan | ) |
Automatically service a channel for us...
0 | success |
-1 | failure, or the channel is already being autoserviced |
Definition at line 200 of file autoservice.c.
References ast_calloc, ast_debug, AST_FLAG_END_DTMF_ONLY, AST_LIST_EMPTY, AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_REMOVE, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_thread_is_user_interface(), and asent::use_count.
Referenced by acf_odbc_write(), ast_app_exec_sub(), ast_audiosocket_connect(), ast_autoservice_chan_hangup_peer(), ast_dtmf_stream(), ast_get_enum(), ast_get_srv(), ast_get_txt(), ast_mf_stream(), ast_sf_stream(), begin_dial_prerun(), confbridge_exec(), dial_exec_full(), join_conference_bridge(), lua_autoservice_start(), lua_get_variable_value(), lua_pbx_exec(), lua_set_variable(), lua_set_variable_value(), push_announcer(), and ring_one().
int ast_autoservice_stop | ( | struct ast_channel * | chan | ) |
Stop servicing a channel for us...
chan |
0 | success |
-1 | error, or the channel has been hungup |
Definition at line 266 of file autoservice.c.
References ast_debug, AST_FLAG_END_DTMF_ONLY, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_REMOVE_HEAD, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_queue_frame_head(), ast_thread_is_user_interface(), asent::deferred_frames, ast_frame::frametype, and asent::use_count.
Referenced by acf_odbc_write(), ast_app_exec_sub(), ast_audiosocket_connect(), ast_autoservice_chan_hangup_peer(), ast_dtmf_stream(), ast_get_enum(), ast_get_srv(), ast_get_txt(), ast_hangup(), ast_mf_stream(), ast_sf_stream(), begin_dial_prerun(), confbridge_exec(), dial_exec_full(), hangup_playback(), join_conference_bridge(), lua_autoservice_stop(), lua_get_variable_value(), lua_pbx_exec(), lua_set_variable(), lua_set_variable_value(), and ring_one().
int ast_call | ( | struct ast_channel * | chan, |
const char * | addr, | ||
int | timeout | ||
) |
Make a call.
chan | which channel to make the call on |
addr | destination of the call |
timeout | time to wait on for connect (Doesn't seem to be used.) |
Place a call, take no longer than timeout ms.
0 | on success |
-1 | on failure |
Definition at line 6461 of file channel.c.
References ast_check_hangup(), AST_FLAG_OUTGOING, AST_FLAG_ZOMBIE, and ast_channel_tech::call.
Referenced by __ast_request_and_dial(), ast_call_forward(), attended_transfer_bridge(), begin_dial_channel(), dial_exec_full(), do_forward(), feature_attended_transfer(), ring_entry(), and wait_for_answer().
struct ast_channel* ast_call_forward | ( | struct ast_channel * | caller, |
struct ast_channel * | orig, | ||
int * | timeout, | ||
struct ast_format_cap * | cap, | ||
struct outgoing_helper * | oh, | ||
int * | outstate | ||
) |
Forwards a call to a new channel specified by the original channel's call_forward str. If possible, the new forwarded channel is created and returned while the original one is terminated.
caller | in channel that requested orig |
orig | channel being replaced by the call forward channel |
timeout | maximum amount of time to wait for setup of new forward channel |
cap | format capabilities for requested channel |
oh | outgoing helper used with original channel |
outstate | reason why unsuccessful (if unsuccessful) |
Definition at line 5898 of file channel.c.
References ast_call(), ast_channel_lock_both, AST_CHANNEL_NAME, ast_channel_req_accountcodes(), AST_CHANNEL_REQUESTOR_REPLACEMENT, ast_channel_set_flag(), ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), ast_copy_string(), AST_FLAG_ORIGINATED, ast_hangup(), ast_party_connected_line_copy(), ast_party_redirecting_copy(), ast_request(), ast_set_variables(), ast_channel::data, pbx_builtin_getvar_helper(), pbx_builtin_setvar_helper(), and S_OR.
Referenced by __ast_request_and_dial().
const char* ast_cause2str | ( | int | cause | ) |
Gives the string form of a given cause code.
cause | cause to get the description of |
Gives the string form of a given cause code.
Definition at line 612 of file channel.c.
Referenced by channel_state_change(), dial_exec_full(), and hangupcause_read().
void ast_change_name | ( | struct ast_channel * | chan, |
const char * | newname | ||
) |
Change channel name.
chan | the channel to change the name of |
newname | the name to change to |
Definition at line 6759 of file channel.c.
References __ast_change_name_nolink(), ao2_link, and ao2_unlink.
const char* ast_channel_amaflags2string | ( | enum ama_flags | flags | ) |
Convert the enum representation of an AMA flag to a string representation.
flags | integer flag |
A | string representation of the flag |
Definition at line 4373 of file channel.c.
Referenced by ast_cdr_format_var().
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().
struct ast_channel* ast_channel_bridge_peer | ( | struct ast_channel * | chan | ) |
Get the channel's bridge peer only if the bridge is two-party.
chan | Channel desiring the bridge peer channel. |
NULL | Channel not in a bridge or the bridge is not two-party. |
non-NULL | Reffed peer channel at time of calling. |
Definition at line 10564 of file channel.c.
References ao2_ref, ast_bridge_peer(), and ast_channel_get_bridge().
Referenced by ast_rtp_instance_set_stats_vars(), ast_set_hangupsource(), ast_unreal_queryoption(), channel_do_masquerade(), fax_detect_framehook(), fax_gateway_framehook(), and spandsp_fax_gateway_start().
struct ast_channel* ast_channel_callback | ( | ao2_callback_data_fn * | cb_fn, |
void * | arg, | ||
void * | data, | ||
int | ao2_flags | ||
) |
Call a function with every active channel.
This function executes a callback one time for each active channel on the system. The channel is provided as an argument to the function.
Definition at line 1278 of file channel.c.
Referenced by ast_channel_get_by_exten(), ast_channel_get_by_name_prefix(), ast_channel_iterator_by_exten_new(), ast_channel_iterator_by_name_new(), ast_pickup_find_by_group(), find_by_channel(), and pickup_by_mark().
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_cc_params_init | ( | struct ast_channel * | chan, |
const struct ast_cc_config_params * | base_params | ||
) |
Set up datastore with CCSS parameters for a 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 to create the datastore on |
base_params | CCSS parameters we wish to copy into the channel |
0 | Success |
-1 | Failure |
Definition at line 10451 of file channel.c.
References ast_cc_config_params_destroy(), ast_cc_config_params_init, ast_cc_copy_config_params(), ast_channel_datastore_add(), and ast_datastore::data.
Referenced by ast_channel_get_cc_config_params(), ast_unreal_call_setup(), and ast_unreal_new_channels().
void ast_channel_clear_flag | ( | struct ast_channel * | chan, |
unsigned int | flag | ||
) |
Clear a flag on a channel.
chan | The channel to clear the flag from |
flag | The flag to clear |
Definition at line 11034 of file channel.c.
Referenced by action_redirect(), ast_bridge_setup_after_goto(), ast_channel_undefer_dtmf(), ast_waitfordigit_full(), dial_exec_full(), and waitstream_core().
void ast_channel_clear_softhangup | ( | struct ast_channel * | chan, |
int | flag | ||
) |
Clear a set of softhangup flags from a channel.
Never clear a softhangup flag from a channel directly. Instead, use this function. This ensures that all aspects of the softhangup process are aborted.
chan | the channel to clear the flag on |
flag | the flag or flags to clear |
Definition at line 2432 of file channel.c.
References AST_CONTROL_END_OF_Q, AST_FRAME_CONTROL, AST_LIST_LAST, AST_LIST_REMOVE, ast_frame::frametype, ast_frame_subclass::integer, and ast_frame::subclass.
Referenced by __ast_pbx_run(), ast_bridge_setup_after_goto(), collect_digits(), and stasis_app_exec().
int ast_channel_cmpwhentohangup_tv | ( | struct ast_channel * | chan, |
struct timeval | offset | ||
) |
Compare a offset with the settings of when to hang a channel up.
chan | channel on which to check for hangup |
offset | offset in seconds and microseconds from current time |
1 | |
0 | |
-1 | This function compares a offset from current time with the absolute time out on a channel (when to hang up). If the absolute time out on a channel is earlier than current time plus the offset, it returns 1, if the two time values are equal, it return 0, otherwise, it return -1. |
Compare a offset with the settings of when to hang a channel up.
Definition at line 523 of file channel.c.
References ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
int ast_channel_connected_line_sub | ( | struct ast_channel * | autoservice_chan, |
struct ast_channel * | sub_chan, | ||
const void * | connected_info, | ||
int | frame | ||
) |
Run a connected line interception subroutine and update a channel's connected line information.
autoservice_chan | Channel to place into autoservice while the sub is running. It is perfectly safe for this to be NULL |
sub_chan | The channel to run the subroutine on. Also the channel from which we determine which subroutine we need to run. |
connected_info | Either an ast_party_connected_line or ast_frame pointer of type AST_CONTROL_CONNECTED_LINE |
frame | If true, then connected_info is an ast_frame pointer, otherwise it is an ast_party_connected_line pointer. |
0 | Success |
-1 | Either the subroutine does not exist, or there was an error while attempting to run the subroutine |
Definition at line 10338 of file channel.c.
References ast_app_run_sub(), ast_channel_update_connected_line(), ast_connected_line_parse_data(), ast_party_connected_line_copy(), ast_party_connected_line_free(), ast_party_connected_line_init(), ast_strdupa, ast_frame::data, ast_frame::datalen, pbx_builtin_getvar_helper(), and S_OR.
Referenced by __ast_read(), ast_do_pickup(), dial_exec_full(), handle_frame(), and wait_for_answer().
int ast_channel_datastore_add | ( | struct ast_channel * | chan, |
struct ast_datastore * | datastore | ||
) |
Add a datastore to a channel.
0 | success |
non-zero | failure |
Definition at line 2385 of file channel.c.
References AST_LIST_INSERT_HEAD.
Referenced by ast_cel_fabricate_channel_from_event(), ast_channel_cc_params_init(), ast_channel_suppress(), ast_do_pickup(), ast_iax2_new(), ast_jb_create_framehook(), ast_setup_cc_recall_datastore(), audiohook_volume_get(), authenticate_reply(), command_prestart_queue_command(), dial_exec_full(), find_or_create_details(), lua_get_state(), raise_exception(), save_dialstring(), set_timeout(), setup_async_playback_datastore(), speech_create(), stasis_app_channel_set_stasis_end_published(), t38_attach_framehook(), and unicast_rtp_request().
struct ast_datastore* ast_channel_datastore_find | ( | struct ast_channel * | chan, |
const struct ast_datastore_info * | info, | ||
const char * | uid | ||
) |
Find a datastore on a channel.
pointer | to the datastore if found |
NULL | if not found |
Definition at line 2399 of file channel.c.
References AST_LIST_TRAVERSE, ast_datastore::info, and ast_datastore::uid.
Referenced by ast_bridge_features_ds_get(), ast_bridge_read_after_goto(), ast_can_pickup(), ast_cc_agent_set_interfaces_chanvar(), ast_cc_call_init(), ast_cc_completed(), ast_cc_extension_monitor_add_dialstring(), ast_cc_get_current_core_id(), ast_cc_is_recall(), ast_cc_offer(), ast_channel_feature_hooks_get(), ast_channel_get_cc_config_params(), ast_channel_suppress(), ast_channel_unsuppress(), ast_handle_cc_control_frame(), ast_ignore_cc(), ast_jb_create_framehook(), ast_set_cc_interfaces_chanvar(), async_play_sound_ready(), audiohook_volume_callback(), audiohook_volume_get(), bridge_timeout(), chan_rtp_get_rtp_peer(), command_prestart_get_container(), command_prestart_queue_command(), conf_find_bridge_profile(), conf_find_user_profile(), conf_set_menu_to_user(), dial_exec_full(), find_details(), find_speech(), fixup_callback(), get_agi_cmd(), get_park_common_datastore_copy(), lua_get_state(), mute_mixmonitor_instance(), raise_exception(), restore_dialstring(), set_interval_hook(), setup_async_playback_datastore(), stasis_app_channel_is_internal(), stasis_app_channel_is_stasis_end_published(), t38_attach_framehook(), and wait_for_initiator().
int ast_channel_datastore_inherit | ( | struct ast_channel * | from, |
struct ast_channel * | to | ||
) |
Inherit datastores from a parent to a child.
Definition at line 2368 of file channel.c.
References AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_datastore::data, ast_datastore_info::duplicate, ast_datastore::info, ast_datastore::inheritance, and ast_datastore::uid.
Referenced by __ast_request_and_dial(), ast_ari_channels_dial(), ast_unreal_call_setup(), begin_dial_prerun(), dial_exec_full(), do_forward(), ring_entry(), and wait_for_answer().
int ast_channel_datastore_remove | ( | struct ast_channel * | chan, |
struct ast_datastore * | datastore | ||
) |
Remove a datastore from a channel.
0 | success |
non-zero | failure |
Definition at line 2394 of file channel.c.
References AST_LIST_REMOVE.
Referenced by ast_channel_unsuppress(), ast_do_pickup(), ast_jb_create_framehook(), bridge_timeout(), fixup_callback(), and lua_get_state().
int ast_channel_defer_dtmf | ( | struct ast_channel * | chan | ) |
Defers DTMF so that you only read things like hangups and audio.
Defers DTMF so that you only read things like hangups and audio.
Definition at line 1257 of file channel.c.
References AST_FLAG_DEFER_DTMF.
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_early_bridge | ( | struct ast_channel * | c0, |
struct ast_channel * | c1 | ||
) |
Bridge two channels together (early)
c0 | first channel to bridge |
c1 | second channel to bridge |
Bridge two channels (c0 and c1) together early. This implies either side may not be answered yet.
Definition at line 7412 of file channel.c.
References ast_channel_tech::early_bridge.
Referenced by dial_exec_full().
void ast_channel_end_dtmf | ( | struct ast_channel * | chan, |
char | digit, | ||
struct timeval | start, | ||
const char * | why | ||
) |
Simulate a DTMF end on a broken bridge channel.
chan | Channel sending DTMF that has not ended. |
digit | DTMF digit to stop. |
start | DTMF digit start time. |
why | Reason bridge broken. |
Definition at line 10869 of file channel.c.
References AST_FLAG_ZOMBIE, ast_senddigit_end(), AST_SOFTHANGUP_ASYNCGOTO, ast_tvdiff_ms(), ast_tvnow(), and option_dtmfminduration.
Referenced by channel_do_masquerade().
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_feature_hooks_append | ( | struct ast_channel * | chan, |
struct ast_bridge_features * | features | ||
) |
Appends to the channel-attached features a channel has access to upon being bridged.
chan | Which channel to set features for |
features | The feature set to append to the channel's features |
0 | on success |
-1 | on failure |
struct ast_bridge_features* ast_channel_feature_hooks_get | ( | struct ast_channel * | chan | ) |
Gets the channel-attached features a channel has access to upon being bridged.
chan | Which channel to get features for |
non-NULL | The features currently set for this channel |
NULL | if the features have not been set |
Definition at line 10903 of file channel.c.
References ast_channel_datastore_find(), and ast_datastore::data.
int ast_channel_feature_hooks_replace | ( | struct ast_channel * | chan, |
struct ast_bridge_features * | features | ||
) |
Sets the channel-attached features a channel has access to upon being bridged.
chan | Which channel to set features for |
features | The feature set with which to replace the channel's features |
0 | on success |
-1 | on failure |
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 varshead* ast_channel_get_ari_vars | ( | struct ast_channel * | chan | ) |
Gets the variables for a given channel, as specified by ast_channel_set_ari_vars().
chan | Channel to get variables for. |
NULL | on error |
Definition at line 7988 of file channel.c.
Referenced by ast_channel_snapshot_create().
struct ast_bridge* ast_channel_get_bridge | ( | const struct ast_channel * | chan | ) |
Get the bridge associated with a channel.
chan | The channel whose bridge we want |
The bridge returned has its reference count incremented. Use ao2_cleanup() or ao2_ref() in order to decrement the reference count when you are finished with the bridge.
NULL | No bridge present on the channel |
non-NULL | The bridge the channel is in |
Definition at line 10534 of file channel.c.
References ao2_ref.
Referenced by ast_bridge_add_channel(), ast_bridge_transfer_acquire_bridge(), ast_channel_bridge_peer(), get_transfer_parties(), and handle_showchan().
struct ast_bridge_channel* ast_channel_get_bridge_channel | ( | struct ast_channel * | chan | ) |
Get a reference to the channel's bridge pointer.
chan | The channel whose bridge channel is desired |
NULL | The channel has no bridge_channel |
non-NULL | A reference to the bridge_channel |
Definition at line 10582 of file channel.c.
References ao2_ref.
Referenced by ast_bridge_add_channel(), ast_bridge_notify_masquerade(), ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), bridge_move(), dial_bridge_after_cb(), hold(), play_sound(), ringing(), set_interval_hook(), and unhold().
struct ast_channel* ast_channel_get_by_exten | ( | const char * | exten, |
const char * | context | ||
) |
Find a channel by extension and context.
exten | the extension to search for |
context | the context to search for |
Return a channel that is currently at the specified extension and context.
a | channel that is at the specified extension and context |
NULL | if no channel was found |
Definition at line 1459 of file channel.c.
References ast_channel_callback().
struct ast_channel* ast_channel_get_by_name | ( | const char * | name | ) |
Find a channel by name.
Channel search functions
name | the name or uniqueid of the channel to search for |
Find a channel that has the same name as the provided argument.
a | channel with the name specified by the argument |
NULL | if no channel was found |
Definition at line 1454 of file channel.c.
References ast_channel_get_by_name_prefix().
Referenced by action_add_agi_cmd(), action_redirect(), action_status(), ast_ari_channels_create(), ast_ari_channels_dial(), ast_ari_channels_get_channel_var(), ast_ari_channels_hangup(), ast_ari_channels_rtpstatistics(), ast_async_goto_by_name(), ast_manager_hangup_helper(), find_control(), handle_cli_agi_add_cmd(), handle_redirect(), handle_show_chanvar(), handle_show_hangup_channel(), handle_showchan(), manager_mute_mixmonitor(), moh_channel_thread(), rtp_check_timeout(), stasis_app_bridge_moh_channel(), stasis_app_bridge_moh_stop(), and stasis_app_bridge_playback_channel_find().
struct ast_channel* ast_channel_get_by_name_prefix | ( | const char * | name, |
size_t | name_len | ||
) |
Find a channel by a name prefix.
name | The channel name or uniqueid prefix to search for |
name_len | Only search for up to this many characters from the name |
Find a channel that has the same name prefix as specified by the arguments.
a | channel with the name prefix specified by the arguments |
NULL | if no channel was found |
Definition at line 1434 of file channel.c.
References ast_channel_callback(), and OBJ_KEY.
Referenced by action_bridge(), ast_channel_get_by_name(), ast_parse_device_state(), and bridge_exec().
int ast_channel_get_cc_agent_type | ( | struct ast_channel * | chan, |
char * | agent_type, | ||
size_t | size | ||
) |
Find the appropriate CC agent type to use given a channel.
During call completion, we will need to create a call completion agent structure. To figure out the type of agent to construct, we need to ask the channel driver for the appropriate type.
Prior to adding this function, the call completion core attempted to figure this out for itself by stripping the technology off the channel's name. However, in the case of chan_dahdi, there are multiple agent types registered, and so simply searching for an agent type called "DAHDI" is not possible. In a case where multiple agent types are defined, the channel driver must have a queryoption callback defined in its channel_tech, and the queryoption callback must handle AST_OPTION_CC_AGENT_TYPE
If a channel driver does not have a queryoption callback or if the queryoption callback does not handle AST_OPTION_CC_AGENT_TYPE, then the old behavior of using the technology portion of the channel name is used instead. This is perfectly suitable for channel drivers whose channel technologies are a one-to-one match with the agent types defined within.
Note that this function is only called when the agent policy on a given channel is set to "native." Generic agents' type can be determined automatically by the core.
chan | The channel for which we wish to retrieve the agent type | |
[out] | agent_type | The type of agent the channel driver wants us to use |
size | The size of the buffer to write to |
Definition at line 10513 of file channel.c.
References ast_channel_queryoption(), ast_copy_string(), and AST_OPTION_CC_AGENT_TYPE.
struct ast_cc_config_params* ast_channel_get_cc_config_params | ( | struct ast_channel * | chan | ) |
Get the CCSS parameters from a channel.
This function makes use of datastore operations on the channel, so it is important to lock the channel before calling this function.
chan | Channel to retrieve parameters from |
NULL | Failure |
non-NULL | The parameters desired |
Definition at line 10474 of file channel.c.
References ast_channel_cc_params_init(), ast_channel_datastore_find(), and ast_datastore::data.
Referenced by ast_cc_call_failed(), ast_cc_call_init(), ast_queue_cc_frame(), ast_unreal_call_setup(), and ast_unreal_new_channels().
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().
int ast_channel_get_device_name | ( | struct ast_channel * | chan, |
char * | device_name, | ||
size_t | name_buffer_length | ||
) |
Get a device name given its channel structure.
A common practice in Asterisk is to determine the device being talked to by dissecting the channel name. For certain channel types, this is not accurate. For instance, an ISDN channel is named based on what B channel is used, not the device being communicated with.
This function interfaces with a channel tech's queryoption callback to retrieve the name of the device being communicated with. If the channel does not implement this specific option, then the traditional method of using the channel name is used instead.
chan | The channel to retrieve the information from | |
[out] | device_name | The buffer to place the device's name into |
name_buffer_length | The allocated space for the device_name |
Definition at line 10496 of file channel.c.
References ast_channel_queryoption(), ast_copy_string(), and AST_OPTION_DEVICE_NAME.
Referenced by ast_cc_call_failed(), ast_cc_is_recall(), ast_queue_cc_frame(), chan_pjsip_indicate(), dial_exec_full(), and sig_pri_call().
int ast_channel_get_duration | ( | struct ast_channel * | chan | ) |
Obtain how long the channel since the channel was created.
chan | The channel object |
0 | if the time value cannot be computed (or you called this really fast) |
The | number of seconds the channel has been up |
Definition at line 2830 of file channel.c.
References ast_channel_get_duration_ms().
int64_t ast_channel_get_duration_ms | ( | struct ast_channel * | chan | ) |
Obtain how long it's been, in milliseconds, since the channel was created.
chan | The channel object |
0 | if the time value cannot be computed (or you called this really fast) |
The | number of milliseconds since channel creation |
Definition at line 2820 of file channel.c.
References ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
Referenced by ast_channel_get_duration().
int ast_channel_get_intercept_mode | ( | void | ) |
Am I currently running an intercept dialplan routine.
A dialplan intercept routine is equivalent to an interrupt routine. As such, the routine must be done quickly and you do not have access to the media stream. These restrictions are necessary because the media stream is the responsibility of some other code and interfering with or delaying that processing is bad.
0 | Not in an intercept routine. |
1 | In an intercept routine. |
Definition at line 10333 of file channel.c.
References ast_threadstorage_get_ptr().
Referenced by run_agi().
struct varshead* ast_channel_get_manager_vars | ( | struct ast_channel * | chan | ) |
Gets the variables for a given channel, as specified by ast_channel_set_manager_vars().
chan | Channel to get variables for. |
NULL | on error |
Definition at line 7983 of file channel.c.
Referenced by ast_channel_snapshot_create().
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.
|
inlinestatic |
Retrieves the current T38 state of a channel.
Definition at line 2850 of file channel.h.
References ast_channel_queryoption(), ast_channel::state, and T38_STATE_UNAVAILABLE.
Referenced by fax_gateway_detect_t38(), fax_gateway_detect_v21(), fax_gateway_framehook(), generic_fax_exec(), receivefax_exec(), sendfax_exec(), and spandsp_fax_gateway_start().
int ast_channel_get_up_time | ( | struct ast_channel * | chan | ) |
Obtain how long it has been since the channel was answered.
chan | The channel object |
0 | if the channel isn't answered (or you called this really fast) |
The | number of seconds the channel has been up |
Definition at line 2845 of file channel.c.
References ast_channel_get_up_time_ms().
Referenced by chan_pjsip_read_stream().
int64_t ast_channel_get_up_time_ms | ( | struct ast_channel * | chan | ) |
Obtain how long it has been since the channel was answered in ms.
chan | The channel object |
0 | if the channel isn't answered (or you called this really fast) |
The | number of milliseconds the channel has been up |
Definition at line 2835 of file channel.c.
References ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
Referenced by ast_channel_get_up_time().
struct varshead* ast_channel_get_vars | ( | struct ast_channel * | chan | ) |
Gets the variables for a given channel, as set using pbx_builtin_setvar_helper().
chan | Channel to get variables for |
NULL | on error |
Definition at line 7911 of file channel.c.
References ao2_ref, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, RAII_VAR, and varshead_dtor().
void ast_channel_hangupcause_hash_set | ( | struct ast_channel * | chan, |
const struct ast_control_pvt_cause_code * | cause_code, | ||
int | datalen | ||
) |
Sets the HANGUPCAUSE hash and optionally the SIP_CAUSE hash on the given channel.
chan | channel on which to set the cause information |
cause_code | ast_control_pvt_cause_code structure containing cause information |
datalen | total length of the structure since it may vary |
Definition at line 4346 of file channel.c.
References ast_channel_dialed_causes_add(), ast_func_write(), ast_control_pvt_cause_code::chan_name, ast_control_pvt_cause_code::code, and ast_control_pvt_cause_code::emulate_sip_cause.
Referenced by __analog_handle_event(), __ast_request_and_dial(), chan_pjsip_incoming_response_update_cause(), indicate_data_internal(), and jingle_action_session_terminate().
int ast_channel_has_ari_vars | ( | void | ) |
int ast_channel_has_audio_frame_or_monitor | ( | struct ast_channel * | chan | ) |
Check if the channel has active audiohooks, active framehooks, or a monitor.
chan | The channel to check. |
non-zero | if channel has active audiohooks, framehooks, or monitor. |
Definition at line 2518 of file channel.c.
References ast_audiohook_write_list_empty(), and ast_framehook_list_contains_no_active().
int ast_channel_has_hook_requiring_audio | ( | struct ast_channel * | chan | ) |
Check if the channel has any active hooks that require audio.
chan | The channel to check. |
non-zero | if channel has active audiohooks, audio framehooks, or monitor. |
Definition at line 2524 of file channel.c.
References ast_audiohook_write_list_empty(), AST_FRAME_VOICE, and ast_framehook_list_contains_no_active_of_type().
int ast_channel_has_manager_vars | ( | void | ) |
Return whether or not any manager variables have been set.
0 | if no manager variables are expected |
1 | if manager variables are expected |
Definition at line 7855 of file channel.c.
Referenced by ast_channel_publish_varset().
void ast_channel_inherit_variables | ( | const struct ast_channel * | parent, |
struct ast_channel * | child | ||
) |
Inherits channel variable from parent to child channel.
parent | Parent channel |
child | Child channel |
Scans all channel variables in the parent channel, looking for those that should be copied into the child channel. Variables whose names begin with a single '_' are copied into the child channel with the prefix removed. Variables whose names begin with '__' are copied into the child channel with their names unchanged.
Definition at line 6771 of file channel.c.
References ast_channel_publish_varset(), ast_debug, AST_LIST_INSERT_TAIL, and AST_LIST_TRAVERSE.
Referenced by __ast_request_and_dial(), ast_ari_channels_dial(), begin_dial_prerun(), dial_exec_full(), do_forward(), ring_entry(), and wait_for_answer().
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_bridged | ( | const struct ast_channel * | chan | ) |
Determine if a channel is in a bridge.
chan | The channel to test |
0 | The channel is not bridged |
non-zero | The channel is bridged |
Definition at line 10545 of file channel.c.
Referenced by __ast_read(), action_redirect(), ast_async_goto(), ast_audiohook_attach(), ast_audiohook_remove(), ast_framehook_attach(), ast_framehook_detach(), ast_framehook_list_fixup(), audio_audiohook_write_list(), chan_pjsip_read_stream(), chan_pjsip_set_rtp_peer(), dtmf_audiohook_write_list(), set_timeout(), wait_for_bridged(), and wait_for_unbridged().
int ast_channel_is_leaving_bridge | ( | struct ast_channel * | chan | ) |
Determine if a channel is leaving a bridge, but not hung up.
chan | The channel to test |
0 | The channel is not leaving the bridge or is hung up |
non-zero | The channel is leaving the bridge |
Definition at line 10550 of file channel.c.
References ast_channel_unbridged(), and AST_SOFTHANGUP_ASYNCGOTO.
Referenced by ast_indicate_data().
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().
struct ast_channel_iterator* ast_channel_iterator_all_new | ( | void | ) |
Create a new channel iterator.
After creating an iterator using this function, the ast_channel_iterator_next() function can be used to iterate through all channels that exist.
NULL | on failure |
a | new channel iterator |
Definition at line 1408 of file channel.c.
References ao2_iterator_init(), and ast_calloc.
Referenced by action_status(), ast_manager_hangup_helper(), and handle_show_hangup_all().
struct ast_channel_iterator* ast_channel_iterator_by_exten_new | ( | const char * | exten, |
const char * | context | ||
) |
Create a new channel iterator based on extension.
exten | The extension that channels must be in |
context | The context that channels must be in |
After creating an iterator using this function, the ast_channel_iterator_next() function can be used to iterate through all channels that are currently in the specified context and extension.
NULL | on failure |
a | new channel iterator based on the specified parameters |
Definition at line 1368 of file channel.c.
References ast_calloc, ast_channel_callback(), and OBJ_MULTIPLE.
Referenced by pickup_by_exten().
struct ast_channel_iterator* ast_channel_iterator_by_name_new | ( | const char * | name, |
size_t | name_len | ||
) |
Create a new channel iterator based on name.
name | channel name or channel uniqueid to match |
name_len | number of characters in the channel name to match on. This would be used to match based on name prefix. If matching on the full channel name is desired, then this parameter should be 0. |
After creating an iterator using this function, the ast_channel_iterator_next() function can be used to iterate through all channels that exist that have the specified name or name prefix.
NULL | on failure |
a | new channel iterator based on the specified parameters |
Definition at line 1388 of file channel.c.
References ast_calloc, ast_channel_callback(), OBJ_KEY, and OBJ_MULTIPLE.
struct ast_channel_iterator* ast_channel_iterator_destroy | ( | struct ast_channel_iterator * | i | ) |
Destroy a channel iterator.
i | the itereator to destroy |
This function is used to destroy a channel iterator that was retrieved by using one of the channel_iterator_xxx_new() functions.
NULL | for convenience to clear out the pointer to the iterator that was just destroyed. |
Definition at line 1360 of file channel.c.
References ao2_iterator_destroy().
Referenced by action_status(), ast_manager_hangup_helper(), handle_show_hangup_all(), and pickup_by_exten().
struct ast_channel* ast_channel_iterator_next | ( | struct ast_channel_iterator * | i | ) |
Get the next channel for a channel iterator.
i | the channel iterator that was created using one of the channel_iterator_xxx_new() functions. |
This function should be used to iterate through all channels that match a specified set of parameters that were provided when the iterator was created.
the | next channel that matches the parameters used when the iterator was created. |
NULL | if no more channels match the iterator parameters. |
Definition at line 1422 of file channel.c.
Referenced by action_status(), ast_manager_hangup_helper(), handle_show_hangup_all(), and pickup_by_exten().
int ast_channel_make_compatible | ( | struct ast_channel * | chan, |
struct ast_channel * | peer | ||
) |
Make the frame formats of two channels compatible.
chan | First channel to make compatible. Should be the calling party. |
peer | Other channel to make compatible. Should be the called party. |
Set two channels to compatible frame formats in both directions. The path from peer to chan is made compatible first to allow for in-band audio in case the other direction cannot be made compatible.
0 | on success. |
-1 | on error. |
Definition at line 6720 of file channel.c.
References ast_channel_make_compatible_helper().
Referenced by dial_exec_full(), do_forward(), fax_detect_framehook(), and fax_gateway_framehook().
int ast_channel_move | ( | struct ast_channel * | dest, |
struct ast_channel * | source | ||
) |
Move a channel from its current location to a new location.
dest | The place to move the source channel |
source | The channel to move |
0 | Success |
non-zero | Failure |
Definition at line 10666 of file channel.c.
References ast_channel_lock_both, ast_channel_masquerade_type(), ast_channel_publish_blob(), AST_FLAG_ZOMBIE, ast_json_pack(), ast_json_unref(), channel_do_masquerade(), channel_move_lock, lock, RAII_VAR, and SCOPED_MUTEX.
Referenced by ast_channel_yank(), ast_do_pickup(), and local_call().
void ast_channel_name_to_dial_string | ( | char * | channel_name | ) |
Removes the trailing identifiers from a channel name string.
channel_name | string that you wish to turn into a dial string. This string will be edited in place. |
const char* ast_channel_oldest_linkedid | ( | const char * | a, |
const char * | b | ||
) |
Return the oldest linkedid between two channels.
A channel linkedid is derived from the channel uniqueid which is formed like this: [systemname-]ctime.seq
The systemname, and the dash are optional, followed by the epoch time followed by an integer sequence. Note that this is not a decimal number, since 1.2 is less than 1.11 in uniqueid land.
To compare two uniqueids, we parse out the integer values of the time and the sequence numbers and compare them, with time trumping sequence.
a | The linkedid value of the first channel to compare |
b | The linkedid value of the second channel to compare |
NULL | on failure |
The | oldest linkedid value |
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().
int ast_channel_queryoption | ( | struct ast_channel * | channel, |
int | option, | ||
void * | data, | ||
int * | datalen, | ||
int | block | ||
) |
Checks the value of an option.
Query the value of an option Works similarly to setoption except only reads the options.
Definition at line 7442 of file channel.c.
References ast_channel_tech::queryoption.
Referenced by ast_channel_get_cc_agent_type(), ast_channel_get_device_name(), ast_channel_get_t38_state(), and ast_unreal_queryoption().
void ast_channel_queue_connected_line_update | ( | struct ast_channel * | chan, |
const struct ast_party_connected_line * | connected, | ||
const struct ast_set_party_connected_line * | update | ||
) |
Queue a connected line update frame on a channel.
chan | Asterisk channel to indicate connected line information |
connected | Connected line information |
update | What connected line information to update. NULL if all. |
Definition at line 9106 of file channel.c.
References ast_connected_line_build_data(), AST_CONTROL_CONNECTED_LINE, and ast_queue_control_data().
Referenced by ast_do_pickup().
void ast_channel_queue_redirecting_update | ( | struct ast_channel * | chan, |
const struct ast_party_redirecting * | redirecting, | ||
const struct ast_set_party_redirecting * | update | ||
) |
Queue a redirecting update frame on a channel.
chan | Asterisk channel to indicate redirecting id information |
redirecting | Redirecting id information |
update | What redirecting information to update. NULL if all. |
Definition at line 10297 of file channel.c.
References AST_CONTROL_REDIRECTING, ast_queue_control_data(), and ast_redirecting_build_data().
const char* ast_channel_reason2str | ( | int | reason | ) |
return an english explanation of the code returned thru __ast_request_and_dial's 'outstate' argument
reason | The integer argument, usually taken from AST_CONTROL_ macros |
Definition at line 5826 of file channel.c.
References AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HANGUP, AST_CONTROL_RING, and AST_CONTROL_RINGING.
int ast_channel_redirecting_sub | ( | struct ast_channel * | autoservice_chan, |
struct ast_channel * | sub_chan, | ||
const void * | redirecting_info, | ||
int | is_frame | ||
) |
Run a redirecting interception subroutine and update a channel's redirecting information.
Whenever we want to update a channel's redirecting information, we may need to run a subroutine so that an administrator can manipulate the information before sending it out. This function both runs the subroutine specified by REDIRECTING_SEND_SUB and sends the update to the channel.
autoservice_chan | Channel to place into autoservice while the subroutine is running. It is perfectly safe for this to be NULL |
sub_chan | The channel to run the subroutine on. Also the channel from which we determine which subroutine we need to run. |
redirecting_info | Either an ast_party_redirecting or ast_frame pointer of type AST_CONTROL_REDIRECTING |
is_frame | If true, then redirecting_info is an ast_frame pointer, otherwise it is an ast_party_redirecting pointer. |
0 | Success |
-1 | Either the subroutine does not exist, or there was an error while attempting to run the subroutine |
Definition at line 10383 of file channel.c.
References ast_app_run_sub(), ast_channel_update_redirecting(), ast_party_redirecting_copy(), ast_party_redirecting_free(), ast_party_redirecting_init(), ast_redirecting_parse_data(), ast_strdupa, ast_frame::data, ast_frame::datalen, pbx_builtin_getvar_helper(), and S_OR.
Referenced by do_forward(), handle_frame(), and wait_for_answer().
int ast_channel_register | ( | const struct ast_channel_tech * | tech | ) |
Register a channel technology (a new channel driver) Called by a channel module to register the kind of channels it supports.
tech | Structure defining channel technology or "type" |
Register a channel technology (a new channel driver) Called by a channel module to register the kind of channels it supports.
Definition at line 539 of file channel.c.
References ast_calloc, ast_debug, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and chanlist::tech.
Referenced by ast_channels_init(), ast_local_init(), and load_module().
struct ast_channel* ast_channel_release | ( | struct ast_channel * | chan | ) |
Unlink and release reference to a channel.
This function will unlink the channel from the global channels container if it is still there and also release the current reference to the channel.
NULL | convenient for clearing invalid pointers |
Definition at line 1584 of file channel.c.
References ao2_unlink, and ast_channel_unref.
Referenced by ast_iax2_new(), and ast_unreal_new_channels().
void ast_channel_req_accountcodes | ( | struct ast_channel * | chan, |
const struct ast_channel * | requestor, | ||
enum ast_channel_requestor_relationship | relationship | ||
) |
Setup new channel accountcodes from the requestor channel after ast_request().
chan | New channel to get accountcodes setup. |
requestor | Requesting channel to get accountcodes from. |
relationship | What the new channel was created for. |
Definition at line 6434 of file channel.c.
Referenced by __ast_request_and_dial(), ast_ari_channels_dial(), ast_call_forward(), attended_transfer_bridge(), begin_dial_prerun(), dial_exec_full(), dial_transfer(), do_forward(), and wait_for_answer().
void ast_channel_req_accountcodes_precious | ( | struct ast_channel * | chan, |
const struct ast_channel * | requestor, | ||
enum ast_channel_requestor_relationship | relationship | ||
) |
Setup new channel accountcodes from the requestor channel after ast_request().
chan | New channel to get accountcodes setup. |
requestor | Requesting channel to get accountcodes from. |
relationship | What the new channel was created for. |
Definition at line 6439 of file channel.c.
Referenced by ring_entry().
int ast_channel_request_stream_topology_change | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology, | ||
void * | change_source | ||
) |
Request that the stream topology of a channel change.
chan | The channel to change |
topology | The new stream topology |
change_source | The source that initiated the change |
0 | request has been accepted to be attempted |
-1 | request could not be attempted |
Definition at line 10966 of file channel.c.
References ast_channel_get_stream_topology(), ast_channel_is_multistream(), AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, ast_debug, ast_str_tmp, ast_stream_topology_equal(), ast_stream_topology_to_str(), and ast_channel_tech::indicate.
Referenced by native_rtp_bridge_join(), and sfu_topologies_on_join().
int ast_channel_sendhtml | ( | struct ast_channel * | channel, |
int | subclass, | ||
const char * | data, | ||
int | datalen | ||
) |
Sends HTML on given channel Send HTML or URL on link.
Definition at line 6628 of file channel.c.
References ast_channel_tech::send_html.
Referenced by ast_channel_sendurl().
int ast_channel_sendurl | ( | struct ast_channel * | channel, |
const char * | url | ||
) |
Sends a URL on a given link Send URL on link.
Definition at line 6635 of file channel.c.
References ast_channel_sendhtml(), and AST_HTML_URL.
Referenced by dial_exec_full().
void ast_channel_set_ari_vars | ( | size_t | varc, |
char ** | vars | ||
) |
void ast_channel_set_caller | ( | struct ast_channel * | chan, |
const struct ast_party_caller * | caller, | ||
const struct ast_set_party_caller * | update | ||
) |
Set the caller id information in the Asterisk channel.
chan | Asterisk channel to set caller id information |
caller | Caller id information |
update | What caller information to update. NULL if all. |
Definition at line 7359 of file channel.c.
References AST_CHANNEL_SNAPSHOT_INVALIDATE_CALLER, ast_channel_snapshot_invalidate_segment(), and ast_party_caller_set().
void ast_channel_set_caller_event | ( | struct ast_channel * | chan, |
const struct ast_party_caller * | caller, | ||
const struct ast_set_party_caller * | update | ||
) |
Set the caller id information in the Asterisk channel and generate an AMI event if the caller id name or number changed.
chan | Asterisk channel to set caller id information |
caller | Caller id information |
update | What caller information to update. NULL if all. |
Definition at line 7372 of file channel.c.
References ast_channel_publish_snapshot(), AST_CHANNEL_SNAPSHOT_INVALIDATE_CALLER, ast_channel_snapshot_invalidate_segment(), and ast_party_caller_set().
Referenced by dial_exec_full(), do_forward(), and ring_entry().
void ast_channel_set_connected_line | ( | struct ast_channel * | chan, |
const struct ast_party_connected_line * | connected, | ||
const struct ast_set_party_connected_line * | update | ||
) |
Set the connected line information in the Asterisk channel.
chan | Asterisk channel to set connected line information |
connected | Connected line information |
update | What connected line information to update. NULL if all. |
Definition at line 8308 of file channel.c.
References ast_channel_publish_snapshot(), AST_CHANNEL_SNAPSHOT_INVALIDATE_CONNECTED, ast_channel_snapshot_invalidate_segment(), and ast_party_connected_line_set().
Referenced by __ast_request_and_dial(), and dial_exec_full().
void ast_channel_set_fd | ( | struct ast_channel * | chan, |
int | which, | ||
int | fd | ||
) |
Set the file descriptor on the channel
Definition at line 2426 of file channel.c.
Referenced by __ast_channel_alloc_ap(), ast_jb_create_framehook(), audiosocket_request(), channel_do_masquerade(), check_for_rtp_changes(), jingle_enable_video(), jingle_new(), sco_accept(), stasis_app_control_snoop(), and unicast_rtp_request().
void ast_channel_set_flag | ( | struct ast_channel * | chan, |
unsigned int | flag | ||
) |
Set a flag on a channel.
chan | The channel to set the flag on |
flag | The flag to set |
Definition at line 11027 of file channel.c.
Referenced by ast_call_forward(), ast_waitfordigit_full(), dial_exec_full(), and waitstream_core().
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().
void ast_channel_set_manager_vars | ( | size_t | varc, |
char ** | vars | ||
) |
void ast_channel_set_redirecting | ( | struct ast_channel * | chan, |
const struct ast_party_redirecting * | redirecting, | ||
const struct ast_set_party_redirecting * | update | ||
) |
Set the redirecting id information in the Asterisk channel.
chan | Asterisk channel to set redirecting id information |
redirecting | Redirecting id information |
update | What redirecting information to update. NULL if all. |
Definition at line 9119 of file channel.c.
References ast_channel_publish_snapshot(), AST_CHANNEL_SNAPSHOT_INVALIDATE_CALLER, ast_channel_snapshot_invalidate_segment(), and ast_party_redirecting_set().
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().
int ast_channel_setoption | ( | struct ast_channel * | channel, |
int | option, | ||
void * | data, | ||
int | datalen, | ||
int | block | ||
) |
Sets an option on a channel.
channel | channel to set options on |
option | option to change |
data | data specific to option |
datalen | length of the data |
block | blocking or not |
Set an option on a channel (see frame.h), optionally blocking awaiting the reply
Definition at line 7422 of file channel.c.
References ast_channel_tech::setoption.
Referenced by dial_exec_full(), and vm_forwardoptions().
void ast_channel_setwhentohangup_tv | ( | struct ast_channel * | chan, |
struct timeval | offset | ||
) |
Set when to hang a channel up.
chan | channel on which to check for hang up |
offset | offset in seconds and useconds relative to the current time of when to hang up |
This function sets the absolute time out on a channel (when to hang up).
Set when to hang a channel up.
Definition at line 510 of file channel.c.
References ast_channel_whentohangup_set(), ast_null_frame, ast_queue_frame(), ast_tvadd(), ast_tvnow(), and ast_tvzero().
void ast_channel_softhangup_withcause_locked | ( | struct ast_channel * | chan, |
int | causecode | ||
) |
Lock the given channel, then request softhangup on the channel with the given causecode.
chan | channel on which to hang up |
causecode | cause code to use (Zero if don't use cause code) |
Definition at line 468 of file channel.c.
References ast_debug, AST_SOFTHANGUP_EXPLICIT, and ast_softhangup_nolock().
struct ast_silence_generator* ast_channel_start_silence_generator | ( | struct ast_channel * | chan | ) |
Starts a silence generator on the given channel.
chan | The channel to generate silence on |
This function will cause SLINEAR silence to be generated on the supplied channel until it is disabled; if the channel cannot be put into SLINEAR mode then the function will fail.
Definition at line 8164 of file channel.c.
References ao2_bump, ast_activate_generator(), ast_calloc, ast_debug, ast_format_slin, and ast_set_write_format().
Referenced by __ast_play_and_record(), and safe_sleep_conditional().
void ast_channel_stop_silence_generator | ( | struct ast_channel * | chan, |
struct ast_silence_generator * | state | ||
) |
Stops a previously-started silence generator on the given channel.
chan | The channel to operate on |
state | The ast_silence_generator pointer return by a previous call to ast_channel_start_silence_generator. |
This function will stop the operating silence generator and return the channel to its previous write format.
Definition at line 8210 of file channel.c.
References ast_debug, and ast_set_write_format().
Referenced by __ast_play_and_record(), control_silence_stop_now(), and safe_sleep_conditional().
int ast_channel_stream_topology_changed | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology | ||
) |
Provide notice to a channel that the stream topology has changed.
chan | The channel to provide notice to |
topology | The new stream topology |
0 | success |
-1 | failure |
Definition at line 10996 of file channel.c.
References ast_channel_is_multistream(), AST_CONTROL_STREAM_TOPOLOGY_CHANGED, and ast_channel_tech::indicate.
Referenced by __ast_read().
int ast_channel_stream_topology_changed_externally | ( | struct ast_channel * | chan | ) |
Provide notice from a channel that the topology has changed on it as a result of the remote party renegotiating.
chan | The channel to provide notice from |
0 | success |
-1 | failure |
Definition at line 11008 of file channel.c.
References ast_channel_is_multistream(), AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_FRAME_CONTROL, ast_queue_frame(), and ast_stream_topology_changed_external.
enum ama_flags ast_channel_string2amaflag | ( | const char * | flag | ) |
Convert a string to a detail record AMA flag.
flag | string form of flag |
the | enum (integer) form of the flag |
Definition at line 4360 of file channel.c.
Referenced by build_user(), and set_config().
int ast_channel_supports_html | ( | struct ast_channel * | channel | ) |
Checks for HTML support on a channel.
Definition at line 6623 of file channel.c.
Referenced by dial_exec_full().
int ast_channel_suppress | ( | struct ast_channel * | chan, |
unsigned int | direction, | ||
enum ast_frame_type | frametype | ||
) |
Suppress passing of a frame type on a channel.
chan | The channel to suppress |
direction | The direction in which to suppress |
frametype | The type of frame (AST_FRAME_VOICE, etc) to suppress |
0 | Success |
-1 | Failure |
Definition at line 10777 of file channel.c.
References ao2_ref, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_framehook_attach(), ast_framehook_detach(), ast_datastore::data, ast_framehook_interface::data, and ast_framehook_interface::version.
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_undefer_dtmf | ( | struct ast_channel * | chan | ) |
Unset defer DTMF flag on channel.
Undo defer. ast_read will return any DTMF characters that were queued
Definition at line 1271 of file channel.c.
References ast_channel_clear_flag(), and AST_FLAG_DEFER_DTMF.
void ast_channel_unlink | ( | struct ast_channel * | chan | ) |
Remove a channel from the global channels container.
chan | channel to remove |
In a case where it is desired that a channel not be available in any lookups in the global channels conatiner, use this function.
Definition at line 10529 of file channel.c.
References ao2_unlink.
void ast_channel_unregister | ( | const struct ast_channel_tech * | tech | ) |
Unregister a channel technology.
tech | Structure defining channel technology or "type" that was previously registered |
Unregister a channel technology.
Definition at line 570 of file channel.c.
References ast_debug, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and chanlist::tech.
Referenced by load_module(), and unload_module().
int ast_channel_unsuppress | ( | struct ast_channel * | chan, |
unsigned int | direction, | ||
enum ast_frame_type | frametype | ||
) |
Stop suppressing of a frame type on a channel.
chan | The channel to stop suppressing |
direction | The direction in which to stop suppressing |
frametype | The type of frame (AST_FRAME_VOICE, etc) to stop suppressing |
0 | Success |
-1 | Failure |
Definition at line 10839 of file channel.c.
References ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_datastore_free(), ast_framehook_detach(), and ast_datastore::data.
void ast_channel_update_connected_line | ( | struct ast_channel * | chan, |
const struct ast_party_connected_line * | connected, | ||
const struct ast_set_party_connected_line * | update | ||
) |
Indicate that the connected line information has changed.
chan | Asterisk channel to indicate connected line information |
connected | Connected line information |
update | What connected line information to update. NULL if all. |
Definition at line 9093 of file channel.c.
References ast_connected_line_build_data(), AST_CONTROL_CONNECTED_LINE, and ast_indicate_data().
Referenced by ast_channel_connected_line_sub(), ast_do_pickup(), and wait_for_answer().
void ast_channel_update_redirecting | ( | struct ast_channel * | chan, |
const struct ast_party_redirecting * | redirecting, | ||
const struct ast_set_party_redirecting * | update | ||
) |
Indicate that the redirecting id has changed.
chan | Asterisk channel to indicate redirecting id information |
redirecting | Redirecting id information |
update | What redirecting information to update. NULL if all. |
Definition at line 10284 of file channel.c.
References AST_CONTROL_REDIRECTING, ast_indicate_data(), and ast_redirecting_build_data().
Referenced by ast_channel_redirecting_sub(), do_forward(), and wait_for_answer().
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().
struct ast_channel* ast_channel_yank | ( | struct ast_channel * | yankee | ) |
Gain control of a channel in the system.
XXX Put name of callback-setting function in above paragraph once it is written
yankee | The channel to gain control of |
NULL | Could not gain control of the channel |
non-NULL | The channel |
Definition at line 10593 of file channel.c.
References ast_channel::accountcode, ast_channel::amaflags, ao2_bump, ast_channel_alloc, ast_channel_move(), AST_FLAG_IN_AUTOLOOP, ast_hangup(), AST_STATE_DOWN, ast_strdupa, ast_channel::context, ast_channel::exten, ast_channel::name, ast_channel::priority, ast_channel::readformat, and ast_channel::writeformat.
Referenced by ast_async_goto(), and ast_bridge_add_channel().
int ast_check_hangup | ( | struct ast_channel * | chan | ) |
Check to see if a channel is needing hang up.
chan | channel on which to check for hang up This function determines if the channel is being requested to be hung up. |
Check to see if a channel is needing hang up.
Definition at line 445 of file channel.c.
References ast_debug, AST_SOFTHANGUP_TIMEOUT, ast_test_suite_event_notify, ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
Referenced by __ast_pbx_run(), __ast_read(), agent_request_exec(), app_exec(), ast_bridge_setup_after_goto(), ast_call(), ast_indicate_data(), ast_raw_answer_with_stream_topology(), ast_recvtext(), ast_sendtext_data(), ast_transfer_protocol(), ast_unreal_fixup(), ast_waitfordigit_full(), ast_write_stream(), confbridge_exec(), dahdi_setoption(), depart_channel(), dial_exec_full(), fax_gateway_framehook(), join_conference_bridge(), lua_check_hangup(), run_agi(), set_config(), stasis_app_exec(), and transfer_target_framehook_cb().
int ast_connected_line_build_data | ( | unsigned char * | data, |
size_t | datalen, | ||
const struct ast_party_connected_line * | connected, | ||
const struct ast_set_party_connected_line * | update | ||
) |
Build the connected line information data frame.
data | Buffer to fill with the frame data |
datalen | Size of the buffer to fill |
connected | Connected line information |
update | What connected line information to build. NULL if all. |
-1 | if error |
Amount | of data buffer used |
Definition at line 8697 of file channel.c.
References ast_party_connected_line::id, ast_set_party_connected_line::id, ast_party_id_ies::name, ast_party_connected_line::priv, ast_set_party_connected_line::priv, ast_party_connected_line::source, and ast_party_name_ies::str.
Referenced by ast_channel_queue_connected_line_update(), and ast_channel_update_connected_line().
void ast_connected_line_copy_from_caller | ( | struct ast_party_connected_line * | dest, |
const struct ast_party_caller * | src | ||
) |
Copy the caller information to the connected line information.
dest | Destination connected line information |
src | Source caller information |
Definition at line 8293 of file channel.c.
References ast_party_caller::ani, ast_party_connected_line::ani, ast_party_caller::ani2, ast_party_connected_line::ani2, ast_party_id_copy(), ast_party_caller::id, and ast_party_connected_line::id.
Referenced by agent_request_exec(), ast_ari_channels_dial(), ast_do_pickup(), ast_unreal_call_setup(), begin_dial_prerun(), dial_exec_full(), do_forward(), ring_entry(), and wait_for_answer().
void ast_connected_line_copy_to_caller | ( | struct ast_party_caller * | dest, |
const struct ast_party_connected_line * | src | ||
) |
Copy the connected line information to the caller information.
dest | Destination caller information |
src | Source connected line information |
Definition at line 8300 of file channel.c.
References ast_party_caller::ani, ast_party_connected_line::ani, ast_party_caller::ani2, ast_party_connected_line::ani2, ast_party_id_copy(), ast_party_caller::id, and ast_party_connected_line::id.
Referenced by ast_unreal_call_setup().
int ast_connected_line_parse_data | ( | const unsigned char * | data, |
size_t | datalen, | ||
struct ast_party_connected_line * | connected | ||
) |
Parse connected line indication frame data.
data | Buffer with the frame data to parse |
datalen | Size of the buffer |
connected | Extracted connected line information |
0 | on success. |
-1 | on error. |
Definition at line 8785 of file channel.c.
References ast_debug, ast_malloc, ast_party_name::char_set, ast_party_id_ies::combined_presentation, ast_party_connected_line::id, ast_party_id::name, ast_party_id::number, ast_party_subaddress::odd_even_indicator, ast_party_number::plan, ast_party_name::presentation, ast_party_number::presentation, ast_party_connected_line::priv, ast_party_connected_line::source, ast_party_name::str, ast_party_number::str, ast_party_subaddress::str, ast_party_id::subaddress, ast_party_id::tag, ast_party_subaddress::type, ast_party_name::valid, ast_party_number::valid, and ast_party_subaddress::valid.
Referenced by __ast_read(), ast_channel_connected_line_sub(), and wait_for_answer().
void ast_deactivate_generator | ( | struct ast_channel * | chan | ) |
Deactivate an active generator
Definition at line 2893 of file channel.c.
References ast_timer_set_rate(), and should_trigger_dtmf_emulating().
Referenced by __ast_read(), ast_openstream_full(), ast_playtones_stop(), ast_tonepair_stop(), ast_write_stream(), and dial_exec_full().
const struct ast_channel_tech* ast_get_channel_tech | ( | const char * | name | ) |
Get a channel technology structure by name.
name | name of technology to find |
Get a channel technology structure by name.
Definition at line 592 of file channel.c.
References AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, and chanlist::tech.
Referenced by __ast_channel_alloc_ap(), _ast_device_state(), and ast_cc_callback().
struct ast_namedgroups* ast_get_namedgroups | ( | const char * | s | ) |
Create an ast_namedgroups set with group names from comma separated string.
Remove leading and trailing whitespace
Definition at line 7675 of file channel.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_container_alloc_hash, ao2_container_count(), ao2_link, ao2_ref, ast_skip_blanks(), ast_str_hash(), ast_strdupa, ast_strip(), ast_trim_blanks(), namedgroup_member::hash, namedgroup_member::name, namedgroup_cmp_cb(), namedgroup_hash_cb(), OBJ_NODATA, OBJ_POINTER, and OBJ_UNLINK.
void ast_hangup | ( | struct ast_channel * | chan | ) |
Hang up a channel.
chan | channel to hang up (NULL tolerant) |
Hang up a channel.
Definition at line 2541 of file channel.c.
References ao2_ref, ao2_unlink, ast_autoservice_stop(), ast_cc_offer(), ast_channel_unref, ast_closestream(), ast_debug, AST_FLAG_BLOCKING, AST_FLAG_ZOMBIE, ast_get_tid(), ast_pbx_hangup_handler_run(), ast_sched_context_destroy(), ast_channel_tech::hangup, and ast_generator::release.
Referenced by __analog_handle_event(), __ast_pbx_run(), __ast_request_and_dial(), answer_exec_run(), ast_ari_bridges_record(), ast_async_goto(), ast_autoservice_chan_hangup_peer(), ast_bridge_add_channel(), ast_bridge_run_after_goto(), ast_call_forward(), ast_channel_yank(), ast_dial_destroy(), ast_dial_hangup(), ast_iax2_new(), ast_pbx_outgoing_exten_predial(), ast_unreal_hangup(), attended_transfer_bridge(), begin_dial_channel(), build_conf(), chan_pjsip_new(), conf_free(), console_new(), destroy_conference_bridge(), dial_exec_full(), do_forward(), do_hang(), feature_attended_transfer(), handle_call_forward(), handle_exec(), handle_frame(), handle_timeout_trip(), hangup_playback(), hangupcalls(), jingle_action_session_initiate(), local_call(), moh_channel_thread(), monitor_dial(), pbx_outgoing_exec(), push_announcer(), snoop_stasis_thread(), stasis_app_control_snoop(), unistim_new(), and wait_for_answer().
int ast_indicate | ( | struct ast_channel * | chan, |
int | condition | ||
) |
Indicates condition of channel.
chan | channel to change the indication |
condition | which condition to indicate on the channel |
Definition at line 4277 of file channel.c.
References ast_indicate_data().
Referenced by __ast_play_and_record(), ast_bridge_channel_feature_digit(), ast_bridge_set_single_src_video_mode(), ast_bridge_update_talker_src_video_mode(), ast_raw_answer_with_stream_topology(), channel_do_masquerade(), cli_console_answer(), dial_exec_full(), do_forward(), handle_frame(), indicate_congestion(), monitor_dial(), queue_exec(), rna(), say_periodic_announcement(), softmix_bridge_join(), and wait_for_answer().
int ast_indicate_data | ( | struct ast_channel * | chan, |
int | condition, | ||
const void * | data, | ||
size_t | datalen | ||
) |
Indicates condition of channel, with payload.
chan | channel to change the indication |
condition | which condition to indicate on the channel |
data | pointer to payload data |
datalen | size of payload data |
Definition at line 4653 of file channel.c.
References ast_channel_is_leaving_bridge(), ast_check_hangup(), AST_CONTROL_MASQUERADE_NOTIFY, AST_FLAG_ZOMBIE, AST_FRAME_CONTROL, ast_framehook_list_is_empty(), ast_framehook_list_write_event(), ast_frdup, ast_frame::data, ast_frame::datalen, ast_frame::frametype, indicate_data_internal(), ast_frame_subclass::integer, and ast_frame::subclass.
Referenced by __ast_read(), ast_channel_update_connected_line(), ast_channel_update_redirecting(), ast_handle_cc_control_frame(), ast_indicate(), channel_do_masquerade(), dial_exec_full(), fax_gateway_indicate_t38(), generic_fax_exec(), handle_frame(), and wait_for_answer().
int ast_is_deferrable_frame | ( | const struct ast_frame * | frame | ) |
Should we keep this frame for later?
There are functions such as ast_safe_sleep which will service a channel to ensure that it does not have a large backlog of queued frames. When this happens, we want to hold on to specific frame types and just drop others. This function will tell if the frame we just read should be held onto.
frame | The frame we just read |
1 | frame should be kept |
0 | frame should be dropped |
Definition at line 1467 of file channel.c.
References AST_FRAME_BRIDGE_ACTION, AST_FRAME_BRIDGE_ACTION_SYNC, AST_FRAME_CNG, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_HTML, AST_FRAME_IAX, AST_FRAME_IMAGE, AST_FRAME_MODEM, AST_FRAME_NULL, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_TEXT_DATA, AST_FRAME_VIDEO, AST_FRAME_VOICE, and ast_frame::frametype.
Referenced by ast_bridge_channel_queue_frame(), and safe_sleep_conditional().
void ast_party_caller_copy | ( | struct ast_party_caller * | dest, |
const struct ast_party_caller * | src | ||
) |
Copy the source caller information to the destination caller.
dest | Destination caller |
src | Source caller |
Definition at line 1986 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_copy(), ast_party_caller::id, and ast_party_caller::priv.
void ast_party_caller_free | ( | struct ast_party_caller * | doomed | ) |
Destroy the caller party contents.
doomed | The caller party to destroy. |
Definition at line 2015 of file channel.c.
References ast_party_caller::ani, ast_party_id_free(), ast_party_caller::id, and ast_party_caller::priv.
Referenced by ast_channel_destructor(), ast_dummy_channel_destructor(), and sla_ring_station().
void ast_party_caller_init | ( | struct ast_party_caller * | init | ) |
Initialize the given caller structure.
init | Caller structure to initialize. |
Definition at line 1978 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_init(), ast_party_caller::id, and ast_party_caller::priv.
Referenced by __ast_channel_alloc_ap(), and sla_ring_station().
void ast_party_caller_set | ( | struct ast_party_caller * | dest, |
const struct ast_party_caller * | src, | ||
const struct ast_set_party_caller * | update | ||
) |
Set the caller information based on another caller source.
This is similar to ast_party_caller_copy, except that NULL values for strings in the src parameter indicate not to update the corresponding dest values.
dest | The caller one wishes to update |
src | The new caller values to update the dest |
update | What caller information to update. NULL if all. |
Definition at line 2007 of file channel.c.
References ast_party_caller::ani, ast_set_party_caller::ani, ast_party_caller::ani2, ast_party_id_set(), ast_party_caller::id, ast_set_party_caller::id, ast_party_caller::priv, and ast_set_party_caller::priv.
Referenced by ast_channel_set_caller(), and ast_channel_set_caller_event().
void ast_party_caller_set_init | ( | struct ast_party_caller * | init, |
const struct ast_party_caller * | guide | ||
) |
Initialize the given caller structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Caller structure to initialize. |
guide | Source caller to use as a guide in initializing. |
Definition at line 1999 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_set_init(), ast_party_caller::id, and ast_party_caller::priv.
Referenced by dial_exec_full(), do_forward(), and ring_entry().
void ast_party_connected_line_collect_caller | ( | struct ast_party_connected_line * | connected, |
struct ast_party_caller * | caller | ||
) |
Collect the caller party information into a connected line structure.
connected | Collected caller information for the connected line |
caller | Caller information. |
Definition at line 2063 of file channel.c.
References ast_party_caller::ani, ast_party_connected_line::ani, ast_party_caller::ani2, ast_party_connected_line::ani2, AST_CONNECTED_LINE_UPDATE_SOURCE_UNKNOWN, ast_party_caller::id, ast_party_connected_line::id, ast_party_caller::priv, ast_party_connected_line::priv, and ast_party_connected_line::source.
void ast_party_connected_line_copy | ( | struct ast_party_connected_line * | dest, |
const struct ast_party_connected_line * | src | ||
) |
Copy the source connected line information to the destination connected line.
dest | Destination connected line |
src | Source connected line |
Definition at line 2031 of file channel.c.
References ast_party_connected_line::ani, ast_party_connected_line::ani2, ast_party_id_copy(), ast_party_connected_line::id, ast_party_connected_line::priv, and ast_party_connected_line::source.
Referenced by __ast_read(), ast_call_forward(), ast_channel_connected_line_sub(), ast_do_pickup(), attended_transfer_properties_alloc(), dial_exec_full(), do_forward(), and wait_for_answer().
void ast_party_connected_line_free | ( | struct ast_party_connected_line * | doomed | ) |
Destroy the connected line information contents.
doomed | The connected line information to destroy. |
Definition at line 2072 of file channel.c.
References ast_party_connected_line::ani, ast_party_id_free(), ast_party_connected_line::id, and ast_party_connected_line::priv.
Referenced by __ast_read(), agent_request_exec(), ast_channel_connected_line_sub(), ast_channel_destructor(), ast_do_pickup(), ast_dummy_channel_destructor(), and wait_for_answer().
void ast_party_connected_line_init | ( | struct ast_party_connected_line * | init | ) |
Initialize the given connected line structure.
init | Connected line structure to initialize. |
Definition at line 2022 of file channel.c.
References ast_party_connected_line::ani, ast_party_connected_line::ani2, AST_CONNECTED_LINE_UPDATE_SOURCE_UNKNOWN, ast_party_id_init(), ast_party_connected_line::id, ast_party_connected_line::priv, and ast_party_connected_line::source.
Referenced by __ast_channel_alloc_ap(), __ast_read(), agent_request_exec(), ast_channel_connected_line_sub(), ast_do_pickup(), and do_forward().
void ast_party_connected_line_set | ( | struct ast_party_connected_line * | dest, |
const struct ast_party_connected_line * | src, | ||
const struct ast_set_party_connected_line * | update | ||
) |
Set the connected line information based on another connected line source.
dest | The connected line one wishes to update |
src | The new connected line values to update the dest |
update | What connected line information to update. NULL if all. |
Definition at line 2054 of file channel.c.
References ast_party_connected_line::ani, ast_set_party_connected_line::ani, ast_party_connected_line::ani2, ast_party_id_set(), ast_party_connected_line::id, ast_set_party_connected_line::id, ast_party_connected_line::priv, ast_set_party_connected_line::priv, and ast_party_connected_line::source.
Referenced by ast_channel_set_connected_line(), and wait_for_answer().
void ast_party_connected_line_set_init | ( | struct ast_party_connected_line * | init, |
const struct ast_party_connected_line * | guide | ||
) |
Initialize the given connected line structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Connected line structure to initialize. |
guide | Source connected line to use as a guide in initializing. |
Definition at line 2045 of file channel.c.
References ast_party_connected_line::ani, ast_party_connected_line::ani2, ast_party_id_set_init(), ast_party_connected_line::id, ast_party_connected_line::priv, and ast_party_connected_line::source.
Referenced by __ast_request_and_dial(), dial_exec_full(), and wait_for_answer().
void ast_party_dialed_copy | ( | struct ast_party_dialed * | dest, |
const struct ast_party_dialed * | src | ||
) |
Copy the source dialed party information to the destination dialed party.
dest | Destination dialed party |
src | Source dialed party |
Definition at line 1936 of file channel.c.
References ast_party_subaddress_copy(), ast_strdup, ast_party_dialed::number, ast_party_dialed::plan, ast_party_dialed::str, ast_party_dialed::subaddress, and ast_party_dialed::transit_network_select.
Referenced by ast_unreal_call_setup().
void ast_party_dialed_free | ( | struct ast_party_dialed * | doomed | ) |
Destroy the dialed party contents.
doomed | The dialed party to destroy. |
Definition at line 1971 of file channel.c.
References ast_party_subaddress_free(), ast_party_dialed::number, ast_party_dialed::str, and ast_party_dialed::subaddress.
Referenced by ast_channel_destructor(), and ast_dummy_channel_destructor().
void ast_party_dialed_init | ( | struct ast_party_dialed * | init | ) |
Initialize the given dialed structure.
init | Dialed structure to initialize. |
Definition at line 1928 of file channel.c.
References ast_party_subaddress_init(), ast_party_dialed::number, ast_party_dialed::plan, ast_party_dialed::str, ast_party_dialed::subaddress, and ast_party_dialed::transit_network_select.
Referenced by __ast_channel_alloc_ap().
void ast_party_dialed_set | ( | struct ast_party_dialed * | dest, |
const struct ast_party_dialed * | src | ||
) |
Set the dialed information based on another dialed source.
This is similar to ast_party_dialed_copy, except that NULL values for strings in the src parameter indicate not to update the corresponding dest values.
dest | The dialed one wishes to update |
src | The new dialed values to update the dest |
Definition at line 1958 of file channel.c.
References ast_party_subaddress_set(), ast_strdup, ast_party_dialed::number, ast_party_dialed::plan, ast_party_dialed::str, ast_party_dialed::subaddress, and ast_party_dialed::transit_network_select.
void ast_party_dialed_set_init | ( | struct ast_party_dialed * | init, |
const struct ast_party_dialed * | guide | ||
) |
Initialize the given dialed structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Caller structure to initialize. |
guide | Source dialed to use as a guide in initializing. |
Definition at line 1950 of file channel.c.
References ast_party_subaddress_set_init(), ast_party_dialed::number, ast_party_dialed::plan, ast_party_dialed::str, ast_party_dialed::subaddress, and ast_party_dialed::transit_network_select.
void ast_party_id_copy | ( | struct ast_party_id * | dest, |
const struct ast_party_id * | src | ||
) |
Copy the source party id information to the destination party id.
dest | Destination party id |
src | Source party id |
Definition at line 1765 of file channel.c.
References ast_party_name_copy(), ast_party_number_copy(), ast_party_subaddress_copy(), ast_strdup, ast_party_id::name, ast_party_id::number, ast_party_id::subaddress, and ast_party_id::tag.
Referenced by ast_connected_line_copy_from_caller(), ast_connected_line_copy_to_caller(), ast_party_caller_copy(), ast_party_connected_line_copy(), ast_party_id_merge_copy(), ast_party_redirecting_copy(), and chan_pjsip_new().
void ast_party_id_free | ( | struct ast_party_id * | doomed | ) |
Destroy the party id contents.
doomed | The party id to destroy. |
Definition at line 1811 of file channel.c.
References ast_party_name_free(), ast_party_number_free(), ast_party_subaddress_free(), ast_party_id::name, ast_party_id::number, ast_party_id::subaddress, and ast_party_id::tag.
Referenced by ast_party_caller_free(), ast_party_connected_line_free(), ast_party_id_reset(), and ast_party_redirecting_free().
void ast_party_id_init | ( | struct ast_party_id * | init | ) |
Initialize the given party id structure.
init | Party id structure to initialize. |
Definition at line 1757 of file channel.c.
References ast_party_name_init(), ast_party_number_init(), ast_party_subaddress_init(), ast_party_id::name, ast_party_id::number, ast_party_id::subaddress, and ast_party_id::tag.
Referenced by ast_party_caller_init(), ast_party_connected_line_init(), ast_party_id_reset(), ast_party_redirecting_init(), and dial_exec_full().
void ast_party_id_invalidate | ( | struct ast_party_id * | id | ) |
struct ast_party_id ast_party_id_merge | ( | struct ast_party_id * | base, |
struct ast_party_id * | overlay | ||
) |
Merge a given party id into another given party id.
This function will generate an effective party id.
Each party id component of the party id 'base' is overwritten by components of the party id 'overlay' if the overlay component is marked as valid. However the component 'tag' of the base party id remains untouched.
base | The party id which is merged. |
overlay | The party id which is used to merge into. |
Definition at line 1902 of file channel.c.
References ast_party_id::name.
Referenced by ast_party_id_merge_copy().
void ast_party_id_merge_copy | ( | struct ast_party_id * | dest, |
struct ast_party_id * | base, | ||
struct ast_party_id * | overlay | ||
) |
Copy a merge of a given party id into another given party id to a given destination party id.
Each party id component of the party id 'base' is overwritten by components of the party id 'overlay' if the 'overlay' component is marked as valid. However the component 'tag' of the 'base' party id remains untouched. The result is copied into the given party id 'dest'.
dest | The resulting merged party id. |
base | The party id which is merged. |
overlay | The party id which is used to merge into. |
Definition at line 1920 of file channel.c.
References ast_party_id_copy(), and ast_party_id_merge().
int ast_party_id_presentation | ( | const struct ast_party_id * | id | ) |
Determine the overall presentation value for the given party.
id | Party to determine the overall presentation value. |
Definition at line 1821 of file channel.c.
References ast_party_id::name, ast_party_id::number, ast_party_name::valid, and ast_party_number::valid.
Referenced by ast_json_party_id(), ast_str_retrieve_variable(), and queue_exec().
void ast_party_id_reset | ( | struct ast_party_id * | id | ) |
Destroy and initialize the given party id structure.
id | The party id to reset. |
Definition at line 1896 of file channel.c.
References ast_party_id_free(), and ast_party_id_init().
Referenced by ast_do_pickup(), and channel_do_masquerade().
void ast_party_id_set | ( | struct ast_party_id * | dest, |
const struct ast_party_id * | src, | ||
const struct ast_set_party_id * | update | ||
) |
Set the source party id information into the destination party id.
dest | The id one wishes to update |
src | The new id values to update the dest |
update | What id information to update. NULL if all. |
Definition at line 1788 of file channel.c.
References ast_party_name_set(), ast_party_number_set(), ast_party_subaddress_set(), ast_strdup, ast_party_id::name, ast_set_party_id::name, ast_party_id::number, ast_set_party_id::number, ast_party_id::subaddress, ast_set_party_id::subaddress, and ast_party_id::tag.
Referenced by ast_party_caller_set(), ast_party_connected_line_set(), and ast_party_redirecting_set().
void ast_party_id_set_init | ( | struct ast_party_id * | init, |
const struct ast_party_id * | guide | ||
) |
Initialize the given party id structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Party id structure to initialize. |
guide | Source party id to use as a guide in initializing. |
Definition at line 1780 of file channel.c.
References ast_party_name_set_init(), ast_party_number_set_init(), ast_party_subaddress_set_init(), ast_party_id::name, ast_party_id::number, ast_party_id::subaddress, and ast_party_id::tag.
Referenced by ast_party_caller_set_init(), ast_party_connected_line_set_init(), ast_party_redirecting_set_init(), and dial_exec_full().
void ast_party_name_copy | ( | struct ast_party_name * | dest, |
const struct ast_party_name * | src | ||
) |
Copy the source party name information to the destination party name.
dest | Destination party name |
src | Source party name |
Definition at line 1599 of file channel.c.
References ast_strdup, ast_party_name::char_set, ast_party_name::presentation, ast_party_name::str, and ast_party_name::valid.
Referenced by ast_party_id_copy().
void ast_party_name_free | ( | struct ast_party_name * | doomed | ) |
Destroy the party name contents.
doomed | The party name to destroy. |
Definition at line 1638 of file channel.c.
References ast_party_name::str.
Referenced by ast_party_id_free().
void ast_party_name_init | ( | struct ast_party_name * | init | ) |
Initialize the given name structure.
init | Name structure to initialize. |
Definition at line 1591 of file channel.c.
References ast_party_name::char_set, ast_party_name::presentation, ast_party_name::str, and ast_party_name::valid.
Referenced by ast_party_id_init().
void ast_party_name_set | ( | struct ast_party_name * | dest, |
const struct ast_party_name * | src | ||
) |
Set the source party name information into the destination party name.
dest | The name one wishes to update |
src | The new name values to update the dest |
Definition at line 1621 of file channel.c.
References ast_strdup, ast_party_name::char_set, ast_party_name::presentation, ast_party_name::str, and ast_party_name::valid.
Referenced by ast_party_id_set().
void ast_party_name_set_init | ( | struct ast_party_name * | init, |
const struct ast_party_name * | guide | ||
) |
Initialize the given party name structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Party name structure to initialize. |
guide | Source party name to use as a guide in initializing. |
Definition at line 1613 of file channel.c.
References ast_party_name::char_set, ast_party_name::presentation, ast_party_name::str, and ast_party_name::valid.
Referenced by ast_party_id_set_init().
void ast_party_number_copy | ( | struct ast_party_number * | dest, |
const struct ast_party_number * | src | ||
) |
Copy the source party number information to the destination party number.
dest | Destination party number |
src | Source party number |
Definition at line 1652 of file channel.c.
References ast_strdup, ast_party_number::plan, ast_party_number::presentation, ast_party_number::str, and ast_party_number::valid.
Referenced by ast_party_id_copy().
void ast_party_number_free | ( | struct ast_party_number * | doomed | ) |
Destroy the party number contents.
doomed | The party number to destroy. |
Definition at line 1691 of file channel.c.
References ast_party_number::str.
Referenced by ast_party_id_free(), do_forward(), and wait_for_answer().
void ast_party_number_init | ( | struct ast_party_number * | init | ) |
Initialize the given number structure.
init | Number structure to initialize. |
Definition at line 1644 of file channel.c.
References ast_party_number::plan, ast_party_number::presentation, ast_party_number::str, and ast_party_number::valid.
Referenced by ast_party_id_init(), do_forward(), and wait_for_answer().
void ast_party_number_set | ( | struct ast_party_number * | dest, |
const struct ast_party_number * | src | ||
) |
Set the source party number information into the destination party number.
dest | The number one wishes to update |
src | The new number values to update the dest |
Definition at line 1674 of file channel.c.
References ast_strdup, ast_party_number::plan, ast_party_number::presentation, ast_party_number::str, and ast_party_number::valid.
Referenced by ast_party_id_set().
void ast_party_number_set_init | ( | struct ast_party_number * | init, |
const struct ast_party_number * | guide | ||
) |
Initialize the given party number structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Party number structure to initialize. |
guide | Source party number to use as a guide in initializing. |
Definition at line 1666 of file channel.c.
References ast_party_number::plan, ast_party_number::presentation, ast_party_number::str, and ast_party_number::valid.
Referenced by ast_party_id_set_init().
void ast_party_redirecting_copy | ( | struct ast_party_redirecting * | dest, |
const struct ast_party_redirecting * | src | ||
) |
Copy the source redirecting information to the destination redirecting.
dest | Destination redirecting |
src | Source redirecting |
Definition at line 2135 of file channel.c.
References ast_party_id_copy(), ast_party_redirecting_reason_copy(), ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by ast_ari_channels_dial(), ast_call_forward(), ast_channel_redirecting_sub(), ast_unreal_call_setup(), begin_dial_prerun(), dial_exec_full(), do_forward(), ring_entry(), and wait_for_answer().
void ast_party_redirecting_free | ( | struct ast_party_redirecting * | doomed | ) |
Destroy the redirecting information contents.
doomed | The redirecting information to destroy. |
Definition at line 2179 of file channel.c.
References ast_party_id_free(), ast_party_redirecting_reason_free(), ast_party_redirecting::from, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by ast_channel_destructor(), ast_channel_redirecting_sub(), ast_dummy_channel_destructor(), do_forward(), and wait_for_answer().
void ast_party_redirecting_init | ( | struct ast_party_redirecting * | init | ) |
Initialize the given redirecting structure.
init | Redirecting structure to initialize. |
Definition at line 2122 of file channel.c.
References ast_party_id_init(), ast_party_redirecting_reason_init(), ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by __ast_channel_alloc_ap(), ast_channel_redirecting_sub(), do_forward(), and wait_for_answer().
void ast_party_redirecting_reason_copy | ( | struct ast_party_redirecting_reason * | dest, |
const struct ast_party_redirecting_reason * | src | ||
) |
Copy the source redirecting reason information to the destination redirecting reason.
dest | Destination redirecting reason |
src | Source redirecting reason |
Definition at line 2085 of file channel.c.
References ast_strdup, ast_party_redirecting_reason::code, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_copy().
void ast_party_redirecting_reason_free | ( | struct ast_party_redirecting_reason * | doomed | ) |
Destroy the redirecting reason contents.
doomed | The redirecting reason to destroy. |
Definition at line 2116 of file channel.c.
References ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_free().
void ast_party_redirecting_reason_init | ( | struct ast_party_redirecting_reason * | init | ) |
Initialize the given redirecting reason structure.
init | Redirecting reason structure to initialize |
Definition at line 2079 of file channel.c.
References ast_party_redirecting_reason::code, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_init().
void ast_party_redirecting_reason_set | ( | struct ast_party_redirecting_reason * | dest, |
const struct ast_party_redirecting_reason * | src | ||
) |
Set the redirecting reason information based on another redirecting reason source.
This is similar to ast_party_redirecting_reason_copy, except that NULL values for strings in the src parameter indicate not to update the corresponding dest values.
dest | The redirecting reason one wishes to update |
src | The new redirecting reason values to update the dest |
Definition at line 2102 of file channel.c.
References ast_strdup, ast_party_redirecting_reason::code, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_set().
void ast_party_redirecting_reason_set_init | ( | struct ast_party_redirecting_reason * | init, |
const struct ast_party_redirecting_reason * | guide | ||
) |
Initialize the given redirecting reason structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Redirecting reason structure to initialize. |
guide | Source redirecting reason to use as a guide in initializing. |
Definition at line 2096 of file channel.c.
References ast_party_redirecting_reason::code, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_set_init().
void ast_party_redirecting_set | ( | struct ast_party_redirecting * | dest, |
const struct ast_party_redirecting * | src, | ||
const struct ast_set_party_redirecting * | update | ||
) |
Set the redirecting information based on another redirecting source.
This is similar to ast_party_redirecting_copy, except that NULL values for strings in the src parameter indicate not to update the corresponding dest values.
dest | The redirecting one wishes to update |
src | The new redirecting values to update the dest |
update | What redirecting information to update. NULL if all. |
Definition at line 2166 of file channel.c.
References ast_party_id_set(), ast_party_redirecting_reason_set(), ast_party_redirecting::count, ast_party_redirecting::from, ast_set_party_redirecting::from, ast_party_redirecting::orig, ast_set_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_set_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_set_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_set_party_redirecting::priv_to, ast_party_redirecting::reason, ast_party_redirecting::to, and ast_set_party_redirecting::to.
Referenced by ast_channel_set_redirecting().
void ast_party_redirecting_set_init | ( | struct ast_party_redirecting * | init, |
const struct ast_party_redirecting * | guide | ||
) |
Initialize the given redirecting id structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Redirecting id structure to initialize. |
guide | Source redirecting id to use as a guide in initializing. |
Definition at line 2153 of file channel.c.
References ast_party_id_set_init(), ast_party_redirecting_reason_set_init(), ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, and ast_party_redirecting::to.
void ast_party_subaddress_copy | ( | struct ast_party_subaddress * | dest, |
const struct ast_party_subaddress * | src | ||
) |
Copy the source party subaddress information to the destination party subaddress.
dest | Destination party subaddress |
src | Source party subaddress |
Definition at line 1705 of file channel.c.
References ast_strdup, ast_party_subaddress::odd_even_indicator, ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by ast_party_dialed_copy(), and ast_party_id_copy().
void ast_party_subaddress_free | ( | struct ast_party_subaddress * | doomed | ) |
Destroy the party subaddress contents.
doomed | The party subaddress to destroy. |
Definition at line 1744 of file channel.c.
References ast_party_subaddress::str.
Referenced by ast_party_dialed_free(), and ast_party_id_free().
void ast_party_subaddress_init | ( | struct ast_party_subaddress * | init | ) |
Initialize the given subaddress structure.
init | Subaddress structure to initialize. |
Definition at line 1697 of file channel.c.
References ast_party_subaddress::odd_even_indicator, ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by ast_party_dialed_init(), ast_party_id_init(), and sig_pri_call().
void ast_party_subaddress_set | ( | struct ast_party_subaddress * | dest, |
const struct ast_party_subaddress * | src | ||
) |
Set the source party subaddress information into the destination party subaddress.
dest | The subaddress one wishes to update |
src | The new subaddress values to update the dest |
Definition at line 1727 of file channel.c.
References ast_strdup, ast_party_subaddress::odd_even_indicator, ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by ast_party_dialed_set(), and ast_party_id_set().
void ast_party_subaddress_set_init | ( | struct ast_party_subaddress * | init, |
const struct ast_party_subaddress * | guide | ||
) |
Initialize the given party subaddress structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Party subaddress structure to initialize. |
guide | Source party subaddress to use as a guide in initializing. |
Definition at line 1719 of file channel.c.
References ast_party_subaddress::odd_even_indicator, ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by ast_party_dialed_set_init(), and ast_party_id_set_init().
int ast_pre_call | ( | struct ast_channel * | chan, |
const char * | sub_args | ||
) |
Execute a Gosub call on the channel before a call is placed.
This is called between ast_request() and ast_call() to execute a predial routine on the newly created channel.
chan | Channel to execute Gosub. |
sub_args | Gosub application parameter string. |
0 | on success. |
-1 | on error. |
Definition at line 6444 of file channel.c.
References ast_app_exec_sub(), and ast_channel_tech::pre_call.
Referenced by begin_dial_prerun(), dial_exec_full(), and ring_entry().
char* ast_print_group | ( | char * | buf, |
int | buflen, | ||
ast_group_t | group | ||
) |
Print call and pickup groups into buffer.
Print call and pickup groups into buffer.
Definition at line 8031 of file channel.c.
int ast_queue_answer | ( | struct ast_channel * | chan, |
const struct ast_stream_topology * | topology | ||
) |
Queue an ANSWER control frame with topology.
chan | channel to queue frame onto |
topology | topology to be passed through the core to the peer channel |
0 | success |
non-zero | failure |
Definition at line 1246 of file channel.c.
References AST_CONTROL_ANSWER, AST_FRAME_CONTROL, and ast_queue_frame().
int ast_queue_control | ( | struct ast_channel * | chan, |
enum ast_control_frame_type | control | ||
) |
Queue a control frame without payload.
chan | channel to queue frame onto |
control | type of control frame |
zero | on success |
non-zero | on failure |
Queue a control frame without payload.
Definition at line 1231 of file channel.c.
References AST_FRAME_CONTROL, and ast_queue_frame().
Referenced by __analog_handle_event(), __ast_read(), ast_do_pickup(), audiosocket_call(), chan_pjsip_incoming_response(), cli_console_answer(), jingle_action_session_accept(), jingle_action_session_info(), jingle_outgoing_hook(), pbx_outgoing_state_callback(), rtp_call(), and stasis_app_control_queue_control().
int ast_queue_control_data | ( | struct ast_channel * | chan, |
enum ast_control_frame_type | control, | ||
const void * | data, | ||
size_t | datalen | ||
) |
Queue a control frame with payload.
chan | channel to queue frame onto |
control | type of control frame |
data | pointer to payload data to be included in frame |
datalen | number of bytes of payload data |
0 | success |
non-zero | failure |
The supplied payload data is copied into the frame, so the caller's copy is not modified nor freed, and the resulting frame will retain a copy of the data even if the caller frees their local copy.
Definition at line 1238 of file channel.c.
References AST_FRAME_CONTROL, and ast_queue_frame().
Referenced by __analog_handle_event(), ast_channel_queue_connected_line_update(), ast_channel_queue_redirecting_update(), chan_pjsip_incoming_response_update_cause(), fax_gateway_indicate_t38(), jingle_action_session_terminate(), queue_read_action_payload(), t38_change_state(), t38_framehook(), t38_interpret_parameters(), and xfer_client_on_evsub_state().
int ast_queue_frame | ( | struct ast_channel * | chan, |
struct ast_frame * | f | ||
) |
Queue one or more frames to a channel's frame queue.
chan | the channel to queue the frame(s) on |
f | the frame(s) to queue. Note that the frame(s) will be duplicated by this function. It is the responsibility of the caller to handle freeing the memory associated with the frame(s) being passed if necessary. |
0 | success |
non-zero | failure |
Definition at line 1139 of file channel.c.
Referenced by __ast_read(), ast_channel_set_unbridged_nolock(), ast_channel_setwhentohangup_tv(), ast_channel_stream_topology_changed_externally(), ast_dsp_process(), ast_msg_data_queue_frame(), ast_queue_answer(), ast_queue_cc_frame(), ast_queue_control(), ast_queue_control_data(), ast_queue_hangup(), ast_queue_hangup_with_cause(), ast_queue_hold(), ast_queue_unhold(), ast_softhangup_nolock(), channel_do_masquerade(), cli_console_sendtext(), iax2_queue_frame(), set_interval_hook(), sig_pri_dial_complete(), stream_monitor(), and unreal_queue_frame().
int ast_queue_frame_head | ( | struct ast_channel * | chan, |
struct ast_frame * | f | ||
) |
Queue one or more frames to the head of a channel's frame queue.
chan | the channel to queue the frame(s) on |
f | the frame(s) to queue. Note that the frame(s) will be duplicated by this function. It is the responsibility of the caller to handle freeing the memory associated with the frame(s) being passed if necessary. |
0 | success |
non-zero | failure |
Definition at line 1144 of file channel.c.
Referenced by __ast_answer(), __ast_read(), ast_autoservice_stop(), and safe_sleep_conditional().
int ast_queue_hangup | ( | struct ast_channel * | chan | ) |
Queue a hangup frame.
Queue a hangup frame.
Definition at line 1150 of file channel.c.
References ast_channel_hangup_request_type(), ast_channel_publish_blob(), AST_CONTROL_HANGUP, AST_FRAME_CONTROL, ast_queue_frame(), and AST_SOFTHANGUP_DEV.
Referenced by ast_app_exec_sub(), ast_unreal_fixup(), chan_pjsip_session_end(), and iax2_queue_hangup().
int ast_queue_hangup_with_cause | ( | struct ast_channel * | chan, |
int | cause | ||
) |
Queue a hangup frame with hangupcause set.
[in] | chan | channel to queue frame onto |
[in] | cause | the hangup cause |
0 | on success |
-1 | on error |
Queue a hangup frame with hangupcause set.
Definition at line 1166 of file channel.c.
References ast_channel_hangup_request_type(), ast_channel_publish_blob(), AST_CONTROL_HANGUP, AST_FRAME_CONTROL, ast_json_pack(), ast_json_unref(), ast_queue_frame(), AST_SOFTHANGUP_DEV, ast_frame::data, and RAII_VAR.
Referenced by __analog_handle_event(), ast_unreal_hangup(), chan_pjsip_session_end(), jingle_action_session_terminate(), and jingle_queue_hangup_with_cause().
int ast_queue_hold | ( | struct ast_channel * | chan, |
const char * | musicclass | ||
) |
Queue a hold frame.
chan | channel to queue frame onto |
musicclass | The suggested musicclass for the other end to use |
zero | on success |
non-zero | on failure |
Definition at line 1191 of file channel.c.
References ast_channel_hold_type(), ast_channel_publish_blob(), AST_CONTROL_HOLD, AST_FRAME_CONTROL, ast_json_pack(), ast_json_unref(), ast_queue_frame(), ast_frame::data, and ast_frame::datalen.
Referenced by __analog_handle_event(), iax2_queue_hold(), and jingle_action_session_info().
int ast_queue_unhold | ( | struct ast_channel * | chan | ) |
Queue an unhold frame.
chan | channel to queue frame onto |
zero | on success |
non-zero | on failure |
Definition at line 1216 of file channel.c.
References ast_channel_publish_blob(), ast_channel_unhold_type(), AST_CONTROL_UNHOLD, AST_FRAME_CONTROL, and ast_queue_frame().
Referenced by __analog_handle_event(), iax2_queue_unhold(), and jingle_action_session_info().
int ast_raw_answer | ( | struct ast_channel * | chan | ) |
Answer a channel.
chan | channel to answer |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2690 of file channel.c.
References ast_raw_answer_with_stream_topology().
Referenced by __ast_answer().
int ast_raw_answer_with_stream_topology | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology | ||
) |
Answer a channel passing in a stream topology.
chan | channel to answer |
topology | the peer's stream topology |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2639 of file channel.c.
References ast_channel_tech::answer, ast_channel_tech::answer_with_stream_topology, ast_check_hangup(), AST_FLAG_OUTGOING, AST_FLAG_ZOMBIE, ast_indicate(), ast_setstate(), AST_STATE_RING, AST_STATE_RINGING, and AST_STATE_UP.
Referenced by ast_raw_answer().
struct ast_frame* ast_read | ( | struct ast_channel * | chan | ) |
Reads a frame.
chan | channel to read a frame from |
Definition at line 4257 of file channel.c.
References __ast_read().
Referenced by __ast_answer(), __ast_play_and_record(), __ast_request_and_dial(), ast_recvtext(), ast_tonepair(), ast_transfer_protocol(), ast_waitfordigit_full(), dial_exec_full(), generic_fax_exec(), moh_channel_thread(), monitor_dial(), read_mf_digits(), read_sf_digits(), receive_dtmf_digits(), run_agi(), safe_sleep_conditional(), speech_background(), stasis_app_exec(), wait_for_answer(), and waitstream_core().
struct ast_frame* ast_read_noaudio | ( | struct ast_channel * | chan | ) |
Reads a frame, returning AST_FRAME_NULL frame if audio.
chan | channel to read a frame from |
Definition at line 4267 of file channel.c.
References __ast_read().
Referenced by ast_control_tone().
struct ast_frame* ast_read_stream | ( | struct ast_channel * | chan | ) |
Reads a frame, but does not filter to just the default streams.
chan | channel to read a frame from |
Definition at line 4262 of file channel.c.
References __ast_read().
struct ast_frame* ast_read_stream_noaudio | ( | struct ast_channel * | chan | ) |
Reads a frame, but does not filter to just the default streams, returning AST_FRAME_NULL frame if audio.
chan | channel to read a frame from |
Definition at line 4272 of file channel.c.
References __ast_read().
int ast_readstring | ( | struct ast_channel * | c, |
char * | s, | ||
int | len, | ||
int | timeout, | ||
int | rtimeout, | ||
char * | enders | ||
) |
Reads multiple digits.
c | channel to read from |
s | string to read in to. Must be at least the size of your length |
len | how many digits to read (maximum) |
timeout | how long to timeout between digits |
rtimeout | timeout to wait on the first digit |
enders | digits to end the string |
Read in a digit string "s", max length "len", maximum timeout between digits "timeout" (-1 for none), terminated by anything in "enders". Give them rtimeout for the first digit.
Definition at line 6558 of file channel.c.
Referenced by ast_app_getdata_terminator(), and forward_message().
int ast_recvchar | ( | struct ast_channel * | chan, |
int | timeout | ||
) |
Receives a text character from a channel.
chan | channel to act upon |
timeout | timeout in milliseconds (0 for infinite wait) |
Read a char of text from a channel
Definition at line 4706 of file channel.c.
References ast_recvtext().
char* ast_recvtext | ( | struct ast_channel * | chan, |
int | timeout | ||
) |
Receives a text string from a channel Read a string of text from a channel.
chan | channel to act upon |
timeout | timeout in milliseconds (0 for infinite wait) |
Definition at line 4717 of file channel.c.
References ast_check_hangup(), AST_CONTROL_HANGUP, AST_FRAME_CONTROL, AST_FRAME_TEXT, ast_read(), ast_remaining_ms(), ast_strndup, ast_tvnow(), ast_waitfor(), ast_frame::data, ast_frame::datalen, ast_frame::frametype, ast_frame_subclass::integer, and ast_frame::subclass.
Referenced by ast_recvchar().
int ast_redirecting_build_data | ( | unsigned char * | data, |
size_t | datalen, | ||
const struct ast_party_redirecting * | redirecting, | ||
const struct ast_set_party_redirecting * | update | ||
) |
Build the redirecting id data frame.
data | Buffer to fill with the frame data |
datalen | Size of the buffer to fill |
redirecting | Redirecting id information |
update | What redirecting information to build. NULL if all. |
-1 | if error |
Amount | of data buffer used |
Definition at line 9268 of file channel.c.
References ast_party_redirecting::count, ast_party_redirecting::from, ast_set_party_redirecting::from, ast_party_id_ies::name, ast_party_redirecting::orig, ast_set_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_set_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_set_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_set_party_redirecting::priv_to, ast_party_redirecting::reason, ast_party_name_ies::str, ast_party_redirecting::to, and ast_set_party_redirecting::to.
Referenced by ast_channel_queue_redirecting_update(), and ast_channel_update_redirecting().
int ast_redirecting_parse_data | ( | const unsigned char * | data, |
size_t | datalen, | ||
struct ast_party_redirecting * | redirecting | ||
) |
Parse redirecting indication frame data.
data | Buffer with the frame data to parse |
datalen | Size of the buffer |
redirecting | Extracted redirecting id information |
0 | on success. |
-1 | on error. |
Definition at line 9479 of file channel.c.
References ast_debug, ast_malloc, ast_party_name::char_set, ast_party_redirecting_reason::code, ast_party_redirecting::count, ast_party_redirecting::from, ast_party_id::name, ast_party_id::number, ast_party_subaddress::odd_even_indicator, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_number::plan, ast_party_name::presentation, ast_party_number::presentation, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, ast_party_name::str, ast_party_number::str, ast_party_subaddress::str, ast_party_redirecting_reason::str, ast_party_id::subaddress, ast_party_id::tag, ast_party_redirecting::to, ast_party_subaddress::type, ast_party_name::valid, ast_party_number::valid, and ast_party_subaddress::valid.
Referenced by ast_channel_redirecting_sub().
struct ast_channel* ast_request | ( | const char * | type, |
struct ast_format_cap * | request_cap, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | addr, | ||
int * | cause | ||
) |
Requests a channel.
type | type of channel to request |
request_cap | Format capabilities for requested channel |
assignedids | Unique ID to create channel with |
requestor | channel asking for data |
addr | destination of the call |
cause | Cause of failure |
Request a channel of a given type, with addr as optional information used by the low level module
NULL | failure |
non-NULL | channel on success |
Definition at line 6354 of file channel.c.
Referenced by __ast_request_and_dial(), ast_ari_channels_create(), ast_call_forward(), attended_transfer_bridge(), begin_dial_prerun(), build_conf(), dial_transfer(), prepare_bridge_moh_channel(), ring_entry(), and wait_for_answer().
struct ast_channel* ast_request_and_dial | ( | const char * | type, |
struct ast_format_cap * | cap, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | addr, | ||
int | timeout, | ||
int * | reason, | ||
const char * | cid_num, | ||
const char * | cid_name | ||
) |
Request a channel of a given type, with data as optional information used by the low level module and attempt to place a call on it.
type | type of channel to request |
cap | format capabilities for requested channel |
assignedids | Unique Id to assign to channel |
requestor | channel asking for data |
addr | destination of the call |
timeout | maximum amount of time to wait for an answer |
reason | why unsuccessful (if unsuccessful) |
cid_num | Caller-ID Number |
cid_name | Caller-ID Name (ascii) |
Definition at line 6174 of file channel.c.
References __ast_request_and_dial().
struct ast_channel* ast_request_with_stream_topology | ( | const char * | type, |
struct ast_stream_topology * | topology, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | addr, | ||
int * | cause | ||
) |
Requests a channel (specifying stream topology)
type | type of channel to request |
topology | Stream topology for requested channel |
assignedids | Unique ID to create channel with |
requestor | channel asking for data |
addr | destination of the call |
cause | Cause of failure |
Request a channel of a given type, with addr as optional information used by the low level module
NULL | failure |
non-NULL | channel on success |
Definition at line 6359 of file channel.c.
Referenced by dial_exec_full(), and do_forward().
int ast_safe_sleep | ( | struct ast_channel * | chan, |
int | ms | ||
) |
Wait for a specified amount of time, looking for hangups.
chan | channel to wait for |
ms | length of time in milliseconds to sleep. This should never be less than zero. |
Waits for a specified amount of time, servicing the channel as required.
Wait for a specified amount of time, looking for hangups.
Definition at line 1574 of file channel.c.
References safe_sleep_conditional().
Referenced by alarmreceiver_exec(), ast_senddigit(), ast_senddigit_mf(), and send_tone_burst().
int ast_safe_sleep_conditional | ( | struct ast_channel * | chan, |
int | ms, | ||
int(*)(void *) | cond, | ||
void * | data | ||
) |
Wait for a specified amount of time, looking for hangups and a condition argument.
chan | channel to wait for |
ms | length of time in milliseconds to sleep. |
cond | a function pointer for testing continue condition |
data | argument to be passed to the condition test function |
Waits for a specified amount of time, servicing the channel as required. If cond returns 0, this function returns.
Definition at line 1568 of file channel.c.
References safe_sleep_conditional().
int ast_safe_sleep_without_silence | ( | struct ast_channel * | chan, |
int | ms | ||
) |
Wait for a specified amount of time, looking for hangups, and do not generate silence.
chan | channel to wait for |
ms | length of time in milliseconds to sleep. This should never be less than zero. |
Waits for a specified amount of time, servicing the channel as required.
Definition at line 1579 of file channel.c.
References safe_sleep_conditional().
int ast_senddigit | ( | struct ast_channel * | chan, |
char | digit, | ||
unsigned int | duration | ||
) |
Send a DTMF digit to a channel.
chan | channel to act upon |
digit | the DTMF digit to send, encoded in ASCII |
duration | the duration of the digit ending in ms |
Definition at line 4974 of file channel.c.
References AST_DEFAULT_EMULATE_DTMF_DURATION, ast_safe_sleep(), ast_senddigit_begin(), and ast_senddigit_end().
Referenced by dial_exec_full().
int ast_senddigit_begin | ( | struct ast_channel * | chan, |
char | digit | ||
) |
Send a DTMF digit to a channel.
chan | channel to act upon |
digit | the DTMF digit to send, encoded in ASCII |
Definition at line 4874 of file channel.c.
References ast_debug, ast_playtones_start(), and ast_tvnow().
Referenced by ast_senddigit(), ast_senddigit_external(), and ast_write_stream().
int ast_senddigit_end | ( | struct ast_channel * | chan, |
char | digit, | ||
unsigned int | duration | ||
) |
Send a DTMF digit to a channel.
chan | channel to act upon |
digit | the DTMF digit to send, encoded in ASCII |
duration | the duration of the digit ending in ms |
Definition at line 4924 of file channel.c.
References ast_playtones_stop(), and ast_channel_tech::send_digit_end.
Referenced by ast_channel_end_dtmf(), ast_senddigit(), ast_senddigit_external(), and ast_write_stream().
int ast_senddigit_external | ( | struct ast_channel * | chan, |
char | digit, | ||
unsigned int | duration | ||
) |
Send a DTMF digit to a channel from an external thread.
chan | channel to act upon |
digit | the DTMF digit to send, encoded in ASCII |
duration | the duration of the digit ending in ms |
Definition at line 4987 of file channel.c.
References AST_DEFAULT_EMULATE_DTMF_DURATION, ast_senddigit_begin(), and ast_senddigit_end().
int ast_senddigit_mf | ( | struct ast_channel * | chan, |
char | digit, | ||
unsigned int | duration, | ||
unsigned int | durationkp, | ||
unsigned int | durationst, | ||
int | is_external | ||
) |
Send an MF digit to a channel.
chan | channel to act upon |
digit | the MF digit to send, encoded in ASCII |
duration | the duration of a numeric digit ending in ms |
durationkp | the duration of a KP digit ending in ms |
durationst | the duration of a ST, STP, ST2P, or ST3P digit ending in ms |
is_external | 1 if called by a thread that is not the channel's media handler thread, 0 if called by the channel's media handler thread. |
Definition at line 4952 of file channel.c.
References ast_safe_sleep(), ast_senddigit_mf_begin(), ast_senddigit_mf_end(), and DEFAULT_EMULATE_MF_DURATION.
int ast_senddigit_mf_begin | ( | struct ast_channel * | chan, |
char | digit | ||
) |
Send an MF digit to a channel.
chan | channel to act upon |
digit | the MF digit to send, encoded in ASCII |
Definition at line 4835 of file channel.c.
References ast_playtones_start().
Referenced by ast_senddigit_mf().
int ast_senddigit_mf_end | ( | struct ast_channel * | chan | ) |
End sending an MF digit to a channel.
chan | channel to act upon |
Definition at line 4943 of file channel.c.
References ast_playtones_stop().
Referenced by ast_senddigit_mf().
int ast_sendtext | ( | struct ast_channel * | chan, |
const char * | text | ||
) |
Sends text to a channel.
chan | channel to act upon |
text | string of text to send on the channel |
Write text to a display on a channel
0 | on success |
-1 | on failure |
Definition at line 4809 of file channel.c.
References ast_msg_data_alloc(), and ast_sendtext_data().
Referenced by __ast_read().
int ast_sendtext_data | ( | struct ast_channel * | chan, |
struct ast_msg_data * | msg | ||
) |
Sends text to a channel in an ast_msg_data structure wrapper with ast_sendtext as fallback.
chan | channel to act upon |
msg | ast_msg_data structure |
Write text to a display on a channel. If the channel driver doesn't support the send_text_data callback. then the original send_text callback will be used if available.
0 | on success |
-1 | on failure |
Definition at line 4751 of file channel.c.
References ast_begins_with(), AST_CHAN_TP_SEND_TEXT_DATA, ast_check_hangup(), ast_debug, AST_FLAG_BLOCKING, AST_FLAG_ZOMBIE, ast_format_cap_has_type(), ast_format_t140, AST_FRAME_TEXT, AST_MALLOCD_DATA, ast_msg_data_get_attribute(), ast_strdup, CHECK_BLOCKING, ast_frame::data, ast_frame::datalen, ast_frame_subclass::format, ast_frame::frametype, ast_frame::mallocd, S_OR, ast_channel_tech::send_text, ast_channel_tech::send_text_data, ast_frame::src, ast_frame::subclass, and ast_channel_tech::write_text.
Referenced by __ast_read(), and ast_sendtext().
void ast_set_callerid | ( | struct ast_channel * | chan, |
const char * | cid_num, | ||
const char * | cid_name, | ||
const char * | cid_ani | ||
) |
Set caller ID number, name and ANI and generate AMI event.
Definition at line 7334 of file channel.c.
References ast_party_caller::ani, ast_channel_publish_snapshot(), ast_strdup, ast_party_caller::id, ast_party_id::name, ast_party_id::number, ast_party_name::str, ast_party_number::str, ast_party_name::valid, and ast_party_number::valid.
Referenced by __ast_request_and_dial(), and ring_entry().
void ast_set_hangupsource | ( | struct ast_channel * | chan, |
const char * | source, | ||
int | force | ||
) |
Set the source of the hangup in this channel and it's bridge.
chan | channel to set the field on |
source | a string describing the source of the hangup for this channel |
force |
Hangupsource is generally the channel name that caused the bridge to be hung up, but it can also be other things such as "dialplan/agi" This can then be logged in the CDR or CEL
Definition at line 2499 of file channel.c.
References ast_channel_bridge_peer(), ast_channel_cleanup, and RAII_VAR.
Referenced by chan_pjsip_session_end().
void ast_set_party_id_all | ( | struct ast_set_party_id * | update_id | ) |
Set the update marker to update all information of a corresponding party id.
update_id | The update marker for a corresponding party id. |
Definition at line 1750 of file channel.c.
References ast_set_party_id::name, ast_set_party_id::number, and ast_set_party_id::subaddress.
int ast_set_read_format | ( | struct ast_channel * | chan, |
struct ast_format * | format | ||
) |
Sets read format on channel chan.
chan | channel to change |
format | format to set for reading |
Definition at line 5762 of file channel.c.
References ast_format_cap_alloc, ast_format_cap_append, and AST_FORMAT_CAP_FLAG_DEFAULT.
Referenced by __ast_play_and_record(), alarmreceiver_exec(), ast_bridge_channel_restore_formats(), ast_channel_make_compatible_helper(), build_conf(), channel_do_masquerade(), fax_detect_framehook(), fax_gateway_framehook(), generic_fax_exec(), jingle_interpret_content(), jingle_read(), set_read_to_slin(), and speech_background().
int ast_set_read_format_from_cap | ( | struct ast_channel * | chan, |
struct ast_format_cap * | formats | ||
) |
Sets read format on channel chan from capabilities Set read format for channel to whichever component of "format" is best.
chan | channel to change |
formats | new formats to pick from for reading |
int ast_set_read_format_path | ( | struct ast_channel * | chan, |
struct ast_format * | raw_format, | ||
struct ast_format * | core_format | ||
) |
Set specific read path on channel.
chan | Channel to setup read path. |
raw_format | Format to expect from the channel driver. |
core_format | What the core wants to read. |
0 | on success. |
-1 | on error. |
Definition at line 5488 of file channel.c.
References ast_debug, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_name(), ast_translator_build_path(), and ast_translator_free_path().
Referenced by __ast_read(), and chan_pjsip_read_stream().
void ast_set_variables | ( | struct ast_channel * | chan, |
struct ast_variable * | vars | ||
) |
adds a list of channel variables to a channel
chan | the channel |
vars | a linked list of variables |
Variable names can be for a regular channel variable or a dialplan function that has the ability to be written to.
Definition at line 8115 of file channel.c.
References ast_variable::name, ast_variable::next, pbx_builtin_setvar_helper(), and ast_variable::value.
Referenced by __ast_request_and_dial(), ast_ari_channels_create(), ast_call_forward(), and ast_pbx_outgoing_exten_predial().
int ast_set_write_format | ( | struct ast_channel * | chan, |
struct ast_format * | format | ||
) |
Sets write format on channel chan.
chan | channel to change |
format | format to set for writing |
Definition at line 5803 of file channel.c.
References ast_format_cap_alloc, ast_format_cap_append, and AST_FORMAT_CAP_FLAG_DEFAULT.
Referenced by alarmreceiver_exec(), ast_bridge_channel_restore_formats(), ast_channel_make_compatible_helper(), ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_stopstream(), ast_write_stream(), build_conf(), channel_do_masquerade(), fax_gateway_framehook(), generic_fax_exec(), jingle_interpret_content(), and jingle_read().
int ast_set_write_format_from_cap | ( | struct ast_channel * | chan, |
struct ast_format_cap * | formats | ||
) |
Sets write format on channel chan Set write format for channel to whichever component of "format" is best.
chan | channel to change |
formats | new formats to pick from for writing |
Definition at line 5821 of file channel.c.
Referenced by ast_openstream_full().
int ast_set_write_format_interleaved_stereo | ( | struct ast_channel * | chan, |
struct ast_format * | format | ||
) |
Sets write format for a channel. All internal data will than be handled in an interleaved format. (needed by binaural opus)
chan | channel to change |
format | format to set for writing |
Definition at line 5785 of file channel.c.
References ast_format_cap_alloc, ast_format_cap_append, and AST_FORMAT_CAP_FLAG_DEFAULT.
Referenced by softmix_bridge_unsuspend().
int ast_set_write_format_path | ( | struct ast_channel * | chan, |
struct ast_format * | core_format, | ||
struct ast_format * | raw_format | ||
) |
Set specific write path on channel.
chan | Channel to setup write path. |
core_format | What the core wants to write. |
raw_format | Raw write format. |
0 | on success. |
-1 | on error. |
Definition at line 5524 of file channel.c.
References ast_debug, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_name(), ast_translator_build_path(), and ast_translator_free_path().
Referenced by chan_pjsip_read_stream().
int ast_settimeout | ( | struct ast_channel * | c, |
unsigned int | rate, | ||
int(*)(const void *data) | func, | ||
void * | data | ||
) |
Enable or disable timer ticks for a channel.
c | channel |
rate | number of timer ticks per second |
func | callback function |
data |
If timers are supported, force a scheduled expiration on the timer fd, at which point we call the callback function / data
Definition at line 3180 of file channel.c.
Referenced by ast_activate_generator().
int ast_softhangup | ( | struct ast_channel * | chan, |
int | cause | ||
) |
Softly hangup up a channel.
chan | channel to be soft-hung-up |
cause | an AST_SOFTHANGUP_* reason code |
Call the protocol layer, but don't destroy the channel structure (use this if you are trying to safely hangup a channel managed by another thread.
Softly hangup up a channel.
Definition at line 2471 of file channel.c.
References ast_channel_hangup_request_type(), ast_channel_publish_blob(), ast_json_pack(), ast_json_unref(), ast_softhangup_nolock(), and RAII_VAR.
Referenced by __analog_handle_event(), __ast_pbx_run(), ast_ari_channels_hangup(), ast_bridge_transfer_attended(), ast_dial_join(), conf_free(), rtp_check_timeout(), and stasis_app_bridge_moh_stop().
void ast_softhangup_all | ( | void | ) |
Soft hangup all active channels.
Definition at line 493 of file channel.c.
References ao2_callback, OBJ_MULTIPLE, and OBJ_NODATA.
int ast_softhangup_nolock | ( | struct ast_channel * | chan, |
int | cause | ||
) |
Softly hangup up a channel (no channel lock)
chan | channel to be soft-hung-up |
cause | an AST_SOFTHANGUP_* reason code |
Softly hangup up a channel (no channel lock)
Definition at line 2458 of file channel.c.
References ast_debug, AST_FLAG_BLOCKING, ast_null_frame, and ast_queue_frame().
Referenced by __analog_handle_event(), ast_async_goto(), ast_bridge_join(), ast_channel_softhangup_withcause_locked(), ast_pbx_h_exten_run(), ast_pbx_hangup_handler_run(), ast_softhangup(), and jingle_indicate().
const char* ast_state2str | ( | enum ast_channel_state | state | ) |
Gives the string form of a given channel state.
state | state to get the name of |
Definition at line 636 of file channel.c.
References AST_STATE_BUSY, AST_STATE_DIALING, AST_STATE_DIALING_OFFHOOK, AST_STATE_DOWN, AST_STATE_MUTE, AST_STATE_OFFHOOK, AST_STATE_PRERING, AST_STATE_RESERVED, AST_STATE_RING, AST_STATE_RINGING, AST_STATE_UP, and ast_threadstorage_get().
Referenced by ast_channel_snapshot_to_json(), ast_manager_build_channel_state_string_prefix(), and handle_showchan().
int ast_str2cause | ( | const char * | name | ) |
Convert the string form of a cause code to a number.
name | string form of the cause |
Convert the string form of a cause code to a number.
Definition at line 625 of file channel.c.
Referenced by dial_exec_full().
int ast_tonepair | ( | struct ast_channel * | chan, |
int | freq1, | ||
int | freq2, | ||
int | duration, | ||
int | vol | ||
) |
Play a tone pair for a given amount of time
Definition at line 7600 of file channel.c.
References ast_read(), ast_tonepair_start(), and ast_waitfor().
int ast_tonepair_start | ( | struct ast_channel * | chan, |
int | freq1, | ||
int | freq2, | ||
int | duration, | ||
int | vol | ||
) |
Start a tone going
Definition at line 7582 of file channel.c.
References ast_activate_generator().
Referenced by ast_tonepair().
void ast_tonepair_stop | ( | struct ast_channel * | chan | ) |
Stop a tone from playing
Definition at line 7595 of file channel.c.
References ast_deactivate_generator().
int ast_transfer | ( | struct ast_channel * | chan, |
char * | dest | ||
) |
Transfer a channel (if supported).
-1 | on error |
0 | if not supported |
1 | if supported and requested |
chan | current channel |
dest | destination extension for transfer |
Transfer a channel (if supported).
Called by:
Definition at line 6485 of file channel.c.
References ast_transfer_protocol().
int ast_transfer_protocol | ( | struct ast_channel * | chan, |
char * | dest, | ||
int * | protocol | ||
) |
Transfer a channel (if supported) receieve protocol result.
-1 | on error |
0 | if not supported |
1 | if supported and requested |
chan | channel to transfer |
dest | destination extension to transfer to |
protocol | protocol is the protocol result SIP example, 0=success, 3xx-6xx is SIP error code |
Transfer a channel (if supported) receieve protocol result.
Called by:
Definition at line 6498 of file channel.c.
References ast_check_hangup(), AST_CONTROL_TRANSFER, AST_FLAG_ZOMBIE, AST_FRAME_CONTROL, ast_read(), AST_TRANSFER_SUCCESS, ast_waitfor(), ast_frame::data, ast_frame::frametype, ast_frame_subclass::integer, ast_frame::subclass, and ast_channel_tech::transfer.
Referenced by ast_transfer().
char* ast_transfercapability2str | ( | int | transfercapability | ) | const |
Gives the string form of a given transfer capability.
transfercapability | transfer capability to get the name of |
Definition at line 672 of file channel.c.
Referenced by sig_pri_call().
int ast_undestroyed_channels | ( | void | ) |
Definition at line 504 of file channel.c.
References ast_atomic_fetchadd_int().
int ast_waitfor | ( | struct ast_channel * | chan, |
int | ms | ||
) |
Wait for input on a channel.
chan | channel to wait on |
ms | length of time to wait on the channel |
Wait for input on a channel for a given # of milliseconds (<0 for indefinite).
< | 0 on failure |
0 | if nothing ever arrived |
the | # of ms remaining otherwise |
Definition at line 3162 of file channel.c.
References ast_waitfor_nandfds().
Referenced by __ast_answer(), __ast_play_and_record(), __ast_request_and_dial(), ast_control_tone(), ast_recvtext(), ast_tonepair(), ast_transfer_protocol(), moh_channel_thread(), read_mf_digits(), read_sf_digits(), receive_dtmf_digits(), safe_sleep_conditional(), speech_background(), stasis_app_exec(), and waitstream_core().
struct ast_channel* ast_waitfor_n | ( | struct ast_channel ** | chan, |
int | n, | ||
int * | ms | ||
) |
Waits for input on a group of channels Wait for input on an array of channels for a given # of milliseconds.
chan | an array of pointers to channels |
n | number of channels that are to be waited upon |
ms | time "ms" is modified in-place, if applicable |
Definition at line 3157 of file channel.c.
References ast_waitfor_nandfds().
Referenced by dial_exec_full(), monitor_dial(), and wait_for_answer().
int ast_waitfor_n_fd | ( | int * | fds, |
int | n, | ||
int * | ms, | ||
int * | exception | ||
) |
Waits for input on an fd.
Waits for input on an fd.
Definition at line 2980 of file channel.c.
References ast_waitfor_nandfds().
Referenced by rfcomm_wait(), and softmix_mixing_loop().
struct ast_channel* ast_waitfor_nandfds | ( | struct ast_channel ** | c, |
int | n, | ||
int * | fds, | ||
int | nfds, | ||
int * | exception, | ||
int * | outfd, | ||
int * | ms | ||
) |
Waits for activity on a group of channels.
c | an array of pointers to channels |
n | number of channels that are to be waited upon |
fds | an array of fds to wait upon |
nfds | the number of fds to wait upon |
exception | exception flag |
outfd | fd that had activity on it |
ms | how long the wait was |
Big momma function here. Wait for activity on any of the n channels, or any of the nfds file descriptors.
Waits for activity on a group of channels.
Definition at line 2988 of file channel.c.
References ast_add_fd(), ast_alloca, ast_channel_fd_count(), AST_FLAG_BLOCKING, AST_FLAG_EXCEPTION, AST_SOFTHANGUP_TIMEOUT, ast_test_suite_event_notify, ast_tvcmp(), ast_tvdiff_ms(), ast_tvnow(), ast_tvsub(), ast_tvzero(), and CHECK_BLOCKING.
Referenced by ast_waitfor(), ast_waitfor_n(), ast_waitfor_n_fd(), ast_waitfordigit_full(), generic_fax_exec(), run_agi(), and waitstream_core().
int ast_waitfordigit | ( | struct ast_channel * | c, |
int | ms | ||
) |
Waits for a digit.
c | channel to wait for a digit on |
ms | how many milliseconds to wait (<0 for indefinite). |
Definition at line 3175 of file channel.c.
References ast_waitfordigit_full().
Referenced by advanced_options(), ast_app_dtget(), ast_record_review(), collect_digits(), forward_message(), get_folder(), vm_forwardoptions(), vm_tempgreeting(), and wait_our_turn().
int ast_waitfordigit_full | ( | struct ast_channel * | c, |
int | ms, | ||
const char * | breakon, | ||
int | audiofd, | ||
int | ctrlfd | ||
) |
Wait for a digit Same as ast_waitfordigit() with audio fd for outputting read audio and ctrlfd to monitor for reading.
c | channel to wait for a digit on |
ms | how many milliseconds to wait (<0 for indefinite). |
breakon | string of DTMF digits to break upon or NULL for any. |
audiofd | audio file descriptor to write to if audio frames are received |
ctrlfd | control file descriptor to monitor for reading |
Definition at line 3239 of file channel.c.
References ast_channel_clear_flag(), ast_channel_set_flag(), ast_check_hangup(), AST_CONTROL_ANSWER, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_FLASH, AST_CONTROL_HANGUP, AST_CONTROL_HOLD, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_REDIRECTING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_STREAM_FORWARD, AST_CONTROL_STREAM_RESTART, AST_CONTROL_STREAM_REVERSE, AST_CONTROL_STREAM_STOP, AST_CONTROL_STREAM_SUSPEND, AST_CONTROL_UNHOLD, AST_CONTROL_UPDATE_RTP_PEER, AST_FLAG_END_DTMF_ONLY, AST_FLAG_ZOMBIE, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_VOICE, ast_read(), ast_remaining_ms(), ast_tvnow(), ast_waitfor_nandfds(), ast_frame::data, ast_frame::datalen, ast_frame::frametype, ast_frame_subclass::integer, and ast_frame::subclass.
Referenced by ast_waitfordigit(), and handle_getoption().
int ast_write | ( | struct ast_channel * | chan, |
struct ast_frame * | frame | ||
) |
Write a frame to a channel This function writes the given frame to the indicated channel.
chan | destination channel of the frame |
frame | frame that will be written |
Definition at line 5144 of file channel.c.
References ast_write_stream().
Referenced by ast_prod(), ast_write_video(), fax_gateway_detect_v21(), generic_fax_exec(), handle_jack_audio(), sms_generate(), and spandsp_fax_gw_t30_gen().
int ast_write_stream | ( | struct ast_channel * | chan, |
int | stream_num, | ||
struct ast_frame * | frame | ||
) |
Write a frame to a stream This function writes the given frame to the indicated stream on the channel.
chan | destination channel of the frame |
stream_num | destination stream on the channel |
frame | frame that will be written |
Definition at line 5149 of file channel.c.
References ast_audiohook_detach_list(), AST_AUDIOHOOK_DIRECTION_WRITE, ast_audiohook_write_list(), ast_audiohook_write_list_empty(), ast_channel_get_default_stream(), ast_channel_get_stream_topology(), ast_check_hangup(), AST_CONTROL_UNHOLD, ast_deactivate_generator(), ast_debug, AST_FLAG_BLOCKING, AST_FLAG_WRITE_INT, AST_FLAG_ZOMBIE, ast_format_cache_is_slinear(), ast_format_cap_get_names(), AST_FORMAT_CAP_NAMES_LEN, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_name(), ast_format_get_type(), ast_format_slin, ast_format_t140, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, ast_frame_dump(), AST_FRAME_HTML, AST_FRAME_IAX, AST_FRAME_MODEM, AST_FRAME_NULL, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_framehook_list_write_event(), ast_frisolate, AST_LIST_NEXT, ast_senddigit_begin(), ast_senddigit_end(), ast_set_write_format(), AST_SOFTHANGUP_DEV, ast_stream_get_position(), ast_stream_get_type(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), ast_translate(), CHECK_BLOCKING, ast_frame::data, ast_frame::datalen, DEBUGCHAN_FLAG, ast_frame_subclass::format, ast_frame::frametype, indicate_data_internal(), ast_frame_subclass::integer, ast_frame::len, ast_channel_tech::send_html, ast_channel_tech::send_text, ast_frame::src, ast_frame::subclass, ast_channel_tech::write, write_stream(), ast_channel_tech::write_stream, ast_channel_tech::write_text, and ast_channel_tech::write_video.
Referenced by ast_write().
int ast_write_text | ( | struct ast_channel * | chan, |
struct ast_frame * | frame | ||
) |
Write text frame to a channel This function writes the given frame to the indicated channel.
chan | destination channel of the frame |
frame | frame that will be written |
int ast_write_video | ( | struct ast_channel * | chan, |
struct ast_frame * | frame | ||
) |
Write video frame to a channel This function writes the given frame to the indicated channel.
chan | destination channel of the frame |
frame | frame that will be written |
Definition at line 5017 of file channel.c.
References ast_write().
DECLARE_STRINGFIELD_SETTERS_FOR | ( | name | ) |
The following string fields result in channel snapshot creation and should have the channel locked when called:
const struct ast_channel_tech ast_kill_tech |
unsigned long global_fin |
The current value of the debug flags is stored in the two variables global_fin and global_fout (declared in main/channel.c)
Definition at line 95 of file channel.c.
Referenced by __ast_channel_alloc_ap().