General Asterisk PBX channel definitions. More...
#include "asterisk/abstract_jb.h"
#include "asterisk/astobj2.h"
#include "asterisk/poll-compat.h"
#include "asterisk/frame.h"
#include "asterisk/sched.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/data.h"
#include "asterisk/channelstate.h"
#include "asterisk/ccss.h"
#include "asterisk/framehook.h"
Go to the source code of this file.
Data Structures | |
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 |
Main Channel structure associated with a channel. More... | |
struct | ast_channel_tech |
Structure to describe a channel "technology", ie a channel driver See for examples: More... | |
struct | ast_generator |
struct | ast_group_info |
channel group info More... | |
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_subaddress |
Information needed to specify a subaddress in a call. More... | |
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 | ast_channel::autochans |
struct | ast_channel::datastores |
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. More... | |
#define | AST_BRIDGE_DTMF_CHANNEL_1 (1 << 1) |
Report DTMF on channel 1. More... | |
#define | AST_BRIDGE_IGNORE_SIGS (1 << 4) |
Ignore all signal frames except NULL. More... | |
#define | AST_BRIDGE_REC_CHANNEL_0 (1 << 2) |
Return all voice frames on channel 0. More... | |
#define | AST_BRIDGE_REC_CHANNEL_1 (1 << 3) |
Return all voice frames on channel 1. More... | |
#define | AST_CHAN_WRITE_INFO_T_VERSION 1 |
ast_chan_write_info_t version. Must be incremented if structure is changed More... | |
#define | ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, linkedid, amaflag,...) |
Create a channel structure. More... | |
#define | ast_channel_lock(chan) ao2_lock(chan) |
#define | ast_channel_lock_both(chan1, chan2) |
Lock two channels. More... | |
#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_GENERATOR_FD (AST_MAX_FDS-4) |
#define | AST_MAX_CONTEXT 80 |
#define | AST_MAX_EXTENSION 80 |
#define | AST_MAX_FDS 10 |
#define | AST_TIMING_FD (AST_MAX_FDS-2) |
#define | CHECK_BLOCKING(c) |
#define | DATASTORE_INHERIT_FOREVER INT_MAX |
#define | DEBUGCHAN_FLAG 0x80000000 |
#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 *, const char *, char *, struct ast_str **, ssize_t) |
Typedef for a custom read2 function. More... | |
typedef int(* | ast_acf_read_fn_t )(struct ast_channel *, const char *, char *, char *, size_t) |
Typedef for a custom read function. More... | |
typedef int(* | ast_acf_write_fn_t )(struct ast_channel *, const char *, char *, const char *) |
Typedef for a custom write function. More... | |
typedef unsigned long long | ast_group_t |
Functions | |
int | __ast_answer (struct ast_channel *chan, unsigned int delay, int cdr_answer) |
Answer a channel, with a selectable delay before returning. More... | |
struct ast_channel *attribute_malloc | __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 char *linkedid, const int amaflag, const char *file, int line, const char *function, const char *name_fmt,...) |
Create a channel structure. More... | |
struct ast_channel * | __ast_request_and_dial (const char *type, format_t format, const struct ast_channel *requestor, void *data, 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_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... | |
void | ast_begin_shutdown (int hangup) |
format_t | ast_best_codec (format_t fmts) |
Pick the best audio codec. More... | |
struct ast_channel * | ast_bridged_channel (struct ast_channel *chan) |
Find bridged channel. More... | |
int | ast_call (struct ast_channel *chan, char *addr, int timeout) |
Make a call. More... | |
struct ast_channel * | ast_call_forward (struct ast_channel *caller, struct ast_channel *orig, int *timeout, format_t format, 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... | |
void | ast_cancel_shutdown (void) |
Cancel a shutdown in progress. More... | |
const char * | ast_cause2str (int state) 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... | |
int | ast_channel_bridge (struct ast_channel *c0, struct ast_channel *c1, struct ast_bridge_config *config, struct ast_frame **fo, struct ast_channel **rc) |
Bridge two channels together. More... | |
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... | |
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... | |
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 (struct ast_channel *chan, time_t offset) |
Compare a offset with the settings of when to hang a channel up. 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... | |
int | ast_channel_connected_line_macro (struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const void *connected_info, int caller, int frame) |
Run a connected line interception macro and update a channel's connected line information. More... | |
int | ast_channel_data_add_structure (struct ast_data *tree, struct ast_channel *chan, int add_bridged) |
Insert into an astdata tree, the channel structure. More... | |
int | ast_channel_data_cmp_structure (const struct ast_data_search *tree, struct ast_channel *chan, const char *structure_name) |
Compare to channel structures using the data api. More... | |
int | ast_channel_datastore_add (struct ast_channel *chan, struct ast_datastore *datastore) |
Add a datastore to a channel. More... | |
struct ast_datastore *attribute_malloc | ast_channel_datastore_alloc (const struct ast_datastore_info *info, const char *uid) |
Create a channel data store object. 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_free (struct ast_datastore *datastore) |
Free a channel data store object. 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... | |
int | ast_channel_defer_dtmf (struct ast_channel *chan) |
Defers DTMF so that you only read things like hangups and audio. More... | |
int | ast_channel_early_bridge (struct ast_channel *c0, struct ast_channel *c1) |
Bridge two channels together (early) 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... | |
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... | |
static enum ast_t38_state | ast_channel_get_t38_state (struct ast_channel *chan) |
Retrieves the current T38 state of a channel. More... | |
void | ast_channel_inherit_variables (const struct ast_channel *parent, struct ast_channel *child) |
Inherits channel variable from parent to child channel. More... | |
int | ast_channel_make_compatible (struct ast_channel *c0, struct ast_channel *c1) |
Makes two channel formats compatible. More... | |
int | ast_channel_masquerade (struct ast_channel *original, struct ast_channel *clone) |
Weird function made for call transfers. More... | |
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... | |
const char * | ast_channel_reason2str (int reason) |
return an english explanation of the code returned thru __ast_request_and_dial's 'outstate' argument More... | |
int | ast_channel_redirecting_macro (struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const void *redirecting_info, int is_caller, int is_frame) |
Run a redirecting interception macro 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... | |
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... | |
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_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_linkgroup (struct ast_channel *chan, struct ast_channel *peer) |
propagate the linked id between chan and peer More... | |
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... | |
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 (struct ast_channel *chan, time_t offset) |
Set when to hang a channel up. More... | |
void | ast_channel_setwhentohangup_tv (struct ast_channel *chan, struct timeval offset) |
Set when to hang a channel up. More... | |
struct ast_silence_generator * | ast_channel_start_silence_generator (struct ast_channel *chan) |
Starts a silence generator on the given channel. More... | |
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... | |
int | ast_channel_supports_html (struct ast_channel *channel) |
Checks for HTML support on a channel. More... | |
int | ast_channel_transfer_masquerade (struct ast_channel *target_chan, const struct ast_party_connected_line *target_id, int target_held, struct ast_channel *transferee_chan, const struct ast_party_connected_line *transferee_id, int transferee_held) |
Setup a masquerade to transfer a call. More... | |
void | ast_channel_undefer_dtmf (struct ast_channel *chan) |
Unset defer DTMF flag on channel. More... | |
void | ast_channel_unregister (const struct ast_channel_tech *tech) |
Unregister a channel technology. 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... | |
struct ast_variable * | ast_channeltype_list (void) |
return an ast_variable list of channeltypes More... | |
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) |
int | ast_do_masquerade (struct ast_channel *chan) |
Start masquerading a channel. More... | |
struct ast_channel * | ast_dummy_channel_alloc (void) |
Create a fake channel structure. More... | |
static int | ast_fdisset (struct pollfd *pfds, int fd, int maximum, int *start) |
Helper function for migrating select to poll. More... | |
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) |
int | 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_internal_timing_enabled (struct ast_channel *chan) |
Check if the channel can run in internal timing mode. More... | |
int | ast_is_deferrable_frame (const struct ast_frame *frame) |
Should we keep this frame for later? More... | |
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... | |
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_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_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... | |
void | ast_poll_channel_add (struct ast_channel *chan0, struct ast_channel *chan1) |
void | ast_poll_channel_del (struct ast_channel *chan0, struct ast_channel *chan1) |
char * | ast_print_group (char *buf, int buflen, ast_group_t group) |
print call- and pickup groups into buffer More... | |
int | ast_prod (struct ast_channel *chan) |
Send empty audio to prime a channel driver. More... | |
int | ast_queue_control (struct ast_channel *chan, enum ast_control_frame_type control) |
Queue a control frame with 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_raw_answer (struct ast_channel *chan, int cdr_answer) |
Answer a channel. 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... | |
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_channel * | ast_request (const char *type, format_t format, const struct ast_channel *requestor, void *data, int *status) |
Requests a channel. More... | |
struct ast_channel * | ast_request_and_dial (const char *type, format_t format, const struct ast_channel *requestor, void *data, 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... | |
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_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_sendtext (struct ast_channel *chan, const char *text) |
Sends text to a channel. 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... | |
int | ast_set_read_format (struct ast_channel *chan, format_t format) |
Sets read format on channel chan Set read format for channel to whichever component of "format" is best. 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, format_t format) |
Sets write format on channel chan Set write format for channel to whichever component of "format" is best. 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_shutting_down (void) |
Returns non-zero if Asterisk is being shut down. More... | |
int | ast_softhangup (struct ast_channel *chan, int reason) |
Softly hangup up a channel. More... | |
int | ast_softhangup_nolock (struct ast_channel *chan, int reason) |
Softly hangup up a channel (no channel lock) More... | |
const char * | ast_state2str (enum ast_channel_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... | |
char * | ast_transfercapability2str (int transfercapability) attribute_const |
Gives the string form of a given transfer capability. More... | |
int | ast_undestroyed_channels (void) |
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 **chan, 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, 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_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... | |
const char * | channelreloadreason2txt (enum channelreloadreason reason) |
Convert enum channelreloadreason to text string for manager event. More... | |
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 | |
struct ast_channel_tech | ast_kill_tech |
Kill the channel channel driver technology descriptor. More... | |
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) |
used by agents for pass through
Definition at line 165 of file channel.h.
Referenced by agent_read().
#define AST_ALERT_FD (AST_MAX_FDS-1) |
used for alertpipe
Definition at line 163 of file channel.h.
Referenced by __ast_channel_alloc_ap().
#define AST_BRIDGE_DTMF_CHANNEL_0 (1 << 0) |
Report DTMF on channel 0.
Definition at line 1932 of file channel.h.
Referenced by ast_generic_bridge(), ast_rtp_instance_bridge(), dahdi_bridge(), iax2_bridge(), local_bridge_loop(), misdn_bridge(), remote_bridge_loop(), and set_config_flags().
#define AST_BRIDGE_DTMF_CHANNEL_1 (1 << 1) |
Report DTMF on channel 1.
Definition at line 1934 of file channel.h.
Referenced by ast_generic_bridge(), ast_rtp_instance_bridge(), dahdi_bridge(), iax2_bridge(), local_bridge_loop(), misdn_bridge(), remote_bridge_loop(), and set_config_flags().
#define AST_BRIDGE_IGNORE_SIGS (1 << 4) |
Ignore all signal frames except NULL.
Definition at line 1940 of file channel.h.
Referenced by ast_generic_bridge(), iax2_bridge(), local_bridge_loop(), and remote_bridge_loop().
#define AST_BRIDGE_REC_CHANNEL_0 (1 << 2) |
#define AST_BRIDGE_REC_CHANNEL_1 (1 << 3) |
#define AST_CHAN_WRITE_INFO_T_VERSION 1 |
ast_chan_write_info_t version. Must be incremented if structure is changed
Definition at line 484 of file channel.h.
Referenced by func_channel_write(), and local_setoption().
#define ast_channel_alloc | ( | needqueue, | |
state, | |||
cid_num, | |||
cid_name, | |||
acctcode, | |||
exten, | |||
context, | |||
linkedid, | |||
amaflag, | |||
... | |||
) |
Create a channel structure.
NULL | failure |
non-NULL | successfully allocated channel |
#define ast_channel_lock | ( | chan | ) | ao2_lock(chan) |
Definition at line 2466 of file channel.h.
Referenced by __analog_handle_event(), __ast_answer(), __ast_pbx_run(), __ast_queue_frame(), __ast_read(), __ast_request_and_dial(), __dahdi_exception(), __oh323_destroy(), __sip_destroy(), _macro_exec(), _while_exec(), acf_cc_read(), acf_cc_write(), acf_fetch(), acf_odbc_read(), action_add_agi_cmd(), action_coreshowchannels(), action_hangup(), action_redirect(), action_status(), action_timeout(), add_features_datastore(), add_to_agi(), agent_indicate(), agent_lock_owner(), analog_exception(), app_exec(), ast_activate_generator(), ast_async_goto(), ast_audiohook_attach(), ast_audiohook_detach_source(), ast_audiohook_remove(), ast_audiohook_set_mute(), ast_autochan_destroy(), ast_autochan_setup(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_call(), ast_bridge_end_dtmf(), ast_bridge_timelimit(), ast_call(), ast_call_forward(), 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_cel_report_event(), ast_change_name(), ast_channel_clear_softhangup(), ast_channel_cmp_cb(), ast_channel_connected_line_macro(), ast_channel_destructor(), ast_channel_queryoption(), ast_channel_redirecting_macro(), ast_channel_set_caller(), ast_channel_set_caller_event(), ast_channel_set_connected_line(), ast_channel_set_redirecting(), ast_channel_setoption(), ast_check_hangup_locked(), ast_complete_channels(), ast_deactivate_generator(), ast_dial_join(), ast_do_masquerade(), ast_do_pickup(), ast_eivr_getvariable(), ast_explicit_goto(), ast_handle_cc_control_frame(), ast_hangup(), ast_ignore_cc(), ast_indicate_data(), ast_odbc_retrieve_transaction_obj(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_raw_answer(), ast_read_generator_actions(), ast_rtp_instance_bridge(), ast_rtp_instance_early_bridge(), ast_rtp_instance_early_bridge_make_compatible(), ast_rtp_instance_make_compatible(), ast_safe_sleep_conditional(), ast_senddigit_begin(), ast_senddigit_end(), ast_sendtext(), ast_set_callerid(), ast_set_cc_interfaces_chanvar(), ast_set_hangupsource(), ast_settimeout_full(), ast_setup_cc_recall_datastore(), ast_softhangup(), ast_stopstream(), ast_str_retrieve_variable(), ast_transfer(), ast_udptl_bridge(), ast_var_channel_bridge(), ast_var_channels_table(), ast_waitfor_nandfds(), ast_write(), auth_exec(), awesome_locking(), bridge_play_sounds(), builtin_atxfer(), builtin_automixmonitor(), builtin_blindtransfer(), calendar_event_read(), calendar_query_exec(), calendar_query_result_exec(), call_forward_inherit(), callerid_read(), callerid_write(), cb_events(), cc_build_payload(), cc_interfaces_datastore_init(), cdr_read(), cdr_write(), channel_set_debug(), channel_spy(), check_bridge(), check_goto_on_transfer(), clear_caller(), clear_dialed_interfaces(), common_exec(), conf_run(), conf_start_moh(), confbridge_exec(), connectedline_read(), connectedline_write(), create_dynamic_parkinglot(), crement_function_read(), dahdi_bridge(), dahdi_handle_dtmf(), dahdi_handle_event(), data_channels_provider_handler(), deactivate_silence_generator(), dial_exec_full(), disable_jack_hook(), do_forward(), do_notify(), dundi_query_read(), dundi_result_read(), enable_jack_hook(), end_bridge_callback(), enum_query_read(), enum_result_read(), exec_odbcfinish(), expand_gosub_args(), feature_check(), feature_interpret(), feature_request_and_dial(), find_by_mark(), find_by_part(), find_calling_channel(), find_channel_by_group(), find_conf_realtime(), find_details(), find_or_create_details(), find_speech(), find_transaction(), findmeexec(), frame_trace_helper(), func_channel_read(), func_channel_write_real(), func_channels_read(), func_header_read(), func_inheritance_write(), func_mute_write(), function_agent(), function_sipchaninfo_read(), generator_force(), generic_fax_exec(), get_agi_cmd(), get_cid_name(), gosub_exec(), gosub_run(), handle_chanlist(), handle_cli_agi_add_cmd(), handle_cli_mixmonitor(), handle_gosub(), handle_invite_replaces(), handle_request_bye(), handle_request_refer(), handle_showchan(), handle_softhangup(), import_ch(), import_helper(), init_jack_data(), jack_hook_callback(), leave_voicemail(), listfilter(), local_ast_moh_stop(), local_call(), local_hangup(), local_queryoption(), local_queue_frame(), local_read(), local_setoption(), local_write(), login_exec(), lua_get_state(), manage_parked_call(), manager_mutestream(), mark_transaction_active(), meetme_menu_admin_extended(), minivm_delete_exec(), minivm_notify_exec(), misdn_answer(), misdn_attempt_transfer(), misdn_update_caller_id(), moh_files_generator(), morsecode_exec(), mute_callback(), my_handle_dtmf(), notify_new_message(), park_call_full(), parkandannounce_exec(), parked_call_exec(), pbx_builtin_background(), pbx_builtin_getvar_helper(), pbx_builtin_gotoiftime(), pbx_builtin_pushvar_helper(), pbx_builtin_serialize_variables(), pbx_builtin_setamaflags(), pbx_builtin_setvar_helper(), peek_read(), pickup_by_exten(), pickup_by_name_cb(), pitchshift_helper(), pop_exec(), pri_dchannel(), process_sdp(), queue_exec(), receivefax_exec(), redirecting_read(), redirecting_write(), release_transaction(), remote_bridge_loop(), report_fax_status(), retrydial_exec(), return_exec(), run_agi(), sendfax_exec(), sendtext_exec(), set_ext_pri(), set_format(), set_security_requirements(), setup_inheritance_datastore(), setup_mixmonitor_ds(), setup_transfer_datastore(), shared_read(), shared_write(), sip_addheader(), sip_dtmfmode(), sip_new(), sip_pvt_lock_full(), sip_read(), sip_removeheader(), sip_set_rtp_peer(), sip_set_udptl_peer(), smdi_msg_read(), smdi_msg_retrieve_read(), softhangup_exec(), speech_background(), speech_create(), speech_datastore_destroy(), speex_read(), speex_write(), srv_datastore_setup(), srv_query_read(), srv_result_read(), stackpeek_read(), start_monitor_action(), start_monitor_exec(), state_notify_build_xml(), stop_mixmonitor_exec(), transmit_invite(), try_calling(), update_bridge_vars(), volume_write(), and wait_for_answer().
#define ast_channel_lock_both | ( | chan1, | |
chan2 | |||
) |
Lock two channels.
Definition at line 2473 of file channel.h.
Referenced by __ast_channel_masquerade(), __ast_request_and_dial(), ast_bridge_call(), ast_call_forward(), ast_channel_bridge(), ast_do_masquerade(), ast_generic_bridge(), call_forward_inherit(), dial_transfer(), do_bridge_masquerade(), do_forward(), findmeexec(), ring_entry(), and wait_for_answer().
#define AST_CHANNEL_NAME 80 |
Max length of an ast_channel name
Definition at line 137 of file channel.h.
Referenced by ast_bridge_call(), ast_cc_call_failed(), ast_cc_is_recall(), ast_channel_destructor(), ast_do_masquerade(), ast_parse_device_state(), ast_queue_cc_frame(), ast_setstate(), cc_core_init_instance(), cc_unique_append(), cccancel_exec(), ccreq_exec(), common_exec(), create_jb(), dahdi_cc_callback(), dahdi_new(), dial_exec_full(), fast_originate(), page_exec(), park_call_full(), sig_pri_call(), sig_pri_cc_available(), sig_pri_cc_generic_check(), sip_call(), sip_handle_cc(), softhangup_exec(), 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 2491 of file channel.h.
Referenced by agent_hangup(), agent_lock_owner(), ast_autochan_new_channel(), ast_autochan_setup(), ast_cel_report_event(), ast_do_masquerade(), ast_set_hangupsource(), awesome_locking(), check_bridge(), handle_getvariablefull(), handle_incoming(), handle_invite_replaces(), handle_request_refer(), local_attended_transfer(), local_queryoption(), local_queue_frame(), local_setoption(), set_hangup_source_and_cause(), sip_pickup(), sip_pvt_lock_full(), sip_queue_hangup_cause(), and socket_process().
#define ast_channel_trylock | ( | chan | ) | ao2_trylock(chan) |
Definition at line 2468 of file channel.h.
Referenced by __ast_channel_masquerade(), __oh323_rtp_create(), agent_logoff(), agent_read(), analog_lock_sub_owner(), ast_queue_hangup(), ast_queue_hangup_with_cause(), ast_rtp_instance_bridge(), ast_rtp_instance_early_bridge(), ast_rtp_instance_early_bridge_make_compatible(), ast_udptl_bridge(), ast_write(), auto_congest(), awesome_locking(), bridge_queue_hangup(), bridge_write(), check_bridge(), check_rtp_timeout(), cleanup_connection(), dahdi_bridge(), dahdi_handle_event(), dahdi_lock_sub_owner(), dahdi_queue_frame(), dahdi_softhangup_all(), dial_exec_full(), get_sip_pvt_byid_locked(), grab_owner(), handle_request_bye(), hangup_connection(), iax2_destroy(), iax2_lock_owner(), mgcp_queue_frame(), mgcp_queue_hangup(), misdn_attempt_transfer(), oh323_rtp_read(), oh323_simulate_dtmf_end(), proc_session_timer(), receive_digit(), release_chan(), release_chan_early(), remote_hold(), retrans_pkt(), setup_rtp_connection(), sig_pri_lock_owner(), sip_hangup(), sip_reinvite_retry(), and update_state().
#define ast_channel_unlock | ( | chan | ) | ao2_unlock(chan) |
Definition at line 2467 of file channel.h.
Referenced by __analog_handle_event(), __ast_answer(), __ast_channel_masquerade(), __ast_pbx_run(), __ast_queue_frame(), __ast_read(), __ast_request_and_dial(), __dahdi_exception(), __oh323_destroy(), __oh323_rtp_create(), __sip_autodestruct(), __sip_destroy(), _macro_exec(), _while_exec(), acf_cc_read(), acf_cc_write(), acf_fetch(), acf_odbc_read(), action_add_agi_cmd(), action_agents(), action_coreshowchannels(), action_hangup(), action_redirect(), action_status(), action_timeout(), add_features_datastore(), add_to_agi(), agent_indicate(), agent_lock_owner(), agent_logoff(), agent_read(), agents_data_provider_get(), agents_show(), agents_show_online(), alsa_call(), analog_attempt_transfer(), analog_exception(), analog_hangup(), app_exec(), ast_activate_generator(), ast_async_goto(), ast_audiohook_attach(), ast_audiohook_detach_source(), ast_audiohook_remove(), ast_audiohook_set_mute(), ast_autochan_destroy(), ast_autochan_setup(), ast_autoservice_start(), ast_autoservice_stop(), ast_bridge_call(), ast_bridge_end_dtmf(), ast_bridge_timelimit(), ast_call(), ast_call_forward(), 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_cel_report_event(), ast_change_name(), ast_channel_bridge(), ast_channel_clear_softhangup(), ast_channel_cmp_cb(), ast_channel_connected_line_macro(), ast_channel_destructor(), ast_channel_queryoption(), ast_channel_redirecting_macro(), ast_channel_set_caller(), ast_channel_set_caller_event(), ast_channel_set_connected_line(), ast_channel_set_redirecting(), ast_channel_setoption(), ast_check_hangup_locked(), ast_complete_channels(), ast_deactivate_generator(), ast_dial_join(), ast_do_masquerade(), ast_do_pickup(), ast_eivr_getvariable(), ast_explicit_goto(), ast_generic_bridge(), ast_handle_cc_control_frame(), ast_hangup(), ast_ignore_cc(), ast_indicate_data(), ast_odbc_retrieve_transaction_obj(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pickup_call(), ast_queue_hangup(), ast_queue_hangup_with_cause(), ast_raw_answer(), ast_read_generator_actions(), ast_rtp_instance_bridge(), ast_rtp_instance_early_bridge(), ast_rtp_instance_early_bridge_make_compatible(), ast_rtp_instance_make_compatible(), ast_safe_sleep_conditional(), ast_senddigit_begin(), ast_senddigit_end(), ast_sendtext(), ast_set_callerid(), ast_set_cc_interfaces_chanvar(), ast_set_hangupsource(), ast_settimeout_full(), ast_setup_cc_recall_datastore(), ast_softhangup(), ast_stopstream(), ast_str_retrieve_variable(), ast_transfer(), ast_udptl_bridge(), ast_var_channel_bridge(), ast_var_channels_table(), ast_waitfor_nandfds(), ast_write(), attempt_transfer(), auth_exec(), auto_congest(), awesome_locking(), bridge_play_sounds(), bridge_queue_hangup(), bridge_write(), builtin_atxfer(), builtin_automixmonitor(), builtin_blindtransfer(), calendar_event_read(), calendar_query_exec(), calendar_query_result_exec(), call_forward_inherit(), callerid_read(), callerid_write(), cb_events(), cc_build_payload(), cc_interfaces_datastore_init(), cdr_read(), cdr_write(), channel_set_debug(), channel_spy(), check_bridge(), check_goto_on_transfer(), check_rtp_timeout(), cleanup_connection(), clear_caller(), clear_dialed_interfaces(), common_exec(), conf_run(), conf_start_moh(), confbridge_exec(), connectedline_read(), connectedline_write(), console_answer(), console_hangup(), console_sendtext(), create_dynamic_parkinglot(), crement_function_read(), dahdi_bridge(), dahdi_handle_dtmf(), dahdi_handle_event(), dahdi_queue_frame(), dahdi_softhangup_all(), data_channels_provider_handler(), deactivate_silence_generator(), dial_exec_full(), dial_transfer(), dialog_unlink_all(), disable_jack_hook(), do_bridge_masquerade(), do_forward(), do_notify(), dundi_query_read(), dundi_result_read(), enable_jack_hook(), end_bridge_callback(), enum_query_read(), enum_result_read(), exec_odbcfinish(), expand_gosub_args(), fast_originate(), feature_check(), feature_interpret(), feature_request_and_dial(), find_by_mark(), find_by_part(), find_calling_channel(), find_channel_by_group(), find_conf_realtime(), find_details(), find_or_create_details(), find_speech(), find_transaction(), findmeexec(), frame_trace_helper(), func_channel_read(), func_channel_write_real(), func_channels_read(), func_header_read(), func_inheritance_write(), func_mute_write(), function_agent(), function_sipchaninfo_read(), generator_force(), generic_fax_exec(), get_agi_cmd(), get_cid_name(), gosub_exec(), gosub_run(), handle_chanlist(), handle_cli_agi_add_cmd(), handle_cli_mixmonitor(), handle_gosub(), handle_incoming(), handle_invite_replaces(), handle_request_bye(), handle_request_do(), handle_request_invite(), handle_request_refer(), handle_showchan(), handle_softhangup(), hangup_connection(), iax2_destroy(), iax2_queue_control_data(), iax2_queue_frame(), iax2_queue_hangup(), import_ch(), import_helper(), init_jack_data(), jack_hook_callback(), leave_voicemail(), listfilter(), local_ast_moh_stop(), local_attended_transfer(), local_bridge_loop(), local_call(), local_hangup(), local_queryoption(), local_queue_frame(), local_read(), local_setoption(), local_write(), login_exec(), lua_get_state(), manage_parked_call(), manager_mutestream(), mark_transaction_active(), meetme_menu_admin_extended(), mgcp_pktcgate_remove(), mgcp_queue_frame(), mgcp_queue_hangup(), minivm_delete_exec(), minivm_notify_exec(), misdn_answer(), misdn_attempt_transfer(), misdn_update_caller_id(), moh_files_generator(), morsecode_exec(), mute_callback(), my_handle_dtmf(), notify_new_message(), oh323_rtp_read(), oh323_simulate_dtmf_end(), park_call_full(), parkandannounce_exec(), parked_call_exec(), pbx_builtin_background(), pbx_builtin_getvar_helper(), pbx_builtin_gotoiftime(), pbx_builtin_pushvar_helper(), pbx_builtin_serialize_variables(), pbx_builtin_setamaflags(), pbx_builtin_setvar_helper(), peek_read(), pickup_by_channel(), pickup_by_exten(), pickup_by_group(), pickup_by_mark(), pickup_by_name_cb(), pickup_by_part(), pitchshift_helper(), pop_exec(), pri_dchannel(), pri_fixup_principle(), pri_queue_frame(), proc_session_timer(), process_sdp(), queue_exec(), receive_digit(), receivefax_exec(), redirecting_read(), redirecting_write(), reinvite_timeout(), release_chan(), release_chan_early(), release_transaction(), remote_bridge_loop(), remote_hold(), report_fax_status(), retrans_pkt(), retrydial_exec(), return_exec(), ring_entry(), run_agi(), schedule_delivery(), send_provisional_keepalive_full(), sendfax_exec(), sendtext_exec(), set_ext_pri(), set_format(), set_hangup_source_and_cause(), set_security_requirements(), setup_inheritance_datastore(), setup_mixmonitor_ds(), setup_rtp_connection(), setup_transfer_datastore(), shared_read(), shared_write(), sig_pri_attempt_transfer(), sig_pri_cc_generic_check(), sig_pri_cli_show_channels(), sig_pri_handle_hold(), sig_pri_handle_subcmds(), sig_pri_send_aoce_termination_request(), sip_addheader(), sip_dtmfmode(), sip_hangup(), sip_new(), sip_pvt_lock_full(), sip_queue_hangup_cause(), sip_read(), sip_reinvite_retry(), sip_removeheader(), sip_request_call(), sip_set_rtp_peer(), sip_set_udptl_peer(), smdi_msg_read(), smdi_msg_retrieve_read(), socket_process(), softhangup_exec(), speech_background(), speech_create(), speech_datastore_destroy(), speex_read(), speex_write(), srv_datastore_setup(), srv_query_read(), srv_result_read(), stackpeek_read(), start_monitor_action(), start_monitor_exec(), state_notify_build_xml(), stop_mixmonitor_exec(), transmit_invite(), try_calling(), update_bridge_vars(), update_state(), volume_write(), wait_for_answer(), and wakeup_sub().
#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 2502 of file channel.h.
Referenced by __ast_channel_alloc_ap(), __sip_autodestruct(), acf_odbc_read(), acf_odbc_write(), action_add_agi_cmd(), action_agents(), action_aocmessage(), action_atxfer(), action_bridge(), action_coreshowchannels(), action_getvar(), action_hangup(), action_redirect(), action_sendtext(), action_setvar(), action_status(), action_timeout(), agent_hangup(), agent_lock_owner(), agent_logoff(), agent_read(), agents_data_provider_get(), agents_show(), agents_show_online(), ast_add_extension2_lockopt(), ast_async_goto_by_name(), ast_autochan_destroy(), ast_autochan_new_channel(), ast_bridge_call(), ast_cel_fabricate_channel_from_event(), ast_cel_report_event(), ast_channel_release(), ast_complete_channels(), ast_do_masquerade(), ast_dummy_channel_alloc(), ast_hangup(), ast_parse_device_state(), ast_pbx_outgoing_cdr_failed(), ast_pickup_call(), ast_set_hangupsource(), ast_str_substitute_variables_full(), ast_var_channel_bridge(), ast_var_channel_types_table(), ast_var_channels_table(), asyncgoto_exec(), awesome_locking(), bridge_exec(), change_monitor_action(), check_bridge(), cli_odbc_read(), cli_odbc_write(), common_exec(), custom_log(), data_channels_provider_handler(), dialog_unlink_all(), do_pause_or_unpause(), func_channels_read(), func_mchan_read(), func_mchan_write(), handle_chanlist(), handle_channelstatus(), handle_cli_agi_add_cmd(), handle_cli_mixmonitor(), handle_core_set_debug_channel(), handle_getvariablefull(), handle_hangup(), handle_incoming(), handle_invite_replaces(), handle_redirect(), handle_request_do(), handle_request_refer(), handle_set_chanvar(), handle_show_chanvar(), handle_showchan(), handle_softhangup(), import_helper(), local_attended_transfer(), local_call(), local_hangup(), local_queryoption(), local_queue_frame(), local_setoption(), make_email_file(), manager_log(), manager_mute_mixmonitor(), manager_mutestream(), manager_optimize_away(), manager_park(), manager_play_dtmf(), next_channel(), park_call_full(), pbx_builtin_importvar(), pbx_substitute_variables_helper_full(), pickup_by_channel(), pickup_by_exten(), pickup_by_group(), pickup_by_mark(), pickup_by_part(), reinvite_timeout(), rotate_file(), send_provisional_keepalive_full(), senddtmf_exec(), sendmail(), sendpage(), set_hangup_source_and_cause(), shared_read(), shared_write(), sip_pickup(), sip_pickup_thread(), sip_pvt_lock_full(), sip_queue_hangup_cause(), socket_process(), softhangup_exec(), start_monitor_action(), state_notify_build_xml(), stop_monitor_action(), and syslog_log().
#define AST_GENERATOR_FD (AST_MAX_FDS-4) |
used by generator
Definition at line 166 of file channel.h.
Referenced by __ast_read(), ast_do_masquerade(), and deactivate_generator_nolock().
#define AST_MAX_CONTEXT 80 |
Max length of a context
Definition at line 136 of file channel.h.
Referenced by _macro_exec(), aji_publish_mwi(), ast_bridge_call(), cleanup_stale_contexts(), common_exec(), conf_run(), config_parse_variables(), dial_transfer(), do_magic_pickup(), gtalk_load_config(), handle_request_invite(), handle_statechange(), park_call_full(), parkinglot_activate(), reload_config(), and try_calling().
#define AST_MAX_EXTENSION 80 |
Max length of an extension
Definition at line 135 of file channel.h.
Referenced by __analog_ss_thread(), __ast_context_destroy(), add_extensions(), advanced_options(), aji_publish_mwi(), analog_ss_thread(), ast_bridge_call(), ast_device_state_changed(), ast_devstate_changed(), ast_ivr_menu_run_internal(), begin_dial_channel(), build_device(), cc_extension_monitor_init(), conf_run(), destroy_space(), dial_exec_full(), dial_transfer(), disa_exec(), do_magic_pickup(), dundi_lookup_local(), feature_attended_transfer(), feature_blind_transfer(), find_conf_realtime(), forward_message(), function_enum(), get_destination(), handle_request_invite(), handle_statechange(), load_module(), log_exec(), manage_parked_call(), manager_show_dialplan_helper(), mgcp_ss(), park_add_hints(), park_call_exec(), park_call_full(), phone_check_exception(), pri_dchannel(), pri_ss_thread(), process_dahdi(), realtime_common(), realtime_switch_common(), search_directory_sub(), show_dialplan_helper(), sig_pri_party_number_convert(), skinny_extensionstate_cb(), skinny_ss(), sla_build_station(), sla_station_destructor(), speech_background(), state_notify_build_xml(), try_calling(), vm_authenticate(), and vmauthenticate().
#define AST_MAX_FDS 10 |
Definition at line 158 of file channel.h.
Referenced by ast_channel_destructor(), ast_do_masquerade(), ast_poll_channel_add(), ast_poll_channel_del(), ast_waitfor_nandfds(), and manage_parked_call().
#define AST_TIMING_FD (AST_MAX_FDS-2) |
used for timingfd
Definition at line 164 of file channel.h.
Referenced by __ast_channel_alloc_ap(), __ast_read(), agent_read(), ast_do_masquerade(), and ast_settimeout_full().
#define CHECK_BLOCKING | ( | c | ) |
Definition at line 2427 of file channel.h.
Referenced by ast_sendtext(), ast_waitfor_nandfds(), ast_write(), dahdi_read(), and phone_read().
#define DATASTORE_INHERIT_FOREVER INT_MAX |
Definition at line 156 of file channel.h.
Referenced by _macro_exec(), acf_iaxvar_write(), add_features_datastore(), ast_channel_datastore_inherit(), ast_iax2_new(), ast_setup_cc_recall_datastore(), authenticate_reply(), calendar_query_exec(), cc_interfaces_datastore_init(), dial_exec_full(), do_notify(), socket_process(), and try_calling().
#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 648 of file channel.h.
Referenced by __ast_read(), ast_write(), channel_set_debug(), handle_core_set_debug_channel(), handle_showchan(), and serialize_showchan().
#define FRAMECOUNT_INC | ( | x | ) | ( ((x) & DEBUGCHAN_FLAG) | (((x)+1) & ~DEBUGCHAN_FLAG) ) |
Definition at line 651 of file channel.h.
Referenced by __ast_read(), and ast_write().
#define MAX_LANGUAGE 40 |
Max length of the language setting
Definition at line 138 of file channel.h.
Referenced by ast_readconfig().
#define MAX_MUSICCLASS 80 |
typedef int(* ast_acf_read2_fn_t)(struct ast_channel *, const char *, char *, struct ast_str **, ssize_t) |
typedef int(* ast_acf_read_fn_t)(struct ast_channel *, const char *, char *, char *, size_t) |
typedef int(* ast_acf_write_fn_t)(struct ast_channel *, const char *, char *, const char *) |
typedef unsigned long long ast_group_t |
anonymous enum |
ast_channel_tech Properties
Definition at line 878 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_NBRIDGE |
This channel is in a native bridge |
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_ANSWERED_ELSEWHERE |
Flag to show channels that this call is hangup due to the fact that the call was indeed answered, but in another channel |
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_BRIDGE_HANGUP_DONT |
This flag indicates that the hangup exten should NOT be run when the bridge terminates, this will allow the hangup in the pbx loop to be run instead. |
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_TIMINGDATA_IS_AO2_OBJ |
The data on chan->timingdata is an astobj2 object. |
Definition at line 892 of file channel.h.
anonymous enum |
ast_bridge_config flags
Definition at line 961 of file channel.h.
anonymous enum |
Definition at line 1009 of file channel.h.
enum ast_bridge_result |
Enumerator | |
---|---|
AST_BRIDGE_COMPLETE | |
AST_BRIDGE_FAILED | |
AST_BRIDGE_FAILED_NOWARN | |
AST_BRIDGE_RETRY |
Definition at line 168 of file channel.h.
enum ast_channel_adsicpe |
Enumerator | |
---|---|
AST_ADSI_UNKNOWN | |
AST_ADSI_AVAILABLE | |
AST_ADSI_UNAVAILABLE | |
AST_ADSI_OFFHOOKONLY |
Definition at line 659 of file channel.h.
enum AST_PARTY_CHAR_SET |
Party name character set enumeration values (values from Q.SIG)
Definition at line 192 of file channel.h.
enum ast_t38_state |
Possible T38 states on channels.
Definition at line 669 of file channel.h.
enum channelreloadreason |
Channel reload reasons for manager events at load or reload of configuration.
Enumerator | |
---|---|
CHANNEL_MODULE_LOAD | |
CHANNEL_MODULE_RELOAD | |
CHANNEL_CLI_RELOAD | |
CHANNEL_MANAGER_RELOAD |
Definition at line 1060 of file channel.h.
int __ast_answer | ( | struct ast_channel * | chan, |
unsigned int | delay, | ||
int | cdr_answer | ||
) |
Answer a channel, with a selectable delay before returning.
chan | channel to answer |
delay | maximum amount of time to wait for incoming media |
cdr_answer | flag to control whether any associated CDR should be marked as 'answered' |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2982 of file channel.c.
References ast_channel::_state, ast_channel_lock, ast_channel_unlock, AST_CONTROL_HANGUP, ast_debug, 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_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frfree, ast_frisolate(), AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_HEAD_NOLOCK, AST_LIST_INSERT_HEAD, AST_LIST_REMOVE_HEAD, ast_log(), ast_queue_frame_head(), ast_raw_answer(), ast_read(), ast_remaining_ms(), AST_STATE_RING, AST_STATE_RINGING, ast_tvnow(), ast_waitfor(), errno, frames, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, MAX, ast_channel::name, and ast_frame::subclass.
Referenced by ast_answer(), pbx_builtin_answer(), and pbx_builtin_incomplete().
struct ast_channel* attribute_malloc __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 char * | linkedid, | ||
const int | amaflag, | ||
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 1366 of file channel.c.
References __ast_channel_alloc_ap().
struct ast_channel* __ast_request_and_dial | ( | const char * | type, |
format_t | format, | ||
const struct ast_channel * | requestor, | ||
void * | data, | ||
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 |
format | requested channel format |
requestor | channel requesting data |
data | data to pass to the channel requester |
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 5456 of file channel.c.
References ast_channel::_state, outgoing_helper::account, ast_call(), ast_call_forward(), AST_CAUSE_NO_ANSWER, ast_cdr_alloc(), ast_cdr_answer(), ast_cdr_busy(), ast_cdr_disposition(), ast_cdr_end(), ast_cdr_failed(), AST_CDR_FLAG_ORIGINATED, ast_cdr_init(), ast_cdr_setaccount(), ast_cdr_setapp(), ast_cdr_start(), ast_cdr_update(), ast_channel_datastore_inherit(), ast_channel_inherit_variables(), ast_channel_lock, ast_channel_lock_both, ast_channel_set_connected_line(), ast_channel_unlock, 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_REDIRECTING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_UNHOLD, AST_CONTROL_VIDUPDATE, ast_copy_string(), AST_FRAME_CONTROL, ast_frfree, ast_hangup(), ast_log(), ast_party_connected_line_set_init(), AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, ast_read(), ast_remaining_ms(), ast_request(), ast_set_callerid(), ast_set_flag, ast_set_variables(), AST_STATE_UP, ast_strlen_zero(), ast_tvnow(), ast_waitfor(), ast_channel::call_forward, ast_channel::cdr, chanlist::chan, outgoing_helper::cid_name, outgoing_helper::cid_num, ast_channel::connected, ast_channel::context, outgoing_helper::context, ast_channel::exten, outgoing_helper::exten, f, ast_frame::frametype, handle_cause(), ast_channel::hangupcause, ast_party_connected_line::id, ast_frame_subclass::integer, LOG_NOTICE, ast_party_id::name, ast_party_id::number, outgoing_helper::parent_channel, ast_party_name::presentation, ast_party_number::presentation, ast_channel::priority, outgoing_helper::priority, ast_party_name::str, ast_party_number::str, ast_frame::subclass, ast_party_name::valid, ast_party_number::valid, and outgoing_helper::vars.
Referenced by ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_request_and_dial(), and parkandannounce_exec().
int ast_activate_generator | ( | struct ast_channel * | chan, |
struct ast_generator * | gen, | ||
void * | params | ||
) |
Activate a given generator
Definition at line 3148 of file channel.c.
References ast_generator::alloc, ast_channel_lock, ast_channel_unlock, ast_prod(), ast_settimeout(), gen, ast_channel::generator, generator_force(), ast_channel::generatordata, and ast_generator::release.
Referenced by app_exec(), ast_channel_start_silence_generator(), ast_linear_stream(), ast_playtones_start(), ast_tonepair_start(), channel_spy(), eivr_comm(), local_ast_moh_start(), old_milliwatt_exec(), and transmit_audio().
int ast_active_channels | ( | void | ) |
returns number of active/allocated channels
Definition at line 848 of file channel.c.
References ao2_container_count(), and channels.
Referenced by action_corestatus(), ast_var_channels(), ast_var_channels_table(), dahdi_restart(), handle_chanlist(), handle_show_settings(), and really_quit().
|
inlinestatic |
if fd is a valid descriptor, set *pfd with the descriptor
Definition at line 2390 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 3086 of file channel.c.
References __ast_answer().
Referenced by action_bridge(), agi_exec_full(), alarmreceiver_exec(), answer_trunk_chan(), app_exec(), ast_control_streamfile(), ast_do_pickup(), ast_pickup_call(), auth_exec(), background_detect_exec(), bridge_exec(), builtin_parkcall(), common_exec(), conf_exec(), count_exec(), dahdiras_exec(), dial_exec_full(), dictate_exec(), directory_exec(), disa_exec(), eivr_comm(), handle_answer(), ices_exec(), login_exec(), minivm_accmess_exec(), minivm_greet_exec(), minivm_record_exec(), old_milliwatt_exec(), park_call_exec(), parked_call_exec(), pbx_builtin_background(), playback_exec(), privacy_exec(), read_exec(), readexten_exec(), receivefax_exec(), record_exec(), sayunixtime_exec(), send_waveform_to_channel(), sendfax_exec(), setup_privacy_args(), skel_exec(), sla_station_exec(), speech_background(), testclient_exec(), testserver_exec(), transmit(), vm_exec(), vm_execmain(), waitfor_exec(), and zapateller_exec().
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 307 of file autoservice.c.
References AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, asent::chan, asent::ignore_frame_types, and asent::list.
Referenced by builtin_automixmonitor(), feature_exec_app(), and play_message_on_chan().
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 179 of file autoservice.c.
References as_cond, ast_calloc, ast_channel_lock, ast_channel_unlock, ast_cond_signal, 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_log(), ast_pthread_create_background, AST_PTHREADT_NULL, ast_set_flag, ast_test_flag, asthread, autoservice_run(), asent::chan, free, asent::list, LOG_WARNING, asent::orig_end_dtmf_flag, and asent::use_count.
Referenced by _macro_exec(), acf_curl_helper(), acf_jabberreceive_read(), acf_odbc_read(), acf_odbc_write(), ast_app_exec_macro(), ast_app_exec_sub(), ast_dtmf_stream(), ast_get_enum(), ast_get_srv(), ast_get_txt(), ast_masq_park_call_exten(), ast_park_call_exten(), bridge_playfile(), builtin_atxfer(), builtin_automixmonitor(), builtin_blindtransfer(), conf_play(), confbridge_exec(), dial_exec_full(), exec(), feature_exec_app(), feature_request_and_dial(), function_realtime_read(), function_realtime_readdestroy(), function_realtime_store(), function_realtime_write(), leave_conference_bridge(), lock_read(), lua_autoservice_start(), lua_get_variable_value(), lua_pbx_exec(), lua_set_variable(), lua_set_variable_value(), originate_exec(), osplookup_exec(), pbx_find_extension(), play_message_on_chan(), realtimefield_read(), shell_helper(), sla_station_exec(), smdi_msg_retrieve_read(), srv_datastore_setup(), system_exec_helper(), try_calling(), and trylock_read().
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 238 of file autoservice.c.
References ast_channel::_softhangup, as_chan_list_state, ast_channel_lock, ast_channel_unlock, ast_clear_flag, AST_FLAG_END_DTMF_ONLY, ast_frfree, 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_PTHREADT_NULL, ast_queue_frame_head(), asthread, asent::chan, asent::deferred_frames, f, ast_frame::frametype, free, asent::ignore_frame_types, asent::list, asent::orig_end_dtmf_flag, and asent::use_count.
Referenced by _macro_exec(), acf_curl_helper(), acf_jabberreceive_read(), acf_odbc_read(), acf_odbc_write(), array(), ast_app_exec_macro(), ast_app_exec_sub(), ast_dtmf_stream(), ast_get_enum(), ast_get_srv(), ast_get_txt(), ast_hangup(), ast_masq_park_call_exten(), ast_park_call_exten(), bridge_playfile(), builtin_atxfer(), builtin_automixmonitor(), conf_play(), confbridge_exec(), dial_exec_full(), exec(), feature_exec_app(), feature_request_and_dial(), finishup(), function_realtime_read(), function_realtime_readdestroy(), function_realtime_store(), function_realtime_write(), leave_conference_bridge(), lock_read(), lua_autoservice_stop(), lua_get_variable_value(), lua_pbx_exec(), lua_set_variable(), lua_set_variable_value(), originate_exec(), osplookup_exec(), pbx_find_extension(), play_message_on_chan(), realtimefield_read(), shell_helper(), sla_station_exec(), smdi_msg_retrieve_read(), srv_datastore_setup(), system_exec_helper(), try_calling(), and trylock_read().
void ast_begin_shutdown | ( | int | hangup | ) |
Initiate system shutdown – prevents new channels from being allocated.
hangup | If "hangup" is non-zero, all existing channels will receive soft hangups |
Definition at line 838 of file channel.c.
References ao2_callback, ast_channel_softhangup_cb(), channels, OBJ_MULTIPLE, and OBJ_NODATA.
Referenced by can_safely_quit().
Pick the best audio codec.
Pick the best codec Choose the best codec... Uhhh... Yah.
Okay, ulaw is used by all telephony equipment, so start with it
Unless of course, you're a silly European, so then prefer ALAW
G.722 is better then all below, but not as common as the above... so give ulaw and alaw priority
Okay, well, signed linear is easy to translate into other stuff
G.726 is standard ADPCM, in RFC3551 packing order
G.726 is standard ADPCM, in AAL2 packing order
ADPCM has great sound quality and is still pretty easy to translate
Okay, we're down to vocoders now, so pick GSM because it's small and easier to translate and sounds pretty good
iLBC is not too bad
Speex is free, but computationally more expensive than GSM
Ick, LPC10 sounds terrible, but at least we have code for it, if you're tacky enough to use it
G.729a is faster than 723 and slightly less expensive
Down to G.723.1 which is proprietary but at least designed for voice
Definition at line 1062 of file channel.c.
References ARRAY_LEN, AST_FORMAT_ADPCM, AST_FORMAT_ALAW, AST_FORMAT_AUDIO_MASK, AST_FORMAT_G719, AST_FORMAT_G722, AST_FORMAT_G723_1, AST_FORMAT_G726, AST_FORMAT_G726_AAL2, AST_FORMAT_G729A, AST_FORMAT_GSM, AST_FORMAT_ILBC, AST_FORMAT_LPC10, AST_FORMAT_SIREN14, AST_FORMAT_SIREN7, AST_FORMAT_SLINEAR, AST_FORMAT_SLINEAR16, AST_FORMAT_SPEEX, AST_FORMAT_SPEEX16, AST_FORMAT_TESTLAW, AST_FORMAT_ULAW, ast_getformatname_multiple(), ast_log(), LOG_WARNING, and prefs.
Referenced by __oh323_new(), agent_call(), ast_codec_choose(), ast_iax2_new(), ast_speech_new(), bridge_make_compatible(), builtin_atxfer(), echo_exec(), findmeexec(), gtalk_new(), handle_open_receive_channel_ack_message(), iax2_request(), jingle_new(), local_new(), login_exec(), mgcp_new(), multicast_rtp_request(), set_format(), sip_new(), skinny_new(), skinny_set_rtp_peer(), socket_process(), start_rtp(), transmit_connect(), and unistim_new().
struct ast_channel* ast_bridged_channel | ( | struct ast_channel * | chan | ) |
Find bridged channel.
chan | Current channel |
Definition at line 7160 of file channel.c.
References ast_channel::_bridge, ast_channel_tech::bridged_channel, and ast_channel::tech.
Referenced by __analog_handle_event(), __analog_ss_thread(), __ast_channel_masquerade(), __ast_read(), __dahdi_exception(), _skinny_show_lines(), action_agents(), action_coreshowchannels(), agents_data_provider_get(), agents_show(), agents_show_online(), analog_attempt_transfer(), analog_exception(), analog_hangup(), analog_ss_thread(), ast_bridge_call(), ast_cel_report_event(), ast_channel_data_add_structure(), ast_channel_set_linkgroup(), ast_do_masquerade(), ast_rtp_instance_set_stats_vars(), ast_set_hangupsource(), ast_var_channel_bridge(), ast_var_channels_table(), attempt_transfer(), cb_events(), channel_spy(), check_bridge(), common_exec(), console_transfer(), create_jb(), dahdi_handle_event(), dahdi_hangup(), export_aoc_vars(), func_channel_read(), get_refer_info(), handle_chanlist(), handle_hd_hf(), handle_invite_replaces(), handle_request(), handle_request_bye(), handle_request_info(), handle_request_refer(), handle_showchan(), handle_soft_key_event_message(), handle_stimulus_message(), key_call(), key_dial_page(), local_attended_transfer(), local_queryoption(), mgcp_hangup(), mgcp_ss(), misdn_attempt_transfer(), mixmonitor_thread(), my_get_sigpvt_bridged_channel(), park_call_full(), pri_dchannel(), schedule_delivery(), serialize_showchan(), sig_pri_attempt_transfer(), sip_get_rtp_peer(), sip_get_trtp_peer(), sip_get_udptl_peer(), sip_get_vrtp_peer(), sip_hangup(), sip_set_rtp_peer(), skinny_transfer(), socket_process(), start_spying(), startmon(), TransferCallStep1(), and unistim_hangup().
int ast_call | ( | struct ast_channel * | chan, |
char * | addr, | ||
int | timeout | ||
) |
Make a call.
chan | which channel to make the call on |
addr | destination of the call (Should be treated as const char *) |
timeout | time to wait on for connect |
Place a call, take no longer than timeout ms.
Definition at line 5761 of file channel.c.
References AST_CDR_FLAG_DIALED, ast_channel_lock, ast_channel_unlock, ast_check_hangup(), AST_FLAG_OUTGOING, AST_FLAG_ZOMBIE, ast_set_flag, ast_test_flag, ast_channel_tech::call, ast_channel::cdr, and ast_channel::tech.
Referenced by __ast_request_and_dial(), ast_call_forward(), begin_dial_channel(), dial_exec_full(), dial_transfer(), do_forward(), do_idle_thread(), feature_request_and_dial(), findmeexec(), play_sound_file(), ring_entry(), and wait_for_answer().
struct ast_channel* ast_call_forward | ( | struct ast_channel * | caller, |
struct ast_channel * | orig, | ||
int * | timeout, | ||
format_t | format, | ||
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 |
format | requested channel format |
oh | outgoing helper used with original channel |
outstate | reason why unsuccessful (if uncuccessful) |
Definition at line 5386 of file channel.c.
References outgoing_helper::account, accountcode, ast_channel::accountcode, ast_call(), AST_CDR_FLAG_ORIGINATED, ast_cdr_setaccount(), ast_channel_lock, ast_channel_lock_both, ast_channel_unlock, ast_copy_flags, ast_copy_string(), ast_hangup(), ast_log(), ast_party_connected_line_copy(), ast_party_redirecting_copy(), ast_request(), ast_set_variables(), ast_string_field_set, ast_channel::call_forward, call_forward_inherit(), ast_channel::cdr, ast_channel::connected, ast_channel::context, ast_channel::data, handle_cause(), LOG_NOTICE, outgoing_helper::parent_channel, pbx_builtin_getvar_helper(), ast_channel::redirecting, S_OR, type, and outgoing_helper::vars.
Referenced by __ast_request_and_dial(), and feature_request_and_dial().
void ast_cancel_shutdown | ( | void | ) |
Cancel a shutdown in progress.
Cancels an existing shutdown and returns to normal operation
Definition at line 859 of file channel.c.
Referenced by handle_abort_shutdown().
const char* ast_cause2str | ( | int | cause | ) |
Gives the string form of a given cause code.
state | cause to get the description of |
Gives the string form of a given cause code.
Definition at line 980 of file channel.c.
References ARRAY_LEN, causes, and causes_map::desc.
Referenced by __transmit_response(), ast_channel_data_add_structure(), ast_do_masquerade(), ast_hangup(), dial_exec_full(), findmeexec(), sip_hangup(), and transmit_request_with_auth().
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 6229 of file channel.c.
References __ast_change_name_nolink(), ao2_link, ao2_lock, ao2_unlink, ao2_unlock, ast_channel_lock, ast_channel_unlock, and channels.
Referenced by update_name().
int ast_channel_bridge | ( | struct ast_channel * | c0, |
struct ast_channel * | c1, | ||
struct ast_bridge_config * | config, | ||
struct ast_frame ** | fo, | ||
struct ast_channel ** | rc | ||
) |
Bridge two channels together.
c0 | first channel to bridge |
c1 | second channel to bridge |
config | config for the channels |
fo | destination frame(?) |
rc | destination channel(?) |
Bridge two channels (c0 and c1) together. If an important frame occurs, we return that frame in *rf (remember, it could be NULL) and which channel (0 or 1) in rc
Definition at line 7506 of file channel.c.
References ast_channel::_bridge, ast_channel::_softhangup, AST_BRIDGE_COMPLETE, AST_BRIDGE_FAILED, AST_BRIDGE_FAILED_NOWARN, AST_BRIDGE_RETRY, ast_channel_clear_softhangup(), ast_channel_lock_both, ast_channel_make_compatible(), ast_channel_unlock, ast_check_hangup(), ast_check_hangup_locked(), ast_clear_flag, AST_CONTROL_SRCUPDATE, ast_debug, AST_FEATURE_PLAY_WARNING, AST_FEATURE_WARNING_ACTIVE, AST_FLAG_END_DTMF_ONLY, AST_FLAG_NBRIDGE, AST_FLAG_ZOMBIE, ast_framehook_list_is_empty(), ast_generic_bridge(), ast_indicate(), ast_log(), ast_manager_event_multichan, ast_samp2tv(), ast_set_flag, ast_set_owners_and_peers(), AST_SOFTHANGUP_UNBRIDGE, ast_test_flag, ast_test_suite_event_notify, ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), ast_tvsub(), ast_tvzero(), ast_verb, ast_channel::audiohooks, ast_channel_tech::bridge, bridge_play_sounds(), bridge_playfile(), ast_channel::caller, ast_bridge_config::end_sound, EVENT_FLAG_CALL, ast_bridge_config::feature_start_time, ast_bridge_config::feature_timer, ast_bridge_config::features_callee, ast_bridge_config::features_caller, ast_bridge_config::flags, ast_channel::framehooks, ast_channel::generator, ast_party_caller::id, LOG_WARNING, manager_bridge_event(), ast_channel::masq, ast_channel::masqr, ast_channel::monitor, ast_channel::name, ast_channel::nativeformats, ast_bridge_config::nexteventts, ast_party_id::number, ast_bridge_config::play_warning, ast_channel::readformat, S_COR, ast_channel_tech::send_digit_begin, ast_bridge_config::start_sound, ast_bridge_config::start_time, ast_party_number::str, ast_channel::tech, ast_bridge_config::timelimit, ast_channel::uniqueid, update_bridge_vars(), ast_party_number::valid, ast_bridge_config::warning_freq, ast_bridge_config::warning_sound, and ast_channel::writeformat.
Referenced by ast_bridge_call().
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 1634 of file channel.c.
References ao2_callback_data, and channels.
Referenced by ast_pickup_call(), handle_core_set_debug_channel(), my_ast_get_channel_by_name_locked(), pickup_by_group(), pickup_by_mark(), pickup_by_part(), and state_notify_build_xml().
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 9731 of file channel.c.
References ast_cc_config_params_destroy(), ast_cc_config_params_init, ast_cc_copy_config_params(), ast_channel_datastore_add(), ast_datastore_alloc(), and ast_datastore::data.
Referenced by ast_channel_get_cc_config_params(), dahdi_new(), local_call(), local_request(), and sip_new().
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 2707 of file channel.c.
References ast_channel::_softhangup, ast_channel_lock, ast_channel_unlock, AST_CONTROL_END_OF_Q, AST_FRAME_CONTROL, ast_frfree, AST_LIST_LAST, AST_LIST_REMOVE, ast_frame::frametype, ast_frame_subclass::integer, ast_channel::readq, and ast_frame::subclass.
Referenced by __ast_pbx_run(), ast_channel_bridge(), ast_generic_bridge(), check_goto_on_transfer(), and collect_digits().
int ast_channel_cmpwhentohangup | ( | struct ast_channel * | chan, |
time_t | offset | ||
) |
Compare a offset with the settings of when to hang a channel up.
chan | channel on which to check for hang up |
offset | offset in seconds from current time |
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.
Definition at line 900 of file channel.c.
References ast_channel_cmpwhentohangup_tv().
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 |
Compare a offset with the settings of when to hang a channel up.
Definition at line 885 of file channel.c.
References ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), and ast_channel::whentohangup.
Referenced by ast_channel_cmpwhentohangup().
int ast_channel_connected_line_macro | ( | struct ast_channel * | autoservice_chan, |
struct ast_channel * | macro_chan, | ||
const void * | connected_info, | ||
int | caller, | ||
int | frame | ||
) |
Run a connected line interception macro and update a channel's connected line information.
autoservice_chan | Channel to place into autoservice while the macro is running. It is perfectly safe for this to be NULL |
macro_chan | The channel to run the macro on. Also the channel from which we determine which macro we need to run. |
connected_info | Either an ast_party_connected_line or ast_frame pointer of type AST_CONTROL_CONNECTED_LINE |
caller | If true, then run CONNECTED_LINE_CALLER_SEND_MACRO, otherwise run CONNECTED_LINE_CALLEE_SEND_MACRO |
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 macro does not exist, or there was an error while attempting to run the macro |
Have multiple return codes based on the MACRO_RESULT
Make constants so that caller and frame can be more expressive than just '1' and '0'
Definition at line 9618 of file channel.c.
References ast_app_run_macro(), ast_channel_lock, ast_channel_unlock, 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_strlen_zero(), chanlist::connected, ast_channel::connected, ast_frame::data, ast_frame::datalen, pbx_builtin_getvar_helper(), ast_frame::ptr, and S_OR.
Referenced by __ast_read(), app_exec(), ast_bridge_call(), ast_do_pickup(), ast_generic_bridge(), atxfer_fail_cleanup(), builtin_atxfer(), feature_request_and_dial(), handle_frame(), local_bridge_loop(), parked_call_exec(), remote_bridge_loop(), and wait_for_answer().
int ast_channel_data_add_structure | ( | struct ast_data * | tree, |
struct ast_channel * | chan, | ||
int | add_bridged | ||
) |
Insert into an astdata tree, the channel structure.
[in] | tree | The ast data tree. |
[in] | chan | The channel structure to add to tree. |
[in] | add_bridged | Add the bridged channel to the structure. |
<0 | on error. |
0 | on success. |
Definition at line 357 of file channel.c.
References ast_channel::_softhangup, ast_channel::_state, ast_channel::amaflags, ast_bridged_channel(), ast_cause2str(), ast_cdr_data_add_structure(), ast_cdr_flags2str(), ast_channel_data_add_structure(), ast_data_add_bool(), ast_data_add_codecs(), ast_data_add_int(), ast_data_add_node(), ast_data_add_str(), ast_data_add_structure, ast_data_add_uint(), AST_SOFTHANGUP_APPUNLOAD, AST_SOFTHANGUP_ASYNCGOTO, AST_SOFTHANGUP_DEV, AST_SOFTHANGUP_EXPLICIT, AST_SOFTHANGUP_SHUTDOWN, AST_SOFTHANGUP_TIMEOUT, AST_SOFTHANGUP_UNBRIDGE, ast_state2str(), ast_tone_zone_data_add_structure(), ast_transfercapability2str(), ast_channel::cdr, channel_data_add_flags(), ast_channel::hangupcause, ast_channel::nativeformats, ast_channel::oldwriteformat, ast_channel::rawreadformat, ast_channel::rawwriteformat, ast_channel::readformat, ast_channel::transfercapability, ast_channel::whentohangup, ast_channel::writeformat, and ast_channel::zone.
Referenced by agents_data_provider_get(), ast_channel_data_add_structure(), data_channels_provider_handler(), queues_data_provider_get_helper(), and user_add_provider_cb().
int ast_channel_data_cmp_structure | ( | const struct ast_data_search * | tree, |
struct ast_channel * | chan, | ||
const char * | structure_name | ||
) |
Compare to channel structures using the data api.
[in] | tree | The search tree generated by the data api. |
[in] | chan | The channel to compare. |
[in] | structure_name | The name of the node of the channel structure. |
0 | The structure matches. |
1 | The structure doesn't matches. |
Definition at line 489 of file channel.c.
References ast_data_search_cmp_structure.
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 2590 of file channel.c.
References AST_LIST_INSERT_HEAD, and ast_channel::datastores.
Referenced by __ast_channel_masquerade(), _macro_exec(), acf_curlopt_write(), acf_iaxvar_write(), acf_odbc_read(), add_features_datastore(), add_to_agi(), apply_plc(), ast_cel_fabricate_channel_from_event(), ast_channel_cc_params_init(), ast_do_pickup(), ast_iax2_new(), ast_setup_cc_recall_datastore(), audiohook_volume_get(), authenticate_reply(), calendar_query_exec(), cc_interfaces_datastore_init(), dial_exec_full(), do_notify(), dundi_query_read(), enable_jack_hook(), enum_query_read(), find_or_create_details(), find_transaction(), frame_trace_helper(), func_channel_write_real(), get_lock(), gosub_exec(), lua_get_state(), mute_add_audiohook(), pitchshift_helper(), raise_exception(), set_chan_app_data(), setup_inheritance_datastore(), setup_mixmonitor_ds(), setup_transfer_datastore(), shared_write(), smdi_msg_retrieve_read(), socket_process(), speech_create(), speex_write(), srv_datastore_setup(), try_calling(), and volume_write().
struct ast_datastore* attribute_malloc ast_channel_datastore_alloc | ( | const struct ast_datastore_info * | info, |
const char * | uid | ||
) |
Create a channel data store object.
Definition at line 2563 of file channel.c.
References ast_datastore_alloc().
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 2604 of file channel.c.
References AST_LIST_TRAVERSE, ast_channel::datastores, ast_datastore::info, and ast_datastore::uid.
Referenced by _macro_exec(), acf_curl_helper(), acf_curlopt_helper(), acf_curlopt_write(), acf_exception_read(), acf_fetch(), acf_iaxvar_read(), acf_iaxvar_write(), acf_odbc_read(), add_agi_cmd(), add_features_datastore(), add_to_agi(), apply_plc(), 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_get_cc_config_params(), ast_do_masquerade(), ast_handle_cc_control_frame(), ast_ignore_cc(), ast_odbc_retrieve_transaction_obj(), ast_set_cc_interfaces_chanvar(), attended_transfer_occurred(), audiohook_volume_callback(), audiohook_volume_get(), balance_stack(), builtin_atxfer(), calendar_event_read(), calendar_query_exec(), calendar_query_result_exec(), cc_build_payload(), clear_dialed_interfaces(), dial_exec_full(), disable_jack_hook(), dundi_result_read(), enable_jack_hook(), enum_result_read(), exec_odbcfinish(), find_details(), find_speech(), find_transaction(), frame_trace_helper(), func_channel_read(), func_channel_write_real(), func_inheritance_write(), func_mute_write(), get_agi_cmd(), get_lock(), gosub_exec(), gosub_run(), handle_gosub(), iax2_call(), jack_hook_callback(), local_read(), local_write(), lock_fixup(), lua_get_state(), manage_parked_call(), manager_mutestream(), mark_transaction_active(), mute_callback(), parked_call_exec(), pitchshift_cb(), pitchshift_helper(), pop_exec(), queue_transfer_fixup(), raise_exception(), release_transaction(), return_exec(), set_security_requirements(), shared_read(), shared_write(), smdi_msg_read(), speech_datastore_destroy(), speex_callback(), speex_read(), speex_write(), srv_query_read(), srv_result_read(), stackpeek_read(), stop_mixmonitor_exec(), try_calling(), unlock_read(), volume_callback(), and volume_write().
int ast_channel_datastore_free | ( | struct ast_datastore * | datastore | ) |
Free a channel data store object.
Definition at line 2568 of file channel.c.
References ast_datastore_free().
int ast_channel_datastore_inherit | ( | struct ast_channel * | from, |
struct ast_channel * | to | ||
) |
Inherit datastores from a parent to a child.
Definition at line 2573 of file channel.c.
References ast_datastore_alloc(), AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_datastore::data, DATASTORE_INHERIT_FOREVER, ast_channel::datastores, ast_datastore_info::duplicate, ast_datastore::info, ast_datastore::inheritance, and ast_datastore::uid.
Referenced by __ast_request_and_dial(), begin_dial_channel(), call_forward_inherit(), dial_exec_full(), dial_transfer(), do_forward(), findmeexec(), local_call(), 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 2599 of file channel.c.
References AST_LIST_REMOVE, and ast_channel::datastores.
Referenced by acf_fetch(), acf_odbc_read(), adjust_frame_for_plc(), ast_do_masquerade(), ast_do_pickup(), clear_dialed_interfaces(), dial_exec_full(), disable_jack_hook(), exec_odbcfinish(), frame_trace_helper(), lua_get_state(), queue_transfer_fixup(), speech_datastore_destroy(), speex_write(), srv_query_read(), stop_mixmonitor_exec(), and try_calling().
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 1616 of file channel.c.
References AST_FLAG_DEFER_DTMF, ast_set_flag, and ast_test_flag.
Referenced by __adsi_transmit_messages(), and find_cache().
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 7406 of file channel.c.
References ast_channel_tech::early_bridge, and ast_channel::tech.
Referenced by dial_exec_full(), and wait_for_answer().
struct ast_channel* ast_channel_get_by_exten | ( | const char * | exten, |
const char * | context | ||
) |
Find a channel by extension and context.
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 1813 of file channel.c.
References ast_channel_get_full().
struct ast_channel* ast_channel_get_by_name | ( | const char * | name | ) |
Find a channel by name.
Channel search functions
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 1803 of file channel.c.
References ast_channel_get_full().
Referenced by action_add_agi_cmd(), action_aocmessage(), action_atxfer(), action_getvar(), action_hangup(), action_redirect(), action_sendtext(), action_setvar(), action_status(), action_timeout(), ast_async_goto_by_name(), ast_bridge_call(), asyncgoto_exec(), change_monitor_action(), do_pause_or_unpause(), func_mchan_read(), func_mchan_write(), handle_channelstatus(), handle_cli_agi_add_cmd(), handle_core_set_debug_channel(), handle_getvariablefull(), handle_hangup(), handle_redirect(), handle_set_chanvar(), handle_show_chanvar(), handle_showchan(), handle_softhangup(), import_helper(), manager_mute_mixmonitor(), manager_mutestream(), manager_optimize_away(), manager_park(), manager_play_dtmf(), park_call_full(), pbx_builtin_importvar(), senddtmf_exec(), shared_read(), shared_write(), start_monitor_action(), and stop_monitor_action().
struct ast_channel* ast_channel_get_by_name_prefix | ( | const char * | name, |
size_t | name_len | ||
) |
Find a channel by a name prefix.
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 1808 of file channel.c.
References ast_channel_get_full().
Referenced by action_aocmessage(), action_bridge(), ast_parse_device_state(), bridge_exec(), cc_generic_agent_stop_ringing(), common_exec(), handle_cli_mixmonitor(), shared_read(), and shared_write().
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 9793 of file channel.c.
References ast_channel_queryoption(), ast_copy_string(), AST_OPTION_CC_AGENT_TYPE, and ast_channel::name.
Referenced by find_agent_callbacks().
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 9754 of file channel.c.
References ast_assert, ast_channel_cc_params_init(), ast_channel_datastore_find(), and ast_datastore::data.
Referenced by acf_cc_read(), acf_cc_write(), analog_call(), ast_cc_call_failed(), ast_cc_call_init(), ast_queue_cc_frame(), cc_agent_init(), cc_core_init_instance(), find_agent_callbacks(), local_call(), local_request(), sig_pri_cc_available(), and sig_pri_cc_generic_check().
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 9776 of file channel.c.
References ast_channel_queryoption(), ast_copy_string(), AST_OPTION_DEVICE_NAME, and ast_channel::name.
Referenced by ast_cc_call_failed(), ast_cc_is_recall(), ast_queue_cc_frame(), cc_core_init_instance(), cccancel_exec(), ccreq_exec(), dial_exec_full(), sig_pri_call(), sig_pri_cc_available(), sig_pri_cc_generic_check(), sip_call(), and sip_handle_cc().
|
inlinestatic |
Retrieves the current T38 state of a channel.
Definition at line 2417 of file channel.h.
References ast_channel_queryoption(), AST_OPTION_T38_STATE, state, and T38_STATE_UNAVAILABLE.
Referenced by generic_fax_exec(), receivefax_exec(), receivefax_t38_init(), sendfax_exec(), sendfax_t38_init(), set_fax_t38_caps(), transmit(), transmit_audio(), and transmit_t38().
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 6241 of file channel.c.
References ast_debug, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_var_assign(), ast_var_full_name(), ast_var_name(), ast_var_value(), ast_var_t::entries, ast_channel::name, and ast_channel::varshead.
Referenced by __ast_request_and_dial(), begin_dial_channel(), call_forward_inherit(), dial_exec_full(), dial_transfer(), do_forward(), feature_request_and_dial(), findmeexec(), ring_entry(), and wait_for_answer().
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 1701 of file channel.c.
References ast_channel_iterator::active_iterator, ao2_iterator_init(), ast_calloc, channels, and ast_channel_iterator::simple_iterator.
Referenced by action_coreshowchannels(), action_status(), ast_complete_channels(), ast_var_channel_bridge(), ast_var_channel_types_table(), ast_var_channels_table(), common_exec(), data_channels_provider_handler(), func_channels_read(), handle_chanlist(), and handle_softhangup().
struct ast_channel_iterator* ast_channel_iterator_by_exten_new | ( | const char * | exten, |
const char * | context | ||
) |
Create a new channel iterator based on extension.
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 1691 of file channel.c.
References channel_iterator_search().
Referenced by common_exec(), and 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.
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 1696 of file channel.c.
References channel_iterator_search().
Referenced by ast_complete_channels(), common_exec(), and softhangup_exec().
struct ast_channel_iterator* ast_channel_iterator_destroy | ( | struct ast_channel_iterator * | i | ) |
Destroy a channel iterator.
This function is used to destroy a channel iterator that was retrieved by using one of the channel_iterator_new() functions.
Definition at line 1649 of file channel.c.
References ast_channel_iterator::active_iterator, ao2_iterator_destroy(), and ast_free.
Referenced by action_coreshowchannels(), action_status(), ast_complete_channels(), ast_var_channel_bridge(), ast_var_channel_types_table(), ast_var_channels_table(), common_exec(), data_channels_provider_handler(), func_channels_read(), handle_chanlist(), handle_softhangup(), pickup_by_exten(), and softhangup_exec().
struct ast_channel* ast_channel_iterator_next | ( | struct ast_channel_iterator * | i | ) |
Get the next channel for a channel iterator.
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 1715 of file channel.c.
References ast_channel_iterator::active_iterator, and ao2_iterator_next.
Referenced by action_coreshowchannels(), action_status(), ast_complete_channels(), ast_var_channel_bridge(), ast_var_channel_types_table(), ast_var_channels_table(), data_channels_provider_handler(), func_channels_read(), handle_chanlist(), handle_softhangup(), next_channel(), pickup_by_exten(), and softhangup_exec().
int ast_channel_make_compatible | ( | struct ast_channel * | c0, |
struct ast_channel * | c1 | ||
) |
Makes two channel formats compatible.
c0 | first channel to make compatible |
c1 | other channel to make compatible |
Set two channels to compatible formats – call before ast_channel_bridge in general.
Definition at line 5970 of file channel.c.
References ast_channel_make_compatible_helper().
Referenced by action_bridge(), app_exec(), ast_channel_bridge(), bridge_exec(), check_compat(), dial_exec_full(), do_forward(), multiplexed_bridge_join(), parked_call_exec(), simple_bridge_join(), try_calling(), and wait_for_answer().
int ast_channel_masquerade | ( | struct ast_channel * | original, |
struct ast_channel * | clone | ||
) |
Weird function made for call transfers.
original | channel to make a copy of |
clone | copy of the original channel |
This is a very strange and freaky function used primarily for transfer. Suppose that "original" and "clone" are two channels in random situations. This function takes the guts out of "clone" and puts them into the "original" channel, then alerts the channel driver of the change, asking it to fixup any private information (like the p->owner pointer) that is affected by the change. The physical layer of the original channel is hung up.
Definition at line 6110 of file channel.c.
References __ast_channel_masquerade().
Referenced by ast_async_goto(), ast_do_pickup(), attempt_transfer(), builtin_atxfer(), check_availability(), check_bridge(), check_goto_on_transfer(), do_bridge_masquerade(), handle_invite_replaces(), iax_park(), masq_park_call(), sip_park(), and skinny_transfer().
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 7815 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_log(), errno, LOG_ERROR, ast_channel_tech::queryoption, and ast_channel::tech.
Referenced by ast_channel_get_cc_agent_type(), ast_channel_get_device_name(), ast_channel_get_t38_state(), local_queryoption(), rcvfax_exec(), and sndfax_exec().
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 9098 of file channel.c.
References ast_connected_line_build_data(), AST_CONTROL_CONNECTED_LINE, and ast_queue_control_data().
Referenced by ast_do_pickup(), handle_request_invite(), handle_request_update(), handle_response_invite(), local_attended_transfer(), masquerade_colp_transfer(), misdn_queue_connected_line_update(), sig_pri_handle_subcmds(), and sip_call().
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 9605 of file channel.c.
References AST_CONTROL_REDIRECTING, ast_queue_control_data(), and ast_redirecting_build_data().
Referenced by cb_events(), handle_response_invite(), misdn_facility_ie_handler(), and sig_pri_handle_subcmds().
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 5313 of file channel.c.
References AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HANGUP, AST_CONTROL_RING, and AST_CONTROL_RINGING.
Referenced by attempt_thread().
int ast_channel_redirecting_macro | ( | struct ast_channel * | autoservice_chan, |
struct ast_channel * | macro_chan, | ||
const void * | redirecting_info, | ||
int | is_caller, | ||
int | is_frame | ||
) |
Run a redirecting interception macro and update a channel's redirecting information.
Whenever we want to update a channel's redirecting information, we may need to run a macro so that an administrator can manipulate the information before sending it out. This function both runs the macro and sends the update to the channel.
autoservice_chan | Channel to place into autoservice while the macro is running. It is perfectly safe for this to be NULL |
macro_chan | The channel to run the macro on. Also the channel from which we determine which macro we need to run. |
redirecting_info | Either an ast_party_redirecting or ast_frame pointer of type AST_CONTROL_REDIRECTING |
is_caller | If true, then run REDIRECTING_CALLER_SEND_MACRO, otherwise run REDIRECTING_CALLEE_SEND_MACRO |
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 macro does not exist, or there was an error while attempting to run the macro |
Have multiple return codes based on the MACRO_RESULT
Make constants so that caller and frame can be more expressive than just '1' and '0'
Definition at line 9663 of file channel.c.
References ast_app_run_macro(), ast_channel_lock, ast_channel_unlock, ast_channel_update_redirecting(), ast_party_redirecting_copy(), ast_party_redirecting_free(), ast_party_redirecting_init(), ast_redirecting_parse_data(), ast_strdupa, ast_strlen_zero(), ast_frame::data, ast_frame::datalen, pbx_builtin_getvar_helper(), ast_frame::ptr, ast_channel::redirecting, and S_OR.
Referenced by ast_bridge_call(), ast_generic_bridge(), call_forward_inherit(), do_forward(), feature_request_and_dial(), handle_frame(), local_bridge_loop(), remote_bridge_loop(), 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 907 of file channel.c.
References ast_calloc, ast_debug, ast_log(), AST_RWLIST_INSERT_HEAD, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, chanlist::chan, ast_channel_tech::description, LOG_WARNING, chanlist::tech, and ast_channel_tech::type.
Referenced by load_module(), and unload_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.
Definition at line 1921 of file channel.c.
References ao2_unlink, ast_channel_unref, and channels.
Referenced by agent_cleanup(), ast_iax2_new(), ast_request(), bridge_request(), do_notify(), gtalk_newcall(), local_new(), and local_request().
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 5907 of file channel.c.
References ast_channel_tech::send_html, and ast_channel::tech.
Referenced by agent_sendhtml(), ast_channel_sendurl(), and wait_for_answer().
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 5914 of file channel.c.
References ast_channel_sendhtml(), and AST_HTML_URL.
Referenced by dial_exec_full(), sendurl_exec(), and try_calling().
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 7079 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_party_caller_set(), and ast_channel::caller.
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 7091 of file channel.c.
References ast_cdr_setcid(), ast_channel_lock, ast_channel_unlock, ast_party_caller_set(), ast_channel::caller, ast_channel::cdr, ast_party_caller::id, ast_party_id::name, ast_party_id::number, report_new_callerid(), S_COR, ast_party_name::str, ast_party_number::str, ast_party_name::valid, and ast_party_number::valid.
Referenced by callerid_write(), dial_exec_full(), do_forward(), misdn_update_caller_id(), ring_entry(), and sig_pri_handle_subcmds().
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 8458 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_party_connected_line_set(), and ast_channel::connected.
Referenced by __ast_request_and_dial(), ast_indicate_data(), connectedline_write(), dial_exec_full(), and feature_request_and_dial().
void ast_channel_set_fd | ( | struct ast_channel * | chan, |
int | which, | ||
int | fd | ||
) |
Set the file descriptor on the channel
Definition at line 2631 of file channel.c.
References ast_calloc, ast_epoll_data::chan, chanlist::chan, ast_channel::fds, free, and ast_epoll_data::which.
Referenced by __ast_channel_alloc_ap(), __oh323_new(), __oh323_rtp_create(), __oh323_update_info(), alsa_new(), ast_do_masquerade(), dahdi_new(), deactivate_generator_nolock(), gtalk_new(), initialize_udptl(), jingle_new(), mgcp_new(), misdn_new(), my_swap_subchannels(), nbs_new(), oss_new(), phone_new(), process_sdp(), setformat(), sip_new(), sip_set_rtp_peer(), skinny_new(), start_rtp(), and swap_subs().
void ast_channel_set_linkgroup | ( | struct ast_channel * | chan, |
struct ast_channel * | peer | ||
) |
propagate the linked id between chan and peer
propagate the linked id between chan and peer
Definition at line 6387 of file channel.c.
References ast_channel::_bridge, ast_bridged_channel(), ast_channel_change_linkedid(), ast_strdupa, ast_channel::linkedid, oldest_linkedid(), and ast_channel::uniqueid.
Referenced by ast_bridge_call(), and ast_do_masquerade().
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 9111 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_party_redirecting_set(), and ast_channel::redirecting.
Referenced by ast_indicate_data(), handle_request_invite(), handle_response(), misdn_copy_redirecting_to_ast(), redirecting_write(), and sig_pri_handle_subcmds().
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 7795 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_log(), errno, LOG_ERROR, ast_channel_tech::setoption, and ast_channel::tech.
Referenced by analog_hangup(), ast_bridge_call(), ast_channel_make_compatible_helper(), common_exec(), conf_run(), dahdi_hangup(), dial_exec_full(), func_channel_write(), func_channel_write_real(), handle_tddmode(), play_record_review(), rcvfax_exec(), reset_volumes(), set_format(), set_listen_volume(), set_security_requirements(), set_talk_volume(), sndfax_exec(), try_calling(), and vm_forwardoptions().
void ast_channel_setwhentohangup | ( | struct ast_channel * | chan, |
time_t | offset | ||
) |
Set when to hang a channel up.
chan | channel on which to check for hang up |
offset | offset in seconds relative to the current time of when to hang up |
This function sets the absolute time out on a channel (when to hang up).
Definition at line 878 of file channel.c.
References ast_channel_setwhentohangup_tv().
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 871 of file channel.c.
References ast_null_frame, ast_queue_frame(), ast_tvadd(), ast_tvnow(), ast_tvzero(), and ast_channel::whentohangup.
Referenced by action_timeout(), ast_channel_setwhentohangup(), handle_autohangup(), sig_pri_send_aoce_termination_request(), and timeout_write().
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 8309 of file channel.c.
References ast_activate_generator(), ast_calloc, ast_debug, AST_FORMAT_SLINEAR, ast_free, ast_log(), ast_set_write_format(), LOG_ERROR, ast_channel::name, ast_silence_generator::old_write_format, state, and ast_channel::writeformat.
Referenced by __ast_play_and_record(), ast_bridge_call(), ast_dtmf_stream(), ast_readstring_full(), ast_safe_sleep_conditional(), channel_spy(), record_exec(), TransferCallStep1(), waitfor_exec(), and waitforring_exec().
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 8355 of file channel.c.
References ast_debug, ast_free, ast_log(), ast_set_write_format(), deactivate_silence_generator(), LOG_ERROR, ast_channel::name, and ast_silence_generator::old_write_format.
Referenced by __ast_play_and_record(), ast_bridge_call(), ast_dtmf_stream(), ast_readstring_full(), ast_safe_sleep_conditional(), channel_spy(), HandleCallOutgoing(), key_dial_page(), record_exec(), unistim_hangup(), waitfor_exec(), and waitforring_exec().
int ast_channel_supports_html | ( | struct ast_channel * | channel | ) |
Checks for HTML support on a channel.
Definition at line 5902 of file channel.c.
References ast_channel_tech::send_html, and ast_channel::tech.
Referenced by dial_exec_full(), sendurl_exec(), and try_calling().
int ast_channel_transfer_masquerade | ( | struct ast_channel * | target_chan, |
const struct ast_party_connected_line * | target_id, | ||
int | target_held, | ||
struct ast_channel * | transferee_chan, | ||
const struct ast_party_connected_line * | transferee_id, | ||
int | transferee_held | ||
) |
Setup a masquerade to transfer a call.
target_chan | Target of the call transfer. (Masquerade original channel) |
target_id | New connected line information for the target channel. |
target_held | TRUE if the target call is on hold. |
transferee_chan | Transferee of the call transfer. (Masquerade clone channel) |
transferee_id | New connected line information for the transferee channel. |
transferee_held | TRUE if the transferee call is on hold. |
Party A - Transferee Party B - Transferer Party C - Target of transfer
Party B transfers A to C.
Party A is connected to bridged channel B1. Party B is connected to channels C1 and C2. Party C is connected to bridged channel B2.
Party B – C1 == B1 – Party A __/ / Party B – C2 == B2 – Party C
Bridged channel B1 is masqueraded into channel C2. Where B1 is the masquerade clone channel and C2 is the masquerade original channel.
0 | on success. |
-1 | on error. |
Definition at line 6184 of file channel.c.
References __ast_channel_masquerade(), ast_calloc, ast_datastore_alloc(), ast_datastore_free(), ast_datastore::data, party_connected_line_copy_transfer(), xfer_masquerade_ds::target_held, xfer_masquerade_ds::target_id, xfer_masquerade_ds::transferee_held, and xfer_masquerade_ds::transferee_id.
Referenced by analog_attempt_transfer(), misdn_attempt_transfer(), and sig_pri_attempt_transfer().
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 1628 of file channel.c.
References ast_clear_flag, and AST_FLAG_DEFER_DTMF.
Referenced by __adsi_transmit_messages(), and find_cache().
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 938 of file channel.c.
References ast_debug, ast_free, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_END, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, chanlist::chan, chanlist::tech, and ast_channel_tech::type.
Referenced by __unload_module(), load_module(), and unload_module().
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 9085 of file channel.c.
References ast_connected_line_build_data(), AST_CONTROL_CONNECTED_LINE, and ast_indicate_data().
Referenced by app_exec(), ast_channel_connected_line_macro(), ast_do_pickup(), atxfer_fail_cleanup(), builtin_atxfer(), connectedline_write(), parked_call_exec(), 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 9592 of file channel.c.
References AST_CONTROL_REDIRECTING, ast_indicate_data(), and ast_redirecting_build_data().
Referenced by ast_channel_redirecting_macro(), call_forward_inherit(), do_forward(), redirecting_write(), and wait_for_answer().
struct ast_variable* ast_channeltype_list | ( | void | ) |
return an ast_variable list of channeltypes
Definition at line 261 of file channel.c.
References AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_variable_new(), ast_channel_tech::description, chanlist::tech, ast_channel_tech::type, and var.
Referenced by ast_var_channel_types(), and ast_var_channel_types_table().
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 806 of file channel.c.
References ast_channel::_softhangup, ast_debug, AST_SOFTHANGUP_TIMEOUT, ast_test_suite_event_notify, ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), ast_channel::name, and ast_channel::whentohangup.
Referenced by __ast_pbx_run(), __ast_read(), _macro_exec(), agent_indicate(), agi_exec(), agi_handle_command(), announce_thread(), ast_bridge_call(), ast_call(), ast_channel_bridge(), ast_check_hangup_locked(), ast_indicate_data(), ast_raw_answer(), ast_readstring_full(), ast_recvtext(), ast_rtp_instance_bridge(), ast_sendtext(), ast_transfer(), ast_udptl_bridge(), ast_waitfordigit_full(), ast_write(), autoservice_run(), bridge_call_thread(), bridge_exec(), builtin_atxfer(), call_forward_inherit(), channel_spy(), check_bridge(), common_exec(), conf_play(), conf_run(), dahdi_accept_r2_call_exec(), dahdi_sendtext(), dahdi_setoption(), dial_exec_full(), dundi_lookup_internal(), eagi_exec(), eivr_comm(), feature_request_and_dial(), findmeexec(), func_channel_read(), gosub_run(), handle_sendimage(), iax2_bridge(), launch_asyncagi(), local_bridge_loop(), local_fixup(), login_exec(), lua_check_hangup(), ospfinished_exec(), pbx_builtin_incomplete(), pbx_builtin_waitexten(), pbx_exec(), read_exec(), readexten_exec(), remote_bridge_loop(), run_agi(), run_ras(), try_calling(), and wait_for_answer().
int ast_check_hangup_locked | ( | struct ast_channel * | chan | ) |
Definition at line 820 of file channel.c.
References ast_channel_lock, ast_channel_unlock, and ast_check_hangup().
Referenced by action_redirect(), and ast_channel_bridge().
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 8825 of file channel.c.
References AST_CONNECTED_LINE_ID_PRESENTATION, AST_CONNECTED_LINE_NAME, AST_CONNECTED_LINE_NAME_CHAR_SET, AST_CONNECTED_LINE_NAME_PRESENTATION, AST_CONNECTED_LINE_NAME_VALID, AST_CONNECTED_LINE_NUMBER, AST_CONNECTED_LINE_NUMBER_PLAN, AST_CONNECTED_LINE_NUMBER_PRESENTATION, AST_CONNECTED_LINE_NUMBER_VALID, AST_CONNECTED_LINE_SOURCE, AST_CONNECTED_LINE_SUBADDRESS, AST_CONNECTED_LINE_SUBADDRESS_ODD_EVEN, AST_CONNECTED_LINE_SUBADDRESS_TYPE, AST_CONNECTED_LINE_SUBADDRESS_VALID, AST_CONNECTED_LINE_TAG, AST_CONNECTED_LINE_VERSION, ast_log(), ast_party_connected_line::id, ast_set_party_connected_line::id, LOG_WARNING, ast_party_id_ies::name, party_id_build_data(), ast_party_connected_line::source, ast_party_name_ies::str, and value.
Referenced by ast_channel_queue_connected_line_update(), ast_channel_update_connected_line(), local_attended_transfer(), local_indicate(), and masquerade_colp_transfer().
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 8443 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 app_exec(), ast_do_pickup(), begin_dial_channel(), builtin_atxfer(), dial_exec_full(), dial_transfer(), do_forward(), feature_request_and_dial(), findmeexec(), local_call(), parked_call_exec(), 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 8450 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 local_call(), and local_indicate().
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 8886 of file channel.c.
References AST_CONNECTED_LINE_ID_PRESENTATION, AST_CONNECTED_LINE_NAME, AST_CONNECTED_LINE_NAME_CHAR_SET, AST_CONNECTED_LINE_NAME_PRESENTATION, AST_CONNECTED_LINE_NAME_VALID, AST_CONNECTED_LINE_NUMBER, AST_CONNECTED_LINE_NUMBER_PLAN, AST_CONNECTED_LINE_NUMBER_PRESENTATION, AST_CONNECTED_LINE_NUMBER_VALID, AST_CONNECTED_LINE_SOURCE, AST_CONNECTED_LINE_SUBADDRESS, AST_CONNECTED_LINE_SUBADDRESS_ODD_EVEN, AST_CONNECTED_LINE_SUBADDRESS_TYPE, AST_CONNECTED_LINE_SUBADDRESS_VALID, AST_CONNECTED_LINE_TAG, AST_CONNECTED_LINE_VERSION, ast_free, ast_log(), ast_malloc, AST_PARTY_CHAR_SET_ISO8859_1, ast_party_name::char_set, ast_party_id_ies::combined_presentation, ast_party_connected_line::id, LOG_DEBUG, LOG_WARNING, 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::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, ast_party_subaddress::valid, and value.
Referenced by __ast_read(), ast_channel_connected_line_macro(), ast_indicate_data(), feature_request_and_dial(), socket_process(), wait_for_answer(), and wait_for_winner().
void ast_deactivate_generator | ( | struct ast_channel * | chan | ) |
Deactivate an active generator
Definition at line 3107 of file channel.c.
References ast_channel_lock, ast_channel_unlock, and deactivate_generator_nolock().
Referenced by __ast_read(), app_exec(), ast_openstream_full(), ast_playtones_stop(), ast_quiet_chan(), ast_read_generator_actions(), ast_tonepair_stop(), ast_write(), cb_events(), channel_spy(), dial_exec_full(), generator_force(), local_ast_moh_stop(), old_milliwatt_exec(), transmit_audio(), and wait_for_answer().
int ast_do_masquerade | ( | struct ast_channel * | original | ) |
Start masquerading a channel.
XXX This is a seriously whacked out operation. We're essentially putting the guts of the clone channel into the original channel. Start by killing off the original channel's backend. I'm not sure we're going to keep this function, because while the features are nice, the cost is very high in terms of pure nastiness. XXX
chan | Channel to masquerade |
Start masquerading a channel.
< TRUE if the clonechan was a zombie before the masquerade.
Definition at line 6546 of file channel.c.
References __ast_change_name_nolink(), ast_channel::_bridge, ast_channel::_softhangup, ast_channel::_state, accountcode, ast_channel::accountcode, ast_channel::adsicpe, ast_channel::alertpipe, ao2_link, ao2_lock, ao2_unlink, ao2_unlock, ast_app_group_update(), ast_autochan_new_channel(), ast_bridge_end_dtmf(), ast_bridged_channel(), ast_cause2str(), AST_CEL_BRIDGE_UPDATE, ast_cel_report_event(), ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_channel_lock, ast_channel_lock_both, AST_CHANNEL_NAME, ast_channel_ref, ast_channel_set_fd(), ast_channel_set_linkgroup(), ast_channel_unlock, ast_channel_unref, ast_clear_flag, AST_CONTROL_SRCCHANGE, AST_CONTROL_UNHOLD, ast_copy_string(), ast_datastore_free(), ast_debug, AST_FLAG_BLOCKING, AST_FLAG_DISABLE_DEVSTATE_CACHE, AST_FLAG_EXCEPTION, AST_FLAG_MOH, AST_FLAG_OUTGOING, AST_FLAG_ZOMBIE, AST_GENERATOR_FD, ast_getformatname(), ast_indicate(), ast_kill_tech, AST_LIST_APPEND_LIST, AST_LIST_FIRST, AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_HEAD_NOLOCK, AST_LIST_INSERT_TAIL, AST_LIST_REMOVE_HEAD, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log(), ast_manager_event, ast_manager_event_multichan, AST_MAX_FDS, ast_moh_start(), ast_null_frame, ast_queue_frame(), ast_set_flag, ast_set_read_format(), ast_set_write_format(), AST_SOFTHANGUP_DEV, ast_state2str(), ast_string_field_set, ast_test_flag, AST_TIMING_FD, ast_channel::blocker, ast_channel::caller, ast_channel::cdr, ast_datastore_info::chan_fixup, channels, clone_variables(), ast_channel::connected, ast_datastore::data, ast_channel::datastores, ast_channel::dialed, errno, EVENT_FLAG_CALL, ast_channel::fdno, ast_channel::fds, ast_channel_tech::fixup, free_translation(), ast_channel_tech::hangup, ast_channel::hangupcause, ast_datastore::info, language, ast_channel::language, LOG_WARNING, ast_channel::masq, ast_channel::masqr, masquerade_colp_transfer(), ast_channel::monitor, musicclass, ast_channel::musicclass, ast_channel::name, ast_channel::nativeformats, parkinglot, ast_channel::parkinglot, ast_channel::rawreadformat, ast_channel::rawwriteformat, ast_channel::readformat, ast_channel::readq, ast_channel::redirecting, report_new_callerid(), S_OR, ast_channel::sending_dtmf_digit, ast_channel::sending_dtmf_tv, ast_channel::tech, ast_channel::tech_pvt, ast_channel::timingfd, xfer_masquerade_ds::transferee_held, ast_channel_tech::type, ast_cdr::uniqueid, ast_channel::uniqueid, ast_channel::visible_indication, ast_channel::whentohangup, and ast_channel::writeformat.
Referenced by __ast_read(), ast_async_goto(), ast_do_pickup(), ast_hangup(), ast_waitfor_nandfds(), ast_write(), builtin_atxfer(), check_bridge(), check_goto_on_transfer(), do_bridge_masquerade(), handle_invite_replaces(), iax_park(), local_attended_transfer(), masq_park_call(), and sip_park().
struct ast_channel* ast_dummy_channel_alloc | ( | void | ) |
Create a fake channel structure.
NULL | failure |
non-NULL | successfully allocated channel |
Definition at line 1391 of file channel.c.
References __ao2_alloc_debug(), ast_channel::alertpipe, ao2_alloc, ARRAY_LEN, ast_channel_unref, ast_dummy_channel_destructor(), AST_LIST_HEAD_INIT_NOLOCK, ast_string_field_init, ast_channel::fds, ast_channel::timingfd, and ast_channel::varshead.
Referenced by acf_odbc_read(), acf_odbc_write(), action_getvar(), ast_add_extension2_lockopt(), ast_cel_fabricate_channel_from_event(), ast_pbx_outgoing_cdr_failed(), ast_str_substitute_variables_full(), cli_odbc_read(), cli_odbc_write(), custom_log(), make_email_file(), manager_log(), pbx_substitute_variables_helper_full(), rotate_file(), sendmail(), sendpage(), and syslog_log().
|
inlinestatic |
Helper function for migrating select to poll.
Definition at line 2398 of file channel.h.
References dummy().
Referenced by do_monitor().
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 960 of file channel.c.
References AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, chanlist::tech, and ast_channel_tech::type.
Referenced by __ast_channel_alloc_ap(), _ast_device_state(), ast_cc_callback(), and ast_var_channel_types_table().
ast_group_t ast_get_group | ( | const char * | s | ) |
Definition at line 7987 of file channel.c.
References ast_log(), ast_strdupa, ast_strlen_zero(), group, LOG_ERROR, LOG_WARNING, and strsep().
Referenced by _parse(), build_device(), build_gateway(), build_peer(), config_parse_variables(), func_channel_write_real(), process_dahdi(), and read_agent_config().
int ast_hangup | ( | struct ast_channel * | chan | ) |
Hang up a channel.
chan | channel to hang up |
Hang up a channel.
Definition at line 2804 of file channel.c.
References ao2_unlink, ast_assert, ast_autoservice_stop(), ast_cause2str(), ast_cc_offer(), ast_cdr_detach(), ast_cdr_end(), AST_CDR_FLAG_BRIDGED, AST_CDR_FLAG_DIALED, AST_CDR_FLAG_POST_DISABLED, AST_CDR_NULL, AST_CEL_HANGUP, ast_cel_report_event(), ast_channel_lock, ast_channel_unlock, ast_channel_unref, ast_closestream(), ast_debug, ast_do_masquerade(), AST_FLAG_BLOCKING, AST_FLAG_ZOMBIE, ast_log(), ast_manager_event, ast_set_flag, ast_test_flag, ast_channel::blocker, ast_channel::blockproc, ast_channel::caller, ast_channel::cdr, channels, ast_channel::connected, destroy_hooks(), ast_cdr::disposition, EVENT_FLAG_CALL, free_translation(), ast_channel::generator, ast_channel::generatordata, ast_channel_tech::hangup, ast_channel::hangupcause, ast_channel::hangupsource, ast_party_caller::id, ast_party_connected_line::id, LOG_WARNING, ast_channel::masq, ast_channel::masqr, ast_party_id::name, ast_channel::name, ast_party_id::number, pbx_builtin_getvar_helper(), ast_generator::release, S_COR, S_OR, ast_channel::sched, sched_context_destroy(), ast_party_name::str, ast_party_number::str, ast_channel::stream, ast_channel::tech, ast_channel::uniqueid, ast_party_name::valid, ast_party_number::valid, and ast_channel::vstream.
Referenced by __analog_handle_event(), __analog_ss_thread(), __ast_pbx_run(), __ast_request_and_dial(), __oh323_new(), action_bridge(), agent_request(), alsa_new(), analog_handle_init_event(), analog_ss_thread(), answer_exec_run(), app_exec(), ast_async_goto(), ast_call_forward(), ast_dial_destroy(), ast_dial_hangup(), ast_iax2_new(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_pbx_run_app(), async_wait(), begin_dial_channel(), bridge_call_thread(), bridge_call_thread_launch(), bridge_channel_thread(), bridge_exec(), build_conf(), builtin_atxfer(), chanavail_exec(), check_availability(), check_compat(), check_goto_on_transfer(), clear_caller(), conf_free(), conf_run(), console_new(), dahdi_handle_event(), dahdi_new(), destroy_conference_bridge(), dial_exec_full(), dial_transfer(), do_forward(), do_hang(), do_idle_thread(), do_monitor(), feature_attended_transfer(), feature_request_and_dial(), findmeexec(), generic_recall(), gtalk_new(), handle_call_forward(), handle_callforward_button(), handle_enbloc_call_message(), handle_frame(), handle_frame_ownerless(), handle_hd_hf(), handle_init_event(), handle_invite_replaces(), handle_offhook_message(), handle_request_invite(), handle_soft_key_event_message(), handle_stimulus_message(), handle_timeout_trip(), handle_transfer_button(), HandleCallOutgoing(), hangup_chan(), hangupcalls(), hanguptree(), iax2_request(), iax_park(), iax_park_thread(), jingle_new(), local_hangup(), manage_parked_call(), masq_park_call(), meetme_menu_admin_extended(), mgcp_new(), mgcp_ss(), monitor_dial(), mwi_thread(), my_distinctive_ring(), my_handle_notify_message(), nbs_new(), oss_new(), parkandannounce_exec(), parked_call_exec(), phone_new(), play_sound_file(), pri_dchannel(), pri_ss_thread(), sip_park(), sip_park_thread(), sip_pickup_thread(), skinny_new(), skinny_ss(), try_calling(), unistim_new(), wait_for_answer(), and wait_for_winner().
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 4393 of file channel.c.
References ast_indicate_data().
Referenced by __ast_play_and_record(), agent_request(), alsa_call(), answer_trunk_chan(), ast_bridge_call(), ast_channel_bridge(), ast_do_masquerade(), ast_dtmf_stream(), ast_raw_answer(), attempt_transfer(), builtin_atxfer(), builtin_blindtransfer(), cli_console_answer(), conf_run(), console_call(), dial_exec_full(), dial_trunk(), disa_exec(), do_forward(), feature_request_and_dial(), finishup(), handle_callforward_button(), handle_frame(), handle_recordfile(), handle_request_refer(), local_attended_transfer(), manage_parked_call(), mgcp_ss(), monitor_dial(), oss_call(), park_call_full(), parked_call_exec(), pbx_builtin_busy(), pbx_builtin_congestion(), pbx_builtin_incomplete(), pbx_builtin_proceeding(), pbx_builtin_progress(), pbx_builtin_ringing(), pbx_builtin_waitexten(), queue_exec(), record_exec(), rna(), say_periodic_announcement(), say_position(), send_waveform_to_channel(), skinny_ss(), sla_handle_hold_event(), sla_station_exec(), sla_trunk_exec(), try_calling(), 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 4447 of file channel.c.
References ast_channel::_state, _XXX_AST_CONTROL_T38, ast_channel_lock, ast_channel_set_connected_line(), ast_channel_set_redirecting(), ast_channel_unlock, ast_check_hangup(), ast_connected_line_parse_data(), AST_CONTROL_ANSWER, AST_CONTROL_AOC, AST_CONTROL_BUSY, AST_CONTROL_CC, AST_CONTROL_CONGESTION, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_END_OF_Q, AST_CONTROL_FLASH, AST_CONTROL_HANGUP, AST_CONTROL_HOLD, AST_CONTROL_INCOMPLETE, AST_CONTROL_OFFHOOK, AST_CONTROL_OPTION, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_RADIO_KEY, AST_CONTROL_RADIO_UNKEY, AST_CONTROL_READ_ACTION, AST_CONTROL_REDIRECTING, AST_CONTROL_RING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_T38_PARAMETERS, AST_CONTROL_TAKEOFFHOOK, AST_CONTROL_TRANSFER, AST_CONTROL_UNHOLD, AST_CONTROL_UPDATE_RTP_PEER, AST_CONTROL_VIDUPDATE, AST_CONTROL_WINK, ast_debug, AST_FLAG_ZOMBIE, AST_FRAME_CONTROL, ast_framehook_list_is_empty(), ast_framehook_list_write_event(), ast_frdup(), ast_frfree, ast_get_indication_tone(), ast_log(), ast_party_connected_line_free(), ast_party_connected_line_set_init(), ast_party_redirecting_free(), ast_party_redirecting_set_init(), ast_playtones_start(), ast_playtones_stop(), ast_redirecting_parse_data(), AST_STATE_UP, ast_test_flag, ast_tone_zone_sound_unref(), ast_channel::connected, ast_tone_zone_sound::data, ast_frame::data, ast_frame::datalen, ast_channel::framehooks, ast_frame::frametype, ast_channel_tech::indicate, ast_frame_subclass::integer, is_visible_indication(), LOG_WARNING, ast_channel::name, ast_frame::ptr, ast_channel::redirecting, ast_frame::subclass, ast_channel::tech, ast_channel::visible_indication, and ast_channel::zone.
Referenced by __ast_read(), action_aocmessage(), agent_hangup(), ast_bridge_call(), ast_channel_update_connected_line(), ast_channel_update_redirecting(), ast_generic_bridge(), ast_handle_cc_control_frame(), ast_indicate(), disable_t38(), feature_request_and_dial(), generic_fax_exec(), handle_frame(), local_bridge_loop(), login_exec(), manage_parked_call(), park_call_full(), pbx_builtin_waitexten(), receivefax_t38_init(), remote_bridge_loop(), sendfax_t38_init(), set_fax_t38_caps(), transmit_audio(), transmit_t38(), and wait_for_answer().
int ast_internal_timing_enabled | ( | struct ast_channel * | chan | ) |
Check if the channel can run in internal timing mode.
chan | The channel to check |
This function will return 1 if internal timing is enabled and the timing device is available.
Definition at line 4378 of file channel.c.
References ast_channel::timingfd.
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 1818 of file channel.c.
References 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_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, and ast_frame::frametype.
Referenced by ast_safe_sleep_conditional(), autoservice_run(), and feature_request_and_dial().
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 2276 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_copy(), and ast_party_caller::id.
void ast_party_caller_free | ( | struct ast_party_caller * | doomed | ) |
Destroy the caller party contents.
doomed | The caller party to destroy. |
Definition at line 2302 of file channel.c.
References ast_party_caller::ani, ast_party_id_free(), and ast_party_caller::id.
Referenced by ast_channel_destructor(), ast_dummy_channel_destructor(), callerid_write(), dial_trunk(), 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 2269 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_init(), and ast_party_caller::id.
Referenced by __ast_channel_alloc_ap(), dial_trunk(), sig_pri_set_caller_id(), 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 2295 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, and ast_set_party_caller::id.
Referenced by ast_channel_set_caller(), ast_channel_set_caller_event(), and callerid_write().
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 2288 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_set_init(), and ast_party_caller::id.
Referenced by callerid_write(), dial_exec_full(), do_forward(), misdn_update_caller_id(), ring_entry(), and sig_pri_handle_subcmds().
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 2345 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, 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 2316 of file channel.c.
References ast_party_connected_line::ani, ast_party_connected_line::ani2, ast_party_id_copy(), ast_party_connected_line::id, and ast_party_connected_line::source.
Referenced by __ast_read(), ast_call_forward(), ast_channel_connected_line_macro(), ast_do_pickup(), builtin_atxfer(), dial_exec_full(), do_forward(), local_attended_transfer(), misdn_attempt_transfer(), party_connected_line_copy_transfer(), try_calling(), 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 2353 of file channel.c.
References ast_party_connected_line::ani, ast_party_id_free(), and ast_party_connected_line::id.
Referenced by __ast_read(), app_exec(), ast_channel_connected_line_macro(), ast_channel_destructor(), ast_do_pickup(), ast_dummy_channel_destructor(), ast_indicate_data(), atxfer_fail_cleanup(), builtin_atxfer(), callattempt_free(), chanlist_free(), connectedline_write(), destroy_calling_tree(), feature_request_and_dial(), findmeexec(), local_attended_transfer(), misdn_attempt_transfer(), parked_call_exec(), sig_pri_handle_subcmds(), socket_process(), wait_for_answer(), wait_for_winner(), and xfer_ds_destroy().
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 2308 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, and ast_party_connected_line::source.
Referenced by __ast_channel_alloc_ap(), __ast_read(), ast_channel_connected_line_macro(), ast_do_pickup(), builtin_atxfer(), do_forward(), handle_request_invite(), handle_request_update(), handle_response_invite(), local_attended_transfer(), misdn_attempt_transfer(), misdn_queue_connected_line_update(), parked_call_exec(), sig_pri_handle_subcmds(), sip_call(), socket_process(), and wait_for_answer().
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 2337 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, and ast_party_connected_line::source.
Referenced by ast_channel_set_connected_line(), wait_for_answer(), and wait_for_winner().
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 2329 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, and ast_party_connected_line::source.
Referenced by __ast_request_and_dial(), ast_indicate_data(), connectedline_write(), dial_exec_full(), feature_request_and_dial(), wait_for_answer(), and wait_for_winner().
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 2227 of file channel.c.
References ast_free, 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 local_call().
void ast_party_dialed_free | ( | struct ast_party_dialed * | doomed | ) |
Destroy the dialed party contents.
doomed | The dialed party to destroy. |
Definition at line 2262 of file channel.c.
References ast_free, ast_party_subaddress_free(), ast_party_dialed::number, ast_party_dialed::str, and ast_party_dialed::subaddress.
Referenced by ast_channel_destructor(), ast_dummy_channel_destructor(), and callerid_write().
void ast_party_dialed_init | ( | struct ast_party_dialed * | init | ) |
Initialize the given dialed structure.
init | Dialed structure to initialize. |
Definition at line 2219 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 2249 of file channel.c.
References ast_free, 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.
Referenced by callerid_write().
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 2241 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.
Referenced by callerid_write().
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 2095 of file channel.c.
References ast_free, 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_redirecting_copy(), and parkandannounce_exec().
void ast_party_id_free | ( | struct ast_party_id * | doomed | ) |
Destroy the party id contents.
doomed | The party id to destroy. |
Definition at line 2141 of file channel.c.
References ast_free, 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_redirecting_free(), parkandannounce_exec(), and sig_pri_mcid_event().
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 2087 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_redirecting_init(), dial_exec_full(), parkandannounce_exec(), and sig_pri_mcid_event().
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 2151 of file channel.c.
References AST_PRES_ALLOWED, AST_PRES_NUMBER_NOT_AVAILABLE, AST_PRES_NUMBER_TYPE, AST_PRES_RESTRICTED, AST_PRES_RESTRICTION, AST_PRES_UNAVAILABLE, AST_PRES_USER_NUMBER_UNSCREENED, ast_party_id::name, ast_party_id::number, ast_party_name::valid, and ast_party_number::valid.
Referenced by add_rpid(), ast_str_retrieve_variable(), ast_var_channels_table(), callerpres_read(), iax2_call(), initreqprep(), my_set_callerid(), oh323_call(), party_id_build_data(), party_id_read(), redirecting_read(), report_new_callerid(), setup_env(), sig_pri_event_party_id(), sig_pri_handle_subcmds(), sip_call(), and socket_process().
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 2118 of file channel.c.
References ast_free, 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 2110 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 1936 of file channel.c.
References ast_free, 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 1975 of file channel.c.
References ast_free, and ast_party_name::str.
Referenced by __analog_ss_thread(), analog_ss_thread(), ast_party_id_free(), and skinny_newcall().
void ast_party_name_init | ( | struct ast_party_name * | init | ) |
Initialize the given name structure.
init | Name structure to initialize. |
Definition at line 1928 of file channel.c.
References AST_PARTY_CHAR_SET_ISO8859_1, AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, ast_party_name::char_set, ast_party_name::presentation, ast_party_name::str, and ast_party_name::valid.
Referenced by __analog_ss_thread(), analog_ss_thread(), ast_party_id_init(), and skinny_newcall().
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 1958 of file channel.c.
References ast_free, 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 1950 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 1989 of file channel.c.
References ast_free, 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 2028 of file channel.c.
References ast_free, and ast_party_number::str.
Referenced by __analog_ss_thread(), analog_ss_thread(), ast_party_id_free(), do_forward(), skinny_newcall(), 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 1981 of file channel.c.
References AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, ast_party_number::plan, ast_party_number::presentation, ast_party_number::str, and ast_party_number::valid.
Referenced by __analog_ss_thread(), analog_ss_thread(), ast_party_id_init(), do_forward(), skinny_newcall(), 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 2011 of file channel.c.
References ast_free, 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 2003 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 2367 of file channel.c.
References ast_party_id_copy(), ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by ast_call_forward(), ast_channel_redirecting_macro(), begin_dial_channel(), call_forward_inherit(), dial_exec_full(), do_forward(), local_call(), 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 2396 of file channel.c.
References ast_party_id_free(), ast_party_redirecting::from, and ast_party_redirecting::to.
Referenced by ast_channel_destructor(), ast_channel_redirecting_macro(), ast_dummy_channel_destructor(), ast_indicate_data(), call_forward_inherit(), do_forward(), handle_request_invite(), handle_response(), handle_response_invite(), redirecting_write(), sig_pri_handle_subcmds(), 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 2359 of file channel.c.
References ast_party_id_init(), AST_REDIRECTING_REASON_UNKNOWN, ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by __ast_channel_alloc_ap(), ast_channel_redirecting_macro(), call_forward_inherit(), do_forward(), handle_request_invite(), handle_response(), handle_response_invite(), and wait_for_answer().
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 2388 of file channel.c.
References ast_party_id_set(), ast_party_redirecting::count, ast_party_redirecting::from, ast_set_party_redirecting::from, 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 2380 of file channel.c.
References ast_party_id_set_init(), ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by ast_indicate_data(), misdn_copy_redirecting_to_ast(), redirecting_write(), and sig_pri_redirecting_convert().
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 2042 of file channel.c.
References ast_free, 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 2081 of file channel.c.
References ast_free, and ast_party_subaddress::str.
Referenced by ast_party_dialed_free(), ast_party_id_free(), and pri_dchannel().
void ast_party_subaddress_init | ( | struct ast_party_subaddress * | init | ) |
Initialize the given subaddress structure.
init | Subaddress structure to initialize. |
Definition at line 2034 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(), pri_dchannel(), sig_pri_call(), and sig_pri_set_subaddress().
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 2064 of file channel.c.
References ast_free, 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 2056 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().
void ast_poll_channel_add | ( | struct ast_channel * | chan0, |
struct ast_channel * | chan1 | ||
) |
Add a channel to an optimized waitfor
Definition at line 2665 of file channel.c.
References AST_MAX_FDS, and ast_channel::fds.
Referenced by ast_generic_bridge(), begin_dial_channel(), feature_request_and_dial(), local_bridge_loop(), remote_bridge_loop(), and wait_for_answer().
void ast_poll_channel_del | ( | struct ast_channel * | chan0, |
struct ast_channel * | chan1 | ||
) |
Delete a channel from an optimized waitfor
Definition at line 2688 of file channel.c.
References AST_MAX_FDS, and ast_channel::fds.
Referenced by ast_generic_bridge(), feature_request_and_dial(), local_bridge_loop(), monitor_dial(), remote_bridge_loop(), and wait_for_answer().
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 8236 of file channel.c.
References first.
Referenced by _sip_show_peer(), _skinny_show_line(), func_channel_read(), function_sippeer(), misdn_cfg_get_config_string(), print_group(), read_config(), and serialize_showchan().
int ast_prod | ( | struct ast_channel * | chan | ) |
Send empty audio to prime a channel driver.
Definition at line 4784 of file channel.c.
References ast_channel::_state, ast_debug, AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, ast_log(), AST_STATE_UP, ast_write(), ast_frame_subclass::codec, ast_frame::data, LOG_WARNING, ast_channel::name, ast_frame::ptr, ast_channel::rawwriteformat, ast_frame::src, and ast_frame::subclass.
Referenced by ast_activate_generator().
int ast_queue_control | ( | struct ast_channel * | chan, |
enum ast_control_frame_type | control | ||
) |
Queue a control frame with payload.
chan | channel to queue frame onto |
control | type of control frame |
zero | on success |
non-zero | on failure |
Queue a control frame with payload.
Definition at line 1601 of file channel.c.
References AST_FRAME_CONTROL, and ast_queue_frame().
Referenced by __analog_handle_event(), __analog_ss_thread(), __ast_read(), __dahdi_exception(), __oh323_update_info(), analog_call(), analog_exception(), analog_hangup(), analog_ss_thread(), ast_do_pickup(), attempt_transfer(), auto_congest(), cb_events(), cli_console_answer(), cli_console_flash(), console_answer(), console_call(), console_sendtext(), dahdi_handle_event(), dahdi_hangup(), gtalk_is_answered(), gtalk_ringing_ack(), handle_hd_hf(), handle_incoming(), handle_offhook_message(), handle_request(), handle_request_bye(), handle_request_info(), handle_request_invite(), handle_request_refer(), handle_response(), handle_response_invite(), handle_response_refer(), handle_soft_key_event_message(), handle_stimulus_message(), HandleCallIncoming(), jingle_is_answered(), jingle_ringing_ack(), masquerade_colp_transfer(), misdn_facility_ie_handler(), multicast_rtp_call(), nbs_call(), phone_call(), process_sdp(), receive_digit(), remote_hold(), send_cause2ast(), setup_rtp_connection(), skinny_call(), skinny_transfer(), skinny_unhold(), unistim_call(), and update_state().
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 1608 of file channel.c.
References AST_FRAME_CONTROL, and ast_queue_frame().
Referenced by __analog_handle_event(), analog_hangup(), ast_channel_queue_connected_line_update(), ast_channel_queue_redirecting_update(), change_t38_state(), dahdi_handle_event(), dahdi_hangup(), handle_request_notify(), handle_response_refer(), iax2_queue_control_data(), iax2_transfer(), interpret_t38_parameters(), local_attended_transfer(), masquerade_colp_transfer(), process_sdp(), sig_pri_aoc_d_from_pri(), sig_pri_aoc_e_from_pri(), sig_pri_aoc_s_from_pri(), sig_pri_send_aoce_termination_request(), sip_sipredirect(), and skinny_hold().
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 1558 of file channel.c.
References __ast_queue_frame().
Referenced by __ast_channel_masquerade(), __ast_read(), __oh323_rtp_create(), __oh323_update_info(), action_atxfer(), agent_request(), alsa_call(), ast_channel_setwhentohangup_tv(), ast_do_masquerade(), ast_dsp_process(), ast_queue_cc_frame(), ast_queue_control(), ast_queue_control_data(), ast_queue_hangup(), ast_queue_hangup_with_cause(), ast_softhangup_nolock(), bridge_write(), cb_events(), cli_console_dial(), cli_console_sendtext(), console_dial(), console_do_answer(), console_flash(), console_sendtext(), dahdi_queue_frame(), dahdi_read(), dictate_exec(), do_immediate_setup(), gtalk_handle_dtmf(), handle_keypad_button_message(), handle_request_info(), handle_request_invite(), handle_response_invite(), iax2_queue_frame(), jingle_handle_dtmf(), keypad_digit(), local_queue_frame(), mgcp_queue_frame(), oh323_simulate_dtmf_end(), oss_call(), pri_queue_frame(), process_sdp(), queue_dtmf_readq(), receive_digit(), receive_message(), sig_pri_dial_complete(), sig_pri_handle_hold(), sig_pri_handle_subcmds(), stream_monitor(), unistim_do_senddigit(), unistim_senddigit_end(), and wakeup_sub().
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 1563 of file channel.c.
References __ast_queue_frame().
Referenced by __ast_answer(), __ast_read(), ast_autoservice_stop(), ast_safe_sleep_conditional(), and feature_request_and_dial().
int ast_queue_hangup | ( | struct ast_channel * | chan | ) |
Queue a hangup frame.
Queue a hangup frame.
Definition at line 1569 of file channel.c.
References ast_channel::_softhangup, ast_channel_trylock, ast_channel_unlock, AST_CONTROL_HANGUP, AST_FRAME_CONTROL, ast_queue_frame(), and AST_SOFTHANGUP_DEV.
Referenced by bridge_queue_hangup(), cleanup_connection(), cli_console_hangup(), close_call(), gtalk_hangup_farend(), gtalk_is_answered(), handle_onhook_message(), handle_request_bye(), handle_soft_key_event_message(), iax2_destroy(), iax2_queue_hangup(), jingle_hangup_farend(), local_fixup(), local_hangup(), mgcp_queue_hangup(), and sip_queue_hangup_cause().
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 |
Queue a hangup frame with hangupcause set.
Definition at line 1581 of file channel.c.
References ast_channel::_softhangup, ast_channel_trylock, ast_channel_unlock, AST_CONTROL_HANGUP, AST_FRAME_CONTROL, ast_queue_frame(), AST_SOFTHANGUP_DEV, ast_frame::data, ast_channel::hangupcause, and ast_frame::uint32.
Referenced by __analog_handle_event(), __oh323_update_info(), __sip_autodestruct(), close_call(), close_client(), console_hangup(), dahdi_handle_event(), dahdi_r2_on_call_disconnect(), handle_request_bye(), handle_response(), handle_response_invite(), HandleCallOutgoing(), hangup_chan(), hangup_connection(), local_hangup(), misdn_answer(), retrans_pkt(), sip_queue_hangup_cause(), and TransferCallStep1().
int ast_raw_answer | ( | struct ast_channel * | chan, |
int | cdr_answer | ||
) |
Answer a channel.
chan | channel to answer |
cdr_answer | flag to control whether any associated CDR should be marked as 'answered' |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2930 of file channel.c.
References ast_channel::_state, ast_channel_tech::answer, ast_cdr_answer(), AST_CEL_ANSWER, ast_cel_report_event(), ast_channel_lock, ast_channel_unlock, ast_check_hangup(), AST_FLAG_OUTGOING, AST_FLAG_ZOMBIE, ast_indicate(), ast_setstate(), AST_STATE_RING, AST_STATE_RINGING, AST_STATE_UP, ast_test_flag, ast_channel::cdr, and ast_channel::tech.
Referenced by __ast_answer(), and ast_bridge_call().
struct ast_frame* ast_read | ( | struct ast_channel * | chan | ) |
Reads a frame.
chan | channel to read a frame from |
Definition at line 4383 of file channel.c.
References __ast_read().
Referenced by __adsi_transmit_messages(), __analog_ss_thread(), __ast_answer(), __ast_play_and_record(), __ast_request_and_dial(), adsi_careful_send(), agent_ack_sleep(), agent_read(), analog_ss_thread(), ast_bridge_handle_trip(), ast_generic_bridge(), ast_recvtext(), ast_safe_sleep_conditional(), ast_tonepair(), ast_transfer(), ast_udptl_bridge(), ast_waitfordigit_full(), async_agi_read_frame(), async_wait(), autoservice_run(), background_detect_exec(), channel_spy(), conf_flush(), conf_run(), dahdi_accept_r2_call_exec(), dahdi_bridge(), dial_exec_full(), dictate_exec(), disa_exec(), disable_t38(), do_idle_thread(), do_waiting(), echo_exec(), eivr_comm(), feature_request_and_dial(), find_cache(), generic_fax_exec(), handle_recordfile(), handle_speechrecognize(), iax2_bridge(), ices_exec(), isAnsweringMachine(), jack_exec(), local_bridge_loop(), manage_parked_call(), measurenoise(), misdn_bridge(), monitor_dial(), mp3_exec(), NBScat_exec(), receive_dtmf_digits(), receivefax_t38_init(), record_exec(), recordthread(), remote_bridge_loop(), run_agi(), send_tone_burst(), send_waveform_to_channel(), sendfax_t38_init(), sendurl_exec(), speech_background(), transmit_audio(), transmit_t38(), wait_for_answer(), wait_for_hangup(), wait_for_winner(), waitforring_exec(), 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 4388 of file channel.c.
References __ast_read().
Referenced by ast_bridge_handle_trip(), and conf_run().
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 5837 of file channel.c.
References ast_readstring_full().
Referenced by __adsi_transmit_messages(), adsi_begin_download(), adsi_get_cpeinfo(), adsi_load_session(), ast_app_getdata(), dialout(), do_directory(), forward_message(), privacy_exec(), vm_authenticate(), vm_newuser(), and vm_options().
int ast_readstring_full | ( | struct ast_channel * | c, |
char * | s, | ||
int | len, | ||
int | timeout, | ||
int | rtimeout, | ||
char * | enders, | ||
int | audiofd, | ||
int | ctrlfd | ||
) |
Definition at line 5842 of file channel.c.
References ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_check_hangup(), AST_DIGIT_ANY, AST_FLAG_ZOMBIE, AST_GETDATA_COMPLETE, AST_GETDATA_EMPTY_END_TERMINATED, AST_GETDATA_FAILED, AST_GETDATA_INTERRUPTED, AST_GETDATA_TIMEOUT, ast_opt_transmit_silence, ast_stopstream(), ast_test_flag, ast_waitfordigit_full(), ast_waitstream_full(), and ast_channel::stream.
Referenced by ast_app_getdata_full(), and ast_readstring().
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 4642 of file channel.c.
References ast_free, and ast_recvtext().
Referenced by handle_recvchar().
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 4653 of file channel.c.
References ast_check_hangup(), AST_CONTROL_HANGUP, AST_FRAME_CONTROL, AST_FRAME_TEXT, ast_frfree, ast_read(), ast_remaining_ms(), ast_strndup, ast_tvnow(), ast_waitfor(), ast_frame::data, ast_frame::datalen, f, ast_frame::frametype, ast_frame_subclass::integer, ast_frame::ptr, and ast_frame::subclass.
Referenced by ast_recvchar(), and handle_recvtext().
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 9161 of file channel.c.
References ast_log(), AST_REDIRECTING_COUNT, AST_REDIRECTING_FROM_ID_PRESENTATION, AST_REDIRECTING_FROM_NAME, AST_REDIRECTING_FROM_NAME_CHAR_SET, AST_REDIRECTING_FROM_NAME_PRESENTATION, AST_REDIRECTING_FROM_NAME_VALID, AST_REDIRECTING_FROM_NUMBER, AST_REDIRECTING_FROM_NUMBER_PLAN, AST_REDIRECTING_FROM_NUMBER_PRESENTATION, AST_REDIRECTING_FROM_NUMBER_VALID, AST_REDIRECTING_FROM_SUBADDRESS, AST_REDIRECTING_FROM_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_FROM_SUBADDRESS_TYPE, AST_REDIRECTING_FROM_SUBADDRESS_VALID, AST_REDIRECTING_FROM_TAG, AST_REDIRECTING_TO_ID_PRESENTATION, AST_REDIRECTING_TO_NAME, AST_REDIRECTING_TO_NAME_CHAR_SET, AST_REDIRECTING_TO_NAME_PRESENTATION, AST_REDIRECTING_TO_NAME_VALID, AST_REDIRECTING_TO_NUMBER, AST_REDIRECTING_TO_NUMBER_PLAN, AST_REDIRECTING_TO_NUMBER_PRESENTATION, AST_REDIRECTING_TO_NUMBER_VALID, AST_REDIRECTING_TO_SUBADDRESS, AST_REDIRECTING_TO_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_TO_SUBADDRESS_TYPE, AST_REDIRECTING_TO_SUBADDRESS_VALID, AST_REDIRECTING_TO_TAG, AST_REDIRECTING_VERSION, ast_party_redirecting::count, ast_party_redirecting::from, ast_set_party_redirecting::from, LOG_WARNING, ast_party_id_ies::name, party_id_build_data(), ast_party_redirecting::reason, ast_party_name_ies::str, ast_party_redirecting::to, ast_set_party_redirecting::to, and value.
Referenced by ast_channel_queue_redirecting_update(), ast_channel_update_redirecting(), and local_indicate().
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 9254 of file channel.c.
References ast_free, ast_log(), ast_malloc, AST_PARTY_CHAR_SET_ISO8859_1, AST_REDIRECTING_COUNT, AST_REDIRECTING_FROM_ID_PRESENTATION, AST_REDIRECTING_FROM_NAME, AST_REDIRECTING_FROM_NAME_CHAR_SET, AST_REDIRECTING_FROM_NAME_PRESENTATION, AST_REDIRECTING_FROM_NAME_VALID, AST_REDIRECTING_FROM_NUMBER, AST_REDIRECTING_FROM_NUMBER_PLAN, AST_REDIRECTING_FROM_NUMBER_PRESENTATION, AST_REDIRECTING_FROM_NUMBER_VALID, AST_REDIRECTING_FROM_SUBADDRESS, AST_REDIRECTING_FROM_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_FROM_SUBADDRESS_TYPE, AST_REDIRECTING_FROM_SUBADDRESS_VALID, AST_REDIRECTING_FROM_TAG, AST_REDIRECTING_TO_ID_PRESENTATION, AST_REDIRECTING_TO_NAME, AST_REDIRECTING_TO_NAME_CHAR_SET, AST_REDIRECTING_TO_NAME_PRESENTATION, AST_REDIRECTING_TO_NAME_VALID, AST_REDIRECTING_TO_NUMBER, AST_REDIRECTING_TO_NUMBER_PLAN, AST_REDIRECTING_TO_NUMBER_PRESENTATION, AST_REDIRECTING_TO_NUMBER_VALID, AST_REDIRECTING_TO_SUBADDRESS, AST_REDIRECTING_TO_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_TO_SUBADDRESS_TYPE, AST_REDIRECTING_TO_SUBADDRESS_VALID, AST_REDIRECTING_TO_TAG, AST_REDIRECTING_VERSION, ast_party_name::char_set, ast_party_redirecting::count, ast_party_redirecting::from, LOG_DEBUG, LOG_WARNING, 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_redirecting::reason, ast_party_name::str, ast_party_number::str, ast_party_subaddress::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, ast_party_subaddress::valid, and value.
Referenced by ast_channel_redirecting_macro(), and ast_indicate_data().
struct ast_channel* ast_request | ( | const char * | type, |
format_t | format, | ||
const struct ast_channel * | requestor, | ||
void * | data, | ||
int * | status | ||
) |
Requests a channel.
type | type of channel to request |
format | requested channel format (codec) |
requestor | channel asking for data |
data | data to pass to the channel requester (Should be treated as const char *) |
status | status |
Request a channel of a given type, with data as optional information used by the low level module
NULL | failure |
non-NULL | channel on success |
Definition at line 5695 of file channel.c.
References AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, AST_CAUSE_NOSUCHDRIVER, AST_CAUSE_NOTDEFINED, ast_channel_release(), AST_FORMAT_AUDIO_MASK, AST_FORMAT_TEXT_MASK, AST_FORMAT_VIDEO_MASK, ast_getformatname_multiple(), ast_log(), AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_translator_best_choice(), capabilities, ast_channel_tech::capabilities, chanlist::chan, LOG_WARNING, ast_channel_tech::requester, set_security_requirements(), chanlist::tech, and ast_channel_tech::type.
Referenced by __ast_request_and_dial(), ast_call_forward(), begin_dial_channel(), build_conf(), chanavail_exec(), conf_run(), dial_exec_full(), dial_transfer(), do_forward(), feature_request_and_dial(), findmeexec(), meetme_menu_admin_extended(), play_sound_file(), ring_entry(), and wait_for_answer().
struct ast_channel* ast_request_and_dial | ( | const char * | type, |
format_t | format, | ||
const struct ast_channel * | requestor, | ||
void * | data, | ||
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 |
format | requested channel format |
requestor | channel asking for data |
data | data to pass to the channel requester |
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 5650 of file channel.c.
References __ast_request_and_dial().
Referenced by ast_pbx_outgoing_exten(), and generic_recall().
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 1916 of file channel.c.
References ast_safe_sleep_conditional().
Referenced by __analog_ss_thread(), adsi_transmit_message_full(), alarmreceiver_exec(), analog_ss_thread(), ast_dtmf_stream(), ast_senddigit(), builtin_atxfer(), builtin_parkcall(), conf_run(), dahdi_send_callrerouting_facility_exec(), dial_trunk(), dictate_exec(), disa_exec(), flash_exec(), handle_callforward_button(), login_exec(), mgcp_ss(), milliwatt_exec(), misdn_check_l2l1(), old_milliwatt_exec(), park_call_exec(), pbx_builtin_wait(), play_moh_exec(), playtone(), privacy_exec(), receive_ademco_contact_id(), skinny_ss(), testclient_exec(), testserver_exec(), try_calling(), wait_for_hangup(), wait_moh_exec(), waituntil_exec(), and zapateller_exec().
int ast_safe_sleep_conditional | ( | struct ast_channel * | chan, |
int | timeout_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.
Wait for a specified amount of time, looking for hangups and a condition argument.
Definition at line 1845 of file channel.c.
References ast_channel_lock, ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_channel_unlock, ast_frfree, ast_frisolate(), ast_is_deferrable_frame(), AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_HEAD_NOLOCK, AST_LIST_INSERT_HEAD, AST_LIST_REMOVE_HEAD, ast_opt_transmit_silence, ast_queue_frame_head(), ast_read(), ast_remaining_ms(), ast_tvnow(), ast_waitfor(), cond, f, and ast_channel::generatordata.
Referenced by ast_safe_sleep(), and login_exec().
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 4774 of file channel.c.
References AST_DEFAULT_EMULATE_DTMF_DURATION, ast_safe_sleep(), ast_senddigit_begin(), ast_senddigit_end(), ast_channel_tech::send_digit_begin, and ast_channel::tech.
Referenced by ast_dtmf_stream(), dial_exec_full(), and manager_play_dtmf().
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 4705 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_debug, ast_playtones_start(), ast_tvnow(), ast_channel::name, ast_channel_tech::send_digit_begin, ast_channel::sending_dtmf_digit, ast_channel::sending_dtmf_tv, and ast_channel::tech.
Referenced by agent_digit_begin(), ast_senddigit(), and ast_write().
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 4755 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_playtones_stop(), ast_channel::generator, ast_channel_tech::send_digit_end, ast_channel::sending_dtmf_digit, and ast_channel::tech.
Referenced by agent_digit_end(), ast_bridge_end_dtmf(), ast_senddigit(), and ast_write().
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 4687 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_check_hangup(), ast_clear_flag, AST_FLAG_BLOCKING, AST_FLAG_ZOMBIE, ast_test_flag, CHECK_BLOCKING, ast_channel_tech::send_text, and ast_channel::tech.
Referenced by action_sendtext(), agent_sendtext(), handle_sendtext(), and sendtext_exec().
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 7051 of file channel.c.
References ast_party_caller::ani, ast_cdr_setcid(), ast_channel_lock, ast_channel_unlock, ast_free, ast_strdup, ast_channel::caller, ast_channel::cdr, ast_party_caller::id, ast_party_id::name, ast_party_id::number, report_new_callerid(), ast_party_name::str, ast_party_number::str, ast_party_name::valid, and ast_party_number::valid.
Referenced by __analog_ss_thread(), __ast_request_and_dial(), analog_ss_thread(), cb_events(), disa_exec(), get_pai(), get_rpid(), handle_setcallerid(), mgcp_ss(), privacy_exec(), ring_entry(), skinny_newcall(), and socket_process().
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 2769 of file channel.c.
References ast_bridged_channel(), ast_channel_lock, ast_channel_ref, ast_channel_unlock, ast_channel_unref, ast_string_field_set, ast_strlen_zero(), ast_channel::bridge, and ast_channel::hangupsource.
Referenced by __dahdi_exception(), analog_exception(), func_channel_write_real(), handle_hangup(), pbx_builtin_hangup(), set_hangup_source_and_cause(), and sip_queue_hangup_cause().
int ast_set_read_format | ( | struct ast_channel * | chan, |
format_t | format | ||
) |
Sets read format on channel chan Set read format for channel to whichever component of "format" is best.
chan | channel to change |
format | format to change to |
Definition at line 5301 of file channel.c.
References ast_channel::rawreadformat, ast_channel::readformat, ast_channel::readtrans, and set_format().
Referenced by __ast_play_and_record(), __oh323_update_info(), adsi_transmit_message_full(), agent_call(), alarmreceiver_exec(), ast_channel_make_compatible_helper(), ast_do_masquerade(), background_detect_exec(), bridge_channel_join(), bridge_make_compatible(), build_conf(), conf_run(), dictate_exec(), do_waiting(), eagi_exec(), echo_exec(), generic_fax_exec(), gtalk_rtp_read(), handle_recordfile(), handle_speechrecognize(), ices_exec(), isAnsweringMachine(), jack_exec(), jingle_rtp_read(), login_exec(), measurenoise(), meetme_menu_admin_extended(), mgcp_rtp_read(), oh323_rtp_read(), old_milliwatt_exec(), process_sdp(), record_exec(), setup_rtp_connection(), sip_rtp_read(), skinny_rtp_read(), socket_process(), speech_background(), transmit_audio(), and unistim_rtp_read().
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 8261 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_call_forward(), ast_pbx_outgoing_app(), and ast_pbx_outgoing_exten().
int ast_set_write_format | ( | struct ast_channel * | chan, |
format_t | format | ||
) |
Sets write format on channel chan Set write format for channel to whichever component of "format" is best.
chan | channel to change |
format | new format for writing |
Definition at line 5307 of file channel.c.
References ast_channel::rawwriteformat, set_format(), ast_channel::writeformat, and ast_channel::writetrans.
Referenced by __oh323_update_info(), adsi_transmit_message_full(), agent_call(), alarmreceiver_exec(), ast_channel_make_compatible_helper(), ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_do_masquerade(), ast_openstream_full(), ast_stopstream(), ast_write(), bridge_channel_join(), bridge_make_compatible(), build_conf(), chanspy_exec(), conf_run(), dahdiscan_exec(), echo_exec(), extenspy_exec(), generic_fax_exec(), gtalk_rtp_read(), jack_exec(), jingle_rtp_read(), linear_alloc(), linear_release(), login_exec(), meetme_menu_admin_extended(), mgcp_rtp_read(), moh_alloc(), moh_files_release(), moh_release(), mp3_exec(), NBScat_exec(), oh323_rtp_read(), old_milliwatt_exec(), playtones_alloc(), playtones_release(), process_sdp(), send_waveform_to_channel(), setup_rtp_connection(), sip_rtp_read(), skinny_rtp_read(), socket_process(), tonepair_alloc(), tonepair_release(), transmit_audio(), and unistim_rtp_read().
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 3557 of file channel.c.
References ast_settimeout_full().
Referenced by ast_activate_generator(), ast_readaudio_callback(), deactivate_generator_nolock(), and filestream_close().
int ast_settimeout_full | ( | struct ast_channel * | c, |
unsigned int | rate, | ||
int(*)(const void *data) | func, | ||
void * | data, | ||
unsigned int | is_ao2_obj | ||
) |
Definition at line 3562 of file channel.c.
References ao2_ref, ast_channel_lock, ast_channel_unlock, ast_clear_flag, ast_debug, AST_FLAG_TIMINGDATA_IS_AO2_OBJ, ast_set_flag, ast_test_flag, ast_timer_get_max_rate(), ast_timer_set_rate(), AST_TIMING_FD, ast_channel::data, ast_channel::fdno, ast_channel::timer, ast_channel::timingdata, ast_channel::timingfd, and ast_channel::timingfunc.
Referenced by ast_readaudio_callback(), and ast_settimeout().
int ast_shutting_down | ( | void | ) |
Returns non-zero if Asterisk is being shut down.
Definition at line 865 of file channel.c.
References shutting_down.
Referenced by handle_request_options().
int ast_softhangup | ( | struct ast_channel * | chan, |
int | cause | ||
) |
Softly hangup up a channel.
chan | channel to be soft-hung-up |
reason | 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 2746 of file channel.c.
References ast_channel_lock, ast_channel_unlock, and ast_softhangup_nolock().
Referenced by __analog_handle_event(), __ast_module_user_hangup_all(), __ast_pbx_run(), __unload_module(), agent_hangup(), agent_logoff(), agent_read(), ast_bridge_call(), ast_channel_softhangup_cb(), ast_dial_join(), cc_generic_agent_stop_ringing(), conf_free(), dahdi_handle_event(), handle_hangup(), handle_softhangup(), login_exec(), manager_park(), mgcp_pktcgate_remove(), read_agent_config(), sla_handle_hold_event(), softhangup_exec(), start_spying(), startmon(), and unload_module().
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 |
reason | an AST_SOFTHANGUP_* reason code |
Softly hangup up a channel (no channel lock)
Definition at line 2733 of file channel.c.
References ast_channel::_softhangup, ast_debug, AST_FLAG_BLOCKING, ast_null_frame, ast_queue_frame(), ast_test_flag, ast_channel::blocker, and ast_channel::name.
Referenced by __analog_handle_event(), action_hangup(), analog_attempt_transfer(), ast_async_goto(), ast_softhangup(), attempt_transfer(), check_pendings(), check_rtp_timeout(), dahdi_softhangup_all(), gosub_run(), oh323_indicate(), pri_dchannel(), proc_session_timer(), sig_pri_indicate(), sig_pri_send_aoce_termination_request(), sip_indicate(), and skinny_indicate().
const char* ast_state2str | ( | enum ast_channel_state | state | ) |
Gives the string form of a given channel state.
ast_channel_state | state to get the name of |
Definition at line 1007 of file channel.c.
References AST_STATE_BUSY, AST_STATE_DIALING, AST_STATE_DIALING_OFFHOOK, AST_STATE_DOWN, AST_STATE_OFFHOOK, AST_STATE_PRERING, AST_STATE_RESERVED, AST_STATE_RING, AST_STATE_RINGING, AST_STATE_UP, ast_threadstorage_get(), STATE2STR_BUFSIZE, and state2str_threadbuf.
Referenced by __ast_channel_alloc_ap(), action_coreshowchannels(), action_status(), agent_hangup(), ast_channel_data_add_structure(), ast_do_masquerade(), ast_setstate(), attempt_transfer(), func_channel_read(), handle_chanlist(), handle_showchan(), local_attended_transfer(), mgcp_new(), serialize_showchan(), sip_hangup(), and update_connectedline().
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 993 of file channel.c.
References ARRAY_LEN, and causes.
Referenced by pbx_builtin_hangup().
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 7969 of file channel.c.
References ast_frfree, ast_read(), ast_tonepair_start(), ast_waitfor(), and ast_channel::generatordata.
Referenced by zapateller_exec().
int ast_tonepair_start | ( | struct ast_channel * | chan, |
int | freq1, | ||
int | freq2, | ||
int | duration, | ||
int | vol | ||
) |
Start a tone going
Definition at line 7951 of file channel.c.
References ast_activate_generator(), tonepair_def::duration, tonepair_def::freq1, tonepair_def::freq2, and tonepair_def::vol.
Referenced by ast_tonepair(), pbx_builtin_waitexten(), play_dialtone(), and sendnoise().
void ast_tonepair_stop | ( | struct ast_channel * | chan | ) |
Stop a tone from playing
Definition at line 7964 of file channel.c.
References ast_deactivate_generator().
Referenced by sendnoise().
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 5788 of file channel.c.
References ast_channel_lock, ast_channel_unlock, ast_check_hangup(), AST_CONTROL_TRANSFER, AST_FLAG_ZOMBIE, AST_FRAME_CONTROL, ast_frfree, ast_read(), ast_test_flag, AST_TRANSFER_SUCCESS, ast_waitfor(), ast_frame::data, ast_frame::frametype, ast_frame_subclass::integer, ast_frame::ptr, ast_frame::subclass, ast_channel::tech, and ast_channel_tech::transfer.
Referenced by transfer_exec().
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 1041 of file channel.c.
References AST_TRANS_CAP_3_1K_AUDIO, AST_TRANS_CAP_DIGITAL, AST_TRANS_CAP_DIGITAL_W_TONES, AST_TRANS_CAP_RESTRICTED_DIGITAL, AST_TRANS_CAP_SPEECH, and AST_TRANS_CAP_VIDEO.
Referenced by ast_channel_data_add_structure(), cb_events(), misdn_call(), oh323_call(), sig_pri_call(), and sig_pri_new_ast_channel().
int ast_undestroyed_channels | ( | void | ) |
Definition at line 853 of file channel.c.
References ast_atomic_fetchadd_int().
Referenced by can_safely_quit().
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 3539 of file channel.c.
References ast_waitfor_nandfds().
Referenced by __adsi_transmit_messages(), __analog_ss_thread(), __ast_answer(), __ast_play_and_record(), __ast_request_and_dial(), adsi_careful_send(), agent_ack_sleep(), analog_ss_thread(), ast_dtmf_stream(), ast_recvtext(), ast_safe_sleep_conditional(), ast_tonepair(), ast_transfer(), async_wait(), background_detect_exec(), channel_spy(), conf_flush(), dahdi_accept_r2_call_exec(), dictate_exec(), disa_exec(), disable_t38(), do_idle_thread(), do_waiting(), echo_exec(), handle_recordfile(), handle_speechrecognize(), ices_exec(), isAnsweringMachine(), jack_exec(), launch_asyncagi(), measurenoise(), mp3_exec(), NBScat_exec(), receive_dtmf_digits(), receivefax_t38_init(), record_exec(), recordthread(), send_tone_burst(), send_waveform_to_channel(), sendfax_t38_init(), sendurl_exec(), speech_background(), transmit_audio(), transmit_t38(), wait_for_hangup(), waitforring_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 3534 of file channel.c.
References ast_waitfor_nandfds().
Referenced by ast_generic_bridge(), ast_udptl_bridge(), autoservice_run(), dahdi_bridge(), dial_exec_full(), feature_request_and_dial(), generic_thread_loop(), iax2_bridge(), local_bridge_loop(), misdn_bridge(), monitor_dial(), remote_bridge_loop(), wait_for_answer(), and wait_for_winner().
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 3176 of file channel.c.
References ast_waitfor_nandfds().
Referenced by dundi_lookup_internal(), dundi_precache_internal(), and softmix_bridge_thread().
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.
chan | 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 3188 of file channel.c.
References ast_channel::_softhangup, ast_add_fd(), ast_alloca, ast_channel_lock, ast_channel_unlock, ast_clear_flag, ast_do_masquerade(), AST_FLAG_BLOCKING, AST_FLAG_EXCEPTION, AST_MAX_FDS, ast_poll, ast_set_flag, AST_SOFTHANGUP_TIMEOUT, ast_test_suite_event_notify, ast_tvcmp(), ast_tvdiff_ms(), ast_tvnow(), ast_tvsub(), ast_tvzero(), chanlist::chan, CHECK_BLOCKING, errno, ast_channel::fdno, and name.
Referenced by ast_waitfor(), ast_waitfor_n(), ast_waitfor_n_fd(), ast_waitfordigit_full(), bridge_channel_join_multithreaded(), conf_run(), eivr_comm(), find_cache(), generic_fax_exec(), multiplexed_thread_function(), 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 3552 of file channel.c.
References ast_waitfordigit_full().
Referenced by __analog_ss_thread(), _while_exec(), adsi_get_cpeid(), adsi_get_cpeinfo(), adsi_print(), adsi_read_encoded_dtmf(), adsi_transmit_message_full(), advanced_options(), analog_my_getsigstr(), analog_ss_thread(), ast_app_dtget(), ast_control_streamfile(), ast_record_review(), bridge_channel_feature(), builtin_atxfer(), collect_digits(), common_exec(), cpeid_exec(), dialout(), directory_exec(), forward_message(), get_folder(), ivr_dispatch(), mgcp_ss(), my_getsigstr(), pbx_builtin_waitexten(), play_record_review(), pri_ss_thread(), read_exec(), read_newoption(), readexten_exec(), retrydial_exec(), select_item_menu(), select_item_pause(), select_item_seq(), sendnoise(), testclient_exec(), testserver_exec(), vm_execmain(), vm_forwardoptions(), vm_instructions_en(), vm_options(), vm_tempgreeting(), wait_a_bit(), and wait_our_turn().
int ast_waitfordigit_full | ( | struct ast_channel * | c, |
int | ms, | ||
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). |
audiofd | audio file descriptor to write to if audio frames are received |
ctrlfd | control file descriptor to monitor for reading |
Definition at line 3616 of file channel.c.
References ast_check_hangup(), ast_clear_flag, AST_CONTROL_ANSWER, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_HANGUP, AST_CONTROL_HOLD, AST_CONTROL_REDIRECTING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, 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_frfree, ast_log(), ast_read(), ast_remaining_ms(), ast_set_flag, ast_test_flag, ast_tvnow(), ast_waitfor_nandfds(), ast_frame::data, ast_frame::datalen, errno, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, ast_frame::ptr, and ast_frame::subclass.
Referenced by ast_readstring_full(), ast_waitfordigit(), handle_getoption(), and handle_waitfordigit().
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 4916 of file channel.c.
References ast_channel::_softhangup, apply_plc(), ast_audiohook_detach_list(), AST_AUDIOHOOK_DIRECTION_WRITE, ast_audiohook_write_list(), ast_audiohook_write_list_empty(), ast_channel_lock, ast_channel_trylock, ast_channel_unlock, ast_check_hangup(), ast_clear_flag, AST_CONTROL_UNHOLD, ast_deactivate_generator(), ast_debug, ast_do_masquerade(), AST_FLAG_BLOCKING, AST_FLAG_WRITE_INT, AST_FLAG_ZOMBIE, AST_FORMAT_AUDIO_MASK, ast_format_rate(), AST_FORMAT_SLINEAR, 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_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_framehook_list_write_event(), ast_frfree, ast_frisolate(), ast_getformatname(), ast_getformatname_multiple(), AST_LIST_NEXT, ast_log(), AST_MONITOR_RUNNING, ast_opt_generic_plc, ast_seekstream(), ast_senddigit_begin(), ast_senddigit_end(), ast_set_write_format(), AST_SOFTHANGUP_DEV, ast_test_flag, ast_translate(), ast_writestream(), ast_channel::audiohooks, calc_monitor_jump(), CHECK_BLOCKING, ast_frame_subclass::codec, ast_frame::data, ast_frame::datalen, DEBUGCHAN_FLAG, ast_filestream::fmt, ast_format::format, ast_channel::fout, FRAMECOUNT_INC, ast_channel::framehooks, ast_frame::frametype, ast_channel::generatordata, ast_channel_tech::indicate, ast_channel::insmpl, ast_frame_subclass::integer, ast_frame::len, LOG_WARNING, ast_channel::masq, ast_channel::masqr, ast_channel::monitor, ast_channel::name, ast_channel::nativeformats, chanlist::next, ast_channel::outsmpl, ast_frame::ptr, ast_channel::rawwriteformat, ast_channel_monitor::read_stream, ast_frame::samples, SEEK_FORCECUR, send_dtmf_event(), ast_channel_tech::send_html, ast_channel_tech::send_text, ast_frame::src, ast_channel_monitor::state, ast_frame::subclass, ast_channel::tech, ast_channel_tech::write, ast_channel_monitor::write_stream, ast_channel_tech::write_text, ast_channel_tech::write_video, ast_channel::writeformat, and ast_channel::writetrans.
Referenced by adsi_careful_send(), agent_write(), ast_bridge_call(), ast_generic_bridge(), ast_prod(), ast_readaudio_callback(), ast_readvideo_callback(), ast_udptl_bridge(), ast_write_video(), conf_queue_dtmf(), conf_run(), dahdi_bridge(), dictate_exec(), echo_exec(), fax_generator_generate(), feature_request_and_dial(), gen_generate(), generic_fax_exec(), handle_jack_audio(), iax2_bridge(), jb_get_and_deliver(), linear_generator(), local_bridge_loop(), milliwatt_generate(), misdn_bridge(), moh_files_generator(), moh_generate(), mp3_exec(), multiplexed_bridge_write(), NBScat_exec(), playtones_generator(), remote_bridge_loop(), send_tone_burst(), send_waveform_to_channel(), silence_generator_generate(), simple_bridge_write(), sms_generate(), softmix_bridge_poke(), softmix_bridge_write(), spy_generate(), t38_tx_packet_handler(), tonepair_generator(), and wait_for_answer().
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 4801 of file channel.c.
References ast_write(), ast_channel::tech, and ast_channel_tech::write_video.
const char* channelreloadreason2txt | ( | enum channelreloadreason | reason | ) |
Convert enum channelreloadreason to text string for manager event.
reason | The reason for reload (manager, cli, start etc) |
\ brief Convert channel reloadreason (ENUM) to text string for manager event
Definition at line 8372 of file channel.c.
References CHANNEL_CLI_RELOAD, CHANNEL_MODULE_LOAD, and CHANNEL_MODULE_RELOAD.
Referenced by reload_config().
struct ast_channel_tech ast_kill_tech |
Kill the channel channel driver technology descriptor.
Kill the channel channel driver technology descriptor.
The purpose of this channel technology is to encourage the channel to hangup as quickly as possible.
Definition at line 668 of file channel.c.
Referenced by ast_do_masquerade().
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 104 of file channel.c.
Referenced by __ast_channel_alloc_ap(), and handle_core_set_debug_channel().
unsigned long global_fout |
Definition at line 104 of file channel.c.
Referenced by __ast_channel_alloc_ap(), and handle_core_set_debug_channel().