Asterisk - The Open Source Telephony Project GIT-master-d856a3e
|
Channel Management. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include <sys/time.h>
#include <signal.h>
#include <math.h>
#include "asterisk/paths.h"
#include "asterisk/pbx.h"
#include "asterisk/frame.h"
#include "asterisk/mod_format.h"
#include "asterisk/sched.h"
#include "asterisk/channel.h"
#include "asterisk/musiconhold.h"
#include "asterisk/say.h"
#include "asterisk/file.h"
#include "asterisk/cli.h"
#include "asterisk/translate.h"
#include "asterisk/manager.h"
#include "asterisk/chanvars.h"
#include "asterisk/linkedlists.h"
#include "asterisk/indications.h"
#include "asterisk/causes.h"
#include "asterisk/callerid.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
#include "asterisk/transcap.h"
#include "asterisk/devicestate.h"
#include "asterisk/threadstorage.h"
#include "asterisk/slinfactory.h"
#include "asterisk/audiohook.h"
#include "asterisk/framehook.h"
#include "asterisk/timing.h"
#include "asterisk/autochan.h"
#include "asterisk/stringfields.h"
#include "asterisk/global_datastores.h"
#include "asterisk/channel_internal.h"
#include "asterisk/features.h"
#include "asterisk/bridge.h"
#include "asterisk/test.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/max_forwards.h"
#include "asterisk/stream.h"
#include "asterisk/message.h"
Go to the source code of this file.
Data Structures | |
struct | ast_channel_iterator |
struct | ast_party_id_ies |
struct | ast_party_name_ies |
struct | ast_party_number_ies |
struct | ast_party_redirecting_reason_ies |
struct | ast_party_subaddress_ies |
struct | ast_silence_generator |
struct | backends |
the list of registered channel types More... | |
struct | causes_map |
map AST_CAUSE's to readable string representations More... | |
struct | chanlist |
List of channel drivers. More... | |
struct | external_vars |
struct | manager_channel_variable |
List of channel variables to append to all channel-related events. More... | |
struct | namedgroup_member |
Named group member structure. More... | |
struct | plc_ds |
struct | set_format_access |
struct | suppress_data |
struct | tonepair_def |
struct | tonepair_state |
Macros | |
#define | AST_DEFAULT_EMULATE_DTMF_DURATION 100 |
#define | AST_MIN_DTMF_GAP 45 |
#define | DEFAULT_AMA_FLAGS AST_AMA_DOCUMENTATION |
#define | DEFAULT_EMULATE_MF_DURATION 55 |
#define | FORMAT "%-15.15s %-40.40s %-13.13s %-13.13s %-13.13s %-13.13s\n" |
#define | STATE2STR_BUFSIZE 32 |
Functions | |
int | __ast_answer (struct ast_channel *chan, unsigned int delay) |
Answer a channel, with a selectable delay before returning. More... | |
static void | __ast_change_name_nolink (struct ast_channel *chan, const char *newname) |
this function simply changes the name of the channel and issues a manager_event with out unlinking and linking the channel from the ao2_container. This should only be used when the channel has already been unlinked from the ao2_container. More... | |
struct ast_channel * | __ast_channel_alloc (int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, enum ama_flags amaflag, struct ast_endpoint *endpoint, const char *file, int line, const char *function, const char *name_fmt,...) |
Create a channel structure. More... | |
static struct ast_channel * | __ast_channel_alloc_ap (int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, enum ama_flags amaflag, struct ast_endpoint *endpoint, struct ast_channel_initializers *initializers, const char *file, int line, const char *function, const char *name_fmt, va_list ap) |
Create a new channel structure. More... | |
struct ast_channel * | __ast_channel_alloc_with_initializers (int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, enum ama_flags amaflag, struct ast_endpoint *endpoint, struct ast_channel_initializers *initializers, const char *file, int line, const char *function, const char *name_fmt,...) |
Create a channel structure. More... | |
struct ast_channel * | __ast_dummy_channel_alloc (const char *file, int line, const char *function) |
static int | __ast_queue_frame (struct ast_channel *chan, struct ast_frame *fin, int head, struct ast_frame *after) |
static struct ast_frame * | __ast_read (struct ast_channel *chan, int dropaudio, int dropnondefault) |
struct ast_channel * | __ast_request_and_dial (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int timeout, int *outstate, 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... | |
static void | __init_state2str_threadbuf (void) |
static void | adjust_frame_for_plc (struct ast_channel *chan, struct ast_frame *frame, struct ast_datastore *datastore) |
static void | apply_plc (struct ast_channel *chan, struct ast_frame *frame) |
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... | |
int | ast_answer (struct ast_channel *chan) |
Answer a channel. More... | |
int | ast_auto_answer (struct ast_channel *chan) |
Answer a channel, if it's not already answered. More... | |
int | ast_call (struct ast_channel *chan, const char *addr, int timeout) |
Make a call. More... | |
struct ast_channel * | ast_call_forward (struct ast_channel *caller, struct ast_channel *orig, int *timeout, struct ast_format_cap *cap, struct outgoing_helper *oh, int *outstate) |
Forwards a call to a new channel specified by the original channel's call_forward str. If possible, the new forwarded channel is created and returned while the original one is terminated. More... | |
const char * | ast_cause2str (int cause) |
Gives the string form of a given hangup cause. More... | |
void | ast_change_name (struct ast_channel *chan, const char *newname) |
Change channel name. More... | |
const char * | ast_channel_amaflags2string (enum ama_flags flag) |
Convert the enum representation of an AMA flag to a string representation. More... | |
struct ast_channel * | ast_channel_bridge_peer (struct ast_channel *chan) |
Get the channel's bridge peer only if the bridge is two-party. More... | |
static int | ast_channel_by_exten_cb (void *obj, void *arg, void *data, int flags) |
static int | ast_channel_by_name_cb (void *obj, void *arg, void *data, int flags) |
static int | ast_channel_by_uniqueid_cb (void *obj, void *arg, void *data, int flags) |
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_flag (struct ast_channel *chan, unsigned int flag) |
Clear a flag on a channel. More... | |
void | ast_channel_clear_softhangup (struct ast_channel *chan, int flag) |
Clear a set of softhangup flags from a channel. More... | |
static int | ast_channel_cmp_cb (void *obj, void *arg, int flags) |
int | ast_channel_cmpwhentohangup_tv (struct ast_channel *chan, struct timeval offset) |
Compare a offset with when to hangup channel. More... | |
int | ast_channel_connected_line_sub (struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const void *connected_info, int is_frame) |
Run a connected line interception subroutine and update a channel's connected line information. More... | |
int | ast_channel_datastore_add (struct ast_channel *chan, struct ast_datastore *datastore) |
Add a datastore to a channel. More... | |
struct ast_datastore * | ast_channel_datastore_find (struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid) |
Find a datastore on a channel. More... | |
int | ast_channel_datastore_inherit (struct ast_channel *from, struct ast_channel *to) |
Inherit datastores from a parent to a child. More... | |
int | ast_channel_datastore_remove (struct ast_channel *chan, struct ast_datastore *datastore) |
Remove a datastore from a channel. More... | |
int | ast_channel_defer_dtmf (struct ast_channel *chan) |
Set defer DTMF flag on channel. More... | |
static void | ast_channel_destructor (void *obj) |
Free a channel structure. More... | |
int | ast_channel_early_bridge (struct ast_channel *c0, struct ast_channel *c1) |
Bridge two channels together (early) More... | |
void | ast_channel_end_dtmf (struct ast_channel *chan, char digit, struct timeval start, const char *why) |
Simulate a DTMF end on a broken bridge channel. More... | |
enum ast_channel_error | ast_channel_errno (void) |
Get error code for latest channel operation. More... | |
int | ast_channel_feature_hooks_append (struct ast_channel *chan, struct ast_bridge_features *features) |
Appends to the channel-attached features a channel has access to upon being bridged. More... | |
struct ast_bridge_features * | ast_channel_feature_hooks_get (struct ast_channel *chan) |
Gets the channel-attached features a channel has access to upon being bridged. More... | |
int | ast_channel_feature_hooks_replace (struct ast_channel *chan, struct ast_bridge_features *features) |
Sets the channel-attached features a channel has access to upon being bridged. More... | |
struct varshead * | ast_channel_get_ari_vars (struct ast_channel *chan) |
Gets the variables for a given channel, as specified by ast_channel_set_ari_vars(). More... | |
struct ast_bridge * | ast_channel_get_bridge (const struct ast_channel *chan) |
Get the bridge associated with a channel. More... | |
struct ast_bridge_channel * | ast_channel_get_bridge_channel (struct ast_channel *chan) |
Get a reference to the channel's bridge pointer. More... | |
struct ast_channel * | ast_channel_get_by_exten (const char *exten, const char *context) |
Find a channel by extension and context. 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... | |
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... | |
int | ast_channel_get_duration (struct ast_channel *chan) |
Obtain how long the channel since the channel was created. More... | |
int64_t | ast_channel_get_duration_ms (struct ast_channel *chan) |
Obtain how long it's been, in milliseconds, since the channel was created. More... | |
int | ast_channel_get_intercept_mode (void) |
Am I currently running an intercept dialplan routine. More... | |
struct varshead * | ast_channel_get_manager_vars (struct ast_channel *chan) |
Gets the variables for a given channel, as specified by ast_channel_set_manager_vars(). More... | |
int | ast_channel_get_up_time (struct ast_channel *chan) |
Obtain how long it has been since the channel was answered. More... | |
int64_t | ast_channel_get_up_time_ms (struct ast_channel *chan) |
Obtain how long it has been since the channel was answered in ms. More... | |
struct varshead * | ast_channel_get_vars (struct ast_channel *chan) |
Gets the variables for a given channel, as set using pbx_builtin_setvar_helper(). More... | |
void | ast_channel_hangupcause_hash_set (struct ast_channel *chan, const struct ast_control_pvt_cause_code *cause_code, int datalen) |
Sets the HANGUPCAUSE hash and optionally the SIP_CAUSE hash on the given channel. More... | |
int | ast_channel_has_ari_vars (void) |
Return whether or not any ARI variables have been set. More... | |
int | ast_channel_has_audio_frame_or_monitor (struct ast_channel *chan) |
Check if the channel has active audiohooks, active framehooks, or a monitor. More... | |
int | ast_channel_has_hook_requiring_audio (struct ast_channel *chan) |
Check if the channel has any active hooks that require audio. More... | |
int | ast_channel_has_manager_vars (void) |
Return whether or not any manager variables have been set. More... | |
static int | ast_channel_hash_cb (const void *obj, const int flags) |
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_is_bridged (const struct ast_channel *chan) |
Determine if a channel is in a bridge. More... | |
int | ast_channel_is_leaving_bridge (struct ast_channel *chan) |
Determine if a channel is leaving a bridge, but not hung up. More... | |
struct ast_channel_iterator * | ast_channel_iterator_all_new (void) |
Create a new 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_destroy (struct ast_channel_iterator *i) |
Destroy a channel iterator. More... | |
struct ast_channel * | ast_channel_iterator_next (struct ast_channel_iterator *i) |
Get the next channel for a channel iterator. More... | |
int | ast_channel_make_compatible (struct ast_channel *chan, struct ast_channel *peer) |
Make the frame formats of two channels compatible. More... | |
static int | ast_channel_make_compatible_helper (struct ast_channel *from, struct ast_channel *to) |
Set up translation from one channel to another. More... | |
int | ast_channel_move (struct ast_channel *dest, struct ast_channel *source) |
Move a channel from its current location to a new location. More... | |
void | ast_channel_name_to_dial_string (char *channel_name) |
Removes the trailing identifiers from a channel name string. More... | |
int | ast_channel_queryoption (struct ast_channel *chan, 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_sub (struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const void *redirecting_info, int is_frame) |
Run a redirecting interception subroutine and update a channel's redirecting information. More... | |
int | ast_channel_register (const struct ast_channel_tech *tech) |
Register a new telephony channel in Asterisk. More... | |
struct ast_channel * | ast_channel_release (struct ast_channel *chan) |
Unlink and release reference to a channel. More... | |
void | ast_channel_req_accountcodes (struct ast_channel *chan, const struct ast_channel *requestor, enum ast_channel_requestor_relationship relationship) |
Setup new channel accountcodes from the requestor channel after ast_request(). More... | |
void | ast_channel_req_accountcodes_precious (struct ast_channel *chan, const struct ast_channel *requestor, enum ast_channel_requestor_relationship relationship) |
Setup new channel accountcodes from the requestor channel after ast_request(). More... | |
int | ast_channel_request_stream_topology_change (struct ast_channel *chan, struct ast_stream_topology *topology, void *change_source) |
Request that the stream topology of a channel change. More... | |
int | ast_channel_sendhtml (struct ast_channel *chan, 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 *chan, const char *url) |
Sends a URL on a given link Send URL on link. More... | |
void | ast_channel_set_ari_vars (size_t varc, char **vars) |
Sets the variables to be stored in the ari_vars field of all snapshots. More... | |
void | ast_channel_set_caller (struct ast_channel *chan, const struct ast_party_caller *caller, const struct ast_set_party_caller *update) |
Set the caller id information in the Asterisk channel. More... | |
void | ast_channel_set_caller_event (struct ast_channel *chan, const struct ast_party_caller *caller, const struct ast_set_party_caller *update) |
Set the caller id information in the Asterisk channel and generate an AMI event if the caller id name or number changed. More... | |
void | ast_channel_set_connected_line (struct ast_channel *chan, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update) |
Set the connected line information in the Asterisk channel. More... | |
void | ast_channel_set_fd (struct ast_channel *chan, int which, int fd) |
void | ast_channel_set_flag (struct ast_channel *chan, unsigned int flag) |
Set a flag on a channel. More... | |
void | ast_channel_set_manager_vars (size_t varc, char **vars) |
Sets the variables to be stored in the manager_vars field of all snapshots. More... | |
void | ast_channel_set_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 *chan, int option, void *data, int datalen, int block) |
Sets an option on a channel. More... | |
void | ast_channel_setwhentohangup_tv (struct ast_channel *chan, struct timeval offset) |
Set when to hangup channel. More... | |
static int | ast_channel_softhangup_cb (void *obj, void *arg, int flags) |
void | ast_channel_softhangup_withcause_locked (struct ast_channel *chan, int causecode) |
Lock the given channel, then request softhangup on the channel with the given causecode. More... | |
struct ast_silence_generator * | ast_channel_start_silence_generator (struct ast_channel *chan) |
Starts a silence generator on the given channel. More... | |
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_stream_topology_changed (struct ast_channel *chan, struct ast_stream_topology *topology) |
Provide notice to a channel that the stream topology has changed. More... | |
int | ast_channel_stream_topology_changed_externally (struct ast_channel *chan) |
Provide notice from a channel that the topology has changed on it as a result of the remote party renegotiating. More... | |
enum ama_flags | ast_channel_string2amaflag (const char *flag) |
Convert a string to a detail record AMA flag. More... | |
int | ast_channel_supports_html (struct ast_channel *chan) |
Checks for HTML support on a channel. More... | |
int | ast_channel_suppress (struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype) |
Suppress passing of a frame type on a channel. More... | |
void | ast_channel_undefer_dtmf (struct ast_channel *chan) |
Unset defer DTMF flag on channel. More... | |
void | ast_channel_unlink (struct ast_channel *chan) |
Remove a channel from the global channels container. More... | |
void | ast_channel_unregister (const struct ast_channel_tech *tech) |
Unregister channel driver. More... | |
int | ast_channel_unsuppress (struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype) |
Stop suppressing of a frame type on a channel. More... | |
void | ast_channel_update_connected_line (struct ast_channel *chan, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update) |
Indicate that the connected line information has changed. More... | |
void | ast_channel_update_redirecting (struct ast_channel *chan, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update) |
Indicate that the redirecting id has changed. More... | |
struct ast_channel * | ast_channel_yank (struct ast_channel *yankee) |
Gain control of a channel in the system. More... | |
int | ast_channels_init (void) |
struct ast_variable * | ast_channeltype_list (void) |
return an ast_variable list of channeltypes More... | |
int | ast_check_hangup (struct ast_channel *chan) |
Checks to see if a channel is needing hang up. More... | |
int | ast_check_hangup_locked (struct ast_channel *chan) |
int | ast_connected_line_build_data (unsigned char *data, size_t datalen, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update) |
Build the connected line information data frame. More... | |
void | ast_connected_line_copy_from_caller (struct ast_party_connected_line *dest, const struct ast_party_caller *src) |
Copy the caller information to the connected line information. More... | |
void | ast_connected_line_copy_to_caller (struct ast_party_caller *dest, const struct ast_party_connected_line *src) |
Copy the connected line information to the caller information. More... | |
int | ast_connected_line_parse_data (const unsigned char *data, size_t datalen, struct ast_party_connected_line *connected) |
Parse connected line indication frame data. More... | |
void | ast_deactivate_generator (struct ast_channel *chan) |
static void | ast_dummy_channel_destructor (void *obj) |
Free a dummy channel structure. More... | |
const struct ast_channel_tech * | ast_get_channel_tech (const char *name) |
Get handle to channel driver based on name. More... | |
ast_group_t | ast_get_group (const char *s) |
struct ast_namedgroups * | ast_get_namedgroups (const char *s) |
Create an ast_namedgroups set with group names from comma separated string. More... | |
void | ast_hangup (struct ast_channel *chan) |
Hangup 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... | |
void | ast_install_music_functions (int(*start_ptr)(struct ast_channel *, const char *, const char *), void(*stop_ptr)(struct ast_channel *), void(*cleanup_ptr)(struct ast_channel *)) |
int | ast_is_deferrable_frame (const struct ast_frame *frame) |
Should we keep this frame for later? More... | |
void | ast_moh_cleanup (struct ast_channel *chan) |
int | ast_moh_start (struct ast_channel *chan, const char *mclass, const char *interpclass) |
Turn on music on hold on a given channel. More... | |
void | ast_moh_stop (struct ast_channel *chan) |
Turn off music on hold on a given channel. More... | |
int | ast_namedgroups_intersect (struct ast_namedgroups *a, struct ast_namedgroups *b) |
Return TRUE if group a and b contain at least one common groupname. 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... | |
void | ast_party_id_invalidate (struct ast_party_id *id) |
Invalidate all components of the given party id. More... | |
struct ast_party_id | ast_party_id_merge (struct ast_party_id *base, struct ast_party_id *overlay) |
Merge a given party id into another given party id. More... | |
void | ast_party_id_merge_copy (struct ast_party_id *dest, struct ast_party_id *base, struct ast_party_id *overlay) |
Copy a merge of a given party id into another given party id to a given destination party id. More... | |
int | ast_party_id_presentation (const struct ast_party_id *id) |
Determine the overall presentation value for the given party. More... | |
void | ast_party_id_reset (struct ast_party_id *id) |
Destroy and initialize the given party id structure. More... | |
void | ast_party_id_set (struct ast_party_id *dest, const struct ast_party_id *src, const struct ast_set_party_id *update) |
Set the source party id information into the destination party id. More... | |
void | ast_party_id_set_init (struct ast_party_id *init, const struct ast_party_id *guide) |
Initialize the given party id structure using the given guide for a set update operation. More... | |
void | ast_party_name_copy (struct ast_party_name *dest, const struct ast_party_name *src) |
Copy the source party name information to the destination party name. More... | |
void | ast_party_name_free (struct ast_party_name *doomed) |
Destroy the party name contents. More... | |
void | ast_party_name_init (struct ast_party_name *init) |
Initialize the given name structure. More... | |
void | ast_party_name_set (struct ast_party_name *dest, const struct ast_party_name *src) |
Set the source party name information into the destination party name. More... | |
void | ast_party_name_set_init (struct ast_party_name *init, const struct ast_party_name *guide) |
Initialize the given party name structure using the given guide for a set update operation. More... | |
void | ast_party_number_copy (struct ast_party_number *dest, const struct ast_party_number *src) |
Copy the source party number information to the destination party number. More... | |
void | ast_party_number_free (struct ast_party_number *doomed) |
Destroy the party number contents. More... | |
void | ast_party_number_init (struct ast_party_number *init) |
Initialize the given number structure. More... | |
void | ast_party_number_set (struct ast_party_number *dest, const struct ast_party_number *src) |
Set the source party number information into the destination party number. More... | |
void | ast_party_number_set_init (struct ast_party_number *init, const struct ast_party_number *guide) |
Initialize the given party number structure using the given guide for a set update operation. More... | |
void | ast_party_redirecting_copy (struct ast_party_redirecting *dest, const struct ast_party_redirecting *src) |
Copy the source redirecting information to the destination redirecting. More... | |
void | ast_party_redirecting_free (struct ast_party_redirecting *doomed) |
Destroy the redirecting information contents. More... | |
void | ast_party_redirecting_init (struct ast_party_redirecting *init) |
Initialize the given redirecting structure. More... | |
void | ast_party_redirecting_reason_copy (struct ast_party_redirecting_reason *dest, const struct ast_party_redirecting_reason *src) |
Copy the source redirecting reason information to the destination redirecting reason. More... | |
void | ast_party_redirecting_reason_free (struct ast_party_redirecting_reason *doomed) |
Destroy the redirecting reason contents. More... | |
void | ast_party_redirecting_reason_init (struct ast_party_redirecting_reason *init) |
Initialize the given redirecting reason structure. More... | |
void | ast_party_redirecting_reason_set (struct ast_party_redirecting_reason *dest, const struct ast_party_redirecting_reason *src) |
Set the redirecting reason information based on another redirecting reason source. More... | |
void | ast_party_redirecting_reason_set_init (struct ast_party_redirecting_reason *init, const struct ast_party_redirecting_reason *guide) |
Initialize the given redirecting reason structure using the given guide for a set update operation. More... | |
void | ast_party_redirecting_set (struct ast_party_redirecting *dest, const struct ast_party_redirecting *src, const struct ast_set_party_redirecting *update) |
Set the redirecting information based on another redirecting source. More... | |
void | ast_party_redirecting_set_init (struct ast_party_redirecting *init, const struct ast_party_redirecting *guide) |
Initialize the given redirecting id structure using the given guide for a set update operation. More... | |
void | ast_party_subaddress_copy (struct ast_party_subaddress *dest, const struct ast_party_subaddress *src) |
Copy the source party subaddress information to the destination party subaddress. More... | |
void | ast_party_subaddress_free (struct ast_party_subaddress *doomed) |
Destroy the party subaddress contents. More... | |
void | ast_party_subaddress_init (struct ast_party_subaddress *init) |
Initialize the given subaddress structure. More... | |
void | ast_party_subaddress_set (struct ast_party_subaddress *dest, const struct ast_party_subaddress *src) |
Set the source party subaddress information into the destination party subaddress. More... | |
void | ast_party_subaddress_set_init (struct ast_party_subaddress *init, const struct ast_party_subaddress *guide) |
Initialize the given party subaddress structure using the given guide for a set update operation. More... | |
int | ast_pre_call (struct ast_channel *chan, const char *sub_args) |
Execute a Gosub call on the channel before a call is placed. More... | |
char * | ast_print_group (char *buf, int buflen, ast_group_t group) |
Print call group and pickup group —. More... | |
char * | ast_print_namedgroups (struct ast_str **buf, struct ast_namedgroups *group) |
Print named call groups and named pickup groups. More... | |
int | ast_prod (struct ast_channel *chan) |
Send empty audio to prime a channel driver. More... | |
int | ast_queue_answer (struct ast_channel *chan, const struct ast_stream_topology *topology) |
Queue an ANSWER control frame with topology. More... | |
int | ast_queue_control (struct ast_channel *chan, enum ast_control_frame_type control) |
Queue a control frame. 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 *fin) |
Queue one or more frames to a channel's frame queue. More... | |
int | ast_queue_frame_head (struct ast_channel *chan, struct ast_frame *fin) |
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 for channel. More... | |
int | ast_queue_hangup_with_cause (struct ast_channel *chan, int cause) |
Queue a hangup frame for channel. More... | |
int | ast_queue_hold (struct ast_channel *chan, const char *musicclass) |
Queue a hold frame. More... | |
int | ast_queue_unhold (struct ast_channel *chan) |
Queue an unhold frame. More... | |
int | ast_raw_answer (struct ast_channel *chan) |
Answer a channel. More... | |
int | ast_raw_answer_with_stream_topology (struct ast_channel *chan, struct ast_stream_topology *topology) |
Answer a channel passing in a stream topology. More... | |
struct ast_frame * | ast_read (struct ast_channel *chan) |
Reads a frame. More... | |
static void | ast_read_generator_actions (struct ast_channel *chan, struct ast_frame *f) |
struct ast_frame * | ast_read_noaudio (struct ast_channel *chan) |
Reads a frame, returning AST_FRAME_NULL frame if audio. More... | |
struct ast_frame * | ast_read_stream (struct ast_channel *chan) |
Reads a frame, but does not filter to just the default streams. More... | |
struct ast_frame * | ast_read_stream_noaudio (struct ast_channel *chan) |
Reads a frame, but does not filter to just the default streams, returning AST_FRAME_NULL frame if audio. More... | |
int | ast_readstring (struct ast_channel *c, char *s, int len, int timeout, int ftimeout, char *enders) |
Reads multiple digits. More... | |
int | ast_readstring_full (struct ast_channel *c, char *s, int len, int timeout, int ftimeout, char *enders, int audiofd, int ctrlfd) |
int | ast_recvchar (struct ast_channel *chan, int timeout) |
Receives a text character from a channel. More... | |
char * | ast_recvtext (struct ast_channel *chan, int timeout) |
Receives a text string from a channel Read a string of text from a channel. More... | |
int | ast_redirecting_build_data (unsigned char *data, size_t datalen, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update) |
Build the redirecting id data frame. More... | |
int | ast_redirecting_parse_data (const unsigned char *data, size_t datalen, struct ast_party_redirecting *redirecting) |
Parse redirecting indication frame data. More... | |
struct ast_namedgroups * | ast_ref_namedgroups (struct ast_namedgroups *groups) |
struct ast_channel * | ast_request (const char *type, struct ast_format_cap *request_cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause) |
Requests a channel. More... | |
struct ast_channel * | ast_request_and_dial (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int timeout, int *outstate, const char *cidnum, const char *cidname) |
Request a channel of a given type, with data as optional information used by the low level module and attempt to place a call on it. More... | |
struct ast_channel * | ast_request_with_stream_topology (const char *type, struct ast_stream_topology *topology, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause) |
Requests a channel (specifying stream topology) More... | |
int | ast_safe_sleep (struct ast_channel *chan, int ms) |
Wait, look for hangups. More... | |
int | ast_safe_sleep_conditional (struct ast_channel *chan, int timeout_ms, int(*cond)(void *), void *data) |
Wait for a specified amount of time, looking for hangups and a condition argument. More... | |
int | ast_safe_sleep_without_silence (struct ast_channel *chan, int ms) |
Wait for a specified amount of time, looking for hangups, and do not generate silence. More... | |
int | ast_say_character_str (struct ast_channel *chan, const char *str, const char *ints, const char *lang, enum ast_say_case_sensitivity sensitivity) |
function to pronounce character and phonetic strings More... | |
int | ast_say_digit_str (struct ast_channel *chan, const char *str, const char *ints, const char *lang) |
says digits of a string More... | |
int | ast_say_digits (struct ast_channel *chan, int num, const char *ints, const char *lang) |
says digits More... | |
int | ast_say_digits_full (struct ast_channel *chan, int num, const char *ints, const char *lang, int audiofd, int ctrlfd) |
Same as ast_say_digits() with audiofd for received audio and returns 1 on ctrlfd being readable. More... | |
int | ast_say_enumeration (struct ast_channel *chan, int num, const char *ints, const char *language, const char *options) |
says an enumeration More... | |
int | ast_say_money_str (struct ast_channel *chan, const char *str, const char *ints, const char *lang) |
function to pronounce monetary amounts More... | |
int | ast_say_number (struct ast_channel *chan, int num, const char *ints, const char *language, const char *options) |
says a number More... | |
int | ast_say_ordinal (struct ast_channel *chan, int num, const char *ints, const char *language, const char *options) |
says an ordinal number More... | |
int | ast_say_phonetic_str (struct ast_channel *chan, const char *str, const char *ints, const char *lang) |
int | ast_senddigit (struct ast_channel *chan, char digit, unsigned int duration) |
Send a DTMF digit to a channel. More... | |
int | ast_senddigit_begin (struct ast_channel *chan, char digit) |
Send a DTMF digit to a channel. More... | |
int | ast_senddigit_end (struct ast_channel *chan, char digit, unsigned int duration) |
Send a DTMF digit to a channel. More... | |
int | ast_senddigit_external (struct ast_channel *chan, char digit, unsigned int duration) |
Send a DTMF digit to a channel from an external thread. More... | |
int | ast_senddigit_mf (struct ast_channel *chan, char digit, unsigned int duration, unsigned int durationkp, unsigned int durationst, int is_external) |
Send an MF digit to a channel. More... | |
int | ast_senddigit_mf_begin (struct ast_channel *chan, char digit) |
Send an MF digit to a channel. More... | |
int | ast_senddigit_mf_end (struct ast_channel *chan) |
End sending an MF digit to a channel. More... | |
int | ast_sendtext (struct ast_channel *chan, const char *text) |
Sends text to a channel. More... | |
int | ast_sendtext_data (struct ast_channel *chan, struct ast_msg_data *msg) |
Sends text to a channel in an ast_msg_data structure wrapper with ast_sendtext as fallback. More... | |
void | ast_set_callerid (struct ast_channel *chan, const char *cid_num, const char *cid_name, const char *cid_ani) |
Set caller ID number, name and ANI and generate AMI event. More... | |
void | ast_set_hangupsource (struct ast_channel *chan, const char *source, int force) |
Set the source of the hangup in this channel and it's bridge. More... | |
void | ast_set_party_id_all (struct ast_set_party_id *update_id) |
Set the update marker to update all information of a corresponding party id. More... | |
int | ast_set_read_format (struct ast_channel *chan, struct ast_format *format) |
Sets read format on channel chan. More... | |
int | ast_set_read_format_from_cap (struct ast_channel *chan, struct ast_format_cap *cap) |
Sets read format on channel chan from capabilities Set read format for channel to whichever component of "format" is best. More... | |
int | ast_set_read_format_path (struct ast_channel *chan, struct ast_format *raw_format, struct ast_format *core_format) |
Set specific read path on channel. More... | |
void | ast_set_variables (struct ast_channel *chan, struct ast_variable *vars) |
adds a list of channel variables to a channel More... | |
int | ast_set_write_format (struct ast_channel *chan, struct ast_format *format) |
Sets write format on channel chan. More... | |
int | ast_set_write_format_from_cap (struct ast_channel *chan, struct ast_format_cap *cap) |
Sets write format on channel chan Set write format for channel to whichever component of "format" is best. More... | |
int | ast_set_write_format_interleaved_stereo (struct ast_channel *chan, struct ast_format *format) |
Sets write format for a channel. All internal data will than be handled in an interleaved format. (needed by binaural opus) More... | |
int | ast_set_write_format_path (struct ast_channel *chan, struct ast_format *core_format, struct ast_format *raw_format) |
Set specific write path on channel. More... | |
int | ast_setstate (struct ast_channel *chan, enum ast_channel_state state) |
Change the state of a channel. More... | |
int | ast_settimeout (struct ast_channel *c, unsigned int rate, int(*func)(const void *data), void *data) |
Enable or disable timer ticks for a channel. More... | |
int | ast_settimeout_full (struct ast_channel *c, unsigned int rate, int(*func)(const void *data), void *data, unsigned int is_ao2_obj) |
int | ast_softhangup (struct ast_channel *chan, int cause) |
Softly hangup a channel, lock. More... | |
void | ast_softhangup_all (void) |
Soft hangup all active channels. More... | |
int | ast_softhangup_nolock (struct ast_channel *chan, int cause) |
Softly hangup a channel, don't lock. More... | |
const char * | ast_state2str (enum ast_channel_state state) |
Gives the string form of a given channel state. More... | |
int | ast_str2cause (const char *name) |
Convert a symbolic hangup cause to number. More... | |
AST_THREADSTORAGE_RAW (in_intercept_routine) | |
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 call to dest, if the channel supports transfer. More... | |
int | ast_transfer_protocol (struct ast_channel *chan, char *dest, int *protocol) |
Transfer a call to dest, if the channel supports transfer. More... | |
char * | ast_transfercapability2str (int transfercapability) |
Gives the string form of a given transfer capability. More... | |
int | ast_undestroyed_channels (void) |
void | ast_uninstall_music_functions (void) |
struct ast_namedgroups * | ast_unref_namedgroups (struct ast_namedgroups *groups) |
int | ast_waitfor (struct ast_channel *c, int ms) |
Wait for input on a channel. More... | |
struct ast_channel * | ast_waitfor_n (struct ast_channel **c, 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) |
Wait for x amount of time on a file descriptor to have input. More... | |
struct ast_channel * | ast_waitfor_nandfds (struct ast_channel **c, int n, int *fds, int nfds, int *exception, int *outfd, int *ms) |
Wait for x amount of time on a file descriptor to have input. More... | |
int | ast_waitfordigit (struct ast_channel *c, int ms) |
Waits for a digit. More... | |
int | ast_waitfordigit_full (struct ast_channel *c, int timeout_ms, const char *breakon, int audiofd, int cmdfd) |
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 *fr) |
Write a frame to a channel This function writes the given frame to the indicated channel. More... | |
int | ast_write_stream (struct ast_channel *chan, int stream_num, struct ast_frame *fr) |
Write a frame to a stream This function writes the given frame to the indicated stream on the channel. More... | |
int | ast_write_video (struct ast_channel *chan, struct ast_frame *fr) |
Write video frame to a channel This function writes the given frame to the indicated channel. More... | |
static int | calc_monitor_jump (int samples, int sample_rate, int seek_rate) |
calculates the number of samples to jump forward with in a monitor stream. More... | |
static void | call_forward_inherit (struct ast_channel *new_chan, struct ast_channel *parent, struct ast_channel *orig) |
static void * | channel_cc_params_copy (void *data) |
static void | channel_cc_params_destroy (void *data) |
static void | channel_do_masquerade (struct ast_channel *original, struct ast_channel *clonechan) |
Masquerade a channel. More... | |
static int | channel_feature_hooks_set_full (struct ast_channel *chan, struct ast_bridge_features *features, int replace) |
static struct varshead * | channel_get_external_vars (struct external_vars *channelvars, struct ast_channel *chan) |
static int | channel_has_external_vars (struct external_vars *channelvars) |
static void | channel_req_accountcodes (struct ast_channel *chan, const struct ast_channel *requestor, enum ast_channel_requestor_relationship relationship, int precious) |
static void | channel_set_external_vars (struct external_vars *channelvars, size_t varc, char **vars) |
static void | channel_set_intercept_mode (int in_intercept_mode) |
static void | channels_shutdown (void) |
static void | clone_variables (struct ast_channel *original, struct ast_channel *clonechan) |
Clone channel variables from 'clone' channel into 'original' channel. More... | |
static char * | complete_channeltypes (struct ast_cli_args *a) |
static void | deactivate_generator_nolock (struct ast_channel *chan) |
static int | deactivate_silence_generator (struct ast_channel *chan) |
static void | destroy_hooks (struct ast_channel *chan) |
static int | does_id_conflict (const char *uniqueid) |
static const char * | dtmf_direction_to_string (enum DtmfDirection direction) |
static void | features_destroy (void *obj) |
static void | free_external_channelvars (struct external_vars *channelvars) |
static void | free_translation (struct ast_channel *clonechan) |
static int | generator_force (const void *data) |
static void | generator_write_format_change (struct ast_channel *chan) |
static void | handle_cause (int cause, int *outstate) |
static char * | handle_cli_core_show_channeltype (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Show details about a channel driver - CLI command. More... | |
static char * | handle_cli_core_show_channeltypes (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Show channel types - CLI command. More... | |
static int | indicate_connected_line (struct ast_channel *chan, const void *data, size_t datalen) |
static int | indicate_data_internal (struct ast_channel *chan, int _condition, const void *data, size_t datalen) |
static int | indicate_redirecting (struct ast_channel *chan, const void *data, size_t datalen) |
static int attribute_const | is_visible_indication (enum ast_control_frame_type condition) |
static struct ast_frame * | kill_exception (struct ast_channel *chan) |
static int | kill_fixup (struct ast_channel *oldchan, struct ast_channel *newchan) |
static int | kill_hangup (struct ast_channel *chan) |
static struct ast_frame * | kill_read (struct ast_channel *chan) |
static int | kill_write (struct ast_channel *chan, struct ast_frame *frame) |
static int | namedgroup_cmp_cb (void *obj, void *arg, int flags) |
Comparison function used for named group container. More... | |
static int | namedgroup_hash_cb (const void *obj, const int flags) |
Hashing function used for named group container. More... | |
static int | namedgroup_match (void *obj, void *arg, int flags) |
static int | party_id_build_data (unsigned char *data, size_t datalen, const struct ast_party_id *id, const char *label, const struct ast_party_id_ies *ies, const struct ast_set_party_id *update) |
static int | party_name_build_data (unsigned char *data, size_t datalen, const struct ast_party_name *name, const char *label, const struct ast_party_name_ies *ies) |
static int | party_number_build_data (unsigned char *data, size_t datalen, const struct ast_party_number *number, const char *label, const struct ast_party_number_ies *ies) |
static int | party_subaddress_build_data (unsigned char *data, size_t datalen, const struct ast_party_subaddress *subaddress, const char *label, const struct ast_party_subaddress_ies *ies) |
static void | plc_ds_destroy (void *data) |
static void | prnt_channel_key (void *v_obj, void *where, ao2_prnt_fn *prnt) |
static void | queue_dtmf_readq (struct ast_channel *chan, struct ast_frame *f) |
static int | redirecting_reason_build_data (unsigned char *data, size_t datalen, const struct ast_party_redirecting_reason *reason, const char *label, const struct ast_party_redirecting_reason_ies *ies) |
static struct ast_channel * | request_channel (const char *type, struct ast_format_cap *request_cap, struct ast_stream_topology *topology, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause) |
static int | safe_sleep_conditional (struct ast_channel *chan, int timeout_ms, int(*cond)(void *), void *data, unsigned int generate_silence) |
Wait, look for hangups and condition arg. More... | |
static void | send_dtmf_begin_event (struct ast_channel *chan, enum DtmfDirection direction, const char digit) |
static void | send_dtmf_end_event (struct ast_channel *chan, enum DtmfDirection direction, const char digit, long duration_ms) |
static void | send_flash_event (struct ast_channel *chan) |
static void | send_wink_event (struct ast_channel *chan) |
static void | set_channel_answer_time (struct ast_channel *chan) |
static int | set_format (struct ast_channel *chan, struct ast_format_cap *cap_set, const int direction, int interleaved_stereo) |
static int | set_security_requirements (const struct ast_channel *requestor, struct ast_channel *out) |
static int | should_skip_dtmf (struct ast_channel *chan) |
Determine whether or not we should ignore DTMF in the readq. More... | |
static int | should_trigger_dtmf_emulating (struct ast_channel *chan) |
Determine whether or not we have to trigger dtmf emulating using 50 fps timer events especially when no voice frames are received during dtmf processing (direct media or muted sender case using SIP INFO) More... | |
static void * | silence_generator_alloc (struct ast_channel *chan, void *data) |
static int | silence_generator_generate (struct ast_channel *chan, void *data, int len, int samples) |
static void | silence_generator_release (struct ast_channel *chan, void *data) |
static void | suppress_datastore_destroy_cb (void *data) |
static void | suppress_framehook_destroy_cb (void *data) |
static struct ast_frame * | suppress_framehook_event_cb (struct ast_channel *chan, struct ast_frame *frame, enum ast_framehook_event event, void *data) |
static void | suppress_framehook_fixup_cb (void *data, int framehook_id, struct ast_channel *old_chan, struct ast_channel *new_chan) |
static const struct ast_datastore_info * | suppress_get_datastore_information (enum ast_frame_type frametype) |
static int | tech_write (struct ast_channel *chan, struct ast_stream *stream, struct ast_stream *default_stream, struct ast_frame *frame) |
static void * | tonepair_alloc (struct ast_channel *chan, void *params) |
static int | tonepair_generator (struct ast_channel *chan, void *data, int len, int samples) |
static void | tonepair_release (struct ast_channel *chan, void *params) |
static void | varshead_dtor (void *obj) |
Destructor for lists of variables. More... | |
Variables | |
static struct external_vars | ami_vars |
static struct external_vars | ari_vars |
const struct ast_channel_tech | ast_kill_tech |
Kill the channel channel driver technology descriptor. More... | |
static void(* | ast_moh_cleanup_ptr )(struct ast_channel *) = NULL |
static int(* | ast_moh_start_ptr )(struct ast_channel *, const char *, const char *) = NULL |
static void(* | ast_moh_stop_ptr )(struct ast_channel *) = NULL |
static struct backends | backends = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static const struct ast_datastore_info | bridge_features_info |
static const struct causes_map | causes [] |
static const struct ast_datastore_info | cc_channel_datastore_info |
static int | chancount |
static ast_mutex_t | channel_move_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static struct ao2_container * | channels |
All active channels on the system. More... | |
static struct ast_cli_entry | cli_channel [] |
unsigned long | global_fin |
unsigned long | global_fout |
static const struct ast_channel_tech | null_tech |
static const struct ast_datastore_info | plc_ds_info |
static const struct set_format_access | set_format_access_read |
static const struct set_format_access | set_format_access_write |
static struct ast_generator | silence_generator |
static struct ast_threadstorage | state2str_threadbuf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_state2str_threadbuf , .custom_init = NULL , } |
static const struct ast_datastore_info | suppress_datastore_voice |
static const struct ast_channel_tech | surrogate_tech |
Channel technology used to extract a channel from a running application. The channel created with this technology will be immediately hung up - most external applications won't ever want to see this. More... | |
static struct ast_generator | tonepair |
Channel Management.
Definition in file channel.c.
#define AST_DEFAULT_EMULATE_DTMF_DURATION 100 |
#define AST_MIN_DTMF_GAP 45 |
#define DEFAULT_AMA_FLAGS AST_AMA_DOCUMENTATION |
#define DEFAULT_EMULATE_MF_DURATION 55 |
#define FORMAT "%-15.15s %-40.40s %-13.13s %-13.13s %-13.13s %-13.13s\n" |
anonymous enum |
Element identifiers for connected line indication frame data.
Definition at line 8683 of file channel.c.
anonymous enum |
Element identifiers for redirecting indication frame data.
Definition at line 9159 of file channel.c.
enum DtmfDirection |
Enumerator | |
---|---|
DTMF_RECEIVED | |
DTMF_SENT |
int __ast_answer | ( | struct ast_channel * | chan, |
unsigned int | delay | ||
) |
Answer a channel, with a selectable delay before returning.
chan | channel to answer |
delay | maximum amount of time to wait for incoming media |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2714 of file channel.c.
References ast_channel_lock, ast_channel_name(), ast_channel_unlock, AST_CONTROL_HANGUP, ast_debug, AST_FRAME_BRIDGE_ACTION, AST_FRAME_BRIDGE_ACTION_SYNC, AST_FRAME_CNG, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_HTML, AST_FRAME_IAX, AST_FRAME_IMAGE, AST_FRAME_MODEM, AST_FRAME_NULL, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_TEXT_DATA, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_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(), done, errno, frames, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, MAX, SCOPE_TRACE, and ast_frame::subclass.
Referenced by ast_answer(), pbx_builtin_answer(), and pbx_builtin_incomplete().
|
static |
this function simply changes the name of the channel and issues a manager_event with out unlinking and linking the channel from the ao2_container. This should only be used when the channel has already been unlinked from the ao2_container.
Definition at line 6761 of file channel.c.
References ast_channel_name(), ast_channel_uniqueid(), ast_manager_event, and EVENT_FLAG_CALL.
Referenced by ast_change_name().
struct ast_channel * __ast_channel_alloc | ( | int | needqueue, |
int | state, | ||
const char * | cid_num, | ||
const char * | cid_name, | ||
const char * | acctcode, | ||
const char * | exten, | ||
const char * | context, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
enum ama_flags | amaflag, | ||
struct ast_endpoint * | endpoint, | ||
const char * | file, | ||
int | line, | ||
const char * | function, | ||
const char * | name_fmt, | ||
... | |||
) |
Create a channel structure.
NULL | failure |
non-NULL | successfully allocated channel |
Definition at line 954 of file channel.c.
References __ast_channel_alloc_ap(), voicemailpwcheck::context, ast_channel::exten, make_ari_stubs::file, NULL, and result.
|
static |
Create a new channel structure.
Definition at line 733 of file channel.c.
References __ast_channel_internal_alloc_with_initializers(), ao2_link_flags, ao2_lock, ao2_ref, ao2_unlock, AST_ALERT_FD, AST_AMA_NONE, ast_atomic_fetchadd_int(), ast_channel_amaflags_set(), ast_channel_autochans(), ast_channel_caller(), ast_channel_connected(), ast_channel_connected_indicated(), ast_channel_context_set(), ast_channel_creationtime_set(), ast_channel_datastores(), ast_channel_destructor(), ast_channel_dialed(), AST_CHANNEL_ERROR_ID_EXISTS, ast_channel_exten_set(), ast_channel_fin_set(), ast_channel_fout_set(), ast_channel_hold_state_set(), ast_channel_internal_alert_readfd(), ast_channel_internal_alertpipe_clear(), ast_channel_internal_alertpipe_init(), ast_channel_internal_errno_set(), ast_channel_internal_fd_clear_all(), ast_channel_internal_finalize(), ast_channel_internal_set_stream_topology(), ast_channel_internal_setup_topics(), ast_channel_lock, ast_channel_name(), ast_channel_nativeformats_set(), ast_channel_priority_set(), ast_channel_redirecting(), ast_channel_sched_set(), ast_channel_set_fd(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), ast_channel_state_set(), ast_channel_streamid_set(), ast_channel_tech_set(), ast_channel_timer(), ast_channel_timer_set(), ast_channel_timingfd(), ast_channel_timingfd_set(), ast_channel_unlock, ast_channel_unref, ast_channel_varshead(), ast_channel_vstreamid_set(), AST_CONTROL_UNHOLD, ast_debug, ast_defaultlanguage, ast_endpoint_add_channel(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_none, ast_get_channel_tech(), AST_LIST_HEAD_INIT_NOLOCK, ast_log, ast_party_caller_init(), ast_party_connected_line_init(), ast_party_dialed_init(), ast_party_redirecting_init(), ast_pbx_hangup_handler_init(), ast_sched_context_create(), ast_shutting_down(), ast_strdup, ast_strdupa, ast_stream_topology_alloc(), ast_strlen_zero(), ast_timer_fd(), ast_timer_get_name(), ast_timer_open(), AST_TIMING_FD, ast_tvnow(), chancount, channels, voicemailpwcheck::context, DEFAULT_AMA_FLAGS, does_id_conflict(), make_ari_stubs::file, global_fin, global_fout, ast_party_caller::id, LOG_WARNING, name, ast_party_id::name, NULL, null_tech, ast_party_id::number, OBJ_NOLOCK, S_OR, ast_party_name::str, ast_party_number::str, timer, tmp(), ast_party_name::valid, and ast_party_number::valid.
Referenced by __ast_channel_alloc(), and __ast_channel_alloc_with_initializers().
struct ast_channel * __ast_channel_alloc_with_initializers | ( | int | needqueue, |
int | state, | ||
const char * | cid_num, | ||
const char * | cid_name, | ||
const char * | acctcode, | ||
const char * | exten, | ||
const char * | context, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
enum ama_flags | amaflag, | ||
struct ast_endpoint * | endpoint, | ||
struct ast_channel_initializers * | initializers, | ||
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 973 of file channel.c.
References __ast_channel_alloc_ap(), voicemailpwcheck::context, ast_channel::exten, make_ari_stubs::file, and result.
struct ast_channel * __ast_dummy_channel_alloc | ( | const char * | file, |
int | line, | ||
const char * | function | ||
) |
Definition at line 994 of file channel.c.
References __ast_channel_internal_alloc(), ast_channel_datastores(), ast_channel_hold_state_set(), ast_channel_internal_alertpipe_clear(), ast_channel_internal_fd_clear_all(), ast_channel_internal_setup_topics(), ast_channel_timingfd_set(), ast_channel_varshead(), AST_CONTROL_UNHOLD, ast_dummy_channel_destructor(), AST_LIST_HEAD_INIT_NOLOCK, ast_pbx_hangup_handler_init(), make_ari_stubs::file, NULL, and tmp().
|
static |
Definition at line 1028 of file channel.c.
References ast_channel_alert_writable(), ast_channel_alert_write(), ast_channel_blocker(), ast_channel_flags(), ast_channel_internal_alert_read(), ast_channel_lock, ast_channel_name(), ast_channel_readq(), ast_channel_timer(), ast_channel_timingfd(), ast_channel_unlock, AST_CONTROL_END_OF_Q, AST_CONTROL_HANGUP, ast_debug, AST_FLAG_BLOCKING, AST_FRAME_CONTROL, AST_FRAME_NULL, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frdup, ast_frfree, AST_LIST_APPEND_LIST, AST_LIST_FIRST, AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_HEAD_NOLOCK, AST_LIST_INSERT_LIST_AFTER, AST_LIST_INSERT_TAIL, AST_LIST_LAST, AST_LIST_NEXT, AST_LIST_REMOVE, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, ast_test_flag, ast_timer_enable_continuous(), errno, ESS, frames, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, NULL, and ast_frame::subclass.
Referenced by __ast_read(), ast_queue_frame(), and ast_queue_frame_head().
|
static |
Definition at line 3544 of file channel.c.
References __ast_queue_frame(), ast_control_read_action_payload::action, ao2_ref, AST_ALERT_READ_FATAL, ast_audiohook_detach_list(), AST_AUDIOHOOK_DIRECTION_READ, ast_audiohook_write_list(), ast_audiohook_write_list_empty(), ast_channel_alert_write(), ast_channel_audiohooks(), ast_channel_audiohooks_set(), ast_channel_connected(), ast_channel_connected_line_sub(), ast_channel_dtmf_digit_to_emulate(), ast_channel_dtmf_digit_to_emulate_set(), ast_channel_dtmf_tv(), ast_channel_dtmf_tv_set(), ast_channel_dtmff(), ast_channel_emulate_dtmf_duration(), ast_channel_emulate_dtmf_duration_set(), ast_channel_fd_isset(), ast_channel_fdno(), ast_channel_fdno_set(), ast_channel_fin(), ast_channel_fin_set(), ast_channel_flags(), ast_channel_framehooks(), ast_channel_generator(), ast_channel_generatordata(), ast_channel_generatordata_set(), ast_channel_get_default_stream(), ast_channel_get_stream_topology(), ast_channel_hangupcause_set(), ast_channel_internal_alert_read(), ast_channel_is_bridged(), ast_channel_lock, ast_channel_music_state(), ast_channel_name(), ast_channel_rawreadformat(), ast_channel_readformat(), ast_channel_readq(), ast_channel_readtrans(), ast_channel_softhangup_internal_flag(), ast_channel_softhangup_internal_flag_add(), ast_channel_stream_topology_changed(), ast_channel_tech(), ast_channel_timer(), ast_channel_timingdata(), ast_channel_timingfd(), ast_channel_timingfunc(), ast_channel_unlock, ast_channel_writetrans(), ast_check_hangup(), ast_clear_flag, ast_connected_line_parse_data(), AST_CONTROL_ANSWER, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_END_OF_Q, AST_CONTROL_FLASH, AST_CONTROL_HANGUP, AST_CONTROL_READ_ACTION, AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, AST_CONTROL_WINK, ast_deactivate_generator(), ast_debug, AST_DEFAULT_EMULATE_DTMF_DURATION, AST_FLAG_DEFER_DTMF, AST_FLAG_EMULATE_DTMF, AST_FLAG_END_DTMF_ONLY, AST_FLAG_EXCEPTION, AST_FLAG_IN_DTMF, AST_FLAG_TIMINGDATA_IS_AO2_OBJ, AST_FLAG_ZOMBIE, ast_format_cache_is_slinear(), ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_type(), AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, ast_frame_dump(), AST_FRAME_NULL, AST_FRAME_READ_ACTION_CONNECTED_LINE_MACRO, AST_FRAME_READ_ACTION_SEND_TEXT, AST_FRAME_READ_ACTION_SEND_TEXT_DATA, AST_FRAME_RTCP, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_framehook_list_read_event(), AST_FRFLAG_REQUEUED, ast_frfree, AST_GENERATOR_FD, ast_indicate_data(), AST_JITTERBUFFER_FD, AST_LIST_EMPTY, AST_LIST_FIRST, AST_LIST_LAST, AST_LIST_NEXT, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, AST_MIN_DTMF_GAP, ast_null_frame, ast_party_connected_line_copy(), ast_party_connected_line_free(), ast_party_connected_line_init(), ast_queue_control(), ast_queue_frame(), ast_queue_frame_head(), ast_read_generator_actions(), ast_sendtext(), ast_sendtext_data(), ast_set_flag, ast_set_read_format_path(), ast_setstate(), AST_SOFTHANGUP_DEV, AST_STATE_UP, ast_stream_get_position(), ast_stream_topology_get_stream(), ast_test_flag, ast_timer_ack(), ast_timer_disable_continuous(), ast_timer_get_event(), ast_timer_set_rate(), AST_TIMING_EVENT_CONTINUOUS, AST_TIMING_EVENT_EXPIRED, AST_TIMING_FD, ast_translate(), ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), connected, ast_frame::data, DEBUGCHAN_FLAG, digit, ast_generator::digit, done, DTMF_RECEIVED, ast_channel_tech::exception, ast_frame_subclass::format, FRAMECOUNT_INC, ast_frame::frametype, ast_generator::generate, ast_frame_subclass::integer, ast_frame::len, LOG_DTMF, LOG_ERROR, LOG_WARNING, NULL, option_dtmfminduration, ast_control_read_action_payload::payload, ast_control_read_action_payload::payload_size, ast_frame::ptr, queue_dtmf_readq(), ast_channel_tech::read, ast_channel_tech::read_stream, send_dtmf_begin_event(), send_dtmf_end_event(), send_flash_event(), send_wink_event(), set_channel_answer_time(), should_skip_dtmf(), should_trigger_dtmf_emulating(), ast_frame::stream_num, ast_frame::subclass, tmp(), and ast_frame::uint32.
Referenced by ast_read(), ast_read_noaudio(), ast_read_stream(), and ast_read_stream_noaudio().
struct ast_channel * __ast_request_and_dial | ( | const char * | type, |
struct ast_format_cap * | cap, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | addr, | ||
int | timeout, | ||
int * | reason, | ||
const char * | cid_num, | ||
const char * | cid_name, | ||
struct outgoing_helper * | oh | ||
) |
Request a channel of a given type, with data as optional information used by the low level module and attempt to place a call on it.
type | type of channel to request |
cap | format capabilities for requested channel |
assignedids | Unique Id to assign to channel |
requestor | channel requesting data |
addr | destination of the call |
timeout | maximum amount of time to wait for an answer |
reason | why unsuccessful (if unsuccessful) |
cid_num | Caller-ID Number |
cid_name | Caller-ID Name (ascii) |
oh | Outgoing helper |
Definition at line 5995 of file channel.c.
References outgoing_helper::account, ast_call(), ast_call_forward(), AST_CAUSE_NO_ANSWER, ast_channel_call_forward(), ast_channel_connected(), ast_channel_context_set(), ast_channel_datastore_inherit(), ast_channel_exten_set(), ast_channel_flags(), ast_channel_hangupcause_hash_set(), ast_channel_hangupcause_set(), ast_channel_inherit_variables(), ast_channel_lock, ast_channel_lock_both, ast_channel_priority_set(), ast_channel_req_accountcodes(), AST_CHANNEL_REQUESTOR_BRIDGE_PEER, ast_channel_set_connected_line(), ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), 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_PVT_CAUSE_CODE, AST_CONTROL_REDIRECTING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_UNHOLD, AST_CONTROL_VIDUPDATE, AST_FLAG_ORIGINATED, AST_FRAME_CONTROL, ast_frfree, ast_hangup(), ast_log, ast_max_forwards_decrement(), 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(), outgoing_helper::cid_name, outgoing_helper::cid_num, outgoing_helper::connect_on_early_media, connected, outgoing_helper::context, ast_frame::data, ast_frame::datalen, outgoing_helper::exten, ast_frame::frametype, handle_cause(), ast_frame_subclass::integer, LOG_NOTICE, NULL, outgoing_helper::parent_channel, outgoing_helper::priority, ast_frame::ptr, ast_frame::subclass, type, and outgoing_helper::vars.
Referenced by announce_to_dial(), and ast_request_and_dial().
|
static |
|
static |
Definition at line 5072 of file channel.c.
References ast_calloc, ast_channel_datastore_remove(), ast_datastore_free(), ast_free, AST_FRIENDLY_OFFSET, ast_datastore::data, ast_frame::data, ast_frame::datalen, plc_ds::num_samples, ast_frame::offset, plc_fillin(), plc_rx(), plc_ds::plc_state, ast_frame::ptr, ast_frame::samples, and plc_ds::samples_buf.
Referenced by apply_plc().
|
static |
Definition at line 5125 of file channel.c.
References adjust_frame_for_plc(), ast_calloc, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_datastore_alloc, ast_datastore_free(), ast_datastore::data, NULL, and plc_ds_info.
Referenced by ast_write_stream().
int ast_activate_generator | ( | struct ast_channel * | chan, |
struct ast_generator * | gen, | ||
void * | params | ||
) |
Activate a given generator
Definition at line 2970 of file channel.c.
References ast_generator::alloc, ast_channel_generator(), ast_channel_generator_set(), ast_channel_generatordata(), ast_channel_generatordata_set(), ast_channel_lock, ast_channel_unlock, ast_prod(), ast_settimeout(), gen, generator_force(), ast_channel::generatordata, NULL, and ast_generator::release.
Referenced by app_exec(), ast_channel_start_silence_generator(), ast_linear_stream(), ast_playtones_start(), ast_tonepair_start(), channel_spy(), do_broadcast(), eivr_comm(), local_ast_moh_start(), old_milliwatt_exec(), and spandsp_fax_gateway_start().
int ast_active_channels | ( | void | ) |
returns number of active/allocated channels
Definition at line 499 of file channel.c.
References ao2_container_count(), and channels.
Referenced by action_corestatus(), ast_var_channels(), ast_var_channels_table(), dahdi_restart(), handle_chanlist(), handle_show_settings(), and really_quit().
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 2824 of file channel.c.
References __ast_answer(), ast_channel_name(), and SCOPE_TRACE.
Referenced by agent_login_exec(), agi_exec_full(), alarmreceiver_exec(), announce_request(), app_exec(),