#include <asterisk/frame.h>
#include <asterisk/sched.h>
#include <asterisk/chanvars.h>
#include <unistd.h>
#include <setjmp.h>
#include <pthread.h>
#include <sys/poll.h>
#include <asterisk/lock.h>
#include <asterisk/cdr.h>
#include <asterisk/monitor.h>
Include dependency graph for channel.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | ast_generator |
struct | ast_channel |
Main Channel structure associated with a channel. More... | |
struct | ast_bridge_config |
struct | outgoing_helper |
Defines | |
#define | AST_MAX_EXTENSION 80 |
Max length of an extension. | |
#define | AST_CHANNEL_NAME 80 |
#define | AST_CHANNEL_MAX_STACK 32 |
#define | MAX_LANGUAGE 20 |
#define | AST_MAX_FDS 8 |
#define | AST_FLAG_DIGITAL 1 /* if the call is a digital ISDN call */ |
#define | LOAD_OH(oh) |
#define | AST_CDR_TRANSFER (1 << 0) |
#define | AST_CDR_FORWARD (1 << 1) |
#define | AST_CDR_CALLWAIT (1 << 2) |
#define | AST_CDR_CONFERENCE (1 << 3) |
#define | AST_ADSI_UNKNOWN (0) |
#define | AST_ADSI_AVAILABLE (1) |
#define | AST_ADSI_UNAVAILABLE (2) |
#define | AST_ADSI_OFFHOOKONLY (3) |
#define | AST_SOFTHANGUP_DEV (1 << 0) /* Soft hangup by device */ |
#define | AST_SOFTHANGUP_ASYNCGOTO (1 << 1) /* Soft hangup for async goto */ |
#define | AST_SOFTHANGUP_SHUTDOWN (1 << 2) |
#define | AST_SOFTHANGUP_TIMEOUT (1 << 3) |
#define | AST_SOFTHANGUP_APPUNLOAD (1 << 4) |
#define | AST_SOFTHANGUP_EXPLICIT (1 << 5) |
#define | AST_STATE_DOWN 0 |
#define | AST_STATE_RESERVED 1 |
#define | AST_STATE_OFFHOOK 2 |
#define | AST_STATE_DIALING 3 |
#define | AST_STATE_RING 4 |
#define | AST_STATE_RINGING 5 |
#define | AST_STATE_UP 6 |
#define | AST_STATE_BUSY 7 |
#define | AST_STATE_DIALING_OFFHOOK 8 |
#define | AST_STATE_MUTE (1 << 16) |
#define | AST_DEVICE_UNKNOWN 0 |
#define | AST_DEVICE_NOT_INUSE 1 |
#define | AST_DEVICE_INUSE 2 |
#define | AST_DEVICE_BUSY 3 |
#define | AST_DEVICE_INVALID 4 |
#define | AST_DEVICE_UNAVAILABLE 5 |
#define | AST_BRIDGE_DTMF_CHANNEL_0 (1 << 0) |
#define | AST_BRIDGE_DTMF_CHANNEL_1 (1 << 1) |
#define | AST_BRIDGE_REC_CHANNEL_0 (1 << 2) |
#define | AST_BRIDGE_REC_CHANNEL_1 (1 << 3) |
#define | AST_BRIDGE_IGNORE_SIGS (1 << 4) |
#define | CRASH do { } while(0) |
#define | CHECK_BLOCKING(c) |
Functions | |
ast_channel * | ast_request (char *type, int format, void *data) |
Requests a channel. | |
int | ast_parse_device_state (char *device) |
Search the Channels by Name. | |
int | ast_device_state (char *device) |
Asks a channel for device state. | |
ast_channel * | ast_request_and_dial (char *type, int format, void *data, int timeout, int *reason, char *callerid) |
ast_channel * | __ast_request_and_dial (char *type, int format, void *data, int timeout, int *reason, char *callerid, struct outgoing_helper *oh) |
int | ast_channel_register (char *type, char *description, int capabilities, struct ast_channel *(*requester)(char *type, int format, void *data)) |
Registers a channel. | |
int | ast_channel_register_ex (char *type, char *description, int capabilities, struct ast_channel *(*requester)(char *type, int format, void *data), int(*devicestate)(void *data)) |
void | ast_channel_unregister (char *type) |
Unregister a channel class. | |
int | ast_hangup (struct ast_channel *chan) |
Hang up a channel. | |
int | ast_softhangup (struct ast_channel *chan, int cause) |
Softly hangup up a channel. | |
int | ast_softhangup_nolock (struct ast_channel *chan, int cause) |
int | ast_check_hangup (struct ast_channel *chan) |
Check to see if a channel is needing hang up. | |
void | ast_channel_setwhentohangup (struct ast_channel *chan, time_t offset) |
Set when to hang a channel up. | |
int | ast_answer (struct ast_channel *chan) |
Answer a ringing call. | |
int | ast_call (struct ast_channel *chan, char *addr, int timeout) |
Make a call. | |
int | ast_indicate (struct ast_channel *chan, int condition) |
Indicates condition of channel. | |
int | ast_waitfor (struct ast_channel *chan, int ms) |
Wait for input on a channel. | |
int | ast_safe_sleep (struct ast_channel *chan, int ms) |
Wait for a specied amount of time, looking for hangups. | |
int | ast_safe_sleep_conditional (struct ast_channel *chan, int ms, int(*cond)(void *), void *data) |
Wait for a specied amount of time, looking for hangups and a condition argument. | |
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. | |
ast_channel * | ast_waitfor_n (struct ast_channel **chan, int n, int *ms) |
Waits for input on a group of channels. | |
int | ast_waitfor_n_fd (int *fds, int n, int *ms, int *exception) |
Waits for input on an fd. | |
ast_frame * | ast_read (struct ast_channel *chan) |
Reads a frame. | |
int | ast_write (struct ast_channel *chan, struct ast_frame *frame) |
Write a frame to a channel. | |
int | ast_write_video (struct ast_channel *chan, struct ast_frame *frame) |
Write video frame to a channel. | |
int | ast_prod (struct ast_channel *chan) |
int | ast_set_read_format (struct ast_channel *chan, int format) |
Sets read format on channel chan. | |
int | ast_set_write_format (struct ast_channel *chan, int format) |
Sets write format on channel chan. | |
int | ast_sendtext (struct ast_channel *chan, char *text) |
Sends text to a channel. | |
int | ast_senddigit (struct ast_channel *chan, char digit) |
Receives a text character from a channel. | |
int | ast_recvchar (struct ast_channel *chan, int timeout) |
ast_channel * | ast_channel_walk_locked (struct ast_channel *prev) |
Browse channels in use. | |
ast_channel * | ast_get_channel_by_name_locked (char *channame) |
Get channel by name (locks channel). | |
char | ast_waitfordigit (struct ast_channel *c, int ms) |
Waits for a digit. | |
char | ast_waitfordigit_full (struct ast_channel *c, int ms, int audiofd, int ctrlfd) |
int | ast_readstring (struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders) |
Reads multiple digits. | |
int | ast_readstring_full (struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders, int audiofd, int ctrlfd) |
int | ast_channel_make_compatible (struct ast_channel *c0, struct ast_channel *c1) |
Makes two channel formats compatible. | |
int | ast_channel_bridge (struct ast_channel *c0, struct ast_channel *c1, struct ast_bridge_config *config, struct ast_frame **fo, struct ast_channel **rc) |
Bridge two channels together. | |
int | ast_channel_masquerade (struct ast_channel *original, struct ast_channel *clone) |
Weird function made for call transfers. | |
char * | ast_state2str (int state) |
Gives the string form of a given state. | |
int | ast_channel_setoption (struct ast_channel *channel, int option, void *data, int datalen, int block) |
Sets an option on a channel. | |
ast_frame * | ast_channel_queryoption (struct ast_channel *channel, int option, void *data, int *datalen, int block) |
Checks the value of an option. | |
int | ast_channel_supports_html (struct ast_channel *channel) |
Checks for HTML support on a channel. | |
int | ast_channel_sendhtml (struct ast_channel *channel, int subclass, char *data, int datalen) |
Sends HTML on given channel. | |
int | ast_channel_sendurl (struct ast_channel *channel, char *url) |
Sends a URL on a given link. | |
int | ast_channel_defer_dtmf (struct ast_channel *chan) |
Defers DTMF. | |
void | ast_channel_undefer_dtmf (struct ast_channel *chan) |
Undeos a defer. | |
void | ast_begin_shutdown (int hangup) |
void | ast_cancel_shutdown (void) |
int | ast_active_channels (void) |
int | ast_shutting_down (void) |
int | ast_activate_generator (struct ast_channel *chan, struct ast_generator *gen, void *params) |
void | ast_deactivate_generator (struct ast_channel *chan) |
void | ast_set_callerid (struct ast_channel *chan, char *callerid, int anitoo) |
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_tonepair (struct ast_channel *chan, int freq1, int freq2, int duration, int vol) |
int | ast_autoservice_start (struct ast_channel *chan) |
int | ast_autoservice_stop (struct ast_channel *chan) |
int | ast_settimeout (struct ast_channel *c, int samples, int(*func)(void *data), void *data) |
int | ast_transfer (struct ast_channel *chan, char *dest) |
int | ast_do_masquerade (struct ast_channel *chan) |
unsigned int | ast_get_group (char *s) |
|
|
|
|
|
|
|
|
|
Report DTMF on channel 0 Definition at line 662 of file channel.h. Referenced by ast_channel_bridge(), and ast_rtp_bridge(). |
|
Report DTMF on channel 1 Definition at line 664 of file channel.h. Referenced by ast_channel_bridge(), and ast_rtp_bridge(). |
|
Ignore all signal frames except NULL Definition at line 670 of file channel.h. Referenced by ast_channel_bridge(). |
|
Return all voice frames on channel 0 |
|
Return all voice frames on channel 1 |
|
|
|
|
|
|
|
|
|
Definition at line 39 of file channel.h. Referenced by pbx_exec(). |
|
Definition at line 38 of file channel.h. Referenced by ast_channel_free(), and ast_parse_device_state(). |
|
Device is busy |
|
Device is in use Definition at line 350 of file channel.h. Referenced by ast_parse_device_state(). |
|
Device is invalid Definition at line 354 of file channel.h. Referenced by ast_device_state(). |
|
Device is not used |
|
Device is unavailable |
|
Device is valid but channel didn't know state Definition at line 346 of file channel.h. Referenced by ast_device_state(), and ast_parse_device_state(). |
|
|
|
Max length of an extension.
Definition at line 32 of file channel.h. Referenced by ast_cdr_init(), ast_cdr_setcid(), ast_cdr_update(), ast_device_state(), and ast_device_state_changed(). |
|
Definition at line 44 of file channel.h. Referenced by ast_channel_alloc(), ast_do_masquerade(), ast_read(), and ast_waitfor_nandfds(). |
|
|
|
Definition at line 315 of file channel.h. Referenced by ast_async_goto(), and ast_pbx_run(). |
|
Definition at line 314 of file channel.h. Referenced by ast_do_masquerade(), ast_dsp_process(), ast_queue_hangup(), ast_read(), and ast_write(). |
|
|
|
Definition at line 316 of file channel.h. Referenced by ast_begin_shutdown(). |
|
Definition at line 317 of file channel.h. Referenced by ast_check_hangup(), ast_pbx_run(), and ast_waitfor_nandfds(). |
|
Line is busy Definition at line 337 of file channel.h. Referenced by ast_state2str(). |
|
Digits (or equivalent) have been dialed Definition at line 329 of file channel.h. Referenced by ast_state2str(). |
|
Digits (or equivalent) have been dialed while offhook |
|
Channel is down and available Definition at line 323 of file channel.h. Referenced by ast_channel_alloc(), ast_request(), ast_setstate(), and ast_state2str(). |
|
Do not transmit voice data |
|
Channel is off hook Definition at line 327 of file channel.h. Referenced by ast_state2str(). |
|
Channel is down, but reserved Definition at line 325 of file channel.h. Referenced by ast_state2str(). |
|
Line is ringing Definition at line 331 of file channel.h. Referenced by ast_answer(), and ast_state2str(). |
|
Remote end is ringing Definition at line 333 of file channel.h. Referenced by ast_answer(), and ast_state2str(). |
|
Line is up Definition at line 335 of file channel.h. Referenced by __ast_request_and_dial(), ast_answer(), ast_cdr_init(), ast_control_streamfile(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), ast_prod(), ast_read(), and ast_state2str(). |
|
Definition at line 876 of file channel.h. Referenced by ast_sendtext(), ast_waitfor_nandfds(), and ast_write(). |
|
Definition at line 873 of file channel.h. Referenced by ast_hangup(), ast_queue_frame(), ast_rtcp_read(), ast_rtp_read(), and ast_sched_del(). |
|
Definition at line 286 of file channel.h. Referenced by ast_pbx_outgoing_exten(). |
|
Definition at line 41 of file channel.h. Referenced by ast_fileexists(), and ast_openvstream(). |
|
Definition at line 1671 of file channel.c. References ast_channel::_state, outgoing_helper::account, ast_call(), ast_cdr_alloc(), ast_cdr_disposition(), ast_cdr_end(), ast_cdr_failed(), ast_cdr_init(), ast_cdr_setaccount(), ast_cdr_setapp(), ast_cdr_start(), ast_cdr_update(), AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HANGUP, AST_CONTROL_PROGRESS, AST_CONTROL_RINGING, AST_FRAME_CONTROL, ast_frfree(), ast_hangup(), ast_log(), ast_read(), ast_request(), ast_set_callerid(), AST_STATE_UP, ast_waitfor(), outgoing_helper::callerid, ast_channel::cdr, ast_channel::context, outgoing_helper::context, ast_channel::exten, outgoing_helper::exten, ast_channel::hangupcause, LOG_NOTICE, LOG_WARNING, pbx_builtin_setvar(), outgoing_helper::priority, ast_channel::priority, type, and outgoing_helper::variable. Referenced by ast_pbx_outgoing_exten(), and ast_request_and_dial().
|
|
Activate a given generator Definition at line 791 of file channel.c. References ast_generator::alloc, ast_mutex_lock, ast_mutex_unlock, ast_prod(), ast_channel::generator, ast_channel::generatordata, ast_channel::lock, and ast_generator::release. Referenced by ast_linear_stream(), ast_playtones_start(), and ast_tonepair_start().
|
|
Returns number of active/allocated channels Definition at line 120 of file channel.c. References ast_mutex_lock, ast_mutex_unlock, channels, and ast_channel::next.
|
|
Answer a ringing call.
Definition at line 750 of file channel.c. References ast_channel::_state, ast_channel_pvt::answer, ast_cdr_answer(), ast_check_hangup(), ast_mutex_lock, ast_mutex_unlock, ast_setstate(), AST_STATE_RING, AST_STATE_RINGING, AST_STATE_UP, ast_channel::cdr, ast_channel::lock, ast_channel::pvt, and ast_channel::zombie. Referenced by ast_control_streamfile().
|
|
Automatically service a channel for us... Definition at line 87 of file autoservice.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, AST_PTHREADT_NULL, free, LOG_WARNING, malloc, ast_channel::next, and asent::next. Referenced by ast_dtmf_stream(), ast_get_enum(), ast_get_srv(), and ast_get_txt().
|
|
Stop servicing a channel for us... Returns -1 on error or if channel has been hungup Definition at line 123 of file autoservice.c. References ast_channel::_softhangup, ast_mutex_lock, ast_mutex_unlock, AST_PTHREADT_NULL, ast_channel::blocking, free, and asent::next. Referenced by ast_dtmf_stream(), ast_get_enum(), ast_get_srv(), and ast_get_txt().
|
|
Initiate system shutdown -- prevents new channels from being allocated. If "hangup" is non-zero, all existing channels will receive soft hangups Definition at line 105 of file channel.c. References ast_mutex_lock, ast_mutex_unlock, ast_softhangup(), AST_SOFTHANGUP_SHUTDOWN, and channels.
|
|
Make a call.
Definition at line 1890 of file channel.c. References ast_check_hangup(), ast_mutex_lock, ast_mutex_unlock, ast_channel_pvt::call, ast_channel::lock, ast_channel::pvt, and ast_channel::zombie. Referenced by __ast_request_and_dial().
|
|
Cancels an existing shutdown and returns to normal operation Definition at line 134 of file channel.c.
|
|
Bridge two channels together.
Definition at line 2418 of file channel.c. References ast_bridge_config::allowdisconnect, ast_bridge_config::allowredirect_in, ast_bridge_config::allowredirect_out, AST_BRIDGE_DTMF_CHANNEL_0, AST_BRIDGE_DTMF_CHANNEL_1, AST_BRIDGE_IGNORE_SIGS, ast_channel_make_compatible(), ast_check_hangup(), AST_FRAME_CONTROL, AST_FRAME_DTMF, AST_FRAME_IMAGE, AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frfree(), ast_log(), ast_read(), ast_verbose(), ast_waitfor_n(), ast_write(), ast_channel::bridge, ast_bridge_config::end_sound, EVENT_FLAG_CALL, LOG_DEBUG, LOG_WARNING, manager_event(), ast_channel::name, option_verbose, ast_bridge_config::play_to_callee, ast_bridge_config::play_to_caller, ast_bridge_config::play_warning, ast_bridge_config::start_sound, ast_bridge_config::timelimit, VERBOSE_PREFIX_3, ast_bridge_config::warning_freq, ast_bridge_config::warning_sound, and ast_channel::zombie.
|
|
Defers DTMF. Defer DTMF so that you only read things like hangups and audio. Returns non-zero if channel was already DTMF-deferred or 0 if channel is just now being DTMF-deferred Definition at line 435 of file channel.c. References ast_channel::deferdtmf.
|
|
Makes two channel formats compatible.
Definition at line 2027 of file channel.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_set_read_format(), ast_set_write_format(), ast_translator_best_choice(), ast_channel::lock, LOG_WARNING, ast_channel::name, and ast_channel::nativeformats. Referenced by ast_channel_bridge().
|
|
Weird function made for call transfers.
Definition at line 2078 of file channel.c. References AST_FRAME_NULL, ast_log(), ast_mutex_lock, ast_mutex_trylock, ast_mutex_unlock, ast_queue_frame(), ast_channel::lock, LOG_DEBUG, LOG_WARNING, ast_channel::masq, ast_channel::masqr, and ast_channel::name. Referenced by ast_async_goto().
|
|
Checks the value of an option. Query the value of an option, optionally blocking until a reply is received Works similarly to setoption except only reads the options. |
|
Registers a channel.
Definition at line 156 of file channel.c. References ast_channel_register_ex(), description(), and type.
|
|
Definition at line 162 of file channel.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_verbose(), backends, description(), LOG_DEBUG, LOG_WARNING, malloc, ast_channel::next, option_debug, option_verbose, type, and VERBOSE_PREFIX_2. Referenced by ast_channel_register().
|
|
Sends HTML on given channel. Send HTML or URL on link. Returns 0 on success or -1 on failure Definition at line 2013 of file channel.c. References ast_channel::pvt, and ast_channel_pvt::send_html.
|
|
Sends a URL on a given link. Send URL on link. Returns 0 on success or -1 on failure Definition at line 2020 of file channel.c. References AST_HTML_URL, ast_channel::pvt, and ast_channel_pvt::send_html.
|
|
Sets an option on a channel.
Definition at line 2641 of file channel.c. References ast_log(), LOG_ERROR, ast_channel::pvt, and ast_channel_pvt::setoption.
|
|
Set when to hang a channel up.
Definition at line 144 of file channel.c. References ast_channel::whentohangup.
|
|
Checks for HTML support on a channel. Returns 0 if channel does not support HTML or non-zero if it does Definition at line 2006 of file channel.c. References ast_channel::pvt, and ast_channel_pvt::send_html.
|
|
Undeos a defer. Undo defer. ast_read will return any dtmf characters that were queued Definition at line 445 of file channel.c. References ast_channel::deferdtmf.
|
|
Unregister a channel class.
Definition at line 721 of file channel.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_verbose(), backends, free, LOG_DEBUG, LOG_WARNING, ast_channel::next, chanlist::next, option_debug, option_verbose, ast_channel::type, type, and VERBOSE_PREFIX_2.
|
|
Browse channels in use.
Definition at line 451 of file channel.c. References ast_mutex_lock, ast_mutex_unlock, and channels. Referenced by ast_async_goto_by_name(), ast_get_channel_by_name_locked(), and ast_parse_device_state().
|
|
Check to see if a channel is needing hang up.
Definition at line 79 of file channel.c. References ast_channel::_softhangup, AST_SOFTHANGUP_TIMEOUT, ast_channel_pvt::pvt, ast_channel::pvt, and ast_channel::whentohangup. Referenced by ast_answer(), ast_call(), ast_channel_bridge(), ast_indicate(), ast_read(), ast_readstring(), ast_readstring_full(), ast_recvchar(), ast_rtp_bridge(), ast_sendtext(), ast_transfer(), ast_waitfordigit(), ast_waitfordigit_full(), and ast_write().
|
|
Deactive an active generator Definition at line 778 of file channel.c. References ast_mutex_lock, ast_mutex_unlock, ast_channel::generator, ast_channel::generatordata, ast_channel::lock, ast_generator::release, and ast_channel::writeinterrupt. Referenced by ast_openstream(), ast_playtones_stop(), ast_read(), ast_tonepair_stop(), and ast_write().
|
|
Asks a channel for device state.
Definition at line 1851 of file channel.c. References AST_DEVICE_INVALID, AST_DEVICE_UNKNOWN, ast_log(), AST_MAX_EXTENSION, ast_mutex_lock, ast_mutex_unlock, ast_parse_device_state(), backends, and LOG_WARNING.
|
|
Definition at line 2117 of file channel.c. References ast_channel::_state, ast_channel::adsicpe, ast_channel_pvt::alertpipe, ast_channel_free(), ast_log(), AST_MAX_FDS, ast_mutex_lock, ast_mutex_unlock, ast_set_read_format(), ast_set_write_format(), AST_SOFTHANGUP_DEV, ast_channel::blocker, ast_channel::blocking, ast_channel::callerid, ast_channel::dnid, EVENT_FLAG_CALL, ast_channel::exception, ast_channel::fdno, ast_channel::fds, ast_channel_pvt::fixup, LOG_DEBUG, LOG_WARNING, manager_event(), ast_channel::masq, ast_channel::masqr, ast_channel::name, ast_channel::nativeformats, ast_channel::next, ast_channel_pvt::pvt, ast_channel::pvt, ast_channel::readformat, ast_channel_pvt::readq, ast_channel::timingfd, ast_channel::type, and ast_channel::writeformat. Referenced by ast_async_goto(), ast_hangup(), ast_read(), ast_waitfor_nandfds(), and ast_write().
|
|
Get channel by name (locks channel).
Definition at line 475 of file channel.c. References ast_channel_walk_locked(), and ast_mutex_unlock.
|
|
Definition at line 2793 of file channel.c. References ast_log(), LOG_ERROR, LOG_WARNING, and s.
|
|
Hang up a channel.
Definition at line 654 of file channel.c. References ast_cdr_end(), ast_cdr_free(), ast_cdr_post(), ast_channel_free(), ast_closestream(), ast_do_masquerade(), ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_channel::blocker, ast_channel::blocking, ast_channel::blockproc, ast_channel::cdr, CRASH, EVENT_FLAG_CALL, ast_channel::generator, ast_channel::generatordata, ast_channel_pvt::hangup, ast_channel::hangupcause, ast_channel::lock, LOG_DEBUG, LOG_WARNING, manager_event(), ast_channel::masq, ast_channel::masqr, ast_channel::name, option_debug, ast_channel::pvt, ast_generator::release, ast_channel::sched, sched_context_destroy(), ast_channel::stream, ast_channel::uniqueid, ast_channel::vstream, and ast_channel::zombie. Referenced by __ast_request_and_dial(), ast_async_goto(), ast_pbx_outgoing_app(), ast_pbx_outgoing_exten(), and ast_pbx_run().
|
|
Indicates condition of channel.
Definition at line 1334 of file channel.c. References ast_check_hangup(), AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_PROGRESS, AST_CONTROL_RINGING, ast_get_indication_tone(), ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_playtones_start(), ast_playtones_stop(), ast_channel::data, ast_channel_pvt::indicate, ast_channel::lock, LOG_DEBUG, LOG_WARNING, ast_channel::name, ast_channel::pvt, ast_channel::zombie, and ast_channel::zone.
|
|
Search the Channels by Name.
Definition at line 1831 of file channel.c. References AST_CHANNEL_NAME, ast_channel_walk_locked(), AST_DEVICE_INUSE, AST_DEVICE_UNKNOWN, ast_mutex_unlock, ast_channel::lock, and ast_channel::name. Referenced by ast_device_state().
|
|
Definition at line 1470 of file channel.c. References ast_channel::_state, AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, ast_log(), AST_STATE_UP, ast_write(), ast_frame::data, LOG_DEBUG, LOG_WARNING, ast_channel::name, ast_channel::pvt, ast_channel_pvt::rawwriteformat, and ast_frame::subclass. Referenced by ast_activate_generator().
|
|
Reads a frame.
Definition at line 1130 of file channel.c. References ast_channel::_softhangup, ast_channel_pvt::alertpipe, ast_cdr_answer(), ast_cdr_end(), ast_check_hangup(), AST_CONTROL_ANSWER, AST_CONTROL_HANGUP, ast_deactivate_generator(), ast_do_masquerade(), AST_FRAME_CONTROL, AST_FRAME_DTMF, ast_frame_dump(), AST_FRAME_NULL, AST_FRAME_VOICE, ast_frfree(), ast_getformatname(), ast_log(), AST_MAX_FDS, ast_mutex_lock, ast_mutex_unlock, ast_seekstream(), ast_setstate(), AST_SOFTHANGUP_DEV, AST_STATE_UP, ast_translate(), ast_writestream(), ast_channel::blocker, ast_channel::cdr, ast_channel::deferdtmf, ast_channel::dtmff, ast_channel::dtmfq, ast_channel_pvt::exception, ast_channel::exception, ast_channel::fdno, ast_channel::fin, ast_frame::frametype, ast_generator::generate, ast_channel::generator, ast_channel::generatordata, ast_channel::insmpl, ast_channel::lock, LOG_DEBUG, LOG_NOTICE, LOG_WARNING, ast_channel::masq, ast_channel::monitor, ast_channel::name, ast_channel::nativeformats, ast_frame::next, ast_channel::outsmpl, ast_channel::pvt, ast_channel_pvt::read, ast_channel_monitor::read_stream, ast_channel_pvt::readq, ast_channel_pvt::readtrans, SEEK_FORCECUR, ast_frame::subclass, ast_channel::timingdata, ast_channel::timingfd, ast_channel::timingfunc, and ast_channel::zombie. Referenced by __ast_request_and_dial(), ast_app_getvoice(), ast_channel_bridge(), ast_recvchar(), ast_rtp_bridge(), ast_safe_sleep(), ast_safe_sleep_conditional(), ast_tonepair(), ast_waitfordigit(), ast_waitfordigit_full(), ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full().
|
|
Reads multiple digits.
Definition at line 1925 of file channel.c. References ast_check_hangup(), AST_DIGIT_ANY, ast_stopstream(), ast_waitfordigit(), ast_waitstream(), s, ast_channel::stream, and ast_channel::zombie. Referenced by ast_app_getdata().
|
|
Definition at line 1964 of file channel.c. References ast_check_hangup(), AST_DIGIT_ANY, ast_stopstream(), ast_waitfordigit_full(), ast_waitstream_full(), s, ast_channel::stream, and ast_channel::zombie. Referenced by ast_app_getdata_full().
|
|
Definition at line 1379 of file channel.c. References ast_check_hangup(), AST_CONTROL_HANGUP, AST_FRAME_CONTROL, AST_FRAME_TEXT, ast_frfree(), ast_read(), and ast_waitfor().
|
|
Requests a channel.
Definition at line 1786 of file channel.c. References ast_channel::_state, ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_state2str(), AST_STATE_DOWN, ast_translator_best_choice(), backends, ast_channel::callerid, EVENT_FLAG_CALL, LOG_WARNING, manager_event(), ast_channel::name, ast_channel::next, ast_channel::type, type, and ast_channel::uniqueid. Referenced by __ast_request_and_dial().
|
|
Definition at line 1781 of file channel.c. References __ast_request_and_dial(), and type. Referenced by ast_pbx_outgoing_app(), and ast_pbx_outgoing_exten().
|
|
Wait for a specied amount of time, looking for hangups.
Definition at line 509 of file channel.c. References ast_frfree(), ast_read(), and ast_waitfor(). Referenced by ast_dtmf_stream().
|
|
Wait for a specied amount of time, looking for hangups and a condition argument.
Definition at line 488 of file channel.c. References ast_frfree(), ast_read(), and ast_waitfor().
|
|
Receives a text character from a channel.
Definition at line 1465 of file channel.c.
|
|
Sends text to a channel.
Definition at line 1408 of file channel.c. References ast_check_hangup(), ast_channel::blocking, CHECK_BLOCKING, ast_channel::pvt, ast_channel_pvt::send_text, and ast_channel::zombie.
|
|
Definition at line 2324 of file channel.c. References ast_channel::ani, ast_cdr_setcid(), ast_channel::callerid, ast_channel::cdr, EVENT_FLAG_CALL, free, manager_event(), ast_channel::name, strdup, and ast_channel::uniqueid. Referenced by __ast_request_and_dial().
|
|
Sets read format on channel chan.
Definition at line 1637 of file channel.c. References ast_getformatname(), ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_translator_best_choice(), ast_translator_build_path(), ast_translator_free_path(), ast_channel::lock, LOG_DEBUG, LOG_NOTICE, ast_channel::name, ast_channel::nativeformats, option_debug, ast_channel::pvt, ast_channel_pvt::rawreadformat, ast_channel::readformat, and ast_channel_pvt::readtrans. Referenced by ast_app_getvoice(), ast_channel_make_compatible(), and ast_do_masquerade().
|
|
Sets write format on channel chan.
Definition at line 1604 of file channel.c. References ast_getformatname(), ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_translator_best_choice(), ast_translator_build_path(), ast_translator_free_path(), ast_channel::lock, LOG_DEBUG, LOG_NOTICE, ast_channel::name, ast_channel::nativeformats, option_debug, ast_channel::pvt, ast_channel_pvt::rawwriteformat, ast_channel::writeformat, and ast_channel_pvt::writetrans. Referenced by ast_channel_make_compatible(), ast_do_masquerade(), ast_openstream(), and ast_stopstream().
|
|
Definition at line 1060 of file channel.c. References ast_log(), LOG_DEBUG, ast_channel::timingdata, ast_channel::timingfd, and ast_channel::timingfunc. Referenced by ast_closestream().
|
|
Returns non-zero if Asterisk is being shut down Definition at line 139 of file channel.c.
|
|
Softly hangup up a channel.
Definition at line 633 of file channel.c. References ast_mutex_lock, ast_mutex_unlock, ast_softhangup_nolock(), and ast_channel::lock. Referenced by ast_begin_shutdown().
|
|
Definition at line 618 of file channel.c. References ast_channel::_softhangup, AST_FRAME_NULL, ast_log(), ast_queue_frame(), ast_channel::blocker, ast_channel::blocking, LOG_DEBUG, ast_channel::name, and option_debug. Referenced by ast_async_goto(), and ast_softhangup().
|
|
Gives the string form of a given state.
Definition at line 205 of file channel.c. References AST_STATE_BUSY, AST_STATE_DIALING, AST_STATE_DOWN, AST_STATE_OFFHOOK, AST_STATE_RESERVED, AST_STATE_RING, AST_STATE_RINGING, and AST_STATE_UP. Referenced by ast_request(), and ast_setstate().
|
|
Play a tone pair for a given amount of time Definition at line 2775 of file channel.c. References ast_frfree(), ast_read(), ast_tonepair_start(), ast_waitfor(), and ast_channel::generatordata.
|
|
Start a tone going Definition at line 2755 of file channel.c. References ast_activate_generator(), tonepair_def::duration, tonepair_def::freq1, tonepair_def::freq2, and tonepair_def::vol. Referenced by ast_tonepair().
|
|
Stop a tone from playing Definition at line 2770 of file channel.c. References ast_deactivate_generator().
|
|
Definition at line 1905 of file channel.c. References ast_check_hangup(), ast_mutex_lock, ast_mutex_unlock, ast_channel::lock, ast_channel::pvt, ast_channel_pvt::transfer, and ast_channel::zombie.
|
|
Wait for input on a channel.
Definition at line 1019 of file channel.c. References ast_waitfor_n(). Referenced by __ast_request_and_dial(), ast_app_getvoice(), ast_dtmf_stream(), ast_recvchar(), ast_safe_sleep(), ast_safe_sleep_conditional(), ast_tonepair(), ast_waitfordigit(), ast_waitstream(), and ast_waitstream_fr().
|
|
Waits for input on a group of channels. Wait for input on an array of channels for a given # of milliseconds. Return channel with activity, or NULL if none has activity. time "ms" is modified in-place, if applicable Definition at line 1014 of file channel.c. References ast_waitfor_nandfds(). Referenced by ast_channel_bridge(), ast_rtp_bridge(), and ast_waitfor().
|
|
Waits for input on an fd. This version works on fd's only. Be careful with it. Definition at line 810 of file channel.c. References ast_log(), LOG_WARNING, poll(), POLLIN, and POLLPRI.
|
|
Waits for activity on a group of channels.
Definition at line 871 of file channel.c. References ast_do_masquerade(), ast_log(), AST_MAX_FDS, ast_mutex_lock, ast_mutex_unlock, AST_SOFTHANGUP_TIMEOUT, ast_channel::blocking, CHECK_BLOCKING, ast_channel::fds, LOG_WARNING, ast_channel::masq, poll(), POLLIN, POLLPRI, and ast_channel::whentohangup. Referenced by ast_waitfor_n(), ast_waitfordigit_full(), and ast_waitstream_full().
|
|
Waits for a digit.
Definition at line 1033 of file channel.c. References ast_check_hangup(), AST_FRAME_DTMF, ast_frfree(), ast_read(), ast_waitfor(), and ast_channel::zombie. Referenced by ast_control_streamfile(), ast_pbx_run(), and ast_readstring().
|
|
Definition at line 1077 of file channel.c. References ast_check_hangup(), AST_CONTROL_ANSWER, AST_CONTROL_HANGUP, AST_CONTROL_RINGING, AST_FRAME_CONTROL, AST_FRAME_DTMF, AST_FRAME_VOICE, ast_frfree(), ast_log(), ast_read(), ast_waitfor_nandfds(), LOG_WARNING, and ast_channel::zombie. Referenced by ast_readstring_full().
|
|
Write a frame to a channel.
Definition at line 1496 of file channel.c. References ast_channel::_softhangup, ast_check_hangup(), ast_deactivate_generator(), ast_do_masquerade(), AST_FRAME_CONTROL, AST_FRAME_DTMF, ast_frame_dump(), AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frfree(), ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_seekstream(), AST_SOFTHANGUP_DEV, ast_translate(), ast_writestream(), ast_channel::blocking, CHECK_BLOCKING, ast_frame::data, ast_channel::fout, ast_frame::frametype, ast_channel::generatordata, ast_channel::insmpl, ast_channel::lock, LOG_WARNING, ast_channel::masq, ast_channel::masqr, ast_channel::monitor, ast_channel::name, ast_channel::outsmpl, ast_channel::pvt, SEEK_FORCECUR, ast_channel_pvt::send_text, ast_frame::subclass, ast_channel_pvt::write, ast_channel_monitor::write_stream, ast_channel_pvt::write_video, ast_channel::writeinterrupt, ast_channel_pvt::writetrans, and ast_channel::zombie. Referenced by ast_channel_bridge(), ast_dtmf_stream(), ast_prod(), ast_rtp_bridge(), and ast_write_video().
|
|
Write video frame to a channel.
Definition at line 1485 of file channel.c. References ast_write(), ast_channel::pvt, and ast_channel_pvt::write_video.
|