Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
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(), ast_auto_answer(), ast_bridge_add_channel(), ast_do_pickup(), ast_pickup_call(), auth_exec(), background_detect_exec(), bridge_channel_handle_control(), bridge_parking_push(), bridgeadd_exec(), bridgewait_exec(), common_exec(), conf_exec(), conf_start_record(), confbridge_exec(), count_exec(), dial_exec_full(), dictate_exec(), directory_exec(), disa_exec(), eivr_comm(), handle_answer(), leave_voicemail(), local_call(), media_request_helper(), minivm_accmess_exec(), minivm_greet_exec(), minivm_record_exec(), old_milliwatt_exec(), park_app_exec(), parked_call_app_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(), vm_exec(), vm_execmain(), vm_playmsgexec(), waitfor_exec(), and zapateller_exec().
|
inline |
Answer a channel, if it's not already answered.
chan | channel to answer |
See ast_answer()
0 | on success |
non-zero | on failure |
Definition at line 2830 of file channel.c.
References ast_answer(), and AST_STATE_UP.
Referenced by record_file(), and senddtmf_exec().
int ast_call | ( | struct ast_channel * | chan, |
const char * | addr, | ||
int | timeout | ||
) |
Make a call.
chan | which channel to make the call on |
addr | destination of the call |
timeout | time to wait on for connect (Doesn't seem to be used.) |
Place a call, take no longer than timeout ms.
0 | on success |
-1 | on failure |
Definition at line 6480 of file channel.c.
References ast_channel_flags(), ast_channel_lock, ast_channel_tech(), ast_channel_unlock, ast_check_hangup(), AST_FLAG_OUTGOING, AST_FLAG_ZOMBIE, ast_set_flag, ast_test_flag, call(), and ast_channel_tech::call.
Referenced by __ast_request_and_dial(), app_control_dial(), ast_call_forward(), attended_transfer_bridge(), begin_dial_channel(), blind_transfer_bridge(), dial_exec_full(), do_forward(), feature_attended_transfer(), findmeexec(), park_local_transfer(), retransfer_enter(), ring_entry(), and wait_for_answer().
struct ast_channel * ast_call_forward | ( | struct ast_channel * | caller, |
struct ast_channel * | orig, | ||
int * | timeout, | ||
struct ast_format_cap * | cap, | ||
struct outgoing_helper * | oh, | ||
int * | outstate | ||
) |
Forwards a call to a new channel specified by the original channel's call_forward str. If possible, the new forwarded channel is created and returned while the original one is terminated.
caller | in channel that requested orig |
orig | channel being replaced by the call forward channel |
timeout | maximum amount of time to wait for setup of new forward channel |
cap | format capabilities for requested channel |
oh | outgoing helper used with original channel |
outstate | reason why unsuccessful (if unsuccessful) |
Definition at line 5917 of file channel.c.
References outgoing_helper::account, ast_call(), ast_channel_call_forward(), ast_channel_connected(), ast_channel_context(), ast_channel_lock, ast_channel_lock_both, AST_CHANNEL_NAME, ast_channel_name(), ast_channel_redirecting(), ast_channel_req_accountcodes(), AST_CHANNEL_REQUESTOR_REPLACEMENT, ast_channel_set_flag(), ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), ast_channel_unlock, ast_copy_string(), AST_FLAG_ORIGINATED, ast_hangup(), ast_log, ast_party_connected_line_copy(), ast_party_redirecting_copy(), ast_request(), ast_set_variables(), ast_strlen_zero(), call_forward_inherit(), ast_channel::caller, ast_channel::data, handle_cause(), LOG_NOTICE, NULL, outgoing_helper::parent_channel, pbx_builtin_getvar_helper(), pbx_builtin_setvar_helper(), S_OR, type, and outgoing_helper::vars.
Referenced by __ast_request_and_dial().
const char * ast_cause2str | ( | int | cause | ) |
Gives the string form of a given hangup cause.
Gives the string form of a given cause code.
Definition at line 612 of file channel.c.
References ARRAY_LEN, causes, and causes_map::desc.
Referenced by bridge_dissolve(), channel_destroyed_event(), channel_state_change(), dial_exec_full(), findmeexec(), hangupcause_read(), and rfc3326_add_reason_header().
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 6778 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.
const char * ast_channel_amaflags2string | ( | enum ama_flags | flags | ) |
Convert the enum representation of an AMA flag to a string representation.
flags | integer flag |
A | string representation of the flag |
Definition at line 4392 of file channel.c.
References AST_AMA_BILLING, AST_AMA_DOCUMENTATION, and AST_AMA_OMIT.
Referenced by ast_cdr_format_var(), beanstalk_put(), build_csv_record(), build_radius_record(), cdr_read_callback(), cel_bs_put(), handle_cli_ooh323_show_config(), handle_cli_ooh323_show_peer(), handle_cli_ooh323_show_user(), manager_log(), and tds_log().
struct ast_channel * ast_channel_bridge_peer | ( | struct ast_channel * | chan | ) |
Get the channel's bridge peer only if the bridge is two-party.
chan | Channel desiring the bridge peer channel. |
NULL | Channel not in a bridge or the bridge is not two-party. |
non-NULL | Reffed peer channel at time of calling. |
Definition at line 10586 of file channel.c.
References ao2_ref, ast_bridge_peer(), ast_channel_get_bridge(), ast_channel_lock, ast_channel_unlock, and NULL.
Referenced by analog_ss_thread(), ast_rtp_instance_set_stats_vars(), ast_set_hangupsource(), ast_unreal_queryoption(), ast_var_channels_table(), attach_barge(), channel_do_masquerade(), create_jb(), fax_detect_framehook(), fax_gateway_framehook(), func_channel_read(), handle_incoming_request(), manager_park(), my_get_sigpvt_bridged_channel(), and spandsp_fax_gateway_start().
|
static |
Definition at line 1325 of file channel.c.
References ast_channel_context(), ast_channel_exten(), ast_channel_lock, ast_channel_unlock, ast_log, ast_strlen_zero(), CMP_MATCH, CMP_STOP, voicemailpwcheck::context, ast_channel::data, ast_channel::exten, and LOG_ERROR.
Referenced by ast_channel_get_by_exten(), and ast_channel_iterator_by_exten_new().
|
static |
Definition at line 1303 of file channel.c.
References ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_log, ast_strlen_zero(), CMP_MATCH, CMP_STOP, ast_channel::data, LOG_ERROR, and name.
Referenced by ast_channel_get_by_name_prefix(), and ast_channel_iterator_by_name_new().
|
static |
Definition at line 1348 of file channel.c.
References ast_channel_lock, ast_channel_uniqueid(), ast_channel_unlock, ast_log, ast_strlen_zero(), CMP_MATCH, CMP_STOP, ast_channel::data, LOG_ERROR, and ast_channel::uniqueid.
Referenced by ast_channel_get_by_name_prefix(), and does_id_conflict().
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 1297 of file channel.c.
References ao2_callback_data, channels, and ast_channel::data.
Referenced by ast_channel_get_by_exten(), ast_channel_get_by_name_prefix(), ast_channel_iterator_by_exten_new(), ast_channel_iterator_by_name_new(), ast_pickup_find_by_group(), does_id_conflict(), find_by_channel(), find_by_part(), handle_core_set_debug_channel(), and pickup_by_mark().
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 10473 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, cc_channel_datastore_info, ast_datastore::data, and NULL.
Referenced by ast_channel_get_cc_config_params(), ast_unreal_call_setup(), ast_unreal_new_channels(), and dahdi_new().
void ast_channel_clear_flag | ( | struct ast_channel * | chan, |
unsigned int | flag | ||
) |
Clear a flag on a channel.
chan | The channel to clear the flag from |
flag | The flag to clear |
Definition at line 11056 of file channel.c.
References ast_channel_flags(), ast_channel_lock, ast_channel_unlock, and ast_clear_flag.
Referenced by action_redirect(), ast_bridge_setup_after_goto(), ast_channel_undefer_dtmf(), ast_waitfordigit_full(), bridge_channel_internal_pull(), channel_spy(), common_exec(), dial_exec_full(), disa_exec(), do_broadcast(), handle_exec(), and waitstream_core().
void ast_channel_clear_softhangup | ( | struct ast_channel * | chan, |
int | flag | ||
) |
Clear a set of softhangup flags from a channel.
Never clear a softhangup flag from a channel directly. Instead, use this function. This ensures that all aspects of the softhangup process are aborted.
chan | the channel to clear the flag on |
flag | the flag or flags to clear |
Definition at line 2451 of file channel.c.
References ast_channel_lock, ast_channel_readq(), ast_channel_softhangup_internal_flag(), ast_channel_softhangup_internal_flag_clear(), 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, and ast_frame::subclass.
Referenced by __ast_pbx_run(), ast_bridge_setup_after_goto(), chan_cleanup(), collect_digits(), gosub_run(), and stasis_app_exec().
|
static |
int ast_channel_cmpwhentohangup_tv | ( | struct ast_channel * | chan, |
struct timeval | offset | ||
) |
Compare a offset with when to hangup channel.
Compare a offset with the settings of when to hang a channel up.
Definition at line 523 of file channel.c.
References ast_channel_whentohangup(), ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
int ast_channel_connected_line_sub | ( | struct ast_channel * | autoservice_chan, |
struct ast_channel * | sub_chan, | ||
const void * | connected_info, | ||
int | frame | ||
) |
Run a connected line interception subroutine and update a channel's connected line information.
Whenever we want to update a channel's connected line information, we may need to run a subroutine so that an administrator can manipulate the information before sending it out. This function both runs the subroutine specified by CONNECTED_LINE_SEND_SUB and sends the update to the channel.
autoservice_chan | Channel to place into autoservice while the sub is running. It is perfectly safe for this to be NULL |
sub_chan | The channel to run the subroutine on. Also the channel from which we determine which subroutine we need to run. |
connected_info | Either an ast_party_connected_line or ast_frame pointer of type AST_CONTROL_CONNECTED_LINE |
frame | If true, then connected_info is an ast_frame pointer, otherwise it is an ast_party_connected_line pointer. |
0 | Success |
-1 | Either the subroutine does not exist, or there was an error while attempting to run the subroutine |
Definition at line 10360 of file channel.c.
References ast_app_run_sub(), ast_channel_connected(), 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(), channel_set_intercept_mode(), connected, ast_frame::data, ast_frame::datalen, NULL, pbx_builtin_getvar_helper(), ast_frame::ptr, retval, S_OR, and sub.
Referenced by __ast_read(), app_exec(), ast_do_pickup(), bridge_channel_handle_control(), dial_exec_full(), handle_frame(), update_connected_line_from_peer(), and wait_for_answer().
int ast_channel_datastore_add | ( | struct ast_channel * | chan, |
struct ast_datastore * | datastore | ||
) |
Add a datastore to a channel.
0 | success |
non-zero | failure |
Definition at line 2404 of file channel.c.
References ast_channel_datastores(), and AST_LIST_INSERT_HEAD.
Referenced by __after_bridge_set_goto(), acf_curlopt_write(), acf_iaxvar_write(), acf_odbc_read(), add_eprofile_to_channel(), add_features_datastore(), add_masquerade_store(), add_to_agi(), after_bridge_cb_setup(), apply_plc(), ast_cel_fabricate_channel_from_event(), ast_channel_cc_params_init(), ast_channel_suppress(), ast_do_pickup(), ast_iax2_new(), ast_jb_create_framehook(), ast_setup_cc_recall_datastore(), ast_stir_shaken_add_result_to_channel(), attach_framehook(), audiohook_volume_get(), authenticate_reply(), bridge_channel_impart_add(), bridge_features_ds_set_full(), calendar_query_exec(), cc_interfaces_datastore_init(), chan_cleanup(), channel_feature_hooks_set_full(), command_prestart_queue_command(), create_msg_q_chan(), create_parked_subscription_full(), create_transaction(), detect_write(), dial_exec_full(), dial_masquerade_datastore_add(), do_notify(), dtmfstore_exec(), dundi_query_read(), enable_jack_hook(), enum_query_read(), find_or_create_details(), frame_drop_helper(), frame_trace_helper(), func_channel_write_real(), func_confbridge_helper(), geoloc_profile_write(), get_feature_ds(), get_lock(), get_replace_channel_store(), gosub_exec(), handle_remb_set(), init_hook(), lua_get_state(), max_forwards_datastore_alloc(), msg_datastore_find_or_create(), pitchshift_helper(), raise_exception(), save_dialstring(), scramble_write(), set_hold_intercept(), set_internal_datastore(), set_talk_detect(), set_timeout(), setup_async_playback_datastore(), setup_bridge_roles_datastore(), setup_mixmonitor_ds(), setup_park_common_datastore(), shared_write(), smdi_msg_retrieve_read(), socket_process_helper(), speech_create(), speex_write(), srv_datastore_setup(), stasis_app_channel_set_stasis_end_published(), t38_attach_framehook(), unicast_rtp_request(), and volume_write().
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 2418 of file channel.c.
References ast_channel_datastores(), AST_LIST_TRAVERSE, sip_to_pjsip::info(), ast_datastore::info, NULL, and ast_datastore::uid.
Referenced by 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_masquerade_store(), add_to_agi(), after_bridge_cb_find(), after_bridge_cb_setup(), after_bridge_goto_remove(), apply_plc(), ast_bridge_features_ds_get(), ast_bridge_read_after_goto(), ast_can_pickup(), ast_cc_agent_set_interfaces_chanvar(), ast_cc_call_init(), ast_cc_completed(), ast_cc_extension_monitor_add_dialstring(), ast_cc_get_current_core_id(), ast_cc_is_recall(), ast_cc_offer(), ast_channel_feature_hooks_get(), ast_channel_get_cc_config_params(), ast_channel_suppress(), ast_channel_unsuppress(), ast_geoloc_datastore_find(), ast_handle_cc_control_frame(), ast_ignore_cc(), ast_jb_create_framehook(), ast_odbc_retrieve_transaction_obj(), ast_set_cc_interfaces_chanvar(), async_play_sound_ready(), attach_framehook(), audiohook_volume_callback(), audiohook_volume_get(), balance_stack(), bridge_channel_impart_add(), bridge_channel_impart_signal(), bridge_features_ds_set_full(), bridge_timeout(), calendar_event_read(), calendar_query_exec(), calendar_query_result_exec(), cc_build_payload(), chan_cleanup(), chan_rtp_get_rtp_peer(), channel_feature_hooks_set_full(), command_prestart_get_container(), command_prestart_queue_command(), conf_find_bridge_profile(), conf_find_user_profile(), conf_set_menu_to_user(), create_transaction(), detect_callback(), detect_read(), detect_write(), dial_exec_full(), dial_masquerade_datastore_find(), dialplan_handle_msg_cb(), disable_jack_hook(), dtmfstore_exec(), dundi_result_read(), enable_jack_hook(), enum_result_read(), exec_odbcfinish(), fetch_bridge_roles_datastore(), find_details(), find_speech(), find_transaction(), fixup_callback(), frame_drop_helper(), frame_trace_helper(), func_channel_read(), func_channel_write_real(), func_confbridge_helper(), func_mixmonitor_read(), get_agi_cmd(), get_feature_chan_ds(), get_feature_ds(), get_lock(), get_park_common_datastore_copy(), get_replace_channel_store(), gosub_exec(), gosub_run(), handle_gosub(), handle_remb_set(), has_masquerade_store(), hook_off(), hook_re_enable(), iax2_call(), jack_hook_callback(), local_read(), local_write(), lock_fixup(), lua_get_state(), mark_transaction_active(), max_forwards_datastore_find_or_alloc(), mixmonitor_ds_remove_and_free(), msg_data_func_read(), msg_datastore_find_or_create(), msg_func_read(), msg_send_exec(), mute_mixmonitor_instance(), pitchshift_cb(), pitchshift_helper(), pop_exec(), raise_exception(), remb_hook_event_cb(), remove_detect(), remove_dtmf_store(), remove_framehook(), remove_hold_intercept(), remove_masquerade_store(), remove_scrambler(), remove_stasis_end_published(), remove_talk_detect(), restore_dialstring(), return_exec(), scramble_callback(), scramble_write(), set_hold_intercept(), set_internal_datastore(), set_interval_hook(), set_security_requirements(), set_talk_detect(), setup_async_playback_datastore(), shared_read(), shared_write(), smdi_msg_read(), speech_datastore_destroy(), speex_callback(), speex_read(), speex_write(), srv_query_read(), srv_result_read(), stackpeek_read(), stasis_app_channel_is_internal(), stasis_app_channel_is_stasis_end_published(), stop_mixmonitor_full(), t38_attach_framehook(), talk_detect_audiohook_cb(), unlock_read(), volume_callback(), volume_read(), volume_write(), wait_for_initiator(), wipe_park_common_datastore(), and wipe_subscription_datastore().
int ast_channel_datastore_inherit | ( | struct ast_channel * | from, |
struct ast_channel * | to | ||
) |
Inherit datastores from a parent to a child.
Definition at line 2387 of file channel.c.
References ast_channel_datastores(), ast_datastore_alloc, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_datastore::data, DATASTORE_INHERIT_FOREVER, ast_datastore_info::duplicate, ast_datastore::info, ast_datastore::inheritance, NULL, and ast_datastore::uid.
Referenced by __ast_request_and_dial(), ast_ari_channels_dial(), ast_unreal_call_setup(), begin_dial_prerun(), call_forward_inherit(), common_recall_channel_setup(), copy_caller_data(), dial_exec_full(), do_forward(), findmeexec(), park_local_transfer(), 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 2413 of file channel.c.
References ast_channel_datastores(), and AST_LIST_REMOVE.
Referenced by acf_fetch(), acf_odbc_read(), adjust_frame_for_plc(), after_bridge_goto_remove(), ast_channel_unsuppress(), ast_do_pickup(), ast_jb_create_framehook(), bridge_timeout(), chan_cleanup(), dial_masquerade_fixup(), disable_jack_hook(), exec_odbcfinish(), fixup_callback(), frame_drop_helper(), frame_trace_helper(), func_confbridge_helper(), lua_get_state(), mixmonitor_ds_remove_and_free(), remove_detect(), remove_dial_masquerade(), remove_dial_masquerade_caller(), remove_dtmf_store(), remove_framehook(), remove_hold_intercept(), remove_masquerade_store(), remove_scrambler(), remove_stasis_end_published(), remove_talk_detect(), set_dial_masquerade(), speech_datastore_destroy(), speex_write(), srv_query_read(), stop_mixmonitor_full(), wipe_park_common_datastore(), and wipe_subscription_datastore().
int ast_channel_defer_dtmf | ( | struct ast_channel * | chan | ) |
Set defer DTMF flag on channel.
Defers DTMF so that you only read things like hangups and audio.
Definition at line 1276 of file channel.c.
References ast_channel_flags(), ast_channel_lock, ast_channel_unlock, AST_FLAG_DEFER_DTMF, ast_set_flag, and ast_test_flag.
Referenced by __adsi_transmit_messages().
|
static |
Free a channel structure.
Definition at line 2211 of file channel.c.
References ast_app_group_discard(), ast_assert, ast_atomic_fetchadd_int(), ast_cdr_free(), ast_channel_caller(), ast_channel_callid(), ast_channel_callid_cleanup(), ast_channel_cdr(), ast_channel_cdr_set(), ast_channel_connected(), ast_channel_connected_indicated(), ast_channel_datastores(), ast_channel_dialed(), ast_channel_flags(), ast_channel_internal_alertpipe_close(), ast_channel_internal_cleanup(), ast_channel_internal_is_finalized(), ast_channel_lock, ast_channel_music_state(), AST_CHANNEL_NAME, ast_channel_name(), ast_channel_named_callgroups_set(), ast_channel_named_pickupgroups_set(), ast_channel_nativeformats_set(), ast_channel_pbx(), ast_channel_publish_final_snapshot(), ast_channel_readq(), ast_channel_readtrans(), ast_channel_redirecting(), ast_channel_sched(), ast_channel_set_oldwriteformat(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_tech_pvt(), ast_channel_timer(), ast_channel_timer_set(), ast_channel_unlock, ast_channel_varshead(), ast_channel_writetrans(), ast_channel_zone(), ast_channel_zone_set(), ast_copy_string(), ast_datastore_free(), ast_debug, AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, ast_devstate_changed_literal(), AST_DEVSTATE_NOT_CACHABLE, AST_FLAG_DEAD, AST_FLAG_DISABLE_DEVSTATE_CACHE, AST_FLAG_SNAPSHOT_STAGE, ast_free, ast_frfree, ast_jb_destroy(), AST_LIST_REMOVE_HEAD, ast_log_callid(), ast_moh_cleanup(), ast_party_caller_free(), ast_party_connected_line_free(), ast_party_dialed_free(), ast_party_redirecting_free(), ast_pbx_hangup_handler_destroy(), ast_sched_context_destroy(), ast_set_flag, ast_test_flag, ast_timer_close(), ast_tone_zone_unref(), ast_translator_free_path(), ast_var_delete(), chancount, LOG_WARNING, and NULL.
Referenced by __ast_channel_alloc_ap().
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 7434 of file channel.c.
References ast_channel_tech(), and ast_channel_tech::early_bridge.
Referenced by dial_exec_full(), and wait_for_answer().
void ast_channel_end_dtmf | ( | struct ast_channel * | chan, |
char | digit, | ||
struct timeval | start, | ||
const char * | why | ||
) |
Simulate a DTMF end on a broken bridge channel.
chan | Channel sending DTMF that has not ended. |
digit | DTMF digit to stop. |
start | DTMF digit start time. |
why | Reason bridge broken. |
Definition at line 10891 of file channel.c.
References ast_channel_flags(), ast_channel_lock, ast_channel_name(), ast_channel_softhangup_internal_flag(), ast_channel_unlock, AST_FLAG_ZOMBIE, ast_log, ast_senddigit_end(), ast_test_flag, ast_tvdiff_ms(), ast_tvnow(), digit, LOG_DTMF, and option_dtmfminduration.
Referenced by bridge_channel_internal_join(), and channel_do_masquerade().
enum ast_channel_error ast_channel_errno | ( | void | ) |
Get error code for latest channel operation.
Definition at line 10983 of file channel.c.
References ast_channel_internal_errno().
Referenced by ari_channels_handle_originate_with_id(), and ast_ari_channels_create().
int ast_channel_feature_hooks_append | ( | struct ast_channel * | chan, |
struct ast_bridge_features * | features | ||
) |
Appends to the channel-attached features a channel has access to upon being bridged.
chan | Which channel to set features for |
features | The feature set to append to the channel's features |
0 | on success |
-1 | on failure |
Definition at line 10973 of file channel.c.
References channel_feature_hooks_set_full().
Referenced by AST_TEST_DEFINE().
struct ast_bridge_features * ast_channel_feature_hooks_get | ( | struct ast_channel * | chan | ) |
Gets the channel-attached features a channel has access to upon being bridged.
chan | Which channel to get features for |
non-NULL | The features currently set for this channel |
NULL | if the features have not been set |
Definition at line 10925 of file channel.c.
References ast_channel_datastore_find(), bridge_features_info, ast_datastore::data, and NULL.
Referenced by bridge_channel_internal_join().
int ast_channel_feature_hooks_replace | ( | struct ast_channel * | chan, |
struct ast_bridge_features * | features | ||
) |
Sets the channel-attached features a channel has access to upon being bridged.
chan | Which channel to set features for |
features | The feature set with which to replace the channel's features |
0 | on success |
-1 | on failure |
Definition at line 10978 of file channel.c.
References channel_feature_hooks_set_full().
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().
The returned variable list is an AO2 object, so ao2_cleanup() to free it.
chan | Channel to get variables for. |
NULL | on error |
Definition at line 8010 of file channel.c.
References ari_vars, and channel_get_external_vars().
Referenced by ast_channel_snapshot_create().
struct ast_bridge * ast_channel_get_bridge | ( | const struct ast_channel * | chan | ) |
Get the bridge associated with a channel.
chan | The channel whose bridge we want |
The bridge returned has its reference count incremented. Use ao2_cleanup() or ao2_ref() in order to decrement the reference count when you are finished with the bridge.
NULL | No bridge present on the channel |
non-NULL | The bridge the channel is in |
Definition at line 10556 of file channel.c.
References ao2_ref, and ast_channel_internal_bridge().
Referenced by ast_bridge_add_channel(), ast_bridge_transfer_acquire_bridge(), ast_channel_bridge_peer(), bridgeadd_exec(), channel_snapshot_bridge_create(), generate_status(), get_transfer_parties(), handle_showchan(), manager_bridge_kick(), native_rtp_framehook(), and serialize_showchan().
struct ast_bridge_channel * ast_channel_get_bridge_channel | ( | struct ast_channel * | chan | ) |
Get a reference to the channel's bridge pointer.
chan | The channel whose bridge channel is desired |
NULL | The channel has no bridge_channel |
non-NULL | A reference to the bridge_channel |
Definition at line 10604 of file channel.c.
References ao2_ref, ast_channel_internal_bridge_channel(), and ast_bridge_channel::chan.
Referenced by __analog_ss_thread(), agent_bridge_channel_get_lock(), analog_ss_thread(), ast_bridge_add_channel(), ast_bridge_notify_masquerade(), ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), bridge_channel_internal_queue_attended_transfer(), bridge_channel_internal_queue_blind_transfer(), bridge_move(), dial_bridge_after_cb(), hold(), internal_bridge_after_cb(), manager_park_bridged(), parker_parked_call_message_response(), play_sound(), recall_pull(), ringing(), send_message(), set_interval_hook(), transfer_pull(), try_parking(), and unhold().
struct ast_channel * ast_channel_get_by_exten | ( | const char * | exten, |
const char * | context | ||
) |
Find a channel by extension and context.
exten | the extension to search for |
context | the context to search for |
Return a channel that is currently at the specified extension and context.
a | channel that is at the specified extension and context |
NULL | if no channel was found |
Definition at line 1478 of file channel.c.
References ast_channel_by_exten_cb(), ast_channel_callback(), voicemailpwcheck::context, and ast_channel::exten.
struct ast_channel * ast_channel_get_by_name | ( | const char * | name | ) |
Find a channel by name.
Channel search functions
name | the name or uniqueid of the channel to search for |
Find a channel that has the same name as the provided argument.
a | channel with the name specified by the argument |
NULL | if no channel was found |
Definition at line 1473 of file channel.c.
References ast_channel_get_by_name_prefix(), and name.
Referenced by action_add_agi_cmd(), action_aocmessage(), action_atxfer(), action_blind_transfer(), action_cancel_atxfer(), action_getvar(), action_redirect(), action_sendtext(), action_setvar(), action_status(), action_timeout(), ari_channels_handle_originate_with_id(), ari_channels_handle_snoop_channel(), assign_uuid(), ast_ari_channels_create(), ast_ari_channels_dial(), ast_ari_channels_get_channel_var(), ast_ari_channels_hangup(), ast_ari_channels_rtpstatistics(), ast_async_goto_by_name(), ast_manager_hangup_helper(), asyncgoto_exec(), bridge_channel_attended_transfer(), call_forwarded_handler(), channel_find(), cli_channelstats_print_body(), common_exec(), controlplayback_manager(), do_broadcast(), find_control(), func_chan_exists_read(), func_export_write(), func_mchan_read(), func_mchan_write(), handle_cli_agi_add_cmd(), handle_core_set_debug_channel(), handle_dump_frames(), handle_getvariablefull(), handle_hangup(), handle_redirect(), handle_remb_set(), handle_set_chanvar(), handle_show_chanvar(), handle_show_hangup_channel(), handle_showchan(), handle_softhangup(), import_helper(), inherit_channel_vars_from_id(), manager_bridge_kick(), manager_mixmonitor(), manager_mute_mixmonitor(), manager_mutestream(), manager_optimize_away(), manager_park(), manager_play_dtmf(), manager_play_mf(), manager_send_flash(), manager_stop_mixmonitor(), moh_channel_thread(), parker_parked_call_message_response(), parking_park_bridge_channel(), push_notify_channel(), refer_progress_bridge(), rtp_check_timeout(), senddtmf_exec(), sendmf_exec(), sendsf_exec(), shared_read(), shared_write(), stasis_app_bridge_moh_channel(), stasis_app_bridge_moh_stop(), and stasis_app_bridge_playback_channel_find().
struct ast_channel * ast_channel_get_by_name_prefix | ( | const char * | name, |
size_t | name_len | ||
) |
Find a channel by a name prefix.
name | The channel name or uniqueid prefix to search for |
name_len | Only search for up to this many characters from the name |
Find a channel that has the same name prefix as specified by the arguments.
a | channel with the name prefix specified by the arguments |
NULL | if no channel was found |
Definition at line 1453 of file channel.c.
References ast_channel_by_name_cb(), ast_channel_by_uniqueid_cb(), ast_channel_callback(), ast_strlen_zero(), name, NULL, and OBJ_KEY.
Referenced by action_aocmessage(), action_bridge(), ast_channel_get_by_name(), ast_parse_device_state(), bridge_exec(), bridgeadd_exec(), cc_generic_agent_stop_ringing(), common_exec(), handle_bridge_kick_channel(), 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 10535 of file channel.c.
References agent_type, ast_channel_name(), ast_channel_queryoption(), ast_copy_string(), AST_OPTION_CC_AGENT_TYPE, and len().
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 10496 of file channel.c.
References ast_assert, ast_channel_cc_params_init(), ast_channel_datastore_find(), cc_channel_datastore_info, ast_datastore::data, and NULL.
Referenced by acf_cc_read(), acf_cc_write(), analog_call(), ast_cc_call_failed(), ast_cc_call_init(), ast_queue_cc_frame(), ast_unreal_call_setup(), ast_unreal_new_channels(), cc_agent_init(), cc_core_init_instance(), and find_agent_callbacks().
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 10518 of file channel.c.
References ast_channel_name(), ast_channel_queryoption(), ast_copy_string(), AST_OPTION_DEVICE_NAME, and len().
Referenced by ast_cc_call_failed(), ast_cc_is_recall(), ast_queue_cc_frame(), cc_core_init_instance(), cccancel_exec(), ccreq_exec(), chan_pjsip_indicate(), dial_exec_full(), and func_channel_read().
int ast_channel_get_duration | ( | struct ast_channel * | chan | ) |
Obtain how long the channel since the channel was created.
chan | The channel object |
0 | if the time value cannot be computed (or you called this really fast) |
The | number of seconds the channel has been up |
Definition at line 2849 of file channel.c.
References ast_channel_get_duration_ms().
Referenced by end_bridge_callback(), and serialize_showchan().
int64_t ast_channel_get_duration_ms | ( | struct ast_channel * | chan | ) |
Obtain how long it's been, in milliseconds, since the channel was created.
chan | The channel object |
0 | if the time value cannot be computed (or you called this really fast) |
The | number of milliseconds since channel creation |
Definition at line 2839 of file channel.c.
References ast_assert, ast_channel_creationtime(), ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), and NULL.
Referenced by ast_channel_get_duration(), and end_bridge_callback().
int ast_channel_get_intercept_mode | ( | void | ) |
Am I currently running an intercept dialplan routine.
A dialplan intercept routine is equivalent to an interrupt routine. As such, the routine must be done quickly and you do not have access to the media stream. These restrictions are necessary because the media stream is the responsibility of some other code and interfering with or delaying that processing is bad.
0 | Not in an intercept routine. |
1 | In an intercept routine. |
Definition at line 10355 of file channel.c.
References ast_threadstorage_get_ptr().
Referenced by run_agi().
struct varshead * ast_channel_get_manager_vars | ( | struct ast_channel * | chan | ) |
Gets the variables for a given channel, as specified by ast_channel_set_manager_vars().
The returned variable list is an AO2 object, so ao2_cleanup() to free it.
chan | Channel to get variables for. |
NULL | on error |
Definition at line 8005 of file channel.c.
References ami_vars, and channel_get_external_vars().
Referenced by append_channel_vars(), and ast_channel_snapshot_create().
int ast_channel_get_up_time | ( | struct ast_channel * | chan | ) |
Obtain how long it has been since the channel was answered.
chan | The channel object |
0 | if the channel isn't answered (or you called this really fast) |
The | number of seconds the channel has been up |
Definition at line 2864 of file channel.c.
References ast_channel_get_up_time_ms().
Referenced by action_confbridgelist_item(), chan_pjsip_read_stream(), dahdi_read(), and end_bridge_callback().
int64_t ast_channel_get_up_time_ms | ( | struct ast_channel * | chan | ) |
Obtain how long it has been since the channel was answered in ms.
chan | The channel object |
0 | if the channel isn't answered (or you called this really fast) |
The | number of milliseconds the channel has been up |
Definition at line 2854 of file channel.c.
References ast_assert, ast_channel_answertime(), ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), and NULL.
Referenced by ast_channel_get_up_time(), and end_bridge_callback().
struct varshead * ast_channel_get_vars | ( | struct ast_channel * | chan | ) |
Gets the variables for a given channel, as set using pbx_builtin_setvar_helper().
The returned variable list is an AO2 object, so ao2_cleanup() to free it.
chan | Channel to get variables for |
NULL | on error |
Definition at line 7933 of file channel.c.
References ao2_alloc, ao2_cleanup, ao2_ref, ast_channel_varshead(), AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_var_assign, ast_var_name(), ast_var_value(), ast_var_t::entries, NULL, RAII_VAR, var, and varshead_dtor().
void ast_channel_hangupcause_hash_set | ( | struct ast_channel * | chan, |
const struct ast_control_pvt_cause_code * | cause_code, | ||
int | datalen | ||
) |
Sets the HANGUPCAUSE hash and optionally the SIP_CAUSE hash on the given channel.
chan | channel on which to set the cause information |
cause_code | ast_control_pvt_cause_code structure containing cause information |
datalen | total length of the structure since it may vary |
Definition at line 4365 of file channel.c.
References ast_channel_dialed_causes_add(), ast_channel_name(), ast_func_write(), ast_log, ast_control_pvt_cause_code::chan_name, ast_control_pvt_cause_code::code, ast_frame::datalen, ast_control_pvt_cause_code::emulate_sip_cause, and LOG_WARNING.
Referenced by __analog_handle_event(), __ast_request_and_dial(), chan_pjsip_incoming_response_update_cause(), indicate_data_internal(), jingle_action_session_terminate(), and socket_process_helper().
int ast_channel_has_ari_vars | ( | void | ) |
Return whether or not any ARI variables have been set.
0 | if no ARI variables are expected |
1 | if ARI variables are expected |
Definition at line 7882 of file channel.c.
References ari_vars, and channel_has_external_vars().
int ast_channel_has_audio_frame_or_monitor | ( | struct ast_channel * | chan | ) |
Check if the channel has active audiohooks, active framehooks, or a monitor.
chan | The channel to check. |
non-zero | if channel has active audiohooks, framehooks, or monitor. |
Definition at line 2537 of file channel.c.
References ast_audiohook_write_list_empty(), ast_channel_audiohooks(), ast_channel_framehooks(), and ast_framehook_list_contains_no_active().
Referenced by native_bridge_is_capable(), optimize_lock_chan_stack(), and optimize_lock_peer_stack().
int ast_channel_has_hook_requiring_audio | ( | struct ast_channel * | chan | ) |
Check if the channel has any active hooks that require audio.
chan | The channel to check. |
non-zero | if channel has active audiohooks, audio framehooks, or monitor. |
Definition at line 2543 of file channel.c.
References ast_audiohook_write_list_empty(), ast_channel_audiohooks(), ast_channel_framehooks(), AST_FRAME_VOICE, and ast_framehook_list_contains_no_active_of_type().
Referenced by native_rtp_bridge_capable().
int ast_channel_has_manager_vars | ( | void | ) |
Return whether or not any manager variables have been set.
0 | if no manager variables are expected |
1 | if manager variables are expected |
Definition at line 7877 of file channel.c.
References ami_vars, and channel_has_external_vars().
Referenced by ast_channel_publish_varset().
|
static |
Definition at line 7810 of file channel.c.
References ast_channel_name(), ast_str_case_hash(), ast_strlen_zero(), ast_channel::flags, name, and OBJ_KEY.
Referenced by ast_channels_init().
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 6790 of file channel.c.
References ast_channel_name(), ast_channel_publish_varset(), ast_channel_varshead(), ast_debug, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_var_assign, ast_var_full_name(), ast_var_value(), current, and ast_var_t::entries.
Referenced by __ast_request_and_dial(), ast_ari_channels_dial(), begin_dial_prerun(), call_forward_inherit(), common_recall_channel_setup(), copy_caller_data(), dial_exec_full(), do_forward(), findmeexec(), park_local_transfer(), ring_entry(), and wait_for_answer().
int ast_channel_is_bridged | ( | const struct ast_channel * | chan | ) |
Determine if a channel is in a bridge.
chan | The channel to test |
0 | The channel is not bridged |
non-zero | The channel is bridged |
Definition at line 10567 of file channel.c.
References ast_channel_internal_bridge(), and NULL.
Referenced by __ast_read(), action_redirect(), app_control_dial(), ast_async_goto(), ast_audiohook_attach(), ast_audiohook_remove(), ast_framehook_attach(), ast_framehook_detach(), ast_framehook_list_fixup(), ast_var_channel_bridge(), attach_barge(), audio_audiohook_write_list(), chan_pjsip_read_stream(), chan_pjsip_set_rtp_peer(), common_exec(), dtmf_audiohook_write_list(), mixmonitor_autochan_is_bridged(), set_caps(), set_timeout(), wait_for_bridged(), and wait_for_unbridged().
int ast_channel_is_leaving_bridge | ( | struct ast_channel * | chan | ) |
Determine if a channel is leaving a bridge, but not hung up.
chan | The channel to test |
0 | The channel is not leaving the bridge or is hung up |
non-zero | The channel is leaving the bridge |
Definition at line 10572 of file channel.c.
References ast_channel_softhangup_internal_flag(), ast_channel_unbridged(), and AST_SOFTHANGUP_ASYNCGOTO.
Referenced by ast_indicate_data(), and bridge_channel_internal_pull().
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 1427 of file channel.c.
References ast_channel_iterator::active_iterator, ao2_iterator_init(), ast_calloc, channels, NULL, and ast_channel_iterator::simple_iterator.
Referenced by action_status(), ast_manager_hangup_helper(), ast_var_channel_bridge(), ast_var_channel_types_table(), ast_var_channels_table(), common_exec(), func_channels_read(), handle_show_hangup_all(), 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.
exten | The extension that channels must be in |
context | The context that channels must be in |
After creating an iterator using this function, the ast_channel_iterator_next() function can be used to iterate through all channels that are currently in the specified context and extension.
NULL | on failure |
a | new channel iterator based on the specified parameters |
Definition at line 1387 of file channel.c.
References ast_channel_iterator::active_iterator, ast_calloc, ast_channel_by_exten_cb(), ast_channel_callback(), ast_free, voicemailpwcheck::context, NULL, and OBJ_MULTIPLE.
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.
name | channel name or channel uniqueid to match |
name_len | number of characters in the channel name to match on. This would be used to match based on name prefix. If matching on the full channel name is desired, then this parameter should be 0. |
After creating an iterator using this function, the ast_channel_iterator_next() function can be used to iterate through all channels that exist that have the specified name or name prefix.
NULL | on failure |
a | new channel iterator based on the specified parameters |
Definition at line 1407 of file channel.c.
References ast_channel_iterator::active_iterator, ast_calloc, ast_channel_by_name_cb(), ast_channel_callback(), ast_free, name, NULL, OBJ_KEY, and OBJ_MULTIPLE.
Referenced by common_exec(), get_device_state_causing_channels(), and softhangup_exec().
struct ast_channel_iterator * ast_channel_iterator_destroy | ( | struct ast_channel_iterator * | i | ) |
Destroy a channel iterator.
i | the itereator to destroy |
This function is used to destroy a channel iterator that was retrieved by using one of the channel_iterator_xxx_new() functions.
NULL | for convenience to clear out the pointer to the iterator that was just destroyed. |
Definition at line 1379 of file channel.c.
References ast_channel_iterator::active_iterator, ao2_iterator_destroy(), ast_free, and NULL.
Referenced by action_status(), ast_manager_hangup_helper(), ast_var_channel_bridge(), ast_var_channel_types_table(), ast_var_channels_table(), common_exec(), func_channels_read(), get_device_state_causing_channels(), handle_show_hangup_all(), 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.
i | the channel iterator that was created using one of the channel_iterator_xxx_new() functions. |
This function should be used to iterate through all channels that match a specified set of parameters that were provided when the iterator was created.
the | next channel that matches the parameters used when the iterator was created. |
NULL | if no more channels match the iterator parameters. |
Definition at line 1441 of file channel.c.
References ast_channel_iterator::active_iterator, and ao2_iterator_next.
Referenced by action_status(), ast_manager_hangup_helper(), ast_var_channel_bridge(), ast_var_channel_types_table(), ast_var_channels_table(), func_channels_read(), get_device_state_causing_channels(), handle_show_hangup_all(), handle_softhangup(), next_channel(), pickup_by_exten(), and softhangup_exec().
int ast_channel_make_compatible | ( | struct ast_channel * | chan, |
struct ast_channel * | peer | ||
) |
Make the frame formats of two channels compatible.
chan | First channel to make compatible. Should be the calling party. |
peer | Other channel to make compatible. Should be the called party. |
Set two channels to compatible frame formats in both directions. The path from peer to chan is made compatible first to allow for in-band audio in case the other direction cannot be made compatible.
0 | on success. |
-1 | on error. |
Definition at line 6739 of file channel.c.
References ast_channel_make_compatible_helper().
Referenced by app_exec(), dial_exec_full(), do_forward(), fax_detect_framehook(), fax_gateway_framehook(), native_bridge_join(), simple_bridge_join(), try_calling(), and wait_for_answer().
|
static |
Set up translation from one channel to another.
Definition at line 6660 of file channel.c.
References ao2_cleanup, ao2_replace, ast_channel_lock_both, ast_channel_name(), ast_channel_nativeformats(), ast_channel_unlock, ast_format_cache_get_slin_by_rate(), ast_format_cache_is_slinear(), ast_format_cap_has_type(), ast_format_cmp(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), ast_format_get_sample_rate(), ast_log, AST_MEDIA_TYPE_AUDIO, ast_opt_generic_plc, ast_opt_generic_plc_on_equal_codecs, ast_opt_transcode_via_slin, ast_set_read_format(), ast_set_write_format(), ast_translate_path_steps(), ast_translator_best_choice(), LOG_WARNING, NULL, and RAII_VAR.
Referenced by ast_channel_make_compatible().
int ast_channel_move | ( | struct ast_channel * | dest, |
struct ast_channel * | source | ||
) |
Move a channel from its current location to a new location.
The intention of this function is to have the destination channel take on the identity of the source channel.
dest | The place to move the source channel |
source | The channel to move |
0 | Success |
non-zero | Failure |
Definition at line 10688 of file channel.c.
References ast_channel_flags(), ast_channel_lock_both, ast_channel_masq_set(), ast_channel_masqr_set(), ast_channel_masquerade_type(), ast_channel_name(), ast_channel_publish_blob(), ast_channel_uniqueid(), ast_channel_unlock, AST_FLAG_ZOMBIE, ast_json_pack(), ast_json_unref(), ast_log, ast_test_flag, channel_do_masquerade(), channel_move_lock, lock, LOG_WARNING, NULL, RAII_VAR, and SCOPED_MUTEX.
Referenced by after_bridge_move_channel(), ast_channel_yank(), ast_do_pickup(), local_call(), and refer_incoming_invite_request().
void ast_channel_name_to_dial_string | ( | char * | channel_name | ) |
Removes the trailing identifiers from a channel name string.
channel_name | string that you wish to turn into a dial string. This string will be edited in place. |
Definition at line 6858 of file channel.c.
Referenced by parked_user_set_parker_dial_string(), and setup_park_common_datastore().
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 7464 of file channel.c.
References ast_channel_lock, ast_channel_tech(), ast_channel_unlock, ast_log, ast_datastore::data, errno, LOG_ERROR, and ast_channel_tech::queryoption.
Referenced by ast_channel_get_cc_agent_type(), ast_channel_get_device_name(), ast_channel_get_t38_state(), ast_unreal_queryoption(), and func_channel_read().
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 9128 of file channel.c.
References ast_connected_line_build_data(), AST_CONTROL_CONNECTED_LINE, ast_queue_control_data(), connected, and update().
Referenced by after_bridge_move_channel(), ast_do_pickup(), onAlerting(), onCallEstablished(), onProgress(), queue_connected_line_update(), and update_initial_connected_line().
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 10319 of file channel.c.
References AST_CONTROL_REDIRECTING, ast_queue_control_data(), ast_redirecting_build_data(), and update().
Referenced by set_redirecting().
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 5845 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_sub | ( | struct ast_channel * | autoservice_chan, |
struct ast_channel * | sub_chan, | ||
const void * | redirecting_info, | ||
int | is_frame | ||
) |
Run a redirecting interception subroutine and update a channel's redirecting information.
Whenever we want to update a channel's redirecting information, we may need to run a subroutine so that an administrator can manipulate the information before sending it out. This function both runs the subroutine specified by REDIRECTING_SEND_SUB and sends the update to the channel.
autoservice_chan | Channel to place into autoservice while the subroutine is running. It is perfectly safe for this to be NULL |
sub_chan | The channel to run the subroutine on. Also the channel from which we determine which subroutine we need to run. |
redirecting_info | Either an ast_party_redirecting or ast_frame pointer of type AST_CONTROL_REDIRECTING |
is_frame | If true, then redirecting_info is an ast_frame pointer, otherwise it is an ast_party_redirecting pointer. |
0 | Success |
-1 | Either the subroutine does not exist, or there was an error while attempting to run the subroutine |
Definition at line 10405 of file channel.c.
References ast_app_run_sub(), ast_channel_lock, ast_channel_redirecting(), 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(), channel_set_intercept_mode(), ast_frame::data, ast_frame::datalen, NULL, pbx_builtin_getvar_helper(), ast_frame::ptr, retval, S_OR, and sub.
Referenced by bridge_channel_handle_control(), call_forward_inherit(), do_forward(), handle_frame(), and wait_for_answer().
int ast_channel_register | ( | const struct ast_channel_tech * | tech | ) |
Register a new telephony channel in Asterisk.
Register a channel technology (a new channel driver) Called by a channel module to register the kind of channels it supports.
Definition at line 539 of file channel.c.
References ast_calloc, ast_debug, ast_log, AST_RWLIST_INSERT_HEAD, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, chanlist::chan, ast_channel_tech::description, chanlist::list, LOG_WARNING, chanlist::tech, ast_channel::tech, and ast_channel_tech::type.
Referenced by ast_channels_init(), ast_local_init(), load_module(), and register_channel_tech().
struct ast_channel * ast_channel_release | ( | struct ast_channel * | chan | ) |
Unlink and release reference to a channel.
This function will unlink the channel from the global channels container if it is still there and also release the current reference to the channel.
NULL | convenient for clearing invalid pointers |
Definition at line 1603 of file channel.c.
References ao2_unlink, ast_channel_unref, and channels.
Referenced by ast_iax2_new(), ast_unreal_new_channels(), destroy_msg_q_chan(), do_notify(), rec_request(), and safe_channel_release().
void ast_channel_req_accountcodes | ( | struct ast_channel * | chan, |
const struct ast_channel * | requestor, | ||
enum ast_channel_requestor_relationship | relationship | ||
) |
Setup new channel accountcodes from the requestor channel after ast_request().
chan | New channel to get accountcodes setup. |
requestor | Requesting channel to get accountcodes from. |
relationship | What the new channel was created for. |
Definition at line 6453 of file channel.c.
References channel_req_accountcodes().
Referenced by __ast_request_and_dial(), ast_ari_channels_dial(), ast_call_forward(), attended_transfer_bridge(), begin_dial_prerun(), blind_transfer_bridge(), common_recall_channel_setup(), dial_exec_full(), dial_transfer(), do_forward(), findmeexec(), park_local_transfer(), and wait_for_answer().
void ast_channel_req_accountcodes_precious | ( | struct ast_channel * | chan, |
const struct ast_channel * | requestor, | ||
enum ast_channel_requestor_relationship | relationship | ||
) |
Setup new channel accountcodes from the requestor channel after ast_request().
chan | New channel to get accountcodes setup. |
requestor | Requesting channel to get accountcodes from. |
relationship | What the new channel was created for. |
Definition at line 6458 of file channel.c.
References channel_req_accountcodes().
Referenced by ring_entry().
int ast_channel_request_stream_topology_change | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology, | ||
void * | change_source | ||
) |
Request that the stream topology of a channel change.
chan | The channel to change |
topology | The new stream topology |
change_source | The source that initiated the change |
0 | request has been accepted to be attempted |
-1 | request could not be attempted |
Definition at line 10988 of file channel.c.
References ast_assert, ast_channel_get_stream_topology(), ast_channel_internal_set_stream_topology_change_source(), ast_channel_is_multistream(), ast_channel_lock, ast_channel_name(), ast_channel_tech(), ast_channel_unlock, AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, ast_debug, ast_str_tmp, ast_stream_topology_equal(), ast_stream_topology_to_str(), indicate(), ast_channel_tech::indicate, and NULL.
Referenced by AST_TEST_DEFINE(), native_rtp_bridge_join(), native_rtp_stream_topology_changed(), sfu_topologies_on_join(), sfu_topologies_on_leave(), sfu_topologies_on_source_change(), simple_bridge_join(), simple_bridge_stream_topology_changed(), softmix_bridge_stream_sources_update(), and stream_echo_perform().
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 6647 of file channel.c.
References ast_channel_tech(), and ast_channel_tech::send_html.
Referenced by 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 6654 of file channel.c.
References ast_channel_sendhtml(), AST_HTML_URL, and url.
Referenced by dial_exec_full(), and try_calling().
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.
varc | Number of variable names. |
vars | Array of variable names. |
Definition at line 7914 of file channel.c.
References ari_vars, and channel_set_external_vars().
Referenced by channelvars_handler().
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 7381 of file channel.c.
References ast_channel_caller(), ast_channel_lock, AST_CHANNEL_SNAPSHOT_INVALIDATE_CALLER, ast_channel_snapshot_invalidate_segment(), ast_channel_unlock, ast_party_caller_set(), and update().
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 7394 of file channel.c.
References ast_channel_caller(), ast_channel_lock, ast_channel_publish_snapshot(), AST_CHANNEL_SNAPSHOT_INVALIDATE_CALLER, ast_channel_snapshot_invalidate_segment(), ast_channel_unlock, ast_party_caller_set(), and update().
Referenced by callerid_write(), dial_exec_full(), do_forward(), queue_connected_line_update(), and ring_entry().
void ast_channel_set_connected_line | ( | struct ast_channel * | chan, |
const struct ast_party_connected_line * | connected, | ||
const struct ast_set_party_connected_line * | update | ||
) |
Set the connected line information in the Asterisk channel.
chan | Asterisk channel to set connected line information |
connected | Connected line information |
update | What connected line information to update. NULL if all. |
Definition at line 8330 of file channel.c.
References ast_channel_connected(), ast_channel_lock, ast_channel_publish_snapshot(), AST_CHANNEL_SNAPSHOT_INVALIDATE_CONNECTED, ast_channel_snapshot_invalidate_segment(), ast_channel_unlock, ast_party_connected_line_set(), connected, and update().
Referenced by __ast_request_and_dial(), ari_channels_handle_originate_with_id(), connectedline_write(), dial_exec_full(), indicate_connected_line(), and pbx_outgoing_attempt().
void ast_channel_set_fd | ( | struct ast_channel * | chan, |
int | which, | ||
int | fd | ||
) |
Set the file descriptor on the channel
Definition at line 2445 of file channel.c.
References ast_channel_internal_fd_set().
Referenced by __ast_channel_alloc_ap(), ast_jb_create_framehook(), AST_TEST_DEFINE(), audiosocket_request(), channel_do_masquerade(), check_for_rtp_changes(), configure_local_rtp(), dahdi_new(), deactivate_generator_nolock(), do_monitor_headset(), jingle_enable_video(), jingle_new(), mbl_hangup(), mbl_new(), mbl_read(), my_swap_subchannels(), sco_accept(), stasis_app_control_snoop(), swap_subs(), and unicast_rtp_request().
void ast_channel_set_flag | ( | struct ast_channel * | chan, |
unsigned int | flag | ||
) |
Set a flag on a channel.
chan | The channel to set the flag on |
flag | The flag to set |
Definition at line 11049 of file channel.c.
References ast_channel_flags(), ast_channel_lock, ast_channel_unlock, and ast_set_flag.
Referenced by ast_call_forward(), ast_waitfordigit_full(), channel_spy(), common_exec(), dial_exec_full(), disa_exec(), do_broadcast(), and waitstream_core().
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.
varc | Number of variable names. |
vars | Array of variable names. |
Definition at line 7909 of file channel.c.
References ami_vars, and channel_set_external_vars().
Referenced by load_channelvars().
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 9141 of file channel.c.
References ast_channel_lock, ast_channel_publish_snapshot(), ast_channel_redirecting(), AST_CHANNEL_SNAPSHOT_INVALIDATE_CALLER, ast_channel_snapshot_invalidate_segment(), ast_channel_unlock, ast_party_redirecting_set(), and update().
Referenced by AST_TEST_DEFINE(), indicate_redirecting(), redirecting_write(), and set_redirecting().
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 7444 of file channel.c.
References ast_channel_lock, ast_channel_tech(), ast_channel_unlock, ast_log, ast_datastore::data, errno, LOG_ERROR, and ast_channel_tech::setoption.
Referenced by analog_hangup(), bridge_channel_handle_control(), common_exec(), conf_run(), dahdi_hangup(), dial_exec_full(), func_channel_write(), func_channel_write_real(), handle_tddmode(), play_record_review(), reset_volumes(), set_format(), set_listen_volume(), set_security_requirements(), set_talk_volume(), try_calling(), and vm_forwardoptions().
void ast_channel_setwhentohangup_tv | ( | struct ast_channel * | chan, |
struct timeval | offset | ||
) |
Set when to hangup channel.
Set when to hang a channel up.
Definition at line 510 of file channel.c.
References ast_channel_whentohangup_set(), ast_null_frame, ast_queue_frame(), ast_tvadd(), ast_tvnow(), and ast_tvzero().
Referenced by action_timeout(), handle_autohangup(), and timeout_write().
|
static |
Definition at line 484 of file channel.c.
References ast_softhangup(), and AST_SOFTHANGUP_SHUTDOWN.
Referenced by ast_softhangup_all().
void ast_channel_softhangup_withcause_locked | ( | struct ast_channel * | chan, |
int | causecode | ||
) |
Lock the given channel, then request softhangup on the channel with the given causecode.
chan | channel on which to hang up |
causecode | cause code to use (Zero if don't use cause code) |
Definition at line 468 of file channel.c.
References ast_channel_hangupcause(), ast_channel_hangupcause_set(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_debug, AST_SOFTHANGUP_EXPLICIT, and ast_softhangup_nolock().
Referenced by action_hangup().
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 8186 of file channel.c.
References ao2_bump, ast_activate_generator(), ast_calloc, ast_channel_name(), ast_channel_writeformat(), ast_debug, ast_format_slin, ast_free, ast_log, ast_set_write_format(), LOG_ERROR, NULL, silence_generator, and state.
Referenced by __ast_play_and_record(), app_control_silence_start(), ast_readstring_full(), channel_spy(), control_streamfile(), do_broadcast(), dtmf_stream(), handle_recordfile(), mf_stream(), participant_entertainment_start(), record_exec(), safe_sleep_conditional(), sf_stream(), sub_start_silence(), 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 8232 of file channel.c.
References ao2_cleanup, ast_channel_name(), ast_debug, ast_free, ast_log, ast_set_write_format(), deactivate_silence_generator(), and LOG_ERROR.
Referenced by __ast_play_and_record(), app_control_silence_start(), ast_readstring_full(), channel_spy(), control_silence_stop_now(), control_streamfile(), do_broadcast(), dtmf_stream(), handle_recordfile(), mf_stream(), participant_entertainment_stop(), record_exec(), safe_sleep_conditional(), sf_stream(), sub_stop_silence(), waitfor_exec(), and waitforring_exec().
int ast_channel_stream_topology_changed | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology | ||
) |
Provide notice to a channel that the stream topology has changed.
chan | The channel to provide notice to |
topology | The new stream topology |
0 | success |
-1 | failure |
Definition at line 11018 of file channel.c.
References ast_assert, ast_channel_is_multistream(), ast_channel_tech(), AST_CONTROL_STREAM_TOPOLOGY_CHANGED, indicate(), ast_channel_tech::indicate, and NULL.
Referenced by __ast_read(), and AST_TEST_DEFINE().
int ast_channel_stream_topology_changed_externally | ( | struct ast_channel * | chan | ) |
Provide notice from a channel that the topology has changed on it as a result of the remote party renegotiating.
chan | The channel to provide notice from |
0 | success |
-1 | failure |
Definition at line 11030 of file channel.c.
References ast_assert, ast_channel_internal_set_stream_topology_change_source(), ast_channel_is_multistream(), ast_channel_lock, ast_channel_unlock, AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_FRAME_CONTROL, ast_queue_frame(), ast_stream_topology_changed_external, and NULL.
Referenced by handle_negotiated_sdp(), and unreal_colp_stream_topology_request_change().
enum ama_flags ast_channel_string2amaflag | ( | const char * | flag | ) |
Convert a string to a detail record AMA flag.
flag | string form of flag |
the | enum (integer) form of the flag |
Definition at line 4379 of file channel.c.
References AST_AMA_BILLING, AST_AMA_DOCUMENTATION, AST_AMA_NONE, AST_AMA_OMIT, and DEFAULT_AMA_FLAGS.
Referenced by build_device(), build_peer(), build_user(), cdr_write(), func_channel_write_real(), process_dahdi(), reload_config(), and set_config().
int ast_channel_supports_html | ( | struct ast_channel * | channel | ) |
Checks for HTML support on a channel.
Definition at line 6642 of file channel.c.
References ast_channel_tech().
Referenced by dial_exec_full(), and try_calling().
int ast_channel_suppress | ( | struct ast_channel * | chan, |
unsigned int | direction, | ||
enum ast_frame_type | frametype | ||
) |
Suppress passing of a frame type on a channel.
chan | The channel to suppress |
direction | The direction in which to suppress |
frametype | The type of frame (AST_FRAME_VOICE, etc) to suppress |
0 | Success |
-1 | Failure |
Definition at line 10799 of file channel.c.
References ao2_alloc, ao2_ref, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_datastore_alloc, ast_framehook_attach(), ast_framehook_detach(), AST_FRAMEHOOK_INTERFACE_VERSION, ast_log, ast_datastore::data, ast_framehook_interface::data, suppress_data::direction, suppress_data::framehook_id, suppress_data::frametype, LOG_WARNING, NULL, suppress_framehook_destroy_cb(), suppress_framehook_event_cb(), suppress_framehook_fixup_cb(), suppress_get_datastore_information(), and ast_framehook_interface::version.
Referenced by app_control_mute(), and mute_channel().
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 1290 of file channel.c.
References ast_channel_clear_flag(), and AST_FLAG_DEFER_DTMF.
Referenced by __adsi_transmit_messages().
void ast_channel_unlink | ( | struct ast_channel * | chan | ) |
Remove a channel from the global channels container.
chan | channel to remove |
In a case where it is desired that a channel not be available in any lookups in the global channels conatiner, use this function.
Definition at line 10551 of file channel.c.
References ao2_unlink, and channels.
Referenced by create_msg_q_chan().
void ast_channel_unregister | ( | const struct ast_channel_tech * | tech | ) |
Unregister channel driver.
Unregister a channel technology.
Definition at line 570 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::list, chanlist::tech, and ast_channel::tech.
Referenced by __unload_module(), channels_shutdown(), load_module(), local_shutdown(), unload_module(), and unregister_channel_tech().
int ast_channel_unsuppress | ( | struct ast_channel * | chan, |
unsigned int | direction, | ||
enum ast_frame_type | frametype | ||
) |
Stop suppressing of a frame type on a channel.
chan | The channel to stop suppressing |
direction | The direction in which to stop suppressing |
frametype | The type of frame (AST_FRAME_VOICE, etc) to stop suppressing |
0 | Success |
-1 | Failure |
Definition at line 10861 of file channel.c.
References ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_datastore_free(), ast_framehook_detach(), ast_log, ast_datastore::data, suppress_data::direction, suppress_data::framehook_id, suppress_data::frametype, LOG_WARNING, NULL, and suppress_get_datastore_information().
Referenced by app_control_unmute(), and mute_channel().
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 9115 of file channel.c.
References ast_connected_line_build_data(), AST_CONTROL_CONNECTED_LINE, ast_indicate_data(), connected, and update().
Referenced by agent_run(), app_exec(), ast_channel_connected_line_sub(), ast_do_pickup(), connectedline_write(), update_connected_line_from_peer(), 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 10306 of file channel.c.
References AST_CONTROL_REDIRECTING, ast_indicate_data(), ast_redirecting_build_data(), and update().
Referenced by ast_channel_redirecting_sub(), call_forward_inherit(), do_forward(), redirecting_write(), and wait_for_answer().
struct ast_channel * ast_channel_yank | ( | struct ast_channel * | yankee | ) |
Gain control of a channel in the system.
The intention of this function is to take a channel that currently is running in one thread and gain control of it in the current thread. This can be used to redirect a channel to a different place in the dialplan, for instance.
XXX Put name of callback-setting function in above paragraph once it is written
yankee | The channel to gain control of |
NULL | Could not gain control of the channel |
non-NULL | The channel |
Definition at line 10615 of file channel.c.
References ast_channel::accountcode, ast_channel::amaflags, ao2_bump, ao2_cleanup, ast_channel_accountcode(), ast_channel_alloc, ast_channel_amaflags(), ast_channel_context(), ast_channel_exten(), ast_channel_flags(), ast_channel_lock, ast_channel_move(), ast_channel_name(), ast_channel_priority(), ast_channel_priority_set(), ast_channel_readformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_unlock, ast_channel_writeformat(), AST_FLAG_IN_AUTOLOOP, ast_hangup(), AST_STATE_DOWN, ast_strdupa, ast_test_flag, ast_channel::context, ast_channel::exten, ast_channel::name, NULL, ast_channel::priority, ast_channel::readformat, and ast_channel::writeformat.
Referenced by ast_async_goto(), and ast_bridge_add_channel().
int ast_channels_init | ( | void | ) |
Provided by channel.c
Definition at line 8029 of file channel.c.
References ami_vars, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_container_register(), ari_vars, ARRAY_LEN, ast_channel_cmp_cb(), ast_channel_hash_cb(), ast_channel_register(), ast_cli_register_multiple, AST_NUM_CHANNEL_BUCKETS, ast_register_cleanup(), AST_RWLIST_HEAD_INIT, ast_stasis_channels_init(), channels, channels_shutdown(), cli_channel, NULL, prnt_channel_key(), and surrogate_tech.
Referenced by asterisk_daemon().
struct ast_variable * ast_channeltype_list | ( | void | ) |
return an ast_variable list of channeltypes
Definition at line 188 of file channel.c.
References AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_variable_new, NULL, chanlist::tech, and var.
Referenced by ast_var_channel_types(), and ast_var_channel_types_table().
int ast_check_hangup | ( | struct ast_channel * | chan | ) |
Checks to see if a channel is needing hang up.
Check to see if a channel is needing hang up.
Definition at line 445 of file channel.c.
References ast_channel_name(), ast_channel_softhangup_internal_flag(), ast_channel_softhangup_internal_flag_add(), ast_channel_whentohangup(), ast_debug, AST_SOFTHANGUP_TIMEOUT, ast_test_suite_event_notify, ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
Referenced by __ast_pbx_run(), __ast_read(), agent_request_exec(), agi_exec(), announce_thread(), app_exec(), ast_bridge_setup_after_goto(), ast_call(), ast_check_hangup_locked(), ast_indicate_data(), ast_raw_answer_with_stream_topology(), ast_readstring_full(), ast_recvtext(), ast_sendtext_data(), ast_transfer_protocol(), ast_unreal_fixup(), ast_waitfordigit_full(), ast_write_stream(), autoservice_run(), call_forward_inherit(), channel_spy(), common_exec(), conf_play(), conf_run(), confbridge_exec(), dahdi_sendtext(), dahdi_setoption(), depart_channel(), dial_exec_full(), directory_exec(), dundi_lookup_internal(), eagi_exec(), eivr_comm(), fax_gateway_framehook(), find_cache(), findmeexec(), func_channel_read(), gosub_run(), handle_sendimage(), join_conference_bridge(), launch_asyncagi(), lua_check_hangup(), pbx_builtin_incomplete(), pbx_builtin_waitexten(), play_on_channel(), playback_exec(), read_exec(), readexten_exec(), run_agi(), stasis_app_exec(), transfer_target_framehook_cb(), try_calling(), vm_authenticate(), and wait_for_answer().
int ast_check_hangup_locked | ( | struct ast_channel * | chan | ) |
Definition at line 459 of file channel.c.
References ast_channel_lock, ast_channel_unlock, and ast_check_hangup().
Referenced by action_redirect(), agent_run(), ast_app_exec_sub(), ast_bridge_channel_feature_digit(), bridge_channel_handle_action(), bridge_reconfigured_connected_line_update(), bridge_stasis_run_cb(), bridgewait_exec(), dial_exec_full(), launch_asyncagi(), pbx_builtin_saynumber(), pbx_builtin_sayordinal(), and stasis_app_exec().
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 8719 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_PRIV_NAME, AST_CONNECTED_LINE_PRIV_NAME_CHAR_SET, AST_CONNECTED_LINE_PRIV_NAME_PRESENTATION, AST_CONNECTED_LINE_PRIV_NAME_VALID, AST_CONNECTED_LINE_PRIV_NUMBER, AST_CONNECTED_LINE_PRIV_NUMBER_PLAN, AST_CONNECTED_LINE_PRIV_NUMBER_PRESENTATION, AST_CONNECTED_LINE_PRIV_NUMBER_VALID, AST_CONNECTED_LINE_PRIV_SUBADDRESS, AST_CONNECTED_LINE_PRIV_SUBADDRESS_ODD_EVEN, AST_CONNECTED_LINE_PRIV_SUBADDRESS_TYPE, AST_CONNECTED_LINE_PRIV_SUBADDRESS_VALID, AST_CONNECTED_LINE_PRIV_TAG, 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, connected, LOG_WARNING, ast_party_id_ies::name, NULL, party_id_build_data(), ast_party_name_ies::str, update(), and value.
Referenced by after_bridge_move_channel(), ast_channel_queue_connected_line_update(), ast_channel_update_connected_line(), bridge_reconfigured_connected_line_update(), indicate_connected_line(), send_colp_to_agent(), and unreal_colp_redirect_indicate().
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 8315 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 after_bridge_move_channel(), agent_request_exec(), app_exec(), ast_ari_channels_dial(), ast_do_pickup(), ast_unreal_call_setup(), begin_dial_prerun(), bridge_reconfigured_connected_line_update(), copy_caller_data(), dial_exec_full(), do_forward(), findmeexec(), park_local_transfer(), ring_entry(), update_connected_line_from_peer(), 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 8322 of file channel.c.
References ast_party_caller::ani, ast_party_connected_line::ani, ast_party_caller::ani2, ast_party_connected_line::ani2, ast_party_id_copy(), ast_party_caller::id, and ast_party_connected_line::id.
Referenced by ast_unreal_call_setup(), and unreal_colp_redirect_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 8807 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_PRIV_NAME, AST_CONNECTED_LINE_PRIV_NAME_CHAR_SET, AST_CONNECTED_LINE_PRIV_NAME_PRESENTATION, AST_CONNECTED_LINE_PRIV_NAME_VALID, AST_CONNECTED_LINE_PRIV_NUMBER, AST_CONNECTED_LINE_PRIV_NUMBER_PLAN, AST_CONNECTED_LINE_PRIV_NUMBER_PRESENTATION, AST_CONNECTED_LINE_PRIV_NUMBER_VALID, AST_CONNECTED_LINE_PRIV_SUBADDRESS, AST_CONNECTED_LINE_PRIV_SUBADDRESS_ODD_EVEN, AST_CONNECTED_LINE_PRIV_SUBADDRESS_TYPE, AST_CONNECTED_LINE_PRIV_SUBADDRESS_VALID, AST_CONNECTED_LINE_PRIV_TAG, 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_debug, ast_free, ast_log, ast_malloc, AST_PARTY_CHAR_SET_ISO8859_1, ast_party_id_ies::combined_presentation, connected, LOG_WARNING, and value.
Referenced by __ast_read(), ast_channel_connected_line_sub(), indicate_connected_line(), socket_process_helper(), wait_for_answer(), and wait_for_winner().
void ast_deactivate_generator | ( | struct ast_channel * | chan | ) |
Deactivate an active generator
Definition at line 2912 of file channel.c.
References ast_channel_lock, ast_channel_timer(), ast_channel_unlock, ast_timer_set_rate(), deactivate_generator_nolock(), and should_trigger_dtmf_emulating().
Referenced by __ast_read(), app_exec(), ast_openstream_full(), ast_playtones_stop(), ast_read_generator_actions(), ast_tonepair_stop(), ast_write_stream(), channel_spy(), dial_exec_full(), do_broadcast(), generator_force(), local_ast_moh_stop(), old_milliwatt_exec(), and wait_for_answer().
|
static |
Free a dummy channel structure.
Definition at line 2352 of file channel.c.
References ast_cdr_free(), ast_channel_caller(), ast_channel_cdr(), ast_channel_cdr_set(), ast_channel_connected(), ast_channel_connected_indicated(), ast_channel_datastores(), ast_channel_dialed(), ast_channel_internal_cleanup(), ast_channel_redirecting(), ast_channel_varshead(), ast_datastore_free(), AST_LIST_REMOVE_HEAD, ast_party_caller_free(), ast_party_connected_line_free(), ast_party_dialed_free(), ast_party_redirecting_free(), ast_pbx_hangup_handler_destroy(), ast_var_delete(), and NULL.
Referenced by __ast_dummy_channel_alloc().
const struct ast_channel_tech * ast_get_channel_tech | ( | const char * | name | ) |
Get handle to channel driver based on name.
Get a channel technology structure by name.
Definition at line 592 of file channel.c.
References AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, name, NULL, and chanlist::tech.
Referenced by __ast_channel_alloc_ap(), _ast_device_state(), ast_cc_callback(), ast_presence_state_helper(), and ast_var_channel_types_table().
ast_group_t ast_get_group | ( | const char * | s | ) |
Definition at line 7640 of file channel.c.
References ast_log, ast_strdupa, ast_strlen_zero(), c, LOG_ERROR, LOG_WARNING, and strsep().
Referenced by build_device(), custom_group_handler(), func_channel_write_real(), group_handler(), and process_dahdi().
struct ast_namedgroups * ast_get_namedgroups | ( | const char * | s | ) |
Create an ast_namedgroups set with group names from comma separated string.
Remove leading and trailing whitespace
Definition at line 7697 of file channel.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_container_alloc_hash, ao2_container_count(), ao2_find, ao2_link, ao2_ref, ast_skip_blanks(), ast_str_hash(), ast_strdupa, ast_strip(), ast_strlen_zero(), ast_trim_blanks(), c, len(), namedgroup_cmp_cb(), namedgroup_hash_cb(), NULL, OBJ_NODATA, OBJ_POINTER, OBJ_UNLINK, and strsep().
Referenced by func_channel_write_real(), named_groups_handler(), and process_dahdi().
void ast_hangup | ( | struct ast_channel * | chan | ) |
Hangup a channel.
Hang up a channel.
Definition at line 2560 of file channel.c.
References ao2_ref, ao2_unlink, ast_assert, ast_autoservice_stop(), ast_cc_offer(), ast_channel_blocker_tid(), ast_channel_blockproc(), ast_channel_flags(), ast_channel_generator(), ast_channel_generator_set(), ast_channel_generatordata(), ast_channel_generatordata_set(), ast_channel_lock, ast_channel_masq(), ast_channel_masqr(), ast_channel_name(), ast_channel_sched(), ast_channel_sched_set(), ast_channel_stream(), ast_channel_stream_set(), ast_channel_tech(), ast_channel_unlock, ast_channel_unref, ast_channel_vstream(), ast_channel_vstream_set(), ast_closestream(), ast_debug, AST_FLAG_BLOCKING, AST_FLAG_ZOMBIE, ast_get_tid(), ast_log, ast_pbx_hangup_handler_run(), ast_sched_context_destroy(), ast_set_flag, ast_test_flag, CHANNEL_DEADLOCK_AVOIDANCE, channels, destroy_hooks(), free_translation(), hangup(), ast_channel_tech::hangup, LOG_WARNING, NULL, and ast_generator::release.
Referenced by __analog_handle_event(), __analog_ss_thread(), __ast_pbx_run(), __ast_request_and_dial(), alloc_playback_chan(), analog_handle_init_event(), analog_ss_thread(), announce_request(), announce_to_dial(), answer_exec_run(), ari_bridges_play_new(), ast_ari_bridges_record(), ast_async_goto(), ast_autoservice_chan_hangup_peer(), ast_bridge_add_channel(), ast_bridge_run_after_goto(), ast_call_forward(), ast_channel_yank(), ast_dial_destroy(), ast_dial_hangup(), ast_iax2_new(), ast_pbx_outgoing_exten_predial(), AST_TEST_DEFINE(), ast_unreal_hangup(), attended_transfer_bridge(), begin_dial_channel(), blind_transfer_bridge(), bridge_channel_control_thread(), bridge_moh_create(), build_conf(), call_pickup_incoming_request(), chan_data_destroy(), chan_pjsip_new(), chanavail_exec(), clear_caller(), conf_free(), conf_run(), conf_start_record(), console_new(), create_msg_q_chan(), dahdi_handle_event(), dahdi_new(), destroy_conference_bridge(), dial_exec_full(), do_forward(), do_hang(), do_monitor(), do_monitor_headset(), feature_attended_transfer(), generic_recall(), handle_call_forward(), handle_call_outgoing(), handle_exec(), handle_frame(), handle_init_event(), handle_timeout_trip(), hangup_playback(), hangupcalls(), hanguptree(), iax2_request(), jingle_action_session_initiate(), local_call(), make_channel(), mbl_ast_hangup(), media_request_helper(), meetme_menu_admin_extended(), moh_channel_thread(), monitor_dial(), mwi_thread(), my_distinctive_ring(), my_handle_notify_message(), ooh323_new(), park_local_transfer(), parking_blind_transfer_park(), pbx_outgoing_exec(), pbx_start_incoming_request(), push_announcer(), read_test(), recalling_exit(), refer_incoming_invite_request(), reject_incoming_call(), request_channel(), retransfer_enter(), safe_hangup(), snoop_stasis_thread(), stasis_app_control_snoop(), unistim_new(), and wait_for_answer().
int ast_indicate | ( | struct ast_channel * | chan, |
int | condition | ||
) |
Indicates condition of channel.
chan | channel to change the indication |
condition | which condition to indicate on the channel |
Definition at line 4296 of file channel.c.
References ast_indicate_data(), and NULL.
Referenced by __ast_play_and_record(), answer_trunk_chan(), app_control_dtmf(), app_control_hold(), app_control_moh_start(), app_control_ring(), app_control_ring_stop(), app_control_silence_start(), app_control_unhold(), app_exec(), ast_bridge_channel_feature_digit(), ast_bridge_set_single_src_video_mode(), ast_bridge_update_talker_src_video_mode(), ast_raw_answer_with_stream_topology(), bridge_channel_do_callback(), bridge_channel_event_join_leave(), bridge_channel_handle_action(), bridge_channel_handle_control(), bridge_channel_handle_interval(), bridge_channel_internal_join(), caller_joined_bridge(), channel_do_masquerade(), cli_console_answer(), conf_run(), console_call(), dial_exec_full(), dial_trunk(), disa_exec(), do_forward(), dtmf_stream(), handle_frame(), handle_recordfile(), indicate_busy(), indicate_congestion(), mf_stream(), monitor_dial(), participant_entertainment_start(), participant_entertainment_stop(), pbx_builtin_incomplete(), pbx_builtin_proceeding(), pbx_builtin_progress(), pbx_builtin_ringing(), pbx_builtin_waitexten(), play_on_channel(), pre_bridge_setup(), queue_exec(), record_exec(), rna(), say_periodic_announcement(), say_position(), send_waveform_to_channel(), sf_stream(), simple_bridge_join(), sla_handle_hold_event(), sla_station_exec(), sla_trunk_exec(), softmix_bridge_join(), try_calling(), vm_exec(), 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 4672 of file channel.c.
References ast_channel_flags(), ast_channel_framehooks(), ast_channel_is_leaving_bridge(), ast_channel_lock, ast_channel_unlock, ast_check_hangup(), AST_CONTROL_MASQUERADE_NOTIFY, AST_FLAG_ZOMBIE, AST_FRAME_CONTROL, ast_framehook_list_is_empty(), ast_framehook_list_write_event(), ast_frdup, ast_frfree, ast_test_flag, ast_frame::data, ast_frame::datalen, ast_frame::frametype, indicate_data_internal(), ast_frame_subclass::integer, NULL, ast_frame::ptr, and ast_frame::subclass.
Referenced by __ast_read(), action_aocmessage(), app_exec(), ast_channel_update_connected_line(), ast_channel_update_redirecting(), ast_handle_cc_control_frame(), ast_indicate(), bridge_channel_handle_control(), bridge_channel_internal_join(), channel_do_masquerade(), dial_exec_full(), disable_t38(), fax_gateway_indicate_t38(), generic_fax_exec(), handle_frame(), participant_entertainment_start(), pbx_builtin_waitexten(), receivefax_t38_init(), sendfax_t38_init(), set_fax_t38_caps(), wait_for_answer(), and wait_for_winner().
void ast_install_music_functions | ( | int(*)(struct ast_channel *, const char *, const char *) | start_ptr, |
void(*)(struct ast_channel *) | stop_ptr, | ||
void(*)(struct ast_channel *) | cleanup_ptr | ||
) |
Definition at line 7772 of file channel.c.
References ast_moh_cleanup_ptr, ast_moh_start_ptr, and ast_moh_stop_ptr.
Referenced by load_module(), and reload().
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 1486 of file channel.c.
References AST_FRAME_BRIDGE_ACTION, AST_FRAME_BRIDGE_ACTION_SYNC, AST_FRAME_CNG, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_HTML, AST_FRAME_IAX, AST_FRAME_IMAGE, AST_FRAME_MODEM, AST_FRAME_NULL, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_TEXT_DATA, AST_FRAME_VIDEO, AST_FRAME_VOICE, and ast_frame::frametype.
Referenced by ast_bridge_channel_queue_frame(), autoservice_run(), and safe_sleep_conditional().
void ast_moh_cleanup | ( | struct ast_channel * | chan | ) |
Definition at line 7804 of file channel.c.
References ast_moh_cleanup_ptr.
Referenced by ast_channel_destructor().
int ast_moh_start | ( | struct ast_channel * | chan, |
const char * | mclass, | ||
const char * | interpclass | ||
) |
Turn on music on hold on a given channel.
chan | The channel structure that will get music on hold |
mclass | The class to use if the musicclass is not currently set on the channel structure. NULL and the empty string are equivalent. |
interpclass | The class to use if the musicclass is not currently set on the channel structure or in the mclass argument. NULL and the empty string are equivalent. |
Zero | on success |
non-zero | on failure |
Definition at line 7788 of file channel.c.
References ast_moh_start_ptr, and ast_verb.
Referenced by app_control_moh_start(), app_exec(), ast_ari_bridges_start_moh(), ast_bridge_channel_playfile(), ast_unreal_indicate(), chan_pjsip_indicate(), channel_do_masquerade(), conf_moh_start(), conf_moh_unsuspend(), conf_start_moh(), console_indicate(), dahdi_indicate(), dial_exec_full(), handle_setmusic(), iax2_indicate(), jingle_indicate(), limits_interval_playback(), moh_handle_digit(), monitor_dial(), ooh323_indicate(), participant_entertainment_start(), play_moh_exec(), queue_exec(), retrydial_exec(), rna(), say_periodic_announcement(), say_position(), start_moh_exec(), and unistim_indicate().
void ast_moh_stop | ( | struct ast_channel * | chan | ) |
Turn off music on hold on a given channel.
Definition at line 7798 of file channel.c.
References ast_moh_stop_ptr.
Referenced by app_control_moh_stop(), app_exec(), ast_bridge_add_channel(), ast_unreal_indicate(), chan_pjsip_indicate(), channel_do_masquerade(), conf_moh_stop(), conf_moh_suspend(), conf_run(), console_indicate(), dahdi_indicate(), dial_exec_full(), handle_setmusic(), iax2_indicate(), jingle_indicate(), moh_channel_thread(), moh_handle_digit(), monitor_dial(), ooh323_indicate(), participant_entertainment_stop(), play_moh_exec(), queue_exec(), retrydial_exec(), say_periodic_announcement(), say_position(), stasis_app_bridge_moh_stop(), stop_moh_exec(), try_calling(), unistim_indicate(), and wait_for_answer().
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.
Definition at line 8112 of file channel.c.
References a, ao2_callback, ao2_cleanup, ao2_container_count(), b, match(), namedgroup_match(), NULL, and SWAP.
Referenced by find_channel_by_group().
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 2005 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_copy(), ast_party_caller::id, and ast_party_caller::priv.
Referenced by recalling_enter().
void ast_party_caller_free | ( | struct ast_party_caller * | doomed | ) |
Destroy the caller party contents.
doomed | The caller party to destroy. |
Definition at line 2034 of file channel.c.
References ast_party_caller::ani, ast_party_id_free(), ast_party_caller::id, and ast_party_caller::priv.
Referenced by ast_channel_destructor(), ast_dummy_channel_destructor(), callerid_write(), dial_trunk(), my_get_callerid(), 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 1997 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_init(), ast_party_caller::id, and ast_party_caller::priv.
Referenced by __ast_channel_alloc_ap(), dial_trunk(), queue_connected_line_update(), 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 2026 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_set(), ast_party_caller::id, NULL, ast_party_caller::priv, and update().
Referenced by ast_channel_set_caller(), ast_channel_set_caller_event(), callerid_write(), and my_get_callerid().
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 2018 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_id_set_init(), ast_party_caller::id, and ast_party_caller::priv.
Referenced by callerid_write(), dial_exec_full(), do_forward(), my_get_callerid(), and ring_entry().
void ast_party_connected_line_collect_caller | ( | struct ast_party_connected_line * | connected, |
struct ast_party_caller * | caller | ||
) |
Collect the caller party information into a connected line structure.
connected | Collected caller information for the connected line |
caller | Caller information. |
Definition at line 2082 of file channel.c.
References ast_party_caller::ani, ast_party_caller::ani2, AST_CONNECTED_LINE_UPDATE_SOURCE_UNKNOWN, connected, ast_party_caller::id, and ast_party_caller::priv.
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 2050 of file channel.c.
References ast_party_connected_line::ani, ast_party_connected_line::ani2, ast_party_id_copy(), ast_party_connected_line::id, ast_party_connected_line::priv, and ast_party_connected_line::source.
Referenced by __ast_read(), after_bridge_move_channel(), agent_login_channel_config(), ast_call_forward(), ast_channel_connected_line_sub(), ast_do_pickup(), attended_transfer_properties_alloc(), dial_exec_full(), do_forward(), indicate_connected_line(), recalling_enter(), retransfer_enter(), 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 2091 of file channel.c.
References ast_party_connected_line::ani, ast_party_id_free(), ast_party_connected_line::id, and ast_party_connected_line::priv.
Referenced by __ast_read(), after_bridge_move_channel(), agent_login_channel_config(), agent_pvt_destructor(), agent_request_exec(), app_exec(), ast_channel_connected_line_sub(), ast_channel_destructor(), ast_do_pickup(), ast_dummy_channel_destructor(), attended_transfer_properties_destructor(), bridge_reconfigured_connected_line_update(), callattempt_free(), chanlist_free(), connectedline_write(), destroy_calling_node(), indicate_connected_line(), socket_process_helper(), update_connected_line_from_peer(), wait_for_answer(), and wait_for_winner().
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 2041 of file channel.c.
References ast_party_connected_line::ani, ast_party_connected_line::ani2, AST_CONNECTED_LINE_UPDATE_SOURCE_UNKNOWN, ast_party_id_init(), ast_party_connected_line::id, ast_party_connected_line::priv, and ast_party_connected_line::source.
Referenced by __ast_channel_alloc_ap(), __ast_read(), after_bridge_move_channel(), agent_login_channel_config(), agent_pvt_new(), agent_request_exec(), ast_channel_connected_line_sub(), ast_do_pickup(), bridge_reconfigured_connected_line_update(), do_forward(), onAlerting(), onCallEstablished(), onProgress(), queue_connected_line_update(), socket_process_helper(), update_connected_line_from_peer(), and update_initial_connected_line().
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.
This is similar to ast_party_connected_line_copy, except that NULL values for strings in the src parameter indicate not to update the corresponding dest values.
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 2073 of file channel.c.
References ast_party_connected_line::ani, ast_party_connected_line::ani2, ast_party_id_set(), ast_party_connected_line::id, NULL, ast_party_connected_line::priv, ast_party_connected_line::source, and update().
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 2064 of file channel.c.
References ast_party_connected_line::ani, ast_party_connected_line::ani2, ast_party_id_set_init(), ast_party_connected_line::id, ast_party_connected_line::priv, and ast_party_connected_line::source.
Referenced by __ast_request_and_dial(), ari_channels_handle_originate_with_id(), connectedline_write(), dial_exec_full(), indicate_connected_line(), pbx_outgoing_attempt(), 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 1955 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 ast_unreal_call_setup().
void ast_party_dialed_free | ( | struct ast_party_dialed * | doomed | ) |
Destroy the dialed party contents.
doomed | The dialed party to destroy. |
Definition at line 1990 of file channel.c.
References ast_free, ast_party_subaddress_free(), NULL, 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 1947 of file channel.c.
References ast_party_subaddress_init(), NULL, 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 1977 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 1969 of file channel.c.
References ast_party_subaddress_set_init(), NULL, 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 1784 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_id_merge_copy(), ast_party_redirecting_copy(), ast_sip_session_create_outgoing(), ast_sip_set_id_from_invite(), caller_id_outgoing_request(), caller_id_outgoing_response(), chan_pjsip_new(), copy_redirecting_id(), queue_connected_line_update(), set_from_header(), stir_shaken_outgoing_request(), and update_initial_connected_line().
void ast_party_id_free | ( | struct ast_party_id * | doomed | ) |
Destroy the party id contents.
doomed | The party id to destroy. |
Definition at line 1830 of file channel.c.
References ast_free, ast_party_name_free(), ast_party_number_free(), ast_party_subaddress_free(), ast_party_id::name, NULL, ast_party_id::number, ast_party_id::subaddress, and ast_party_id::tag.
Referenced by ast_party_caller_free(), ast_party_connected_line_free(), ast_party_id_reset(), ast_party_redirecting_free(), caller_id_outgoing_request(), caller_id_outgoing_response(), endpoint_destructor(), fetch_callerid_num(), session_destructor(), set_from_header(), stir_shaken_outgoing_request(), and update_incoming_connected_line().
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 1776 of file channel.c.
References ast_party_name_init(), ast_party_number_init(), ast_party_subaddress_init(), ast_party_id::name, NULL, ast_party_id::number, ast_party_id::subaddress, and ast_party_id::tag.
Referenced by ast_party_caller_init(), ast_party_connected_line_init(), ast_party_id_reset(), ast_party_redirecting_init(), ast_sip_endpoint_alloc(), ast_sip_session_alloc(), caller_id_outgoing_request(), caller_id_outgoing_response(), dial_exec_full(), fetch_callerid_num(), set_from_header(), stir_shaken_outgoing_request(), and update_incoming_connected_line().
void ast_party_id_invalidate | ( | struct ast_party_id * | id | ) |
struct ast_party_id ast_party_id_merge | ( | struct ast_party_id * | base, |
struct ast_party_id * | overlay | ||
) |
Merge a given party id into another given party id.
This function will generate an effective party id.
Each party id component of the party id 'base' is overwritten by components of the party id 'overlay' if the overlay component is marked as valid. However the component 'tag' of the base party id remains untouched.
base | The party id which is merged. |
overlay | The party id which is used to merge into. |
Definition at line 1921 of file channel.c.
References ast_party_id::name, ast_party_id::number, and ast_party_id::subaddress.
Referenced by ast_channel_connected_effective_id(), ast_channel_redirecting_effective_from(), ast_channel_redirecting_effective_orig(), ast_channel_redirecting_effective_to(), and ast_party_id_merge_copy().
void ast_party_id_merge_copy | ( | struct ast_party_id * | dest, |
struct ast_party_id * | base, | ||
struct ast_party_id * | overlay | ||
) |
Copy a merge of a given party id into another given party id to a given destination party id.
Each party id component of the party id 'base' is overwritten by components of the party id 'overlay' if the 'overlay' component is marked as valid. However the component 'tag' of the 'base' party id remains untouched. The result is copied into the given party id 'dest'.
dest | The resulting merged party id. |
base | The party id which is merged. |
overlay | The party id which is used to merge into. |
Definition at line 1939 of file channel.c.
References ast_party_id_copy(), and ast_party_id_merge().
int ast_party_id_presentation | ( | const struct ast_party_id * | id | ) |
Determine the overall presentation value for the given party.
id | Party to determine the overall presentation value. |
Definition at line 1840 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, and id.
Referenced by add_privacy_header(), add_privacy_params(), ast_json_party_id(), ast_sip_can_present_connected_id(), ast_str_retrieve_variable(), ast_var_channels_table(), channel_snapshot_caller_create(), iax2_call(), is_colp_update_allowed(), my_send_callerid(), party_id_build_data(), party_id_read(), queue_exec(), redirecting_read(), set_from_header(), setup_env(), and socket_process_helper().
void ast_party_id_reset | ( | struct ast_party_id * | id | ) |
Destroy and initialize the given party id structure.
id | The party id to reset. |
Definition at line 1915 of file channel.c.
References ast_party_id_free(), and ast_party_id_init().
Referenced by after_bridge_move_channel(), ast_do_pickup(), channel_do_masquerade(), and retransfer_enter().
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 1807 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_party_id::number, ast_party_id::subaddress, ast_party_id::tag, and update().
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 1799 of file channel.c.
References ast_party_name_set_init(), ast_party_number_set_init(), ast_party_subaddress_set_init(), ast_party_id::name, NULL, 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 1618 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 1657 of file channel.c.
References ast_free, NULL, and ast_party_name::str.
Referenced by analog_ss_thread(), and ast_party_id_free().
void ast_party_name_init | ( | struct ast_party_name * | init | ) |
Initialize the given name structure.
init | Name structure to initialize. |
Definition at line 1610 of file channel.c.
References AST_PARTY_CHAR_SET_ISO8859_1, AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, ast_party_name::char_set, NULL, ast_party_name::presentation, ast_party_name::str, and ast_party_name::valid.
Referenced by analog_ss_thread(), and ast_party_id_init().
void ast_party_name_set | ( | struct ast_party_name * | dest, |
const struct ast_party_name * | src | ||
) |
Set the source party name information into the destination party name.
dest | The name one wishes to update |
src | The new name values to update the dest |
Definition at line 1640 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 1632 of file channel.c.
References ast_party_name::char_set, NULL, 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 1671 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 1710 of file channel.c.
References ast_free, NULL, and ast_party_number::str.
Referenced by analog_ss_thread(), ast_party_id_free(), do_forward(), and wait_for_answer().
void ast_party_number_init | ( | struct ast_party_number * | init | ) |
Initialize the given number structure.
init | Number structure to initialize. |
Definition at line 1663 of file channel.c.
References AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, NULL, ast_party_number::plan, ast_party_number::presentation, ast_party_number::str, and ast_party_number::valid.
Referenced by analog_ss_thread(), ast_party_id_init(), do_forward(), and wait_for_answer().
void ast_party_number_set | ( | struct ast_party_number * | dest, |
const struct ast_party_number * | src | ||
) |
Set the source party number information into the destination party number.
dest | The number one wishes to update |
src | The new number values to update the dest |
Definition at line 1693 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 1685 of file channel.c.
References NULL, 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 2154 of file channel.c.
References ast_party_id_copy(), ast_party_redirecting_reason_copy(), ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by ast_ari_channels_dial(), ast_call_forward(), ast_channel_redirecting_sub(), ast_unreal_call_setup(), begin_dial_prerun(), call_forward_inherit(), dial_exec_full(), do_forward(), ring_entry(), and wait_for_answer().
void ast_party_redirecting_free | ( | struct ast_party_redirecting * | doomed | ) |
Destroy the redirecting information contents.
doomed | The redirecting information to destroy. |
Definition at line 2198 of file channel.c.
References ast_party_id_free(), ast_party_redirecting_reason_free(), ast_party_redirecting::from, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by ast_channel_destructor(), ast_channel_redirecting_sub(), ast_dummy_channel_destructor(), AST_TEST_DEFINE(), call_forward_inherit(), do_forward(), indicate_redirecting(), redirecting_write(), set_redirecting(), 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 2141 of file channel.c.
References ast_party_id_init(), ast_party_redirecting_reason_init(), ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by __ast_channel_alloc_ap(), ast_channel_redirecting_sub(), AST_TEST_DEFINE(), call_forward_inherit(), do_forward(), set_redirecting(), and wait_for_answer().
void ast_party_redirecting_reason_copy | ( | struct ast_party_redirecting_reason * | dest, |
const struct ast_party_redirecting_reason * | src | ||
) |
Copy the source redirecting reason information to the destination redirecting reason.
dest | Destination redirecting reason |
src | Source redirecting reason |
Definition at line 2104 of file channel.c.
References ast_free, ast_strdup, ast_party_redirecting_reason::code, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_copy().
void ast_party_redirecting_reason_free | ( | struct ast_party_redirecting_reason * | doomed | ) |
Destroy the redirecting reason contents.
doomed | The redirecting reason to destroy. |
Definition at line 2135 of file channel.c.
References ast_free, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_free().
void ast_party_redirecting_reason_init | ( | struct ast_party_redirecting_reason * | init | ) |
Initialize the given redirecting reason structure.
init | Redirecting reason structure to initialize |
Definition at line 2098 of file channel.c.
References AST_REDIRECTING_REASON_UNKNOWN, ast_party_redirecting_reason::code, NULL, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_init().
void ast_party_redirecting_reason_set | ( | struct ast_party_redirecting_reason * | dest, |
const struct ast_party_redirecting_reason * | src | ||
) |
Set the redirecting reason information based on another redirecting reason source.
This is similar to ast_party_redirecting_reason_copy, except that NULL values for strings in the src parameter indicate not to update the corresponding dest values.
dest | The redirecting reason one wishes to update |
src | The new redirecting reason values to update the dest |
Definition at line 2121 of file channel.c.
References ast_free, ast_strdup, ast_party_redirecting_reason::code, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_set().
void ast_party_redirecting_reason_set_init | ( | struct ast_party_redirecting_reason * | init, |
const struct ast_party_redirecting_reason * | guide | ||
) |
Initialize the given redirecting reason structure using the given guide for a set update operation.
The initialization is needed to allow a set operation to know if a value needs to be updated. Simple integers need the guide's original value in case the set operation is not trying to set a new value. String values are simply set to NULL pointers if they are not going to be updated.
init | Redirecting reason structure to initialize. |
guide | Source redirecting reason to use as a guide in initializing. |
Definition at line 2115 of file channel.c.
References ast_party_redirecting_reason::code, NULL, and ast_party_redirecting_reason::str.
Referenced by ast_party_redirecting_set_init().
void ast_party_redirecting_set | ( | struct ast_party_redirecting * | dest, |
const struct ast_party_redirecting * | src, | ||
const struct ast_set_party_redirecting * | update | ||
) |
Set the redirecting information based on another redirecting source.
This is similar to ast_party_redirecting_copy, except that NULL values for strings in the src parameter indicate not to update the corresponding dest values.
dest | The redirecting one wishes to update |
src | The new redirecting values to update the dest |
update | What redirecting information to update. NULL if all. |
Definition at line 2185 of file channel.c.
References ast_party_id_set(), ast_party_redirecting_reason_set(), ast_party_redirecting::count, ast_party_redirecting::from, NULL, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, ast_party_redirecting::to, and update().
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 2172 of file channel.c.
References ast_party_id_set_init(), ast_party_redirecting_reason_set_init(), ast_party_redirecting::count, ast_party_redirecting::from, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, and ast_party_redirecting::to.
Referenced by indicate_redirecting(), and redirecting_write().
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 1724 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 1763 of file channel.c.
References ast_free, NULL, and ast_party_subaddress::str.
Referenced by ast_party_dialed_free(), and ast_party_id_free().
void ast_party_subaddress_init | ( | struct ast_party_subaddress * | init | ) |
Initialize the given subaddress structure.
init | Subaddress structure to initialize. |
Definition at line 1716 of file channel.c.
References NULL, 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(), and ast_party_id_init().
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 1746 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 1738 of file channel.c.
References NULL, ast_party_subaddress::odd_even_indicator, ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by ast_party_dialed_set_init(), and ast_party_id_set_init().
int ast_pre_call | ( | struct ast_channel * | chan, |
const char * | sub_args | ||
) |
Execute a Gosub call on the channel before a call is placed.
This is called between ast_request() and ast_call() to execute a predial routine on the newly created channel.
chan | Channel to execute Gosub. |
sub_args | Gosub application parameter string. |
0 | on success. |
-1 | on error. |
Definition at line 6463 of file channel.c.
References ast_app_exec_sub(), ast_channel_lock, ast_channel_tech(), ast_channel_unlock, NULL, and ast_channel_tech::pre_call.
Referenced by begin_dial_prerun(), dial_exec_full(), findmeexec(), and ring_entry().
char * ast_print_group | ( | char * | buf, |
int | buflen, | ||
ast_group_t | group | ||
) |
Print call group and pickup group —.
Print call and pickup groups into buffer.
Definition at line 8053 of file channel.c.
Referenced by callgroup_to_str(), func_channel_read(), pickupgroup_to_str(), and serialize_showchan().
char * ast_print_namedgroups | ( | struct ast_str ** | buf, |
struct ast_namedgroups * | group | ||
) |
Print named call groups and named pickup groups.
Definition at line 8078 of file channel.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_str_append(), ast_str_buffer(), buf, first, and namedgroup_member::name.
Referenced by func_channel_read(), named_callgroups_to_str(), and named_pickupgroups_to_str().
int ast_prod | ( | struct ast_channel * | chan | ) |
Send empty audio to prime a channel driver.
Definition at line 5019 of file channel.c.
References a, ast_channel_name(), ast_channel_rawwriteformat(), ast_debug, AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, ast_log, AST_STATE_UP, ast_write(), and LOG_WARNING.
Referenced by ast_activate_generator().
int ast_queue_answer | ( | struct ast_channel * | chan, |
const struct ast_stream_topology * | topology | ||
) |
Queue an ANSWER control frame with topology.
chan | channel to queue frame onto |
topology | topology to be passed through the core to the peer channel |
0 | success |
non-zero | failure |
Definition at line 1265 of file channel.c.
References AST_CONTROL_ANSWER, AST_FRAME_CONTROL, and ast_queue_frame().
int ast_queue_control | ( | struct ast_channel * | chan, |
enum ast_control_frame_type | control | ||
) |
Queue a control frame.
Queue a control frame without payload.
Definition at line 1250 of file channel.c.
References AST_FRAME_CONTROL, and ast_queue_frame().
Referenced by __analog_handle_event(), __ast_read(), analog_call(), analog_exception(), analog_hangup(), apply_negotiated_sdp_stream(), ast_do_pickup(), audiosocket_call(), chan_pjsip_incoming_ack(), chan_pjsip_incoming_response(), cli_console_answer(), cli_console_flash(), console_call(), controlplayback_manager(), handle_call_incoming(), jingle_action_session_accept(), jingle_action_session_info(), jingle_outgoing_hook(), mbl_queue_control(), on_topology_change_response(), onAlerting(), onCallEstablished(), onProgress(), pbx_outgoing_state_callback(), rtp_call(), stasis_app_control_queue_control(), unistim_call(), unreal_colp_stream_topology_request_change(), and video_info_incoming_request().
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 1257 of file channel.c.
References AST_FRAME_CONTROL, ast_queue_frame(), ast_frame::data, and ast_frame::datalen.
Referenced by __analog_handle_event(), after_bridge_move_channel(), ast_channel_queue_connected_line_update(), ast_channel_queue_redirecting_update(), chan_pjsip_incoming_response_update_cause(), close_udptl_connection(), fax_gateway_indicate_t38(), iax2_transfer(), jingle_action_session_terminate(), onModeChanged(), ooh323_indicate(), queue_read_action_payload(), setup_udptl_connection(), socket_process_helper(), t38_change_state(), t38_framehook(), t38_interpret_parameters(), transfer_redirect(), transfer_refer(), and xfer_client_on_evsub_state().
int ast_queue_frame | ( | struct ast_channel * | chan, |
struct ast_frame * | f | ||
) |
Queue one or more frames to a channel's frame queue.
chan | the channel to queue the frame(s) on |
f | the frame(s) to queue. Note that the frame(s) will be duplicated by this function. It is the responsibility of the caller to handle freeing the memory associated with the frame(s) being passed if necessary. |
0 | success |
non-zero | failure |
Definition at line 1158 of file channel.c.
References __ast_queue_frame(), and NULL.
Referenced by __ast_read(), action_atxfer(), action_cancel_atxfer(), apply_negotiated_sdp_stream(), ast_channel_set_unbridged_nolock(), ast_channel_setwhentohangup_tv(), ast_channel_stream_topology_changed_externally(), ast_dsp_process(), ast_msg_data_queue_frame(), ast_queue_answer(), ast_queue_cc_frame(), ast_queue_control(), ast_queue_control_data(), ast_queue_hangup(), ast_queue_hangup_with_cause(), ast_queue_hold(), ast_queue_unhold(), ast_softhangup_nolock(), AST_TEST_DEFINE(), attended_transfer_exec(), bridge_channel_internal_push_full(), bridge_channel_poke(), channel_do_masquerade(), cli_console_dial(), cli_console_sendtext(), conf_stop_record(), dahdi_queue_frame(), dahdi_read(), dictate_exec(), dtmf_info_incoming_request(), exec_command_on_condition(), handle_incoming_request(), handle_negotiated_sdp(), iax2_queue_frame(), load_stream_readqueue(), manager_play_dtmf(), manager_send_flash(), ooh323_onReceivedDigit(), queue_dtmf_readq(), refer_incoming_invite_request(), set_interval_hook(), stream_monitor(), stream_periodic_frames(), t38_tx_packet_handler(), unistim_do_senddigit(), unreal_queue_frame(), 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 1163 of file channel.c.
References __ast_queue_frame(), and NULL.
Referenced by __ast_answer(), __ast_read(), ast_autoservice_stop(), bridge_channel_queue_deferred_frames(), and safe_sleep_conditional().
int ast_queue_hangup | ( | struct ast_channel * | chan | ) |
Queue a hangup frame for channel.
Queue a hangup frame.
Definition at line 1169 of file channel.c.
References ast_channel_hangup_request_type(), ast_channel_lock, ast_channel_publish_blob(), ast_channel_softhangup_internal_flag_add(), ast_channel_unlock, AST_CONTROL_HANGUP, AST_FRAME_CONTROL, ast_queue_frame(), AST_SOFTHANGUP_DEV, and NULL.
Referenced by ast_app_exec_sub(), ast_unreal_fixup(), call(), chan_pjsip_session_end(), cli_console_hangup(), close_call(), iax2_destroy(), iax2_queue_hangup(), mbl_queue_hangup(), refer_incoming_invite_request(), and session_inv_on_media_update().
int ast_queue_hangup_with_cause | ( | struct ast_channel * | chan, |
int | cause | ||
) |
Queue a hangup frame for channel.
Queue a hangup frame with hangupcause set.
Definition at line 1185 of file channel.c.
References ast_channel_hangup_request_type(), ast_channel_hangupcause(), ast_channel_lock, ast_channel_publish_blob(), ast_channel_softhangup_internal_flag_add(), ast_channel_unlock, AST_CONTROL_HANGUP, AST_FRAME_CONTROL, ast_json_pack(), ast_json_unref(), ast_queue_frame(), AST_SOFTHANGUP_DEV, ast_frame::data, NULL, RAII_VAR, and ast_frame::uint32.
Referenced by __analog_handle_event(), ast_unreal_hangup(), chan_pjsip_session_end(), close_call(), close_client(), dahdi_handle_event(), discard_call(), handle_call_outgoing(), jingle_action_session_terminate(), jingle_queue_hangup_with_cause(), onCallCleared(), and transfer_cancel_step2().
int ast_queue_hold | ( | struct ast_channel * | chan, |
const char * | musicclass | ||
) |
Queue a hold frame.
chan | channel to queue frame onto |
musicclass | The suggested musicclass for the other end to use |
zero | on success |
non-zero | on failure |
Definition at line 1210 of file channel.c.
References ast_channel_hold_type(), ast_channel_lock, ast_channel_publish_blob(), ast_channel_unlock, AST_CONTROL_HOLD, AST_FRAME_CONTROL, ast_json_pack(), ast_json_unref(), ast_queue_frame(), ast_strlen_zero(), ast_frame::data, ast_frame::datalen, NULL, and ast_frame::ptr.
Referenced by __analog_handle_event(), analog_hangup(), apply_negotiated_sdp_stream(), dahdi_handle_event(), dahdi_hangup(), iax2_queue_hold(), jingle_action_session_info(), sub_hold(), and transfer_call_step1().
int ast_queue_unhold | ( | struct ast_channel * | chan | ) |
Queue an unhold frame.
chan | channel to queue frame onto |
zero | on success |
non-zero | on failure |
Definition at line 1235 of file channel.c.
References ast_channel_lock, ast_channel_publish_blob(), ast_channel_unhold_type(), ast_channel_unlock, AST_CONTROL_UNHOLD, AST_FRAME_CONTROL, ast_queue_frame(), and NULL.
Referenced by __analog_handle_event(), __analog_ss_thread(), __dahdi_exception(), analog_exception(), analog_hangup(), analog_ss_thread(), apply_negotiated_sdp_stream(), dahdi_handle_event(), dahdi_hangup(), iax2_queue_unhold(), jingle_action_session_info(), key_dial_page(), refer_incoming_invite_request(), session_inv_on_create_offer(), sub_unhold(), transfer_cancel_step2(), and unistim_hangup().
int ast_raw_answer | ( | struct ast_channel * | chan | ) |
Answer a channel.
chan | channel to answer |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2709 of file channel.c.
References ast_raw_answer_with_stream_topology(), and NULL.
Referenced by __ast_answer(), answer_trunk_chan(), app_control_answer(), pbx_builtin_answer(), and refer_incoming_invite_request().
int ast_raw_answer_with_stream_topology | ( | struct ast_channel * | chan, |
struct ast_stream_topology * | topology | ||
) |
Answer a channel passing in a stream topology.
chan | channel to answer |
topology | the peer's stream topology |
This function answers a channel and handles all necessary call setup functions.
0 | on success |
non-zero | on failure |
Definition at line 2658 of file channel.c.
References answer(), ast_channel_tech::answer, ast_channel_tech::answer_with_stream_topology, ast_channel_flags(), ast_channel_lock, ast_channel_name(), ast_channel_tech(), 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, SCOPE_TRACE, and set_channel_answer_time().
Referenced by ast_raw_answer(), and pre_bridge_setup().
struct ast_frame * ast_read | ( | struct ast_channel * | chan | ) |
Reads a frame.
chan | channel to read a frame from |
Definition at line 4276 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(), analog_ss_thread(), ast_recvtext(), AST_TEST_DEFINE(), ast_tonepair(), ast_transfer_protocol(), ast_waitfordigit_full(), async_agi_read_frame(), audiosocket_run(), autoservice_run(), background_detect_exec(), channel_spy(), conf_flush(), conf_run(), dial_exec_full(), dial_trunk(), dictate_exec(), disa_exec(), disable_t38(), do_broadcast(), do_waiting(), echo_exec(), eivr_comm(), generic_fax_exec(), handle_recordfile(), handle_speechrecognize(), isAnsweringMachine(), jack_exec(), measurenoise(), moh_channel_thread(), monitor_dial(), mp3_exec(), read_from_chan(), read_mf_digits(), read_sf_digits(), receive_dtmf_digits(), receivefax_t38_init(), record_exec(), recordthread(), run_agi(), safe_sleep_conditional(), scan_exec(), send_waveform_to_channel(), sendfax_t38_init(), speech_background(), stasis_app_exec(), wait_exec(), wait_for_answer(), wait_for_hangup(), wait_for_signal_or_hangup(), wait_for_winner(), waitforring_exec(), and waitstream_core().
|
static |
Definition at line 3432 of file channel.c.
References ast_channel_generator(), ast_channel_generatordata(), ast_channel_generatordata_set(), ast_channel_lock, ast_channel_timingfunc(), ast_channel_unlock, ast_channel_writeformat(), ast_deactivate_generator(), ast_debug, ast_format_cmp(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_sample_rate(), AST_FRAME_VOICE, ast_frame::datalen, ast_frame_subclass::format, ast_frame::frametype, ast_generator::generate, NULL, ast_frame::samples, and ast_frame::subclass.
Referenced by __ast_read().
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 4286 of file channel.c.
References __ast_read().
Referenced by ast_control_tone(), and conf_run().
struct ast_frame * ast_read_stream | ( | struct ast_channel * | chan | ) |
Reads a frame, but does not filter to just the default streams.
chan | channel to read a frame from |
Definition at line 4281 of file channel.c.
References __ast_read().
Referenced by AST_TEST_DEFINE(), bridge_handle_trip(), read_from_chan(), and stream_echo_perform().
struct ast_frame * ast_read_stream_noaudio | ( | struct ast_channel * | chan | ) |
Reads a frame, but does not filter to just the default streams, returning AST_FRAME_NULL frame if audio.
chan | channel to read a frame from |
Definition at line 4291 of file channel.c.
References __ast_read().
Referenced by bridge_handle_trip().
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 6577 of file channel.c.
References ast_readstring_full(), c, and len().
Referenced by __adsi_transmit_messages(), adsi_begin_download(), adsi_get_cpeinfo(), adsi_load_session(), app_exec(), ast_app_getdata_terminator(), dialout(), do_directory(), forward_message(), privacy_exec(), vm_authenticate(), vm_newuser_setup(), and vm_options().
int ast_readstring_full | ( | struct ast_channel * | c, |
char * | s, | ||
int | len, | ||
int | timeout, | ||
int | ftimeout, | ||
char * | enders, | ||
int | audiofd, | ||
int | ctrlfd | ||
) |
Definition at line 6582 of file channel.c.
References ast_channel_flags(), ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_channel_stream(), 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(), c, d, len(), and NULL.
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 4725 of file channel.c.
References ast_free, ast_recvtext(), buf, c, and NULL.
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 4736 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(), buf, ast_frame::data, ast_frame::datalen, ast_frame::frametype, ast_frame_subclass::integer, NULL, ast_frame::ptr, and ast_frame::subclass.
Referenced by ast_recvchar(), handle_recvtext(), and recvtext_exec().
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 9290 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_ORIG_NAME, AST_REDIRECTING_ORIG_NAME_CHAR_SET, AST_REDIRECTING_ORIG_NAME_PRESENTATION, AST_REDIRECTING_ORIG_NAME_VALID, AST_REDIRECTING_ORIG_NUMBER, AST_REDIRECTING_ORIG_NUMBER_PLAN, AST_REDIRECTING_ORIG_NUMBER_PRESENTATION, AST_REDIRECTING_ORIG_NUMBER_VALID, AST_REDIRECTING_ORIG_REASON_CODE, AST_REDIRECTING_ORIG_REASON_STR, AST_REDIRECTING_ORIG_SUBADDRESS, AST_REDIRECTING_ORIG_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_ORIG_SUBADDRESS_TYPE, AST_REDIRECTING_ORIG_SUBADDRESS_VALID, AST_REDIRECTING_ORIG_TAG, AST_REDIRECTING_PRIV_FROM_NAME, AST_REDIRECTING_PRIV_FROM_NAME_CHAR_SET, AST_REDIRECTING_PRIV_FROM_NAME_PRESENTATION, AST_REDIRECTING_PRIV_FROM_NAME_VALID, AST_REDIRECTING_PRIV_FROM_NUMBER, AST_REDIRECTING_PRIV_FROM_NUMBER_PLAN, AST_REDIRECTING_PRIV_FROM_NUMBER_PRESENTATION, AST_REDIRECTING_PRIV_FROM_NUMBER_VALID, AST_REDIRECTING_PRIV_FROM_SUBADDRESS, AST_REDIRECTING_PRIV_FROM_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_PRIV_FROM_SUBADDRESS_TYPE, AST_REDIRECTING_PRIV_FROM_SUBADDRESS_VALID, AST_REDIRECTING_PRIV_FROM_TAG, AST_REDIRECTING_PRIV_ORIG_NAME, AST_REDIRECTING_PRIV_ORIG_NAME_CHAR_SET, AST_REDIRECTING_PRIV_ORIG_NAME_PRESENTATION, AST_REDIRECTING_PRIV_ORIG_NAME_VALID, AST_REDIRECTING_PRIV_ORIG_NUMBER, AST_REDIRECTING_PRIV_ORIG_NUMBER_PLAN, AST_REDIRECTING_PRIV_ORIG_NUMBER_PRESENTATION, AST_REDIRECTING_PRIV_ORIG_NUMBER_VALID, AST_REDIRECTING_PRIV_ORIG_SUBADDRESS, AST_REDIRECTING_PRIV_ORIG_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_PRIV_ORIG_SUBADDRESS_TYPE, AST_REDIRECTING_PRIV_ORIG_SUBADDRESS_VALID, AST_REDIRECTING_PRIV_ORIG_TAG, AST_REDIRECTING_PRIV_TO_NAME, AST_REDIRECTING_PRIV_TO_NAME_CHAR_SET, AST_REDIRECTING_PRIV_TO_NAME_PRESENTATION, AST_REDIRECTING_PRIV_TO_NAME_VALID, AST_REDIRECTING_PRIV_TO_NUMBER, AST_REDIRECTING_PRIV_TO_NUMBER_PLAN, AST_REDIRECTING_PRIV_TO_NUMBER_PRESENTATION, AST_REDIRECTING_PRIV_TO_NUMBER_VALID, AST_REDIRECTING_PRIV_TO_SUBADDRESS, AST_REDIRECTING_PRIV_TO_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_PRIV_TO_SUBADDRESS_TYPE, AST_REDIRECTING_PRIV_TO_SUBADDRESS_VALID, AST_REDIRECTING_PRIV_TO_TAG, AST_REDIRECTING_REASON_CODE, AST_REDIRECTING_REASON_STR, 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_reason_ies::code, ast_party_redirecting::count, ast_party_redirecting::from, LOG_WARNING, ast_party_id_ies::name, NULL, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, party_id_build_data(), ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, redirecting_reason_build_data(), ast_party_name_ies::str, ast_party_redirecting::to, update(), and value.
Referenced by ast_channel_queue_redirecting_update(), ast_channel_update_redirecting(), and unreal_colp_redirect_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 9501 of file channel.c.
References ast_debug, 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_ORIG_NAME, AST_REDIRECTING_ORIG_NAME_CHAR_SET, AST_REDIRECTING_ORIG_NAME_PRESENTATION, AST_REDIRECTING_ORIG_NAME_VALID, AST_REDIRECTING_ORIG_NUMBER, AST_REDIRECTING_ORIG_NUMBER_PLAN, AST_REDIRECTING_ORIG_NUMBER_PRESENTATION, AST_REDIRECTING_ORIG_NUMBER_VALID, AST_REDIRECTING_ORIG_REASON_CODE, AST_REDIRECTING_ORIG_REASON_STR, AST_REDIRECTING_ORIG_SUBADDRESS, AST_REDIRECTING_ORIG_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_ORIG_SUBADDRESS_TYPE, AST_REDIRECTING_ORIG_SUBADDRESS_VALID, AST_REDIRECTING_ORIG_TAG, AST_REDIRECTING_PRIV_FROM_NAME, AST_REDIRECTING_PRIV_FROM_NAME_CHAR_SET, AST_REDIRECTING_PRIV_FROM_NAME_PRESENTATION, AST_REDIRECTING_PRIV_FROM_NAME_VALID, AST_REDIRECTING_PRIV_FROM_NUMBER, AST_REDIRECTING_PRIV_FROM_NUMBER_PLAN, AST_REDIRECTING_PRIV_FROM_NUMBER_PRESENTATION, AST_REDIRECTING_PRIV_FROM_NUMBER_VALID, AST_REDIRECTING_PRIV_FROM_SUBADDRESS, AST_REDIRECTING_PRIV_FROM_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_PRIV_FROM_SUBADDRESS_TYPE, AST_REDIRECTING_PRIV_FROM_SUBADDRESS_VALID, AST_REDIRECTING_PRIV_FROM_TAG, AST_REDIRECTING_PRIV_ORIG_NAME, AST_REDIRECTING_PRIV_ORIG_NAME_CHAR_SET, AST_REDIRECTING_PRIV_ORIG_NAME_PRESENTATION, AST_REDIRECTING_PRIV_ORIG_NAME_VALID, AST_REDIRECTING_PRIV_ORIG_NUMBER, AST_REDIRECTING_PRIV_ORIG_NUMBER_PLAN, AST_REDIRECTING_PRIV_ORIG_NUMBER_PRESENTATION, AST_REDIRECTING_PRIV_ORIG_NUMBER_VALID, AST_REDIRECTING_PRIV_ORIG_SUBADDRESS, AST_REDIRECTING_PRIV_ORIG_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_PRIV_ORIG_SUBADDRESS_TYPE, AST_REDIRECTING_PRIV_ORIG_SUBADDRESS_VALID, AST_REDIRECTING_PRIV_ORIG_TAG, AST_REDIRECTING_PRIV_TO_NAME, AST_REDIRECTING_PRIV_TO_NAME_CHAR_SET, AST_REDIRECTING_PRIV_TO_NAME_PRESENTATION, AST_REDIRECTING_PRIV_TO_NAME_VALID, AST_REDIRECTING_PRIV_TO_NUMBER, AST_REDIRECTING_PRIV_TO_NUMBER_PLAN, AST_REDIRECTING_PRIV_TO_NUMBER_PRESENTATION, AST_REDIRECTING_PRIV_TO_NUMBER_VALID, AST_REDIRECTING_PRIV_TO_SUBADDRESS, AST_REDIRECTING_PRIV_TO_SUBADDRESS_ODD_EVEN, AST_REDIRECTING_PRIV_TO_SUBADDRESS_TYPE, AST_REDIRECTING_PRIV_TO_SUBADDRESS_VALID, AST_REDIRECTING_PRIV_TO_TAG, AST_REDIRECTING_REASON_CODE, AST_REDIRECTING_REASON_STR, 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_reason::code, ast_party_redirecting::count, ast_party_redirecting::from, LOG_WARNING, ast_party_id::name, ast_party_id::number, ast_party_subaddress::odd_even_indicator, ast_party_redirecting::orig, ast_party_redirecting::orig_reason, ast_party_number::plan, ast_party_name::presentation, ast_party_number::presentation, ast_party_redirecting::priv_from, ast_party_redirecting::priv_orig, ast_party_redirecting::priv_to, ast_party_redirecting::reason, ast_party_name::str, ast_party_number::str, ast_party_subaddress::str, ast_party_redirecting_reason::str, ast_party_id::subaddress, ast_party_id::tag, ast_party_redirecting::to, ast_party_subaddress::type, ast_party_name::valid, ast_party_number::valid, ast_party_subaddress::valid, and value.
Referenced by ast_channel_redirecting_sub(), and indicate_redirecting().
struct ast_namedgroups * ast_ref_namedgroups | ( | struct ast_namedgroups * | groups | ) |
Definition at line 7760 of file channel.c.
References ao2_ref, and groups.
Referenced by ast_channel_named_callgroups_set(), ast_channel_named_pickupgroups_set(), and mkintf().
struct ast_channel * ast_request | ( | const char * | type, |
struct ast_format_cap * | request_cap, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | addr, | ||
int * | cause | ||
) |
Requests a channel.
type | type of channel to request |
request_cap | Format capabilities for requested channel |
assignedids | Unique ID to create channel with |
requestor | channel asking for data |
addr | destination of the call |
cause | Cause of failure |
Request a channel of a given type, with addr as optional information used by the low level module
NULL | failure |
non-NULL | channel on success |
Definition at line 6373 of file channel.c.
References NULL, request_channel(), and type.
Referenced by __ast_request_and_dial(), alloc_playback_chan(), ast_ari_channels_create(), ast_call_forward(), attended_transfer_bridge(), begin_dial_prerun(), blind_transfer_bridge(), build_conf(), chanavail_exec(), conf_run(), conf_start_record(), dial_transfer(), findmeexec(), meetme_menu_admin_extended(), park_local_transfer(), prepare_bridge_media_channel(), prepare_bridge_moh_channel(), retransfer_enter(), ring_entry(), and wait_for_answer().
struct ast_channel * ast_request_and_dial | ( | const char * | type, |
struct ast_format_cap * | cap, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | addr, | ||
int | timeout, | ||
int * | reason, | ||
const char * | cid_num, | ||
const char * | cid_name | ||
) |
Request a channel of a given type, with data as optional information used by the low level module and attempt to place a call on it.
type | type of channel to request |
cap | format capabilities for requested channel |
assignedids | Unique Id to assign to channel |
requestor | channel asking for data |
addr | destination of the call |
timeout | maximum amount of time to wait for an answer |
reason | why unsuccessful (if unsuccessful) |
cid_num | Caller-ID Number |
cid_name | Caller-ID Name (ascii) |
Definition at line 6193 of file channel.c.
References __ast_request_and_dial(), NULL, and type.
Referenced by generic_recall().
struct ast_channel * ast_request_with_stream_topology | ( | const char * | type, |
struct ast_stream_topology * | topology, | ||
const struct ast_assigned_ids * | assignedids, | ||
const struct ast_channel * | requestor, | ||
const char * | addr, | ||
int * | cause | ||
) |
Requests a channel (specifying stream topology)
type | type of channel to request |
topology | Stream topology for requested channel |
assignedids | Unique ID to create channel with |
requestor | channel asking for data |
addr | destination of the call |
cause | Cause of failure |
Request a channel of a given type, with addr as optional information used by the low level module
NULL | failure |
non-NULL | channel on success |
Definition at line 6378 of file channel.c.
References NULL, request_channel(), and type.
Referenced by dial_exec_full(), and do_forward().
int ast_safe_sleep | ( | struct ast_channel * | chan, |
int | ms | ||
) |
Wait, look for hangups.
Wait for a specified amount of time, looking for hangups.
Definition at line 1593 of file channel.c.
References NULL, and safe_sleep_conditional().
Referenced by __analog_ss_thread(), adsi_transmit_message_full(), alarmreceiver_exec(), analog_ss_thread(), ast_senddigit(), ast_senddigit_mf(), conf_run(), dictate_exec(), disa_exec(), dtmf_no_bridge(), dtmf_stream(), flash_exec(), mf_stream(), milliwatt_exec(), old_milliwatt_exec(), pbx_builtin_wait(), play_moh_exec(), playtone(), privacy_exec(), send_tone_burst(), sf_stream(), testclient_exec(), testserver_exec(), try_calling(), waitforcond_exec(), waituntil_exec(), and zapateller_exec().
int ast_safe_sleep_conditional | ( | struct ast_channel * | chan, |
int | ms, | ||
int(*)(void *) | cond, | ||
void * | data | ||
) |
Wait for a specified amount of time, looking for hangups and a condition argument.
chan | channel to wait for |
ms | length of time in milliseconds to sleep. |
cond | a function pointer for testing continue condition |
data | argument to be passed to the condition test function |
Waits for a specified amount of time, servicing the channel as required. If cond returns 0, this function returns.
Definition at line 1587 of file channel.c.
References cond, ast_frame::data, and safe_sleep_conditional().
int ast_safe_sleep_without_silence | ( | struct ast_channel * | chan, |
int | ms | ||
) |
Wait for a specified amount of time, looking for hangups, and do not generate silence.
chan | channel to wait for |
ms | length of time in milliseconds to sleep. This should never be less than zero. |
Waits for a specified amount of time, servicing the channel as required.
Definition at line 1598 of file channel.c.
References NULL, and safe_sleep_conditional().
Referenced by wait_for_hangup().
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
Definition at line 8293 of file channel.c.
References ast_say_character_str_full, and str.
Referenced by common_exec(), pbx_builtin_saycharacters(), pbx_builtin_saycharacters_case(), play_mailbox_owner(), play_on_channel(), and vmsayname_exec().
int ast_say_digit_str | ( | struct ast_channel * | chan, |
const char * | num, | ||
const char * | ints, | ||
const char * | lang | ||
) |
says digits of a string
chan | channel to act upon |
num | string to speak |
ints | which dtmf to interrupt on |
lang | language to speak in |
Vocally says the digits of a given string
0 | on succes |
DTMF | if interrupted |
-1 | on failure |
Definition at line 8281 of file channel.c.
References ast_say_digit_str_full, and str.
Referenced by __analog_ss_thread(), forward_message(), invent_message(), pbx_builtin_saydigits(), play_message_callerid(), and play_on_channel().
int ast_say_digits | ( | struct ast_channel * | chan, |
int | num, | ||
const char * | ints, | ||
const char * | lang | ||
) |
says digits
chan | channel to act upon |
num | number to speak |
ints | which dtmf to interrupt on |
lang | language to speak |
Vocally says digits of a given number
0 | on success |
DTMF | if interrupted |
-1 | on failure |
Definition at line 8275 of file channel.c.
References ast_say_digits_full().
Referenced by announce_to_dial(), common_exec(), conf_exec(), conf_run(), and say_parking_space().
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.
Definition at line 8305 of file channel.c.
References ast_say_digit_str_full, and buf.
Referenced by ast_say_digits(), ast_say_enumeration_full_da(), ast_say_enumeration_full_de(), ast_say_enumeration_full_is(), ast_say_number_full_cs(), ast_say_number_full_da(), ast_say_number_full_de(), ast_say_number_full_en_GB(), ast_say_number_full_es(), ast_say_number_full_fr(), ast_say_number_full_he(), ast_say_number_full_hu(), ast_say_number_full_is(), ast_say_number_full_it(), ast_say_number_full_ja(), ast_say_number_full_ka(), ast_say_number_full_nl(), ast_say_number_full_no(), ast_say_number_full_pt(), ast_say_number_full_ru(), ast_say_number_full_se(), ast_say_number_full_th(), ast_say_number_full_ur(), ast_say_number_full_vi(), ast_say_number_full_zh(), and say_init_mode().
int ast_say_enumeration | ( | struct ast_channel * | chan, |
int | num, | ||
const char * | ints, | ||
const char * | lang, | ||
const char * | options | ||
) |
says an enumeration
chan | channel to say them enumeration on |
num | number to say on the channel |
ints | which dtmf to interrupt on |
lang | language to speak the enumeration |
options | set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter |
Vocally says an enumeration on a given channel (first, second, third, forth, thirtyfirst, hundredth, ....) Especially useful for dates and messages. Says 'last' if num equals to INT_MAX
0 | on success |
DTMF | digit on interrupt |
-1 | on failure |
Definition at line 8269 of file channel.c.
References ast_say_enumeration_full, language, and options.
Referenced by ast_say_date_da(), ast_say_date_de(), ast_say_date_is(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), ast_say_date_with_format_is(), ast_say_date_with_format_pl(), and ast_say_date_with_format_vi().
int ast_say_money_str | ( | struct ast_channel * | chan, |
const char * | str, | ||
const char * | ints, | ||
const char * | lang | ||
) |
function to pronounce monetary amounts
Definition at line 8287 of file channel.c.
References ast_say_money_str_full, and str.
Referenced by pbx_builtin_saymoney().
int ast_say_number | ( | struct ast_channel * | chan, |
int | num, | ||
const char * | ints, | ||
const char * | lang, | ||
const char * | options | ||
) |
says a number
chan | channel to say them number on |
num | number to say on the channel |
ints | which dtmf to interrupt on |
lang | language to speak the number |
options | set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter |
Vocally says a number on a given channel
0 | on success |
DTMF | digit on interrupt |
-1 | on failure |
Definition at line 8257 of file channel.c.
References ast_say_number_full, language, and options.
Referenced by announce_user_count(), app_exec(), ast_say_date_da(), ast_say_date_de(), ast_say_date_en(), ast_say_date_fr(), ast_say_date_gr(), ast_say_date_he(), ast_say_date_hu(), ast_say_date_is(), ast_say_date_ja(), ast_say_date_ka(), ast_say_date_nl(), ast_say_date_pt(), ast_say_date_th(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), ast_say_date_with_format_es(), ast_say_date_with_format_fr(), ast_say_date_with_format_is(), ast_say_date_with_format_it(), ast_say_date_with_format_nl(), ast_say_date_with_format_pl(), ast_say_date_with_format_pt(), ast_say_date_with_format_th(), ast_say_date_with_format_vi(), ast_say_datetime_en(), ast_say_datetime_fr(), ast_say_datetime_from_now_en(), ast_say_datetime_from_now_fr(), ast_say_datetime_from_now_he(), ast_say_datetime_from_now_ka(), ast_say_datetime_from_now_pt(), ast_say_datetime_he(), ast_say_datetime_ja(), ast_say_datetime_pt(), ast_say_datetime_th(), ast_say_datetime_zh(), ast_say_time_de(), ast_say_time_en(), ast_say_time_fr(), ast_say_time_gr(), ast_say_time_hu(), ast_say_time_ja(), ast_say_time_ka(), ast_say_time_nl(), ast_say_time_pt(), ast_say_time_pt_BR(), ast_say_time_th(), ast_say_time_zh(), conf_run(), count_exec(), dictate_exec(), get_folder(), get_folder_ja(), gr_say_number_female(), limits_interval_playback(), meetme_menu_admin_extended(), pbx_builtin_saynumber(), play_message(), play_message_duration(), play_on_channel(), playback_common(), say_and_wait(), say_position(), try_calling(), vm_intro_gr(), vm_intro_he(), vm_intro_multilang(), vm_intro_pt(), and vm_intro_pt_BR().
int ast_say_ordinal | ( | struct ast_channel * | chan, |
int | num, | ||
const char * | ints, | ||
const char * | lang, | ||
const char * | options | ||
) |
says an ordinal number
chan | channel to say them number on |
num | ordinal number to say on the channel |
ints | which dtmf to interrupt on |
lang | language to speak the number |
options | set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter |
Vocally says an ordinal number on a given channel
0 | on success |
DTMF | digit on interrupt |
-1 | on failure |
Definition at line 8263 of file channel.c.
References ast_say_ordinal_full, language, and options.
Referenced by pbx_builtin_sayordinal().
int ast_say_phonetic_str | ( | struct ast_channel * | chan, |
const char * | str, | ||
const char * | ints, | ||
const char * | lang | ||
) |
Definition at line 8299 of file channel.c.
References ast_say_phonetic_str_full, and str.
Referenced by pbx_builtin_sayphonetic().
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 4993 of file channel.c.
References ast_channel_tech(), AST_DEFAULT_EMULATE_DTMF_DURATION, ast_safe_sleep(), ast_senddigit_begin(), ast_senddigit_end(), and digit.
Referenced by dial_exec_full(), and dtmf_stream().
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 4893 of file channel.c.
References ast_channel_lock, ast_channel_name(), ast_channel_sending_dtmf_digit_set(), ast_channel_sending_dtmf_tv_set(), ast_channel_tech(), ast_channel_unlock, ast_debug, ast_playtones_start(), ast_tvnow(), and digit.
Referenced by ast_senddigit(), ast_senddigit_external(), and ast_write_stream().
int ast_senddigit_end | ( | struct ast_channel * | chan, |
char | digit, | ||
unsigned int | duration | ||
) |
Send a DTMF digit to a channel.
chan | channel to act upon |
digit | the DTMF digit to send, encoded in ASCII |
duration | the duration of the digit ending in ms |
Definition at line 4943 of file channel.c.
References ast_channel_generator(), ast_channel_lock, ast_channel_sending_dtmf_digit(), ast_channel_sending_dtmf_digit_set(), ast_channel_tech(), ast_channel_unlock, ast_playtones_stop(), digit, and ast_channel_tech::send_digit_end.
Referenced by ast_channel_end_dtmf(), ast_senddigit(), ast_senddigit_external(), and ast_write_stream().
int ast_senddigit_external | ( | struct ast_channel * | chan, |
char | digit, | ||
unsigned int | duration | ||
) |
Send a DTMF digit to a channel from an external thread.
chan | channel to act upon |
digit | the DTMF digit to send, encoded in ASCII |
duration | the duration of the digit ending in ms |
Definition at line 5006 of file channel.c.
References ast_channel_tech(), AST_DEFAULT_EMULATE_DTMF_DURATION, ast_senddigit_begin(), ast_senddigit_end(), and digit.
Referenced by dtmf_stream(), and manager_play_dtmf().
int ast_senddigit_mf | ( | struct ast_channel * | chan, |
char | digit, | ||
unsigned int | duration, | ||
unsigned int | durationkp, | ||
unsigned int | durationst, | ||
int | is_external | ||
) |
Send an MF digit to a channel.
chan | channel to act upon |
digit | the MF digit to send, encoded in ASCII |
duration | the duration of a numeric digit ending in ms |
durationkp | the duration of a KP digit ending in ms |
durationst | the duration of a ST, STP, ST2P, or ST3P digit ending in ms |
is_external | 1 if called by a thread that is not the channel's media handler thread, 0 if called by the channel's media handler thread. |
Definition at line 4971 of file channel.c.
References ast_channel_tech(), ast_safe_sleep(), ast_senddigit_mf_begin(), ast_senddigit_mf_end(), DEFAULT_EMULATE_MF_DURATION, and digit.
Referenced by mf_stream().
int ast_senddigit_mf_begin | ( | struct ast_channel * | chan, |
char | digit | ||
) |
Send an MF digit to a channel.
chan | channel to act upon |
digit | the MF digit to send, encoded in ASCII |
Definition at line 4854 of file channel.c.
References ast_channel_name(), ast_log, ast_playtones_start(), digit, LOG_WARNING, and mf_tones.
Referenced by ast_senddigit_mf().
int ast_senddigit_mf_end | ( | struct ast_channel * | chan | ) |
End sending an MF digit to a channel.
chan | channel to act upon |
Definition at line 4962 of file channel.c.
References ast_channel_generator(), and ast_playtones_stop().
Referenced by ast_senddigit_mf(), mf_stream(), and sf_stream().
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 4828 of file channel.c.
References ARRAY_LEN, ast_free, ast_msg_data_alloc(), AST_MSG_DATA_ATTR_BODY, AST_MSG_DATA_SOURCE_TYPE_UNKNOWN, ast_sendtext_data(), ast_strlen_zero(), text, and ast_msg_data_attribute::type.
Referenced by __ast_read(), handle_sendtext(), sendtext_exec(), and sendtext_safe().
int ast_sendtext_data | ( | struct ast_channel * | chan, |
struct ast_msg_data * | msg | ||
) |
Sends text to a channel in an ast_msg_data structure wrapper with ast_sendtext as fallback.
chan | channel to act upon |
msg | ast_msg_data structure |
Write text to a display on a channel. If the channel driver doesn't support the send_text_data callback. then the original send_text callback will be used if available.
0 | on success |
-1 | on failure |
Definition at line 4770 of file channel.c.
References ast_begins_with(), AST_CHAN_TP_SEND_TEXT_DATA, ast_channel_flags(), ast_channel_lock, ast_channel_name(), ast_channel_nativeformats(), ast_channel_tech(), ast_channel_unlock, ast_check_hangup(), ast_clear_flag, ast_debug, AST_FLAG_BLOCKING, AST_FLAG_ZOMBIE, ast_format_cap_has_type(), ast_format_t140, AST_FRAME_TEXT, ast_frfree, AST_MALLOCD_DATA, AST_MEDIA_TYPE_TEXT, AST_MSG_DATA_ATTR_BODY, AST_MSG_DATA_ATTR_CONTENT_TYPE, AST_MSG_DATA_ATTR_FROM, AST_MSG_DATA_ATTR_TO, ast_msg_data_get_attribute(), ast_strdup, ast_strlen_zero(), ast_test_flag, CHECK_BLOCKING, ast_frame::data, ast_frame::datalen, ast_frame_subclass::format, ast_frame::frametype, ast_frame::mallocd, ast_frame::ptr, S_OR, send_text(), ast_channel_tech::send_text, ast_channel_tech::send_text_data, ast_frame::src, ast_frame::subclass, and ast_channel_tech::write_text.
Referenced by __ast_read(), ast_sendtext(), bridge_channel_handle_write(), 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 7356 of file channel.c.
References ast_party_caller::ani, ast_channel_caller(), ast_channel_lock, ast_channel_publish_snapshot(), ast_channel_unlock, ast_free, ast_strdup, ast_party_caller::id, name, ast_party_id::name, ast_party_id::number, ast_party_name::str, ast_party_number::str, ast_party_name::valid, and ast_party_number::valid.
Referenced by __analog_ss_thread(), __ast_request_and_dial(), analog_ss_thread(), ari_channels_handle_originate_with_id(), disa_exec(), handle_setcallerid(), pbx_outgoing_attempt(), privacy_exec(), ring_entry(), and socket_process_helper().
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 2518 of file channel.c.
References ast_channel_bridge_peer(), ast_channel_cleanup, ast_channel_hangupsource(), ast_channel_lock, ast_channel_unlock, ast_strlen_zero(), and RAII_VAR.
Referenced by __dahdi_exception(), analog_exception(), call(), chan_pjsip_session_end(), func_channel_write_real(), handle_hangup(), pbx_builtin_hangup(), session_inv_on_media_update(), and set_hangup_source_and_cause().
void ast_set_party_id_all | ( | struct ast_set_party_id * | update_id | ) |
Set the update marker to update all information of a corresponding party id.
update_id | The update marker for a corresponding party id. |
Definition at line 1769 of file channel.c.
References ast_set_party_id::name, ast_set_party_id::number, and ast_set_party_id::subaddress.
Referenced by set_redirecting().
int ast_set_read_format | ( | struct ast_channel * | chan, |
struct ast_format * | format | ||
) |
Sets read format on channel chan.
chan | channel to change |
format | format to set for reading |
Definition at line 5781 of file channel.c.
References ao2_cleanup, ast_assert, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, NULL, and set_format().
Referenced by __ast_play_and_record(), adsi_transmit_message_full(), alarmreceiver_exec(), ast_bridge_channel_restore_formats(), ast_channel_make_compatible_helper(), audiosocket_exec(), background_detect_exec(), build_conf(), channel_do_masquerade(), conf_run(), dictate_exec(), do_waiting(), eagi_exec(), fax_detect_framehook(), fax_gateway_framehook(), generic_fax_exec(), handle_recordfile(), handle_speechrecognize(), holding_bridge_join(), isAnsweringMachine(), jack_exec(), jingle_interpret_content(), jingle_read(), measurenoise(), meetme_menu_admin_extended(), old_milliwatt_exec(), ooh323_new(), ooh323_rtp_read(), ooh323_set_read_format(), ooh323_set_write_format(), record_exec(), set_caps(), set_read_to_slin(), socket_process_helper(), speech_background(), and unistim_rtp_read().
int ast_set_read_format_from_cap | ( | struct ast_channel * | chan, |
struct ast_format_cap * | formats | ||
) |
Sets read format on channel chan from capabilities Set read format for channel to whichever component of "format" is best.
chan | channel to change |
formats | new formats to pick from for reading |
Definition at line 5799 of file channel.c.
References set_format().
int ast_set_read_format_path | ( | struct ast_channel * | chan, |
struct ast_format * | raw_format, | ||
struct ast_format * | core_format | ||
) |
Set specific read path on channel.
chan | Channel to setup read path. |
raw_format | Format to expect from the channel driver. |
core_format | What the core wants to read. |
0 | on success. |
-1 | on error. |
Definition at line 5507 of file channel.c.
References ast_channel_name(), ast_channel_rawreadformat(), ast_channel_readformat(), ast_channel_readtrans(), ast_channel_readtrans_set(), ast_channel_set_rawreadformat(), ast_channel_set_readformat(), ast_debug, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_name(), ast_translator_build_path(), ast_translator_free_path(), and NULL.
Referenced by __ast_read(), chan_pjsip_read_stream(), set_softmix_bridge_data(), and softmix_bridge_write_voice().
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 8137 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(), ari_channels_handle_originate_with_id(), ast_ari_channels_create(), ast_call_forward(), ast_pbx_outgoing_exten_predial(), and pbx_outgoing_attempt().
int ast_set_write_format | ( | struct ast_channel * | chan, |
struct ast_format * | format | ||
) |
Sets write format on channel chan.
chan | channel to change |
format | format to set for writing |
Definition at line 5822 of file channel.c.
References ao2_cleanup, ast_assert, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, NULL, and set_format().
Referenced by adsi_transmit_message_full(), alarmreceiver_exec(), ast_bridge_channel_restore_formats(), ast_channel_make_compatible_helper(), ast_channel_start_silence_generator(), ast_channel_stop_silence_generator(), ast_stopstream(), ast_write_stream(), audiosocket_exec(), broadcast_exec(), build_conf(), channel_do_masquerade(), chanspy_exec(), conf_run(), dahdiscan_exec(), extenspy_exec(), fax_gateway_framehook(), generic_fax_exec(), handle_participant_join(), jack_exec(), jingle_interpret_content(), jingle_read(), linear_alloc(), linear_release(), meetme_menu_admin_extended(), moh_alloc(), moh_files_release(), moh_files_write_format_change(), moh_release(), mp3_exec(), old_milliwatt_exec(), ooh323_new(), ooh323_rtp_read(), ooh323_set_write_format(), ooh323_write(), participant_reaction_announcer_join(), playtones_alloc(), playtones_release(), send_waveform_to_channel(), set_caps(), set_softmix_bridge_data(), socket_process_helper(), tonepair_alloc(), tonepair_release(), and unistim_rtp_read().
int ast_set_write_format_from_cap | ( | struct ast_channel * | chan, |
struct ast_format_cap * | formats | ||
) |
Sets write format on channel chan Set write format for channel to whichever component of "format" is best.
chan | channel to change |
formats | new formats to pick from for writing |
Definition at line 5840 of file channel.c.
References set_format().
Referenced by ast_openstream_full().
int ast_set_write_format_interleaved_stereo | ( | struct ast_channel * | chan, |
struct ast_format * | format | ||
) |
Sets write format for a channel. All internal data will than be handled in an interleaved format. (needed by binaural opus)
chan | channel to change |
format | format to set for writing |
Definition at line 5804 of file channel.c.
References ao2_cleanup, ast_assert, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, NULL, and set_format().
Referenced by set_softmix_bridge_data(), and softmix_bridge_unsuspend().
int ast_set_write_format_path | ( | struct ast_channel * | chan, |
struct ast_format * | core_format, | ||
struct ast_format * | raw_format | ||
) |
Set specific write path on channel.
chan | Channel to setup write path. |
core_format | What the core wants to write. |
raw_format | Raw write format. |
0 | on success. |
-1 | on error. |
Definition at line 5543 of file channel.c.
References ast_channel_name(), ast_channel_rawwriteformat(), ast_channel_set_rawwriteformat(), ast_channel_set_writeformat(), ast_channel_writeformat(), ast_channel_writetrans(), ast_channel_writetrans_set(), ast_debug, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_name(), ast_translator_build_path(), ast_translator_free_path(), and NULL.
Referenced by chan_pjsip_read_stream().
int ast_setstate | ( | struct ast_channel * | chan, |
enum | ast_channel_state | ||
) |
Change the state of a channel.
Definition at line 7408 of file channel.c.
References ast_channel_flags(), AST_CHANNEL_NAME, ast_channel_name(), ast_channel_publish_snapshot(), ast_channel_state_set(), ast_copy_string(), AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, ast_devstate_changed_literal(), AST_DEVSTATE_NOT_CACHABLE, AST_FLAG_DISABLE_DEVSTATE_CACHE, ast_test_flag, and name.
Referenced by __analog_handle_event(), __analog_ss_thread(), __ast_read(), __dahdi_exception(), analog_answer(), analog_call(), analog_exception(), analog_ss_thread(), ast_raw_answer_with_stream_topology(), AST_TEST_DEFINE(), chan_pjsip_answer(), chan_pjsip_incoming_response(), console_answer(), dahdi_answer(), dahdi_call(), dahdi_handle_event(), dahdi_indicate(), dahdi_read(), handle_response_ciev(), iax2_call(), indicate_busy(), indicate_congestion(), jingle_action_session_info(), jingle_action_session_initiate(), jingle_call(), mbl_hangup(), my_set_waitingfordt(), onAlerting(), onProgress(), ooh323_answer(), ooh323_new(), refer_incoming_invite_request(), unistim_answer(), unistim_call(), unistim_new(), unistim_ss(), and unreal_queue_frame().
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 3199 of file channel.c.
References ast_settimeout_full(), c, and ast_channel::data.
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 3204 of file channel.c.
References ao2_ref, ast_channel_fdno(), ast_channel_fdno_set(), ast_channel_flags(), ast_channel_lock, ast_channel_timer(), ast_channel_timingdata(), ast_channel_timingdata_set(), ast_channel_timingfd(), ast_channel_timingfunc_set(), 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, c, ast_channel::data, and NULL.
Referenced by ast_readaudio_callback(), and ast_settimeout().
int ast_softhangup | ( | struct ast_channel * | chan, |
int | cause | ||
) |
Softly hangup a channel, lock.
Softly hangup up a channel.
Definition at line 2490 of file channel.c.
References ast_channel_hangup_request_type(), ast_channel_lock, ast_channel_publish_blob(), ast_channel_unlock, ast_json_pack(), ast_json_unref(), ast_softhangup_nolock(), NULL, and RAII_VAR.
Referenced by __analog_handle_event(), __ast_module_user_hangup_all(), __ast_pbx_run(), __unload_module(), after_bridge_move_channel(), after_bridge_move_channel_fail(), agent_logoff_request(), agents_sweep(), analog_attempt_transfer(), ast_ari_channels_hangup(), ast_bridge_transfer_attended(), ast_channel_softhangup_cb(), ast_dial_join(), attempt_transfer(), blond_nonfinal_exit(), bridge_channel_attended_transfer(), cc_generic_agent_stop_ringing(), conf_free(), dahdi_handle_event(), handle_hangup(), handle_softhangup(), hangup_channel(), retransfer_exit(), rtp_check_timeout(), sla_handle_hold_event(), softhangup_exec(), stasis_app_bridge_moh_stop(), and unload_module().
void ast_softhangup_all | ( | void | ) |
Soft hangup all active channels.
Definition at line 493 of file channel.c.
References ao2_callback, ast_channel_softhangup_cb(), channels, NULL, OBJ_MULTIPLE, and OBJ_NODATA.
Referenced by can_safely_quit().
int ast_softhangup_nolock | ( | struct ast_channel * | chan, |
int | cause | ||
) |
Softly hangup a channel, don't lock.
Softly hangup up a channel (no channel lock)
Definition at line 2477 of file channel.c.
References ast_channel_blocker(), ast_channel_flags(), ast_channel_name(), ast_channel_softhangup_internal_flag_add(), ast_debug, AST_FLAG_BLOCKING, ast_null_frame, ast_queue_frame(), and ast_test_flag.
Referenced by __analog_handle_event(), app_control_dial(), ast_async_goto(), ast_bridge_join(), ast_channel_softhangup_withcause_locked(), ast_pbx_h_exten_run(), ast_pbx_hangup_handler_run(), ast_softhangup(), attempt_transfer(), dahdi_softhangup_all(), do_monitor(), gosub_run(), internal_bridge_after_cb(), jingle_indicate(), and pbx_builtin_hangup().
const char * ast_state2str | ( | enum ast_channel_state | state | ) |
Gives the string form of a given channel state.
state | state to get the name of |
Definition at line 636 of file channel.c.
References AST_STATE_BUSY, AST_STATE_DIALING, AST_STATE_DIALING_OFFHOOK, AST_STATE_DOWN, AST_STATE_MUTE, AST_STATE_OFFHOOK, AST_STATE_PRERING, AST_STATE_RESERVED, AST_STATE_RING, AST_STATE_RINGING, AST_STATE_UP, ast_threadstorage_get(), buf, STATE2STR_BUFSIZE, and state2str_threadbuf.
Referenced by ast_channel_snapshot_to_json(), ast_manager_build_channel_state_string_prefix(), cli_channel_print_body(), func_channel_read(), handle_chanlist(), handle_showchan(), and serialize_showchan().
int ast_str2cause | ( | const char * | name | ) |
Convert a symbolic hangup cause to number.
Convert the string form of a cause code to a number.
Definition at line 625 of file channel.c.
References ARRAY_LEN, causes, and name.
Referenced by dial_exec_full(), and pbx_builtin_hangup().
AST_THREADSTORAGE_RAW | ( | in_intercept_routine | ) |
Storage to determine if the current thread is running an intercept dialplan routine.
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 7622 of file channel.c.
References ast_channel_generatordata(), ast_frfree, ast_read(), ast_tonepair_start(), ast_waitfor(), tonepair_def::duration, tonepair_def::freq1, tonepair_def::freq2, and tonepair_def::vol.
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 7604 of file channel.c.
References ast_activate_generator(), d, tonepair_def::duration, tonepair_def::freq1, tonepair_def::freq2, tonepair, 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 7617 of file channel.c.
References ast_deactivate_generator().
Referenced by sendnoise().
int ast_transfer | ( | struct ast_channel * | chan, |
char * | dest | ||
) |
Transfer a call to dest, if the channel supports transfer.
Transfer a channel (if supported).
Called by:
Definition at line 6504 of file channel.c.
References ast_transfer_protocol().
Referenced by app_control_redirect().
int ast_transfer_protocol | ( | struct ast_channel * | chan, |
char * | dest, | ||
int * | protocol | ||
) |
Transfer a call to dest, if the channel supports transfer.
Transfer a channel (if supported) receieve protocol result.
Called by:
Definition at line 6517 of file channel.c.
References ast_channel_flags(), ast_channel_lock, ast_channel_tech(), 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, transfer(), and ast_channel_tech::transfer.
Referenced by ast_transfer(), and 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 672 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.
int ast_undestroyed_channels | ( | void | ) |
Definition at line 504 of file channel.c.
References ast_atomic_fetchadd_int(), and chancount.
Referenced by wait_for_channels_to_die().
void ast_uninstall_music_functions | ( | void | ) |
Definition at line 7781 of file channel.c.
References ast_moh_cleanup_ptr, ast_moh_start_ptr, ast_moh_stop_ptr, and NULL.
Referenced by unload_module().
struct ast_namedgroups * ast_unref_namedgroups | ( | struct ast_namedgroups * | groups | ) |
Definition at line 7754 of file channel.c.
References ao2_cleanup, and NULL.
Referenced by ast_channel_named_callgroups_set(), ast_channel_named_pickupgroups_set(), destroy_dahdi_pvt(), endpoint_destructor(), func_channel_write_real(), mkintf(), named_groups_handler(), and process_dahdi().
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 3181 of file channel.c.
References ast_waitfor_nandfds(), c, and NULL.
Referenced by __adsi_transmit_messages(), __analog_ss_thread(), __ast_answer(), __ast_play_and_record(), __ast_request_and_dial(), adsi_careful_send(), analog_ss_thread(), ast_control_tone(), ast_recvtext(), ast_tonepair(), ast_transfer_protocol(), background_detect_exec(), channel_spy(), conf_flush(), dial_trunk(), dictate_exec(), disa_exec(), disable_t38(), do_broadcast(), do_waiting(), echo_exec(), handle_recordfile(), handle_speechrecognize(), isAnsweringMachine(), jack_exec(), launch_asyncagi(), measurenoise(), moh_channel_thread(), mp3_exec(), read_mf_digits(), read_sf_digits(), receive_dtmf_digits(), receivefax_t38_init(), record_exec(), recordthread(), safe_sleep_conditional(), scan_exec(), send_waveform_to_channel(), sendfax_t38_init(), speech_background(), stasis_app_exec(), stream_echo_perform(), wait_exec(), 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 3176 of file channel.c.
References ast_waitfor_nandfds(), c, and NULL.
Referenced by autoservice_run(), dial_exec_full(), monitor_dial(), wait_for_answer(), and wait_for_winner().
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.
Waits for input on an fd.
Definition at line 2999 of file channel.c.
References ast_waitfor_nandfds(), and NULL.
Referenced by dundi_lookup_internal(), dundi_precache_internal(), rfcomm_wait(), and softmix_mixing_loop().
struct ast_channel * ast_waitfor_nandfds | ( | struct ast_channel ** | c, |
int | n, | ||
int * | fds, | ||
int | nfds, | ||
int * | exception, | ||
int * | outfd, | ||
int * | ms | ||
) |
Wait for x amount of time on a file descriptor to have input.
Waits for activity on a group of channels.
Definition at line 3007 of file channel.c.
References ast_add_fd(), ast_alloca, ast_channel_fd(), ast_channel_fd_count(), ast_channel_fdno_set(), ast_channel_flags(), ast_channel_lock, ast_channel_name(), ast_channel_softhangup_internal_flag_add(), ast_channel_unlock, ast_channel_whentohangup(), ast_clear_flag, AST_FLAG_BLOCKING, AST_FLAG_EXCEPTION, ast_poll, ast_set_flag, AST_SOFTHANGUP_TIMEOUT, ast_test_suite_event_notify, ast_tvcmp(), ast_tvdiff_ms(), ast_tvnow(), ast_tvsub(), ast_tvzero(), c, CHECK_BLOCKING, errno, max, and NULL.
Referenced by ast_waitfor(), ast_waitfor_n(), ast_waitfor_n_fd(), ast_waitfordigit_full(), audiosocket_run(), bridge_channel_wait(), conf_run(), eivr_comm(), generic_fax_exec(), run_agi(), wait_for_signal_or_hangup(), 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 3194 of file channel.c.
References ast_waitfordigit_full(), c, and NULL.
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_record_review(), collect_digits(), common_exec(), control_streamfile(), cpeid_exec(), dialout(), directory_exec(), forward_message(), get_folder(), get_folder_ja(), ivr_dispatch(), my_getsigstr(), pbx_builtin_waitexten(), play_record_review(), 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_instructions_ja(), vm_options(), vm_tempgreeting(), wait_a_bit(), and wait_our_turn().
int ast_waitfordigit_full | ( | struct ast_channel * | c, |
int | ms, | ||
const char * | breakon, | ||
int | audiofd, | ||
int | ctrlfd | ||
) |
Wait for a digit Same as ast_waitfordigit() with audio fd for outputting read audio and ctrlfd to monitor for reading.
c | channel to wait for a digit on |
ms | how many milliseconds to wait (<0 for indefinite). |
breakon | string of DTMF digits to break upon or NULL for any. |
audiofd | audio file descriptor to write to if audio frames are received |
ctrlfd | control file descriptor to monitor for reading |
Definition at line 3258 of file channel.c.
References ast_channel_clear_flag(), ast_channel_flags(), ast_channel_set_flag(), ast_check_hangup(), AST_CONTROL_ANSWER, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_FLASH, AST_CONTROL_HANGUP, AST_CONTROL_HOLD, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_REDIRECTING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_STREAM_FORWARD, AST_CONTROL_STREAM_RESTART, AST_CONTROL_STREAM_REVERSE, AST_CONTROL_STREAM_STOP, AST_CONTROL_STREAM_SUSPEND, AST_CONTROL_UNHOLD, AST_CONTROL_UPDATE_RTP_PEER, AST_FLAG_END_DTMF_ONLY, AST_FLAG_ZOMBIE, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_VOICE, ast_frfree, ast_log, ast_read(), ast_remaining_ms(), ast_test_flag, ast_tvnow(), ast_waitfor_nandfds(), c, ast_frame::data, ast_frame::datalen, errno, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, NULL, ast_frame::ptr, and ast_frame::subclass.
Referenced by ast_readstring_full(), ast_waitfordigit(), handle_getoption(), handle_waitfordigit(), and pbx_builtin_waitdigit().
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 5163 of file channel.c.
References ast_write_stream().
Referenced by adsi_careful_send(), ast_prod(), ast_readaudio_callback(), ast_readvideo_callback(), AST_TEST_DEFINE(), ast_write_video(), audiosocket_run(), conf_queue_dtmf(), conf_run(), dictate_exec(), echo_exec(), fax_gateway_detect_v21(), gen_generate(), generic_fax_exec(), handle_jack_audio(), jb_get_and_deliver(), linear_generator(), manager_send_flash(), milliwatt_generate(), moh_files_generator(), moh_generate(), mp3_exec(), playtones_generator(), send_waveform_to_channel(), silence_generator_generate(), sms_generate(), spandsp_fax_gw_t30_gen(), spy_generate(), t38_tx_packet_handler(), tonepair_generator(), and wait_for_answer().
int ast_write_stream | ( | struct ast_channel * | chan, |
int | stream_num, | ||
struct ast_frame * | frame | ||
) |
Write a frame to a stream This function writes the given frame to the indicated stream on the channel.
chan | destination channel of the frame |
stream_num | destination stream on the channel |
frame | frame that will be written |
Definition at line 5168 of file channel.c.
References apply_plc(), ast_audiohook_detach_list(), AST_AUDIOHOOK_DIRECTION_WRITE, ast_audiohook_write_list(), ast_audiohook_write_list_empty(), ast_channel_audiohooks(), ast_channel_audiohooks_set(), ast_channel_flags(), ast_channel_fout(), ast_channel_fout_set(), ast_channel_framehooks(), ast_channel_generatordata(), ast_channel_get_default_stream(), ast_channel_get_stream_topology(), ast_channel_lock, ast_channel_name(), ast_channel_nativeformats(), ast_channel_rawwriteformat(), ast_channel_softhangup_internal_flag_add(), ast_channel_tech(), ast_channel_trylock, ast_channel_unlock, ast_channel_writeformat(), ast_channel_writetrans(), ast_check_hangup(), ast_clear_flag, AST_CONTROL_UNHOLD, ast_deactivate_generator(), ast_debug, AST_FLAG_BLOCKING, AST_FLAG_WRITE_INT, AST_FLAG_ZOMBIE, ast_format_cache_is_slinear(), ast_format_cap_get_names(), AST_FORMAT_CAP_NAMES_LEN, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_name(), ast_format_get_type(), ast_format_slin, ast_format_t140, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, ast_frame_dump(), AST_FRAME_HTML, AST_FRAME_IAX, AST_FRAME_MODEM, AST_FRAME_NULL, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_framehook_list_write_event(), ast_frfree, ast_frisolate, AST_LIST_NEXT, AST_MEDIA_TYPE_IMAGE, AST_MEDIA_TYPE_UNKNOWN, ast_opt_generic_plc, ast_senddigit_begin(), ast_senddigit_end(), ast_set_write_format(), AST_SOFTHANGUP_DEV, ast_str_alloca, ast_stream_get_position(), ast_stream_get_type(), ast_stream_topology_get_count(), ast_stream_topology_get_stream(), ast_test_flag, ast_translate(), CHECK_BLOCKING, ast_frame::data, ast_frame::datalen, DEBUGCHAN_FLAG, done, DTMF_SENT, ast_frame_subclass::format, FRAMECOUNT_INC, ast_frame::frametype, indicate_data_internal(), ast_frame_subclass::integer, ast_frame::len, ast_frame::next, NULL, ast_frame::ptr, send_dtmf_begin_event(), send_dtmf_end_event(), ast_channel_tech::send_html, ast_channel_tech::send_text, ast_frame::src, ast_frame::stream_num, ast_frame::subclass, tech_write(), type, ast_channel_tech::write, write_stream(), ast_channel_tech::write_stream, ast_channel_tech::write_text, and ast_channel_tech::write_video.
Referenced by AST_TEST_DEFINE(), ast_write(), bridge_channel_handle_write(), and stream_echo_write().
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 5036 of file channel.c.
References ast_channel_tech(), and ast_write().
|
inlinestatic |
calculates the number of samples to jump forward with in a monitor stream.
number | of samples to seek forward after rate conversion. |
Definition at line 3531 of file channel.c.
References ast_frame::samples.
|
static |
Definition at line 5889 of file channel.c.
References ast_channel_datastore_inherit(), ast_channel_flags(), ast_channel_inherit_variables(), ast_channel_lock, ast_channel_lock_both, ast_channel_redirecting(), ast_channel_redirecting_sub(), ast_channel_unlock, ast_channel_update_redirecting(), ast_check_hangup(), AST_FLAG_ZOMBIE, ast_max_forwards_decrement(), ast_party_redirecting_copy(), ast_party_redirecting_free(), ast_party_redirecting_init(), ast_test_flag, NULL, and ast_party_redirecting::orig.
Referenced by ast_call_forward().
|
static |
Definition at line 10450 of file channel.c.
References ast_cc_config_params_init, ast_cc_copy_config_params(), and NULL.
|
static |
Definition at line 10461 of file channel.c.
References ast_cc_config_params_destroy().
|
static |
Masquerade a channel.
Definition at line 6876 of file channel.c.
References ao2_bump, ao2_cleanup, ao2_link, ao2_lock, ao2_ref, ao2_unlink, ao2_unlock, ast_app_group_update(), ast_audiohook_move_all(), ast_autochan_new_channel(), ast_bridge_notify_masquerade(), ast_channel_accountcode(), ast_channel_adsicpe_set(), ast_channel_alert_write(), ast_channel_blocker(), ast_channel_bridge_peer(), ast_channel_caller(), ast_channel_caller_set(), ast_channel_connected(), ast_channel_connected_set(), ast_channel_datastores(), ast_channel_dialed(), ast_channel_dialed_set(), ast_channel_end_dtmf(), ast_channel_fd(), ast_channel_fd_count(), ast_channel_fdno(), ast_channel_fdno_set(), ast_channel_flags(), ast_channel_hangup_handlers(), ast_channel_hold_state(), ast_channel_internal_alertpipe_swap(), ast_channel_internal_fd_clear_all(), ast_channel_internal_swap_endpoint_forward(), ast_channel_internal_swap_snapshots(), ast_channel_internal_swap_stream_topology(), ast_channel_internal_swap_topics(), ast_channel_internal_swap_uniqueid_and_linkedid(), ast_channel_language(), ast_channel_latest_musicclass(), ast_channel_lock, ast_channel_lock_both, ast_channel_masq_set(), ast_channel_masqr_set(), ast_channel_musicclass(), AST_CHANNEL_NAME, ast_channel_name(), ast_channel_nativeformats(), ast_channel_nativeformats_set(), ast_channel_parkinglot(), ast_channel_publish_snapshot(), ast_channel_rawreadformat(), ast_channel_rawwriteformat(), ast_channel_readformat(), ast_channel_readq(), ast_channel_redirecting(), ast_channel_redirecting_set(), ast_channel_ref, ast_channel_sending_dtmf_digit(), ast_channel_sending_dtmf_tv(), ast_channel_set_fd(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_snapshot_segment_flags(), ast_channel_softhangup_internal_flag_set(), ast_channel_state_set(), ast_channel_tech(), ast_channel_tech_pvt(), ast_channel_tech_pvt_set(), ast_channel_tech_set(), ast_channel_timingfd(), ast_channel_unlock, ast_channel_unref, ast_channel_userfield(), ast_channel_visible_indication(), ast_channel_writeformat(), ast_clear_flag, AST_CONTROL_HOLD, AST_CONTROL_MASQUERADE_NOTIFY, AST_CONTROL_SRCCHANGE, AST_CONTROL_UNHOLD, ast_copy_string(), ast_debug, AST_FLAG_BLOCKING, AST_FLAG_DISABLE_DEVSTATE_CACHE, AST_FLAG_EXCEPTION, AST_FLAG_MOH, AST_FLAG_OUTGOING, AST_FLAG_ZOMBIE, AST_FLAGS_ALL, ast_format_cap_alloc, ast_format_cap_append_from_cap(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_get_name(), ast_framehook_list_fixup(), AST_GENERATOR_FD, ast_indicate(), ast_indicate_data(), 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_MEDIA_TYPE_UNKNOWN, ast_moh_start(), ast_moh_stop(), ast_null_frame, ast_party_id_reset(), ast_queue_frame(), ast_set_flag, ast_set_read_format(), ast_set_write_format(), AST_SOFTHANGUP_DEV, ast_strdupa, ast_strlen_zero(), ast_test_flag, AST_TIMING_FD, ast_channel::caller, ast_datastore_info::chan_breakdown, ast_datastore_info::chan_fixup, channels, clone_variables(), connected, ast_channel::connected, current, ast_datastore::data, ast_channel::dialed, errno, free_translation(), handlers, ast_datastore::info, len(), LOG_WARNING, NULL, ast_channel::redirecting, S_OR, and type.
Referenced by ast_channel_move().
|
static |
Definition at line 10936 of file channel.c.
References ast_bridge_features_cleanup(), ast_bridge_features_init(), ast_bridge_features_merge(), ast_bridge_features_new(), ast_channel_datastore_add(), ast_channel_datastore_find(), ast_datastore_alloc, ast_datastore_free(), bridge_features_info, ast_datastore::data, NULL, and replace().
Referenced by ast_channel_feature_hooks_append(), and ast_channel_feature_hooks_replace().
|
static |
Definition at line 7958 of file channel.c.
References ao2_alloc, ao2_cleanup, ao2_ref, ast_free, ast_func_read2(), AST_LIST_EMPTY, AST_LIST_TRAVERSE, ast_log, AST_RWLIST_INSERT_TAIL, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_str_buffer(), ast_str_create, ast_var_assign, ast_var_t::entries, manager_channel_variable::isfunc, lock, LOG_ERROR, manager_channel_variable::name, NULL, pbx_builtin_getvar_helper(), RAII_VAR, SCOPED_LOCK, tmp(), var, and varshead_dtor().
Referenced by ast_channel_get_ari_vars(), and ast_channel_get_manager_vars().
|
static |
Definition at line 7866 of file channel.c.
References AST_LIST_EMPTY, AST_RWLIST_RDLOCK, and AST_RWLIST_UNLOCK.
Referenced by ast_channel_has_ari_vars(), and ast_channel_has_manager_vars().
|
static |
Definition at line 6395 of file channel.c.
References ast_channel_accountcode(), ast_channel_peeraccount(), AST_CHANNEL_REQUESTOR_BRIDGE_PEER, AST_CHANNEL_REQUESTOR_REPLACEMENT, and ast_strlen_zero().
Referenced by ast_channel_req_accountcodes(), and ast_channel_req_accountcodes_precious().
|
static |
Definition at line 7887 of file channel.c.
References ast_calloc, AST_RWLIST_INSERT_TAIL, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, free_external_channelvars(), manager_channel_variable::isfunc, manager_channel_variable::name, and var.
Referenced by ast_channel_set_ari_vars(), and ast_channel_set_manager_vars().
|
static |
Definition at line 10344 of file channel.c.
References ast_log, ast_threadstorage_set_ptr(), LOG_ERROR, NULL, and status.
Referenced by ast_channel_connected_line_sub(), and ast_channel_redirecting_sub().
|
static |
Definition at line 8015 of file channel.c.
References ami_vars, ao2_container_unregister(), ao2_ref, ari_vars, ARRAY_LEN, ast_channel_unregister(), ast_cli_unregister_multiple(), channels, cli_channel, free_external_channelvars(), NULL, and surrogate_tech.
Referenced by ast_channels_init().
|
static |
Clone channel variables from 'clone' channel into 'original' channel.
All variables except those related to app_groupcount are cloned. Variables are actually removed from 'clone' channel, presumably because it will subsequently be destroyed.
Definition at line 6841 of file channel.c.
References ast_channel_varshead(), AST_LIST_APPEND_LIST, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_var_assign, current, and ast_var_t::entries.
Referenced by channel_do_masquerade().
|
static |
Definition at line 303 of file channel.c.
References a, ast_cli_completion_add(), AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_strdup, chanlist::list, NULL, and chanlist::tech.
Referenced by handle_cli_core_show_channeltype().
|
static |
Definition at line 2896 of file channel.c.
References ast_channel_flags(), ast_channel_generator(), ast_channel_generator_set(), ast_channel_generatordata(), ast_channel_generatordata_set(), ast_channel_set_fd(), ast_clear_flag, AST_FLAG_WRITE_INT, AST_GENERATOR_FD, ast_settimeout(), NULL, and ast_generator::release.
Referenced by ast_deactivate_generator(), and deactivate_silence_generator().
|
static |
Definition at line 8209 of file channel.c.
References ast_channel_generator(), ast_channel_generatordata(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_debug, deactivate_generator_nolock(), and silence_generator.
Referenced by ast_channel_stop_silence_generator().
|
static |
Definition at line 2549 of file channel.c.
References ast_audiohook_detach_list(), ast_channel_audiohooks(), ast_channel_audiohooks_set(), ast_framehook_list_destroy(), and NULL.
Referenced by ast_hangup().
|
static |
Definition at line 711 of file channel.c.
References ast_channel_by_uniqueid_cb(), ast_channel_callback(), ast_channel_name(), ast_channel_unref, ast_log, ast_strlen_zero(), LOG_ERROR, OBJ_NOLOCK, and ast_channel::uniqueid.
Referenced by __ast_channel_alloc_ap().
|
static |
Definition at line 3377 of file channel.c.
References DTMF_RECEIVED, and DTMF_SENT.
Referenced by send_dtmf_begin_event(), and send_dtmf_end_event().
|
static |
Definition at line 10915 of file channel.c.
References ast_bridge_features_destroy().
|
static |
Definition at line 7856 of file channel.c.
References ast_free, AST_RWLIST_REMOVE_HEAD, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and var.
Referenced by channel_set_external_vars(), and channels_shutdown().
|
static |
Definition at line 2506 of file channel.c.
References ast_channel_readtrans(), ast_channel_readtrans_set(), ast_channel_writetrans(), ast_channel_writetrans_set(), ast_translator_free_path(), and NULL.
Referenced by ast_hangup(), and channel_do_masquerade().
|
static |
Definition at line 2935 of file channel.c.
References ast_channel_generator(), ast_channel_generatordata(), ast_channel_generatordata_set(), ast_channel_lock, ast_channel_unlock, ast_channel_writeformat(), ast_deactivate_generator(), ast_debug, ast_format_get_sample_rate(), ast_channel::data, ast_generator::generate, NULL, and tmp().
Referenced by ast_activate_generator().
|
static |
Definition at line 2923 of file channel.c.
References ast_channel_generator(), ast_channel_generatordata(), ast_channel_lock, ast_channel_unlock, and ast_generator::write_format_change.
Referenced by set_format().
|
static |
Definition at line 5868 of file channel.c.
References AST_CAUSE_BUSY, AST_CAUSE_CONGESTION, AST_CONTROL_BUSY, and AST_CONTROL_CONGESTION.
Referenced by __ast_request_and_dial(), and ast_call_forward().
|
static |
Show details about a channel driver - CLI command.
Definition at line 326 of file channel.c.
References a, ast_cli(), ast_format_cap_get_names(), AST_FORMAT_CAP_NAMES_LEN, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_str_alloca, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_channeltypes(), NULL, chanlist::tech, and ast_cli_entry::usage.
|
static |
Show channel types - CLI command.
Definition at line 261 of file channel.c.
References a, ast_cli(), AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, FORMAT, chanlist::list, NULL, chanlist::tech, and ast_cli_entry::usage.
|
static |
Definition at line 4420 of file channel.c.
References ast_channel_connected(), ast_channel_connected_indicated(), ast_channel_name(), ast_channel_set_connected_line(), ast_connected_line_build_data(), ast_connected_line_parse_data(), ast_debug, ast_party_connected_line_copy(), ast_party_connected_line_free(), ast_party_connected_line_set_init(), connected, current, ast_party_connected_line::id, ast_party_id::name, NULL, ast_party_id::number, S_COR, ast_party_name::str, ast_party_number::str, ast_party_name::valid, and ast_party_number::valid.
Referenced by indicate_data_internal().
|
static |
Definition at line 4489 of file channel.c.
References _XXX_AST_CONTROL_T38, ast_channel_hangupcause_hash_set(), ast_channel_hold_state_set(), ast_channel_name(), ast_channel_set_is_t38_active_nolock(), ast_channel_tech(), ast_channel_visible_indication_set(), ast_channel_zone(), 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_MASQUERADE_NOTIFY, AST_CONTROL_MCID, AST_CONTROL_OFFHOOK, AST_CONTROL_OPTION, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_RADIO_KEY, AST_CONTROL_RADIO_UNKEY, AST_CONTROL_READ_ACTION, AST_CONTROL_RECORD_CANCEL, AST_CONTROL_RECORD_MUTE, AST_CONTROL_RECORD_STOP, AST_CONTROL_RECORD_SUSPEND, AST_CONTROL_REDIRECTING, AST_CONTROL_RING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_STREAM_FORWARD, AST_CONTROL_STREAM_RESTART, AST_CONTROL_STREAM_REVERSE, AST_CONTROL_STREAM_STOP, AST_CONTROL_STREAM_SUSPEND, AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, AST_CONTROL_STREAM_TOPOLOGY_SOURCE_CHANGED, 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_get_indication_tone(), ast_log, ast_playtones_start(), ast_playtones_stop(), AST_STATE_UP, AST_T38_NEGOTIATED, AST_T38_REFUSED, AST_T38_REQUEST_NEGOTIATE, AST_T38_REQUEST_TERMINATE, AST_T38_TERMINATED, ast_test_suite_event_notify, ast_tone_zone_sound_unref(), ast_tone_zone_sound::data, indicate(), ast_channel_tech::indicate, indicate_connected_line(), indicate_redirecting(), is_visible_indication(), LOG_WARNING, NULL, and ast_control_t38_parameters::request_response.
Referenced by ast_indicate_data(), and ast_write_stream().
|
static |
Definition at line 4475 of file channel.c.
References ast_channel_redirecting(), ast_channel_set_redirecting(), ast_party_redirecting_free(), ast_party_redirecting_set_init(), ast_redirecting_parse_data(), and NULL.
Referenced by indicate_data_internal().
|
static |
Definition at line 4301 of file channel.c.
References _XXX_AST_CONTROL_T38, 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_MASQUERADE_NOTIFY, AST_CONTROL_MCID, AST_CONTROL_OFFHOOK, AST_CONTROL_OPTION, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_RADIO_KEY, AST_CONTROL_RADIO_UNKEY, AST_CONTROL_READ_ACTION, AST_CONTROL_RECORD_CANCEL, AST_CONTROL_RECORD_MUTE, AST_CONTROL_RECORD_STOP, AST_CONTROL_RECORD_SUSPEND, AST_CONTROL_REDIRECTING, AST_CONTROL_RING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_STREAM_FORWARD, AST_CONTROL_STREAM_RESTART, AST_CONTROL_STREAM_REVERSE, AST_CONTROL_STREAM_STOP, AST_CONTROL_STREAM_SUSPEND, AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, AST_CONTROL_STREAM_TOPOLOGY_SOURCE_CHANGED, AST_CONTROL_T38_PARAMETERS, AST_CONTROL_TAKEOFFHOOK, AST_CONTROL_TRANSFER, AST_CONTROL_UNHOLD, AST_CONTROL_UPDATE_RTP_PEER, AST_CONTROL_VIDUPDATE, and AST_CONTROL_WINK.
Referenced by indicate_data_internal().
|
static |
|
static |
|
static |
Definition at line 419 of file channel.c.
References ast_channel_tech_pvt_set(), and NULL.
|
static |
|
static |
|
static |
Comparison function used for named group container.
Definition at line 7681 of file channel.c.
References CMP_MATCH, CMP_STOP, and namedgroup_member::name.
Referenced by ast_get_namedgroups().
|
static |
Hashing function used for named group container.
Definition at line 7690 of file channel.c.
Referenced by ast_get_namedgroups().
|
static |
Definition at line 8102 of file channel.c.
References ao2_cleanup, ao2_find, CMP_MATCH, CMP_STOP, match(), and OBJ_POINTER.
Referenced by ast_namedgroups_intersect().
|
static |
Definition at line 8599 of file channel.c.
References ast_log, ast_party_id_presentation(), ast_party_id_ies::combined_presentation, id, LOG_WARNING, ast_party_id_ies::name, ast_party_id_ies::number, party_name_build_data(), party_number_build_data(), party_subaddress_build_data(), ast_party_id_ies::subaddress, ast_party_id_ies::tag, and update().
Referenced by ast_connected_line_build_data(), and ast_redirecting_build_data().
|
static |
Definition at line 8370 of file channel.c.
References ast_log, ast_party_name_ies::char_set, LOG_WARNING, name, ast_party_name_ies::presentation, ast_party_name_ies::str, and ast_party_name_ies::valid.
Referenced by party_id_build_data().
|
static |
Definition at line 8444 of file channel.c.
References ast_log, LOG_WARNING, ast_party_number_ies::plan, ast_party_number_ies::presentation, ast_party_number_ies::str, and ast_party_number_ies::valid.
Referenced by party_id_build_data().
|
static |
Definition at line 8518 of file channel.c.
References ast_log, LOG_WARNING, ast_party_subaddress::odd_even_indicator, ast_party_subaddress_ies::odd_even_indicator, ast_party_subaddress::str, ast_party_subaddress_ies::str, ast_party_subaddress::type, ast_party_subaddress_ies::type, ast_party_subaddress::valid, and ast_party_subaddress_ies::valid.
Referenced by party_id_build_data().
|
static |
Definition at line 5060 of file channel.c.
References ast_free, and plc_ds::samples_buf.
|
static |
Definition at line 7832 of file channel.c.
References ast_channel_name().
Referenced by ast_channels_init().
|
inlinestatic |
Definition at line 3486 of file channel.c.
References ast_channel_dtmff(), AST_FRAME_DTMF_END, ast_queue_frame(), ast_frame::frametype, ast_frame_subclass::integer, ast_frame::len, and ast_frame::subclass.
Referenced by __ast_read().
|
static |
Definition at line 9257 of file channel.c.
References ast_log, ast_party_redirecting_reason::code, ast_party_redirecting_reason_ies::code, LOG_WARNING, ast_party_redirecting_reason::str, ast_party_redirecting_reason_ies::str, and value.
Referenced by ast_redirecting_build_data().
|
static |
Definition at line 6238 of file channel.c.
References ao2_cleanup, ao2_ref, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, AST_CAUSE_NOSUCHDRIVER, AST_CAUSE_NOTDEFINED, ast_channel_callid(), ast_channel_callid_set(), ast_channel_lock_both, ast_channel_unlock, ast_format_cap_alloc, ast_format_cap_append, ast_format_cap_append_from_cap(), ast_format_cap_empty(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_names(), AST_FORMAT_CAP_NAMES_LEN, ast_format_cap_remove_by_type(), ast_hangup(), ast_log, AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_UNKNOWN, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_str_alloca, ast_stream_topology_create_from_format_cap(), ast_stream_topology_free(), ast_stream_topology_get_formats(), ast_translator_best_choice(), c, chanlist::chan, LOG_WARNING, NULL, RAII_VAR, set_security_requirements(), chanlist::tech, and type.
Referenced by ast_request(), and ast_request_with_stream_topology().
|
static |
Wait, look for hangups and condition arg.
Definition at line 1517 of file channel.c.
References ast_channel_generatordata(), 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, ast_frame::data, and NULL.
Referenced by ast_safe_sleep(), ast_safe_sleep_conditional(), and ast_safe_sleep_without_silence().
|
static |
Definition at line 3389 of file channel.c.
References ast_channel_dtmf_begin_type(), ast_channel_publish_blob(), ast_json_pack(), ast_json_unref(), digit, dtmf_direction_to_string(), NULL, and RAII_VAR.
Referenced by __ast_read(), and ast_write_stream().
|
static |
Definition at line 3405 of file channel.c.
References ast_channel_dtmf_end_type(), ast_channel_publish_blob(), ast_json_pack(), ast_json_unref(), digit, dtmf_direction_to_string(), NULL, and RAII_VAR.
Referenced by __ast_read(), and ast_write_stream().
|
static |
Definition at line 3422 of file channel.c.
References ast_channel_flash_type(), ast_channel_publish_blob(), and NULL.
Referenced by __ast_read().
|
static |
Definition at line 3427 of file channel.c.
References ast_channel_publish_blob(), ast_channel_wink_type(), and NULL.
Referenced by __ast_read().
|
static |
Definition at line 2647 of file channel.c.
References ast_channel_answertime(), ast_channel_answertime_set(), ast_tvnow(), and ast_tvzero().
Referenced by __ast_read(), and ast_raw_answer_with_stream_topology().
|
static |
Definition at line 5612 of file channel.c.
References ao2_cleanup, ast_assert, ast_channel_generatordata(), ast_channel_lock, ast_channel_name(), ast_channel_nativeformats(), ast_channel_nativeformats_set(), ast_channel_setoption(), ast_channel_unlock, ast_debug, ast_format_cap_alloc, ast_format_cap_append, ast_format_cap_empty(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_best_by_type(), ast_format_cap_get_names(), AST_FORMAT_CAP_NAMES_LEN, ast_format_cmp(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), ast_log, AST_MEDIA_TYPE_AUDIO, ast_str_alloca, ast_str_buffer(), ast_translator_best_choice(), ast_translator_build_path(), ast_translator_free_path(), set_format_access::direction, generator_write_format_change(), set_format_access::get_format, set_format_access::get_rawformat, set_format_access::get_trans, ast_trans_pvt::interleaved_stereo, LOG_ERROR, LOG_WARNING, NULL, RAII_VAR, set_format_access::set_format, set_format_access_read, set_format_access_write, set_format_access::set_rawformat, set_format_access::set_trans, and set_format_access::setoption.
Referenced by ast_set_read_format(), ast_set_read_format_from_cap(), ast_set_write_format(), ast_set_write_format_from_cap(), and ast_set_write_format_interleaved_stereo().
|
static |
Definition at line 6198 of file channel.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_setoption(), ast_channel_unlock, AST_OPTION_SECURE_MEDIA, AST_OPTION_SECURE_SIGNALING, ast_datastore::data, ast_secure_call_store::media, NULL, out, secure_call_info, and ast_secure_call_store::signaling.
Referenced by request_channel().
|
inlinestatic |
Determine whether or not we should ignore DTMF in the readq.
Definition at line 3504 of file channel.c.
References ast_channel_dtmf_tv(), ast_channel_flags(), AST_FLAG_DEFER_DTMF, AST_FLAG_EMULATE_DTMF, AST_MIN_DTMF_GAP, ast_test_flag, ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
Referenced by __ast_read().
|
inlinestatic |
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)
Definition at line 2874 of file channel.c.
References ast_channel_dtmf_tv(), ast_channel_flags(), AST_FLAG_DEFER_DTMF, AST_FLAG_EMULATE_DTMF, AST_MIN_DTMF_GAP, ast_test_flag, ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
Referenced by __ast_read(), and ast_deactivate_generator().
|
static |
|
static |
Definition at line 8157 of file channel.c.
References ast_format_slin, AST_FRAME_VOICE, ast_write(), buf, ast_frame_subclass::format, ast_frame::frametype, ast_frame::samples, and ast_frame::subclass.
|
static |
|
static |
Definition at line 10726 of file channel.c.
References ao2_cleanup.
|
static |
Definition at line 10736 of file channel.c.
References ao2_cleanup.
Referenced by ast_channel_suppress().
|
static |
Definition at line 10754 of file channel.c.
References AST_FRAME_VOICE, AST_FRAMEHOOK_EVENT_READ, AST_FRAMEHOOK_EVENT_WRITE, ast_frfree, AST_MUTE_DIRECTION_READ, AST_MUTE_DIRECTION_WRITE, ast_null_frame, suppress_data::direction, ast_frame::frametype, suppress_data::frametype, and NULL.
Referenced by ast_channel_suppress().
|
static |
Definition at line 10747 of file channel.c.
References suppress_data::framehook_id.
Referenced by ast_channel_suppress().
|
static |
Definition at line 10789 of file channel.c.
References AST_FRAME_VOICE, NULL, and suppress_datastore_voice.
Referenced by ast_channel_suppress(), and ast_channel_unsuppress().
|
static |
Definition at line 5151 of file channel.c.
References ast_channel_tech(), ast_stream_get_position(), ast_channel_tech::write, write_stream(), and ast_channel_tech::write_stream.
Referenced by ast_write_stream().
|
static |
Definition at line 7520 of file channel.c.
References ao2_bump, ast_calloc, ast_channel_flags(), ast_channel_name(), ast_channel_writeformat(), AST_FLAG_WRITE_INT, ast_format_slin, ast_log, ast_set_flag, ast_set_write_format(), cos, tonepair_def::duration, tonepair_state::duration, tonepair_state::fac1, tonepair_state::fac2, tonepair_def::freq1, tonepair_def::freq2, LOG_WARNING, M_PI, tonepair_state::modulate, NULL, tonepair_state::origwfmt, tonepair_release(), tonepair_state::v1_1, tonepair_state::v2_1, tonepair_state::v2_2, tonepair_state::v3_1, tonepair_state::v3_2, and tonepair_def::vol.
|
static |
Definition at line 7551 of file channel.c.
References ast_format_slin, AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, ast_log, ast_write(), ast_frame::data, tonepair_state::data, ast_frame::datalen, tonepair_state::duration, tonepair_state::f, tonepair_state::fac1, tonepair_state::fac2, ast_frame_subclass::format, ast_frame::frametype, len(), LOG_WARNING, tonepair_state::modulate, ast_frame::offset, tonepair_state::pos, ast_frame::ptr, ast_frame::samples, ast_frame::subclass, tonepair_state::v1_1, tonepair_state::v1_2, tonepair_state::v2_1, tonepair_state::v2_2, tonepair_state::v3_1, and tonepair_state::v3_2.
|
static |
Definition at line 7509 of file channel.c.
References ao2_cleanup, ast_free, ast_set_write_format(), and tonepair_state::origwfmt.
Referenced by tonepair_alloc().
|
static |
Destructor for lists of variables.
obj | AO2 object. |
Definition at line 7923 of file channel.c.
References AST_RWLIST_REMOVE_HEAD, ast_var_delete(), ast_var_t::entries, and var.
Referenced by ast_channel_get_vars(), and channel_get_external_vars().
|
static |
Definition at line 7853 of file channel.c.
Referenced by ast_channel_get_manager_vars(), ast_channel_has_manager_vars(), ast_channel_set_manager_vars(), ast_channels_init(), and channels_shutdown().
|
static |
Definition at line 7854 of file channel.c.
Referenced by ast_channel_get_ari_vars(), ast_channel_has_ari_vars(), ast_channel_set_ari_vars(), ast_channels_init(), and channels_shutdown().
const struct ast_channel_tech ast_kill_tech |
|
static |
Definition at line 7770 of file channel.c.
Referenced by ast_install_music_functions(), ast_moh_cleanup(), and ast_uninstall_music_functions().
|
static |
Definition at line 7768 of file channel.c.
Referenced by ast_install_music_functions(), ast_moh_start(), and ast_uninstall_music_functions().
|
static |
Definition at line 7769 of file channel.c.
Referenced by ast_install_music_functions(), ast_moh_stop(), and ast_uninstall_music_functions().
|
static |
|
static |
Definition at line 10920 of file channel.c.
Referenced by ast_channel_feature_hooks_get(), and channel_feature_hooks_set_full().
|
static |
Definition at line 136 of file channel.c.
Referenced by ast_cause2str(), ast_str2cause(), and dump_cause().
|
static |
Definition at line 10467 of file channel.c.
Referenced by ast_channel_cc_params_init(), and ast_channel_get_cc_config_params().
|
static |
Definition at line 93 of file channel.c.
Referenced by __ast_channel_alloc_ap(), __ast_manager_event_multichan(), __manager_event_sessions(), __manager_event_sessions_va(), ast_channel_destructor(), ast_undestroyed_channels(), and generic_fax_exec().
|
static |
Mutex that prevents multiple ast_channel_move() operations from occurring simultaneously. This is necessary since the involved channels have to be locked and unlocked throughout the move operation.
The most important data being protected are the masq and masqr data on channels. We don't want them getting criss-crossed due to multiple moves mucking with them.
Definition at line 10686 of file channel.c.
Referenced by ast_channel_move().
|
static |
All active channels on the system.
Definition at line 124 of file channel.c.
Referenced by __ast_channel_alloc_ap(), ast_active_channels(), ast_change_name(), ast_channel_callback(), ast_channel_iterator_all_new(), ast_channel_release(), ast_channel_unlink(), ast_channels_init(), ast_hangup(), ast_softhangup_all(), channel_do_masquerade(), and channels_shutdown().
|
static |
Definition at line 390 of file channel.c.
Referenced by ast_channels_init(), and channels_shutdown().
unsigned long global_fin |
The current value of the debug flags is stored in the two variables global_fin and global_fout (declared in main/channel.c)
Definition at line 95 of file channel.c.
Referenced by __ast_channel_alloc_ap(), and handle_core_set_debug_channel().
unsigned long global_fout |
Definition at line 95 of file channel.c.
Referenced by __ast_channel_alloc_ap().
|
static |
Definition at line 702 of file channel.c.
Referenced by __ast_channel_alloc_ap().
|
static |
Definition at line 5067 of file channel.c.
Referenced by apply_plc().
|
static |
Definition at line 5590 of file channel.c.
Referenced by set_format().
|
static |
Definition at line 5601 of file channel.c.
Referenced by set_format().
|
static |
Definition at line 8176 of file channel.c.
Referenced by ast_channel_start_silence_generator(), and deactivate_silence_generator().
|
static |
Definition at line 97 of file channel.c.
Referenced by ast_state2str().
|
static |
Definition at line 10731 of file channel.c.
Referenced by suppress_get_datastore_information().
|
static |
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.
Definition at line 696 of file channel.c.
Referenced by ast_channels_init(), and channels_shutdown().
|
static |
Definition at line 7598 of file channel.c.
Referenced by ast_tonepair_start().