123 #ifndef _ASTERISK_CHANNEL_H 124 #define _ASTERISK_CHANNEL_H 131 #if defined(__cplusplus) || defined(c_plusplus) 135 #define AST_MAX_EXTENSION 80 136 #define AST_MAX_CONTEXT 80 148 #define AST_MAX_PUBLIC_UNIQUEID 149 154 #define AST_NUM_CHANNEL_BUCKETS 61 156 #define AST_NUM_CHANNEL_BUCKETS 1567 169 #define AST_MAX_UNIQUEID (AST_MAX_PUBLIC_UNIQUEID + 2 + 1) 171 #define AST_MAX_ACCOUNT_CODE 80 172 #define AST_CHANNEL_NAME 80 173 #define MAX_LANGUAGE 40 174 #define MAX_MUSICCLASS 80 175 #define AST_MAX_USER_FIELD 256 193 #define DATASTORE_INHERIT_FOREVER INT_MAX 195 #define AST_MAX_FDS 11 196 #define AST_EXTENDED_FDS 12 201 #define AST_ALERT_FD (AST_MAX_FDS-1) 202 #define AST_TIMING_FD (AST_MAX_FDS-2) 203 #define AST_AGENT_FD (AST_MAX_FDS-3) 204 #define AST_GENERATOR_FD (AST_MAX_FDS-4) 205 #define AST_JITTERBUFFER_FD (AST_MAX_FDS-5) 592 #define AST_CHAN_WRITE_INFO_T_VERSION 1 596 const char *
function;
676 int (*
const devicestate)(
const char *device_number);
677 int (*
const presencestate)(
const char *presence_provider,
char **subtype,
char **
message);
778 int (*
const setoption)(
struct ast_channel *chan,
int option,
void *
data,
int datalen);
781 int (*
const queryoption)(
struct ast_channel *chan,
int option,
void *
data,
int *datalen);
851 struct ast_epoll_data;
858 #define DEBUGCHAN_FLAG 0x80000000 861 #define FRAMECOUNT_INC(x) ( ((x) & DEBUGCHAN_FLAG) | (((x)+1) & ~DEBUGCHAN_FLAG) ) 1073 #define AST_FEATURE_DTMF_MASK (AST_FEATURE_REDIRECT | AST_FEATURE_DISCONNECT |\ 1074 AST_FEATURE_ATXFER | AST_FEATURE_AUTOMON | AST_FEATURE_PARKCALL | AST_FEATURE_AUTOMIXMON) 1080 struct timeval start_time;
1081 struct timeval nexteventts;
1082 struct timeval feature_start_time;
1241 const
char *
cid_name, const
char *acctcode,
1245 const
char *
file,
int line, const
char *function,
1246 const
char *name_fmt, ...);
1259 #define ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, assignedids, requestor, amaflag, ...) \ 1260 __ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, assignedids, requestor, amaflag, NULL, \ 1261 __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) 1263 #define ast_channel_alloc_with_endpoint(needqueue, state, cid_num, cid_name, acctcode, exten, context, assignedids, requestor, amaflag, endpoint, ...) \ 1264 __ast_channel_alloc((needqueue), (state), (cid_num), (cid_name), (acctcode), (exten), (context), (assignedids), (requestor), (amaflag), (endpoint), \ 1265 __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__) 1283 #define ast_dummy_channel_alloc() __ast_dummy_channel_alloc(__FILE__, __LINE__, __PRETTY_FUNCTION__) 1396 const void *data,
size_t datalen);
1534 int timeout,
int *reason,
const char *cid_num,
const char *cid_name);
2013 int *fds,
int nfds,
int *exception,
int *outfd,
int *ms);
2279 unsigned int durationkp,
unsigned int durationst,
int is_external);
2382 #define AST_BRIDGE_DTMF_CHANNEL_0 (1 << 0) 2384 #define AST_BRIDGE_DTMF_CHANNEL_1 (1 << 1) 2845 pfd->events = POLLIN | POLLPRI;
2850 static inline int ast_fdisset(
struct pollfd *pfds,
int fd,
int maximum,
int *start)
2859 for (x = *start; x < maximum; x++)
2860 if (pfds[x].fd == fd) {
2863 return pfds[
x].revents;
2876 int datalen =
sizeof(
state);
2894 #define CHECK_BLOCKING(c) \ 2896 if (ast_test_flag(ast_channel_flags(c), AST_FLAG_BLOCKING)) { \ 2898 ast_log(LOG_DEBUG, "Thread LWP %d is blocking '%s', already blocked by thread LWP %d in procedure %s\n", \ 2899 ast_get_tid(), ast_channel_name(c), \ 2900 ast_channel_blocker_tid(c), ast_channel_blockproc(c)); \ 2903 ast_channel_blocker_tid_set((c), ast_get_tid()); \ 2904 ast_channel_blocker_set((c), pthread_self()); \ 2905 ast_channel_blockproc_set((c), __PRETTY_FUNCTION__); \ 2906 ast_set_flag(ast_channel_flags(c), AST_FLAG_BLOCKING); \ 2915 struct ast_namedgroups;
2945 #define ast_channel_lock(chan) ao2_lock(chan) 2946 #define ast_channel_unlock(chan) ao2_unlock(chan) 2947 #define ast_channel_trylock(chan) ao2_trylock(chan) 2952 #define ast_channel_lock_both(chan1, chan2) do { \ 2953 ast_channel_lock(chan1); \ 2954 while (ast_channel_trylock(chan2)) { \ 2955 ast_channel_unlock(chan1); \ 2957 ast_channel_lock(chan1); \ 2970 #define ast_channel_ref(c) ({ ao2_ref(c, +1); (c); }) 2981 #define ast_channel_unref(c) ({ ao2_ref(c, -1); (struct ast_channel *) (NULL); }) 2992 #define ast_channel_cleanup(c) ({ ao2_cleanup(c); (struct ast_channel *) (NULL); }) 3108 void *data,
int ao2_flags);
4189 #if defined(__cplusplus) || defined(c_plusplus) 4257 #define DECLARE_STRINGFIELD_SETTERS_FOR(field) \ 4258 void ast_channel_##field##_set(struct ast_channel *chan, const char *field); \ 4259 void ast_channel_##field##_build_va(struct ast_channel *chan, const char *fmt, va_list ap) __attribute__((format(printf, 2, 0))); \ 4260 void ast_channel_##field##_build(struct ast_channel *chan, const char *fmt, ...) __attribute__((format(printf, 2, 3))) 4937 #define AST_MUTE_DIRECTION_READ (1 << 0) 4938 #define AST_MUTE_DIRECTION_WRITE (1 << 1) 5175 #define ast_channel_has_tech_function(chan, function) \ 5176 (ast_channel_tech(chan) ? ast_channel_tech(chan)->function != NULL : 0)
void(* ast_cc_callback_fn)(struct ast_channel *chan, struct ast_cc_config_params *cc_params, const char *monitor_type, const char *const device_name, const char *const dialstring, void *private_data)
Callback made from ast_cc_callback for certain channel types.
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
const ast_string_field peeraccount
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.
enum ast_channel_state ast_channel_state(const struct ast_channel *chan)
void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value)
static char musicclass[MAX_MUSICCLASS]
static enum ast_t38_state ast_channel_get_t38_state(struct ast_channel *chan)
Retrieves the current T38 state of a channel.
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 millis...
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
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.
void ast_channel_internal_bridge_channel_set(struct ast_channel *chan, struct ast_bridge_channel *value)
int ast_queue_hangup(struct ast_channel *chan)
Queue a hangup frame.
unsigned long long ast_group_t
void ast_channel_internal_alertpipe_clear(struct ast_channel *chan)
void ast_channel_snapshot_set(struct ast_channel *chan, struct ast_channel_snapshot *snapshot)
void ast_channel_fdno_set(struct ast_channel *chan, int value)
int ast_channel_early_bridge(struct ast_channel *c0, struct ast_channel *c1)
Bridge two channels together (early)
int ast_channel_vstreamid(const struct ast_channel *chan)
Information needed to identify an endpoint in a call.
enum sip_cc_notify_state state
const char * ast_channel_blockproc(const struct ast_channel *chan)
int ast_recvchar(struct ast_channel *chan, int timeout)
Receives a text character from a channel.
void ast_party_connected_line_init(struct ast_party_connected_line *init)
Initialize the given connected line structure.
static char accountcode[AST_MAX_ACCOUNT_CODE]
void ast_channel_timingfunc_set(struct ast_channel *chan, ast_timing_func_t value)
void ast_channel_pickupgroup_set(struct ast_channel *chan, ast_group_t value)
int presentation
Q.931 encoded presentation-indicator encoded field.
int ast_channel_fd_isset(const struct ast_channel *chan, int which)
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.
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().
static int indicate(void *data)
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
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.
struct ast_channel * ast_channel_get_by_exten(const char *exten, const char *context)
Find a channel by extension and context.
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.
void ast_channel_blocker_tid_set(struct ast_channel *chan, int tid)
int plan
Q.931 Type-Of-Number and Numbering-Plan encoded fields.
char * str
Subscriber phone number (Malloced)
int64_t ast_channel_get_duration_ms(struct ast_channel *chan)
Obtain how long it's been, in milliseconds, since the channel was created.
int ast_channel_hold_state(const struct ast_channel *chan)
Asterisk locking-related definitions:
struct ast_channel * ast_channel_iterator_next(struct ast_channel_iterator *i)
Get the next channel for a channel iterator.
void ast_channel_internal_fd_clear(struct ast_channel *chan, int which)
int ast_channel_connected_line_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const void *connected_info, int is_caller, int frame)
Run a connected line interception macro and update a channel's connected line information.
void ast_channel_visible_indication_set(struct ast_channel *chan, int value)
char * str
Subscriber phone number (Malloced)
char chan_name[AST_CHANNEL_NAME]
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...
void ast_channel_timer_set(struct ast_channel *chan, struct ast_timer *value)
static char parkinglot[AST_MAX_CONTEXT]
int ast_queue_control(struct ast_channel *chan, enum ast_control_frame_type control)
Queue a control frame without payload.
Channels have this property if they implement send_text_data.
int ast_redirecting_parse_data(const unsigned char *data, size_t datalen, struct ast_party_redirecting *redirecting)
Parse redirecting indication frame data.
struct ast_party_caller caller
Channel Caller ID information.
struct ast_filestream * ast_channel_vstream(const struct ast_channel *chan)
void * ast_channel_generatordata(const struct ast_channel *chan)
int ast_write_text(struct ast_channel *chan, struct ast_frame *frame)
Write text frame to a channel This function writes the given frame to the indicated channel...
void ast_channel_whentohangup_set(struct ast_channel *chan, struct timeval *value)
int ast_channel_is_multistream(struct ast_channel *chan)
Determine if a channel is multi-stream capable.
int ast_autoservice_start(struct ast_channel *chan)
Automatically service a channel for us...
int ast_channel_internal_alert_readfd(struct ast_channel *chan)
struct ast_party_id ast_channel_redirecting_effective_from(struct ast_channel *chan)
unsigned short ast_channel_transfercapability(const struct ast_channel *chan)
void ast_channel_insmpl_set(struct ast_channel *chan, unsigned long value)
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...
struct ast_cdr * ast_channel_cdr(const struct ast_channel *chan)
struct ast_channel_id linkedid
void ast_channel_dtmff_set(struct ast_channel *chan, struct ast_frame *value)
struct ast_stream_topology * ast_channel_get_stream_topology(const struct ast_channel *chan)
Retrieve the topology of streams on a channel.
int presentation
Q.931 presentation-indicator and screening-indicator encoded fields.
ast_channel_requestor_relationship
channelreloadreason
Channel reload reasons for manager events at load or reload of configuration.
Channels have this property if they can accept input with jitter; i.e. most VoIP channels.
void ast_channel_set_writeformat(struct ast_channel *chan, struct ast_format *format)
void ast_channel_set_oldwriteformat(struct ast_channel *chan, struct ast_format *format)
struct ast_channel * parent_channel
struct ast_stream_topology * answer_topology
int ast_auto_answer(struct ast_channel *chan)
Answer a channel, if it's not already answered.
void ast_party_id_reset(struct ast_party_id *id)
Destroy and initialize the given party id structure.
Structure that contains features information.
void * ast_channel_tech_pvt(const struct ast_channel *chan)
const struct ast_channel_tech * ast_get_channel_tech(const char *name)
Get a channel technology structure by name.
int ast_channel_epfd(const struct ast_channel *chan)
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...
char ast_channel_sending_dtmf_digit(const struct ast_channel *chan)
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. ...
unsigned int ast_channel_fout(const struct ast_channel *chan)
void ast_channel_setwhentohangup_tv(struct ast_channel *chan, struct timeval offset)
Set when to hang a channel up.
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...
int ast_activate_generator(struct ast_channel *chan, struct ast_generator *gen, void *params)
static void update(int code_size, int y, int wi, int fi, int dq, int sr, int dqsez, struct g726_state *state_ptr)
void ast_channel_blockproc_set(struct ast_channel *chan, const char *value)
int ast_indicate(struct ast_channel *chan, int condition)
Indicates condition of channel.
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...
void ast_channel_unregister(const struct ast_channel_tech *tech)
Unregister a channel technology.
void ast_channel_appl_set(struct ast_channel *chan, const char *value)
void ast_channel_hangupcause_set(struct ast_channel *chan, int value)
int ast_channel_queryoption(struct ast_channel *channel, int option, void *data, int *datalen, int block)
Checks the value of an option.
static struct aco_type agent_type
int ast_channel_is_t38_active_nolock(struct ast_channel *chan)
ast_channel_is_t38_active variant. Use this if the channel is already locked prior to calling...
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.
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.
int ast_queue_unhold(struct ast_channel *chan)
Queue an unhold frame.
void ast_channel_framehooks_set(struct ast_channel *chan, struct ast_framehook_list *value)
int ast_channel_forward_endpoint(struct ast_channel *chan, struct ast_endpoint *endpoint)
Forward channel stasis messages to the given endpoint.
struct ast_variable * ast_channeltype_list(void)
return an ast_variable list of channeltypes
struct ast_channel * ast_channel_release(struct ast_channel *chan)
Unlink and release reference to a channel.
void ast_channel_set_rawwriteformat(struct ast_channel *chan, struct ast_format *format)
int ast_channel_supports_html(struct ast_channel *channel)
Checks for HTML support on a channel.
int ast_check_hangup_locked(struct ast_channel *chan)
struct ast_framehook_list * ast_channel_framehooks(const struct ast_channel *chan)
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().
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
void ast_channel_dialed_set(struct ast_channel *chan, struct ast_party_dialed *value)
struct ast_channel * ast_channel__bridge(const struct ast_channel *chan)
unsigned long ast_channel_insmpl(const struct ast_channel *chan)
static int ast_fdisset(struct pollfd *pfds, int fd, int maximum, int *start)
Helper function for migrating select to poll.
void ast_channel_macrocontext_set(struct ast_channel *chan, const char *value)
struct ast_channel_snapshot * ast_channel_snapshot(const struct ast_channel *chan)
int ast_party_id_presentation(const struct ast_party_id *id)
Determine the overall presentation value for the given party.
static void dummy(char *unused,...)
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.
struct timeval ast_channel_answertime(struct ast_channel *chan)
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.
static void end_bridge_callback(void *data)
struct ast_format * ast_channel_oldwriteformat(struct ast_channel *chan)
static int ast_add_fd(struct pollfd *pfd, int fd)
if fd is a valid descriptor, set *pfd with the descriptor
int ast_raw_answer_with_stream_topology(struct ast_channel *chan, struct ast_stream_topology *topology)
Answer a channel passing in a stream topology.
int ast_settimeout_full(struct ast_channel *c, unsigned int rate, int(*func)(const void *data), void *data, unsigned int is_ao2_obj)
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.
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.
int ast_call(struct ast_channel *chan, const char *addr, int timeout)
Make a call.
Structure for variables, used for configurations and for channel variables.
const char * ast_channel_oldest_linkedid(const char *a, const char *b)
Return the oldest linkedid between two channels.
struct ast_tone_zone * ast_channel_zone(const struct ast_channel *chan)
void ast_channel_generator_set(struct ast_channel *chan, struct ast_generator *value)
Structure representing a snapshot of channel state.
void ast_set_variables(struct ast_channel *chan, struct ast_variable *vars)
adds a list of channel variables to a channel
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.
void ast_channel_vstream_set(struct ast_channel *chan, struct ast_filestream *value)
void ast_channel_clear_flag(struct ast_channel *chan, unsigned int flag)
struct ast_frame * ast_read(struct ast_channel *chan)
Reads a frame.
int char_set
Character set the name is using.
Structure to pass both assignedid values to channel drivers.
struct ast_frame * ast_read_stream(struct ast_channel *chan)
Reads a frame, but does not filter to just the default streams.
void ast_channel_readtrans_set(struct ast_channel *chan, struct ast_trans_pvt *value)
Structure for a data store type.
void ast_channel_callgroup_set(struct ast_channel *chan, ast_group_t value)
Structure used to transport a message through the frame core.
ast_channel_state
ast_channel states
void ast_channel_audiohooks_set(struct ast_channel *chan, struct ast_audiohook_list *value)
char * str
Subscriber name (Malloced)
int ast_indicate_data(struct ast_channel *chan, int condition, const void *data, size_t datalen)
Indicates condition of channel, with payload.
unsigned long global_fout
const char * ast_channel_amaflags2string(enum ama_flags flags)
Convert the enum representation of an AMA flag to a string representation.
void ast_channel_answertime_set(struct ast_channel *chan, struct timeval *value)
ast_t38_state
Possible T38 states on channels.
struct ast_channel * ast_channel_internal_bridged_channel(const struct ast_channel *chan)
void ast_party_caller_free(struct ast_party_caller *doomed)
Destroy the caller party contents.
struct ast_party_id ast_channel_redirecting_effective_to(struct ast_channel *chan)
void ast_channel_named_pickupgroups_set(struct ast_channel *chan, struct ast_namedgroups *value)
unsigned char valid
TRUE if the subaddress information is valid/present.
int ast_senddigit_external(struct ast_channel *chan, char digit, unsigned int duration)
Send a DTMF digit to a channel from an external thread.
struct ast_party_id ast_channel_redirecting_effective_orig(struct ast_channel *chan)
int connect_on_early_media
void ast_channel_internal_alertpipe_close(struct ast_channel *chan)
ast_control_frame_type
Internal control frame subtype field values.
struct ast_channel * ast_channel_yank(struct ast_channel *yankee)
Gain control of a channel in the system.
struct ast_bridge * ast_channel_internal_bridge(const struct ast_channel *chan)
int ani2
Automatic Number Identification 2 (Info Digits)
int(* generate)(struct ast_channel *chan, void *data, int len, int samples)
int ast_channel_get_up_time(struct ast_channel *chan)
Obtain how long it has been since the channel was answered.
void ast_party_redirecting_reason_init(struct ast_party_redirecting_reason *init)
Initialize the given redirecting reason structure.
int ast_channel_register(const struct ast_channel_tech *tech)
Register a channel technology (a new channel driver) Called by a channel module to register the kind ...
int ast_channel_blocker_tid(const struct ast_channel *chan)
void ast_channel_music_state_set(struct ast_channel *chan, void *value)
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...
void ast_party_id_free(struct ast_party_id *doomed)
Destroy the party id contents.
static int call(void *data)
Structure for a data store object.
void ast_party_connected_line_free(struct ast_party_connected_line *doomed)
Destroy the connected line information contents.
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.
struct varshead * ast_channel_varshead(struct ast_channel *chan)
static int hangup(void *data)
int ast_prod(struct ast_channel *chan)
Send empty audio to prime a channel driver.
const char * ast_state2str(enum ast_channel_state)
Gives the string form of a given channel state.
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.
int ast_senddigit_begin(struct ast_channel *chan, char digit)
Send a DTMF digit to a channel.
void ast_channel_softhangup_internal_flag_set(struct ast_channel *chan, int value)
char * str
Malloced subaddress string.
int ast_channel_move(struct ast_channel *dest, struct ast_channel *source)
Move a channel from its current location to a new location.
int ast_senddigit(struct ast_channel *chan, char digit, unsigned int duration)
Send a DTMF digit to a channel.
Common implementation-independent jitterbuffer stuff.
void ast_channel_zone_set(struct ast_channel *chan, struct ast_tone_zone *value)
void ast_channel_internal_fd_clear_all(struct ast_channel *chan)
int ast_channel_setoption(struct ast_channel *channel, int option, void *data, int datalen, int block)
Sets an option on a channel.
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.
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.
const char * ast_channel_call_forward(const struct ast_channel *chan)
static char cid_num[AST_MAX_EXTENSION]
int ast_channel_priority(const struct ast_channel *chan)
struct ast_channel * ast_waitfor_nandfds(struct ast_channel **chan, int n, int *fds, int nfds, int *exception, int *outfd, int *ms)
Waits for activity on a group of channels.
int code
enum AST_REDIRECTING_REASON value for redirection
int() ao2_callback_data_fn(void *obj, void *arg, void *data, int flags)
Type of a generic callback function.
unsigned char odd_even_indicator
TRUE if odd number of address signals.
void ast_channel__bridge_set(struct ast_channel *chan, struct ast_channel *value)
struct ast_trans_pvt * ast_channel_readtrans(const struct ast_channel *chan)
const char * ast_channel_linkedid(const struct ast_channel *chan)
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...
Indicate what information in ast_party_caller should be set.
void ast_channel_callid_cleanup(struct ast_channel *chan)
static const char ast_stream_topology_changed_external[]
Set as the change source reason when a channel stream topology has been changed externally as a resul...
struct ast_namedgroups * ast_channel_named_callgroups(const struct ast_channel *chan)
int ast_raw_answer(struct ast_channel *chan)
Answer a channel.
struct ast_variable * vars
struct ast_cc_config_params * ast_channel_get_cc_config_params(struct ast_channel *chan)
Get the CCSS parameters from a channel.
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...
void ast_channel_writetrans_set(struct ast_channel *chan, struct ast_trans_pvt *value)
char * ast_print_group(char *buf, int buflen, ast_group_t group)
Print call and pickup groups into buffer.
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.
int ast_queue_hangup_with_cause(struct ast_channel *chan, int cause)
Queue a hangup frame with hangupcause set.
struct ast_channel * ast_channel_get_by_name_prefix(const char *name, size_t name_len)
Find a channel by a name prefix.
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.
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...
int ast_channel_unbridged_nolock(struct ast_channel *chan)
ast_channel_unbridged variant. Use this if the channel is already locked prior to calling...
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.
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.
struct timeval * ast_channel_whentohangup(struct ast_channel *chan)
struct ast_format * ast_channel_readformat(struct ast_channel *chan)
int ast_channel_defer_dtmf(struct ast_channel *chan)
Defers DTMF so that you only read things like hangups and audio.
void ast_channel_stream_set(struct ast_channel *chan, struct ast_filestream *value)
void ast_channel_tech_set(struct ast_channel *chan, const struct ast_channel_tech *value)
void ast_channel_macropriority_set(struct ast_channel *chan, int value)
Asterisk datastore objects.
const struct ast_channel_tech * tech
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.
void ast_channel_internal_alertpipe_swap(struct ast_channel *chan1, struct ast_channel *chan2)
Swap the interal alertpipe between two channels.
struct ast_str * ast_channel_dialed_causes_channels(const struct ast_channel *chan)
Retrieve a comma-separated list of channels for which dialed cause information is available...
enum ama_flags ast_channel_string2amaflag(const char *flag)
Convert a string to a detail record AMA flag.
void(* write_format_change)(struct ast_channel *chan, void *data)
int ast_queue_answer(struct ast_channel *chan, const struct ast_stream_topology *topology)
Queue an ANSWER control frame with topology.
void ast_change_name(struct ast_channel *chan, const char *newname)
Change channel name.
Configuration File Parser.
ast_alert_status_t ast_channel_internal_alert_flush(struct ast_channel *chan)
int ast_channel_datastore_inherit(struct ast_channel *from, struct ast_channel *to)
Inherit datastores from a parent to a child.
struct ast_readq_list * ast_channel_readq(struct ast_channel *chan)
void ast_channel_internal_swap_endpoint_forward(struct ast_channel *a, struct ast_channel *b)
Swap endpoint_forward between two channels.
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 ...
void ast_channel_masq_set(struct ast_channel *chan, struct ast_channel *value)
void ast_channel_set_rawreadformat(struct ast_channel *chan, struct ast_format *format)
void ast_channel_cdr_set(struct ast_channel *chan, struct ast_cdr *value)
struct ast_bridge * ast_channel_get_bridge(const struct ast_channel *chan)
Get the bridge associated with a channel.
unsigned int ast_channel_emulate_dtmf_duration(const struct ast_channel *chan)
unsigned int ast_channel_fin(const struct ast_channel *chan)
int ast_channel_make_compatible(struct ast_channel *chan, struct ast_channel *peer)
Make the frame formats of two channels compatible.
void ast_channel_internal_swap_topics(struct ast_channel *a, struct ast_channel *b)
Swap topics beteween two channels.
int ast_waitfor_n_fd(int *fds, int n, int *ms, int *exception)
Waits for input on an fd.
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.
const char * ast_channel_latest_musicclass(const struct ast_channel *chan)
void ast_channel_rings_set(struct ast_channel *chan, int value)
int ast_channel_fd_add(struct ast_channel *chan, int value)
Add a file descriptor to the channel without a fixed position.
struct ast_channel * chan
static char dialcontext[AST_MAX_CONTEXT]
const char * ast_channel_accountcode(const struct ast_channel *chan)
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...
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.
void ast_channel_clear_softhangup(struct ast_channel *chan, int flag)
Clear a set of softhangup flags from a channel.
void ast_channel_undefer_dtmf(struct ast_channel *chan)
Unset defer DTMF flag on channel.
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...
struct ast_stream * ast_channel_get_default_stream(struct ast_channel *chan, enum ast_media_type type)
Retrieve the default stream of a specific media type on a channel.
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
void ast_channel_internal_bridge_set(struct ast_channel *chan, struct ast_bridge *value)
void ast_channel_generatordata_set(struct ast_channel *chan, void *value)
A set of tones for a given locale.
static struct ast_generator gen
void ast_channel_nativeformats_set(struct ast_channel *chan, struct ast_format_cap *value)
struct ast_trans_pvt * ast_channel_writetrans(const struct ast_channel *chan)
void ast_party_subaddress_free(struct ast_party_subaddress *doomed)
Destroy the party subaddress contents.
int ast_channel_macropriority(const struct ast_channel *chan)
struct ast_party_connected_line * ast_channel_connected(struct ast_channel *chan)
int ast_channel_visible_indication(const struct ast_channel *chan)
int ast_senddigit_end(struct ast_channel *chan, char digit, unsigned int duration)
Send a DTMF digit to a channel.
struct ast_pbx * ast_channel_pbx(const struct ast_channel *chan)
int(* ast_acf_write_fn_t)(struct ast_channel *chan, const char *function, char *data, const char *value)
Typedef for a custom write function.
void ast_softhangup_all(void)
Soft hangup all active channels.
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.
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.
void ast_party_number_init(struct ast_party_number *init)
Initialize the given number structure.
void * end_bridge_callback_data
Caller Party information.
ast_alert_status_t ast_channel_internal_alert_read(struct ast_channel *chan)
Asterisk internal frame definitions.
void ast_channel_set_readformat(struct ast_channel *chan, struct ast_format *format)
int ast_softhangup(struct ast_channel *chan, int reason)
Softly hangup up a channel.
struct ast_datastore_list * ast_channel_datastores(struct ast_channel *chan)
void(* release)(struct ast_channel *chan, void *data)
void ast_channel_jb_set(struct ast_channel *chan, struct ast_jb *value)
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 aud...
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.
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().
void ast_party_redirecting_reason_free(struct ast_party_redirecting_reason *doomed)
Destroy the redirecting reason contents.
struct ast_bridge_channel * ast_channel_internal_bridge_channel(const struct ast_channel *chan)
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)
void ast_channel_amaflags_set(struct ast_channel *chan, enum ama_flags value)
A set of macros to manage forward-linked lists.
static char language[MAX_LANGUAGE]
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.
int ast_senddigit_mf_begin(struct ast_channel *chan, char digit)
Send an MF digit to a channel.
void ast_channel_internal_swap_uniqueid_and_linkedid(struct ast_channel *a, struct ast_channel *b)
Swap uniqueid and linkedid beteween two channels.
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format)
Sets write format on channel chan.
void ast_channel_set_unbridged_nolock(struct ast_channel *chan, int value)
Variant of ast_channel_set_unbridged. Use this if the channel is already locked prior to calling...
ast_group_t ast_get_group(const char *s)
AST_LIST_HEAD_NOLOCK(contactliststruct, contact)
void * ast_channel_timingdata(const struct ast_channel *chan)
static int answer(void *data)
Channels with this particular technology are an implementation detail of Asterisk and should generall...
void ast_channel_caller_set(struct ast_channel *chan, struct ast_party_caller *value)
int ast_queue_hold(struct ast_channel *chan, const char *musicclass)
Queue a hold frame.
int ast_pre_call(struct ast_channel *chan, const char *sub_args)
Execute a Gosub call on the channel before a call is placed.
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().
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.
Structure to describe a channel "technology", ie a channel driver See for examples: ...
void ast_channel_adsicpe_set(struct ast_channel *chan, enum ast_channel_adsicpe value)
const char * ast_channel_exten(const struct ast_channel *chan)
int ast_channel_is_t38_active(struct ast_channel *chan)
This function will check if T.38 is active on the channel.
int(* ast_timing_func_t)(const void *data)
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.
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
void ast_channel_dtmf_tv_set(struct ast_channel *chan, struct timeval *value)
void ast_channel_epfd_set(struct ast_channel *chan, int value)
void ast_party_number_free(struct ast_party_number *doomed)
Destroy the party number contents.
int ast_autoservice_stop(struct ast_channel *chan)
Stop servicing a channel for us...
int ast_channel_is_leaving_bridge(struct ast_channel *chan)
Determine if a channel is leaving a bridge, but not hung up.
int ast_check_hangup(struct ast_channel *chan)
Check to see if a channel is needing hang up.
struct ast_channel * __ast_dummy_channel_alloc(const char *file, int line, const char *function)
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...
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.
struct ast_channel * chan
int ast_channel_fdno(const struct ast_channel *chan)
void ast_channel_masqr_set(struct ast_channel *chan, struct ast_channel *value)
void ast_channel_timingdata_set(struct ast_channel *chan, void *value)
const char * ast_channel_uniqueid(const struct ast_channel *chan)
ast_frame_type
Frame types.
ast_acf_write_fn_t write_fn
int ast_channel_timingfd(const struct ast_channel *chan)
struct ast_silence_generator * ast_channel_start_silence_generator(struct ast_channel *chan)
Starts a silence generator on the given channel.
struct stasis_topic * ast_channel_topic(struct ast_channel *chan)
A topic which publishes the events for a particular channel.
Redirecting reason information.
Dialed/Called Party information.
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.
Responsible for call detail data.
Structure that contains information about a bridge.
Indicate what information in ast_party_id should be set.
const char * ast_channel_userfield(const struct ast_channel *chan)
struct ast_format * ast_channel_rawreadformat(struct ast_channel *chan)
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.
struct ast_namedgroups * ast_get_namedgroups(const char *s)
Create an ast_namedgroups set with group names from comma separated string.
void ast_party_dialed_init(struct ast_party_dialed *init)
Initialize the given dialed structure.
struct ast_sched_context * ast_channel_sched(const struct ast_channel *chan)
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.
void * ast_channel_get_stream_topology_change_source(struct ast_channel *chan)
Retrieve the source that initiated the last stream topology change.
struct ast_generator * ast_channel_generator(const struct ast_channel *chan)
struct ast_stream_topology * ast_channel_set_stream_topology(struct ast_channel *chan, struct ast_stream_topology *topology)
Set the topology of streams on a channel.
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.
struct timeval * ast_channel_dtmf_tv(struct ast_channel *chan)
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
void ast_channel_name_to_dial_string(char *channel_name)
Removes the trailing identifiers from a channel name string.
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.
void ast_channel_set_is_t38_active(struct ast_channel *chan, int is_t38_active)
Sets the is_t38_active flag.
int ast_channel_internal_alertpipe_init(struct ast_channel *chan)
struct ast_party_id ast_channel_connected_effective_id(struct ast_channel *chan)
void ast_channel_set_flag(struct ast_channel *chan, unsigned int flag)
Set a flag on a channel.
int plan
Q.931 Type-Of-Number and Numbering-Plan encoded fields.
void ast_channel_named_callgroups_set(struct ast_channel *chan, struct ast_namedgroups *value)
int ast_channel_streamid(const struct ast_channel *chan)
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.
char * ast_recvtext(struct ast_channel *chan, int timeout)
Receives a text string from a channel Read a string of text from a channel.
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...
int ast_senddigit_mf_end(struct ast_channel *chan)
End sending an MF digit to a channel.
const ast_string_field call_forward
void ast_party_name_init(struct ast_party_name *init)
Initialize the given name structure.
void ast_channel_streamid_set(struct ast_channel *chan, int value)
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.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
int ani2
Automatic Number Identification 2 (Info Digits)
struct ast_channel * ast_channel_masq(const struct ast_channel *chan)
struct ast_channel_iterator * ast_channel_iterator_by_exten_new(const char *exten, const char *context)
Create a new channel iterator based on extension.
pthread_t ast_channel_blocker(const struct ast_channel *chan)
Connected Line/Party information.
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.
struct ast_party_dialed * ast_channel_dialed(struct ast_channel *chan)
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.
const ast_string_field hangupsource
int ast_channel_has_ari_vars(void)
Return whether or not any ARI variables have been set.
void ast_party_name_free(struct ast_party_name *doomed)
Destroy the party name contents.
void ast_channel_fout_set(struct ast_channel *chan, unsigned int value)
struct timeval ast_channel_creationtime(struct ast_channel *chan)
struct varshead * ast_channel_get_vars(struct ast_channel *chan)
Gets the variables for a given channel, as set using pbx_builtin_setvar_helper(). ...
Redirecting Line information. RDNIS (Redirecting Directory Number Information Service) Where a call d...
int __ast_answer(struct ast_channel *chan, unsigned int delay)
Answer a channel, with a selectable delay before returning.
const char * ast_channel_appl(const struct ast_channel *chan)
struct ast_format_cap * capabilities
struct ast_filestream * read_stream
int ast_softhangup_nolock(struct ast_channel *chan, int reason)
Softly hangup up a channel (no channel lock)
int ast_channel_is_bridged(const struct ast_channel *chan)
Determine if a channel is in a bridge.
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.
const char * ast_channel_peeraccount(const struct ast_channel *chan)
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.
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.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
General jitterbuffer state.
void(* digit)(struct ast_channel *chan, char digit)
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.
struct ast_namedgroups * ast_ref_namedgroups(struct ast_namedgroups *groups)
char * str
a string value for the redirecting reason
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.
const char * ast_channel_dialcontext(const struct ast_channel *chan)
int ast_channel_sendurl(struct ast_channel *channel, const char *url)
Sends a URL on a given link Send URL on link.
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.
const char * ast_cause2str(int state) attribute_pure
Gives the string form of a given cause code.
struct ast_hangup_handler_list * ast_channel_hangup_handlers(struct ast_channel *chan)
void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_channel *child)
Inherits channel variable from parent to child channel.
int source
Information about the source of an update.
int ast_channel_get_duration(struct ast_channel *chan)
Obtain how long the channel since the channel was created.
Structure to handle passing func_channel_write info to channels via setoption.
struct ast_filestream * write_stream
Call Completion Supplementary Services API.
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
struct ast_filestream * ast_channel_stream(const struct ast_channel *chan)
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.
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.
void ast_channel_pbx_set(struct ast_channel *chan, struct ast_pbx *value)
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.
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...
const char * ast_channel_hangupsource(const struct ast_channel *chan)
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...
struct ast_autochan_list * ast_channel_autochans(struct ast_channel *chan)
void ast_channel_timingfd_set(struct ast_channel *chan, int value)
const ast_string_field userfield
int ast_namedgroups_intersect(struct ast_namedgroups *a, struct ast_namedgroups *b)
Return TRUE if group a and b contain at least one common groupname.
void ast_autoservice_chan_hangup_peer(struct ast_channel *chan, struct ast_channel *peer)
Put chan into autoservice while hanging up peer.
struct ast_jb * ast_channel_jb(struct ast_channel *chan)
void ast_party_id_init(struct ast_party_id *init)
Initialize the given party id structure.
const char *const description
int ast_autoservice_ignore(struct ast_channel *chan, enum ast_frame_type ftype)
Ignore certain frame types.
void ast_channel_macroexten_set(struct ast_channel *chan, const char *value)
Structure used to handle boolean flags.
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.
void ast_channel_set_fd(struct ast_channel *chan, int which, int fd)
struct ast_party_redirecting * ast_channel_redirecting(struct ast_channel *chan)
static char cid_name[AST_MAX_EXTENSION]
struct ast_bridge_channel * ast_channel_get_bridge_channel(struct ast_channel *chan)
Get a reference to the channel's bridge pointer.
void ast_channel_callid_set(struct ast_channel *chan, ast_callid value)
Indicate what information in ast_party_connected_line should be set.
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.
static void send_text(unsigned char pos, unsigned char inverse, struct unistimsession *pte, const char *text)
int(* ast_acf_read2_fn_t)(struct ast_channel *chan, const char *cmd, char *data, struct ast_str **str, ssize_t len)
Typedef for a custom read2 function.
void ast_channel_exten_set(struct ast_channel *chan, const char *value)
struct ast_format_cap * ast_channel_nativeformats(const struct ast_channel *chan)
int ast_channel_internal_alert_readable(struct ast_channel *chan)
void ast_channel_sending_dtmf_tv_set(struct ast_channel *chan, struct timeval value)
char ast_channel_dtmf_digit_to_emulate(const struct ast_channel *chan)
const char * ast_channel_data(const struct ast_channel *chan)
int ast_waitfordigit(struct ast_channel *c, int ms)
Waits for a digit.
struct timeval ast_channel_sending_dtmf_tv(const struct ast_channel *chan)
void ast_channel_internal_copy_linkedid(struct ast_channel *dest, struct ast_channel *source)
Copy the full linkedid channel id structure from one channel to another.
void ast_channel_creationtime_set(struct ast_channel *chan, struct timeval *value)
char * tag
User-set "tag".
int ast_channel_fd(const struct ast_channel *chan, int which)
int(* ast_acf_read_fn_t)(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len)
Typedef for a custom read function.
void ast_deactivate_generator(struct ast_channel *chan)
int type
Q.931 subaddress type.
int ast_channel_softhangup_internal_flag(struct ast_channel *chan)
int transit_network_select
Transit Network Select.
void ast_party_redirecting_free(struct ast_party_redirecting *doomed)
Destroy the redirecting information contents.
Structure that contains information regarding a channel in a bridge.
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.
int ast_channel_dialed_causes_add(const struct ast_channel *chan, const struct ast_control_pvt_cause_code *cause_code, int datalen)
Add cause code information to the channel.
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
int ast_waitfor(struct ast_channel *chan, int ms)
Wait for input on a channel.
Indicate what information in ast_party_redirecting should be set.
void ast_tonepair_stop(struct ast_channel *chan)
int ast_channel_has_hook_requiring_audio(struct ast_channel *chan)
Check if the channel has any active hooks that require audio.
int count
Number of times the call was redirected.
void ast_channel_varshead_set(struct ast_channel *chan, struct varshead *value)
int ast_channel_hangupcause(const struct ast_channel *chan)
void ast_party_id_invalidate(struct ast_party_id *id)
Invalidate all components of the given party id.
static int func_channel_read(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len)
void ast_channel_context_set(struct ast_channel *chan, const char *value)
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.
const struct ast_channel_tech ast_kill_tech
Kill the channel channel driver technology descriptor.
void ast_party_subaddress_init(struct ast_party_subaddress *init)
Initialize the given subaddress structure.
struct ast_namedgroups * ast_channel_named_pickupgroups(const struct ast_channel *chan)
struct ast_channel * ast_channel_bridge_peer(struct ast_channel *chan)
Get the channel's bridge peer only if the bridge is two-party.
const char * ast_channel_name(const struct ast_channel *chan)
void ast_party_redirecting_init(struct ast_party_redirecting *init)
Initialize the given redirecting structure.
int ast_channel_fd_count(const struct ast_channel *chan)
Retrieve the number of file decriptor positions present on the channel.
void ast_channel_state_set(struct ast_channel *chan, enum ast_channel_state)
int ast_channel_alert_writable(struct ast_channel *chan)
struct ast_control_pvt_cause_code * ast_channel_dialed_causes_find(const struct ast_channel *chan, const char *chan_name)
Retrieve a ref-counted cause code information structure.
int ast_readstring_full(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders, int audiofd, int ctrlfd)
struct ast_channel_iterator * ast_channel_iterator_destroy(struct ast_channel_iterator *i)
Destroy a channel iterator.
void ast_channel_transfercapability_set(struct ast_channel *chan, unsigned short value)
#define DECLARE_STRINGFIELD_SETTERS_FOR(field)
void * ast_channel_music_state(const struct ast_channel *chan)
Information needed to specify a number in a call.
int ast_transfer_protocol(struct ast_channel *chan, char *dest, int *protocol)
Transfer a channel (if supported) receieve protocol result.
int ast_answer(struct ast_channel *chan)
Answer a channel.
char * ast_transfercapability2str(int transfercapability) attribute_const
Gives the string form of a given transfer capability.
void ast_channel_connected_set(struct ast_channel *chan, struct ast_party_connected_line *value)
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.
void ast_channel_sched_set(struct ast_channel *chan, struct ast_sched_context *value)
void ast_channel_internal_bridged_channel_set(struct ast_channel *chan, struct ast_channel *value)
int ast_transfer(struct ast_channel *chan, char *dest)
Transfer a channel (if supported).
int ast_is_deferrable_frame(const struct ast_frame *frame)
Should we keep this frame for later?
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.
void ast_channel_blocker_set(struct ast_channel *chan, pthread_t value)
Data structure associated with a single frame of data.
void ast_channel_emulate_dtmf_duration_set(struct ast_channel *chan, unsigned int value)
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...
void ast_channel_softhangup_internal_flag_add(struct ast_channel *chan, int value)
const char * ast_channel_language(const struct ast_channel *chan)
static int func_channel_write(struct ast_channel *chan, const char *function, char *data, const char *value)
struct ast_flags * ast_channel_snapshot_segment_flags(struct ast_channel *chan)
int ast_channel_has_manager_vars(void)
Return whether or not any manager variables have been set.
int ast_channel_unbridged(struct ast_channel *chan)
This function will check if the bridge needs to be re-evaluated due to external changes.
ast_group_t ast_channel_pickupgroup(const struct ast_channel *chan)
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.
struct ast_channel_id uniqueid
int ast_channel_get_intercept_mode(void)
Am I currently running an intercept dialplan routine.
int ast_tonepair_start(struct ast_channel *chan, int freq1, int freq2, int duration, int vol)
const char * ast_channel_context(const struct ast_channel *chan)
void ast_party_dialed_free(struct ast_party_dialed *doomed)
Destroy the dialed party contents.
unsigned long ast_channel_outsmpl(const struct ast_channel *chan)
ast_media_type
Types of media.
int ast_str2cause(const char *name) attribute_pure
Convert the string form of a cause code to a number.
void ast_channel_dialed_causes_clear(const struct ast_channel *chan)
Clear all cause information from the channel.
const char * warning_sound
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.
static void end_bridge_callback_data_fixup(struct ast_bridge_config *bconfig, struct ast_channel *originator, struct ast_channel *terminator)
int ast_safe_sleep_conditional(struct ast_channel *chan, int ms, int(*cond)(void *), void *data)
Wait for a specified amount of time, looking for hangups and a condition argument.
int ast_undestroyed_channels(void)
int ast_channel_rings(const struct ast_channel *chan)
ama_flags
Channel AMA Flags.
unsigned char valid
TRUE if the name information is valid/present.
struct ast_namedgroups * ast_unref_namedgroups(struct ast_namedgroups *groups)
const char * ast_channel_reason2str(int reason)
return an english explanation of the code returned thru __ast_request_and_dial's 'outstate' argument ...
ast_group_t ast_channel_callgroup(const struct ast_channel *chan)
static char context[AST_MAX_CONTEXT]
struct ast_flags * ast_channel_flags(struct ast_channel *chan)
enum ast_channel_error ast_channel_errno(void)
Get error code for latest channel operation.
int ast_readstring(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders)
Reads multiple digits.
Information needed to specify a subaddress in a call.
int ast_tonepair(struct ast_channel *chan, int freq1, int freq2, int duration, int vol)
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.
void ast_channel_internal_fd_set(struct ast_channel *chan, int which, int value)
void ast_channel_hold_state_set(struct ast_channel *chan, int value)
void ast_channel_internal_swap_snapshots(struct ast_channel *a, struct ast_channel *b)
Swap snapshots beteween two channels.
struct ast_channel_iterator * ast_channel_iterator_all_new(void)
Create a new channel iterator.
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.
void ast_channel_fin_set(struct ast_channel *chan, unsigned int value)
struct ast_audiohook_list * ast_channel_audiohooks(const struct ast_channel *chan)
const char * ast_channel_macrocontext(const struct ast_channel *chan)
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.
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.
void ast_channel_name_set(struct ast_channel *chan, const char *name)
Set the channel name.
void ast_party_caller_init(struct ast_party_caller *init)
Initialize the given caller structure.
void ast_channel_priority_set(struct ast_channel *chan, int value)
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
struct ast_party_connected_line * ast_channel_connected_indicated(struct ast_channel *chan)
struct ast_format * ast_channel_writeformat(struct ast_channel *chan)
struct ast_channel_monitor * ast_channel_monitor(const struct ast_channel *chan)
ast_timing_func_t ast_channel_timingfunc(const struct ast_channel *chan)
char * ast_print_namedgroups(struct ast_str **buf, struct ast_namedgroups *groups)
Print named call groups and named pickup groups.
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 ren...
struct ast_frame * ast_channel_dtmff(struct ast_channel *chan)
static snd_pcm_format_t format
void ast_channel_set_is_t38_active_nolock(struct ast_channel *chan, int is_t38_active)
Variant of ast_channel_set_is_t38_active. Use this if the channel is already locked prior to calling...
int ast_active_channels(void)
returns number of active/allocated channels
enum ama_flags ast_channel_amaflags(const struct ast_channel *chan)
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
Information needed to specify a name in a call.
void ast_channel_tech_pvt_set(struct ast_channel *chan, void *value)
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.
struct ast_frame * ast_read_noaudio(struct ast_channel *chan)
Reads a frame, returning AST_FRAME_NULL frame if audio.
int ast_channel_has_audio_frame_or_monitor(struct ast_channel *chan)
Check if the channel has active audiohooks, active framehooks, or a monitor.
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.
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.
struct ast_format * ast_channel_rawwriteformat(struct ast_channel *chan)
unsigned char valid
TRUE if the number information is valid/present.
void ast_channel_sending_dtmf_digit_set(struct ast_channel *chan, char value)
const ast_string_field latest_musicclass
const struct ast_channel_tech * ast_channel_tech(const struct ast_channel *chan)
ast_callid ast_channel_callid(const struct ast_channel *chan)
void ast_channel_vstreamid_set(struct ast_channel *chan, int value)
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. ...
int ast_channel_datastore_remove(struct ast_channel *chan, struct ast_datastore *datastore)
Remove a datastore from a channel.
struct ast_channel * ast_channel_masqr(const struct ast_channel *chan)
const char * ast_channel_parkinglot(const struct ast_channel *chan)
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.
const char * ast_channel_macroexten(const struct ast_channel *chan)
void ast_channel_outsmpl_set(struct ast_channel *chan, unsigned long value)
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 mon...
void ast_channel_softhangup_internal_flag_clear(struct ast_channel *chan, int value)
void ast_channel_data_set(struct ast_channel *chan, const char *value)
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.
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.
int ast_channel_cmpwhentohangup_tv(struct ast_channel *chan, struct timeval offset)
Compare a offset with the settings of when to hang a channel up.
#define AST_OPTION_T38_STATE
int ast_channel_alert_write(struct ast_channel *chan)
const char * ast_channel_musicclass(const struct ast_channel *chan)
struct ast_timer * ast_channel_timer(const struct ast_channel *chan)
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.
void ast_channel_unlink(struct ast_channel *chan)
Remove a channel from the global channels container.
void ast_channel_set_unbridged(struct ast_channel *chan, int value)
Sets the unbridged flag and queues a NULL frame on the channel to trigger a check by bridge_channel_w...
int ast_channel_redirecting_macro(struct ast_channel *autoservice_chan, struct ast_channel *macro_chan, const void *redirecting_info, int is_caller, int is_frame)
Run a redirecting interception macro and update a channel's redirecting information.
void ast_channel_redirecting_set(struct ast_channel *chan, struct ast_party_redirecting *value)
void ast_channel_monitor_set(struct ast_channel *chan, struct ast_channel_monitor *value)
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.
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.
struct ast_channel * ast_channel_internal_oldest_linkedid(struct ast_channel *a, struct ast_channel *b)
Determine which channel has an older linkedid.
int ast_sendtext(struct ast_channel *chan, const char *text)
Sends text to a channel.
void ast_channel_internal_set_fake_ids(struct ast_channel *chan, const char *uniqueid, const char *linkedid)
Set uniqueid and linkedid string value only (not time)
Channels have this property if they can create jitter; i.e. most VoIP channels.