118 struct timeval whentohangup;
156 struct timeval creationtime;
157 struct timeval answertime;
160 struct timeval dtmf_tv;
189 unsigned int finalized:1;
197 unsigned int emulate_dtmf_duration;
198 int visible_indication;
201 unsigned short transfercapability;
214 char dtmf_digit_to_emulate;
215 char sending_dtmf_digit;
216 struct timeval sending_dtmf_tv;
221 void *stream_topology_change_source;
232 #define DEFINE_STRINGFIELD_SETTERS_FOR(field, assert_on_null) \ 233 void ast_channel_##field##_set(struct ast_channel *chan, const char *value) \ 235 if ((assert_on_null)) ast_assert(!ast_strlen_zero(value)); \ 236 if (!strcmp(value, chan->field)) return; \ 237 ast_string_field_set(chan, field, value); \ 240 void ast_channel_##field##_build_va(struct ast_channel *chan, const char *fmt, va_list ap) \ 242 ast_string_field_build_va(chan, field, fmt, ap); \ 244 void ast_channel_##field##_build(struct ast_channel *chan, const char *fmt, ...) \ 248 ast_channel_##field##_build_va(chan, fmt, ap); \ 252 #define DEFINE_STRINGFIELD_SETTERS_AND_INVALIDATE_FOR(field, publish, assert_on_null, invalidate) \ 253 void ast_channel_##field##_set(struct ast_channel *chan, const char *value) \ 255 if ((assert_on_null)) ast_assert(!ast_strlen_zero(value)); \ 256 if (!strcmp(value, chan->field)) return; \ 257 ast_string_field_set(chan, field, value); \ 258 ast_channel_snapshot_invalidate_segment(chan, invalidate); \ 259 if (publish && ast_channel_internal_is_finalized(chan)) ast_channel_publish_snapshot(chan); \ 262 void ast_channel_##field##_build_va(struct ast_channel *chan, const char *fmt, va_list ap) \ 264 ast_string_field_build_va(chan, field, fmt, ap); \ 265 ast_channel_snapshot_invalidate_segment(chan, invalidate); \ 266 if (publish && ast_channel_internal_is_finalized(chan)) ast_channel_publish_snapshot(chan); \ 268 void ast_channel_##field##_build(struct ast_channel *chan, const char *fmt, ...) \ 272 ast_channel_##field##_build_va(chan, fmt, ap); \ 288 #define DEFINE_STRINGFIELD_GETTER_FOR(field) const char *ast_channel_##field(const struct ast_channel *chan) \ 290 return chan->field; \ 346 return chan->context;
364 return chan->macrocontext;
368 ast_copy_string(chan->macrocontext, value,
sizeof(chan->macrocontext));
372 return chan->macroexten;
381 return chan->dtmf_digit_to_emulate;
385 chan->dtmf_digit_to_emulate =
value;
390 return chan->sending_dtmf_digit;
394 chan->sending_dtmf_digit =
value;
399 return chan->sending_dtmf_tv;
403 chan->sending_dtmf_tv =
value;
408 return chan->amaflags;
413 if (chan->amaflags == value) {
416 chan->amaflags =
value;
429 return chan->hangupcause;
433 chan->hangupcause =
value;
438 return chan->macropriority;
442 chan->macropriority =
value;
446 return chan->priority;
450 chan->priority =
value;
463 return chan->streamid;
467 chan->streamid =
value;
471 return chan->timingfd;
475 chan->timingfd =
value;
479 return chan->visible_indication;
483 chan->visible_indication =
value;
487 return chan->hold_state;
491 chan->hold_state =
value;
495 return chan->vstreamid;
499 chan->vstreamid =
value;
503 return chan->transfercapability;
507 chan->transfercapability =
value;
511 return chan->emulate_dtmf_duration;
515 chan->emulate_dtmf_duration =
value;
639 return chan->nativeformats;
649 if (chan->stream_topology) {
650 chan->default_streams[
type] =
662 chan->stream_topology = topology;
669 chan->stream_topology_change_source = change_source;
674 return chan->stream_topology_change_source;
691 if (!chan->stream_topology) {
783 return chan->adsicpe;
787 chan->adsicpe =
value;
801 call_identifier_from[0] =
'\0';
805 ast_debug(3,
"Channel Call ID changing from %s to %s\n", call_identifier_from, call_identifier_to);
811 "State: CallIDChange\r\n" 817 call_identifier_from);
846 return chan->oldwriteformat;
850 return chan->rawreadformat;
854 return chan->rawwriteformat;
858 return chan->readformat;
862 return chan->writeformat;
978 return chan->creationtime;
988 return chan->answertime;
999 return chan->softhangup;
1003 chan->softhangup =
value;
1007 chan->softhangup |=
value;
1011 chan ->softhangup &= ~value;
1016 return chan->unbridged;
1030 chan->unbridged = !!
value;
1043 return chan->is_t38_active;
1058 chan->is_t38_active = !!is_t38_active;
1242 return chan->bridge;
1246 chan->bridge =
value;
1253 return chan->bridge_channel;
1257 chan->bridge_channel =
value;
1262 return &chan->flags;
1298 if (ao2_cause_code) {
1299 memcpy(ao2_cause_code, cause_code, datalen);
1329 #define DIALED_CAUSES_BUCKETS 37 1439 a->topic = b->topic;
1442 forward = a->channel_forward;
1443 a->channel_forward = b->channel_forward;
1444 b->channel_forward = forward;
1451 temp = a->endpoint_forward;
1452 a->endpoint_forward = b->endpoint_forward;
1453 b->endpoint_forward = temp;
1460 snapshot = a->snapshot;
1461 a->snapshot = b->snapshot;
1462 b->snapshot = snapshot;
1475 "done with dialed causes since the channel is going away");
1494 chan->finalized = 1;
1499 return chan->finalized;
1517 chan->endpoint_forward =
1520 if (!chan->endpoint_forward) {
1534 static int dummy_id;
1552 if (!chan->channel_forward) {
1570 *error_code =
error;
1588 return chan->stream_topology;
1609 new_topology = topology;
1625 return chan->default_streams[
type];
1635 tmp_topology = chan1->stream_topology;
1636 chan1->stream_topology = chan2->stream_topology;
1637 chan2->stream_topology = tmp_topology;
1650 return chan->snapshot;
1656 chan->snapshot =
ao2_bump(snapshot);
1661 return &chan->snapshot_segment_flags;
int ast_channel_fdno(const struct ast_channel *chan)
#define ao2_t_ref(o, delta, tag)
Reference/unreference an object and return the old refcount.
void ast_channel_redirecting_set(struct ast_channel *chan, struct ast_party_redirecting *value)
void ast_channel_nativeformats_set(struct ast_channel *chan, struct ast_format_cap *value)
static int collect_names_cb(void *obj, void *arg, int flags)
int ast_channel_unbridged(struct ast_channel *chan)
This function will check if the bridge needs to be re-evaluated due to external changes.
#define AST_VECTOR_FREE(vec)
Deallocates this vector.
void ast_channel_blockproc_set(struct ast_channel *chan, const char *value)
static char musicclass[MAX_MUSICCLASS]
#define AST_THREADSTORAGE(name)
Define a thread storage variable.
void * ast_channel_generatordata(const struct ast_channel *chan)
void ast_channel_creationtime_set(struct ast_channel *chan, struct timeval *value)
unsigned long long ast_group_t
void ast_channel_callid_cleanup(struct ast_channel *chan)
Information needed to identify an endpoint in a call.
enum sip_cc_notify_state state
ast_alert_status_t ast_channel_internal_alert_flush(struct ast_channel *chan)
static char accountcode[AST_MAX_ACCOUNT_CODE]
int ast_channel_internal_is_finalized(struct ast_channel *chan)
struct ast_channel * masqr
#define ast_channel_lock(chan)
static int pvt_cause_hash_fn(const void *vpc, const int flags)
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
struct ast_format * ast_channel_rawreadformat(struct ast_channel *chan)
struct ast_stream_topology * ast_channel_get_stream_topology(const struct ast_channel *chan)
Retrieve the topology of streams on a channel.
const char * ast_channel_appl(const struct ast_channel *chan)
struct ast_channel * masq
struct ast_party_connected_line connected
Channel Connected Line ID information.
void ast_channel_pickupgroup_set(struct ast_channel *chan, ast_group_t value)
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...
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...
struct ast_party_redirecting * ast_channel_redirecting(struct ast_channel *chan)
Asterisk main include file. File version handling, generic pbx functions.
struct timeval answertime
struct ast_party_connected_line * ast_channel_connected_indicated(struct ast_channel *chan)
void ast_channel_set_rawreadformat(struct ast_channel *chan, struct ast_format *format)
void ast_channel_rings_set(struct ast_channel *chan, int value)
char chan_name[AST_CHANNEL_NAME]
static char parkinglot[AST_MAX_CONTEXT]
struct ast_party_caller caller
Channel Caller ID information.
struct ast_tone_zone * zone
void * ast_threadstorage_get(struct ast_threadstorage *ts, size_t init_size)
Retrieve thread storage.
const char * ast_channel_blockproc(const struct ast_channel *chan)
void ast_channel_appl_set(struct ast_channel *chan, const char *value)
struct ast_channel_id linkedid
void ast_channel_snapshot_invalidate_segment(struct ast_channel *chan, enum ast_channel_snapshot_segment_invalidation segment)
Invalidate a channel snapshot segment from being reused.
void ast_channel_masqr_set(struct ast_channel *chan, struct ast_channel *value)
void ast_channel_internal_alertpipe_swap(struct ast_channel *chan1, struct ast_channel *chan2)
Swap the interal alertpipe between two channels.
struct ast_filestream * ast_channel_stream(const struct ast_channel *chan)
struct varshead * ast_channel_varshead(struct ast_channel *chan)
struct timeval * ast_channel_whentohangup(struct ast_channel *chan)
#define ast_channel_unref(c)
Decrease channel reference count.
enum ast_channel_state ast_channel_state(const struct ast_channel *chan)
char ast_channel_dtmf_digit_to_emulate(const struct ast_channel *chan)
void ast_channel_internal_bridge_channel_set(struct ast_channel *chan, struct ast_bridge_channel *value)
ast_timing_func_t ast_channel_timingfunc(const struct ast_channel *chan)
void ast_channel_vstream_set(struct ast_channel *chan, struct ast_filestream *value)
static void channel_set_default_streams(struct ast_channel *chan)
unsigned short ast_channel_transfercapability(const struct ast_channel *chan)
struct ast_flags * ast_channel_flags(struct ast_channel *chan)
struct ast_autochan_list * ast_channel_autochans(struct ast_channel *chan)
Channel UniqueId structure.
int ast_channel_streamid(const struct ast_channel *chan)
void ast_channel_zone_set(struct ast_channel *chan, struct ast_tone_zone *value)
#define ast_set_flag(p, flag)
void ast_channel_fdno_set(struct ast_channel *chan, int value)
void ast_channel_jb_set(struct ast_channel *chan, struct ast_jb *value)
struct ast_party_connected_line * ast_channel_connected(struct ast_channel *chan)
#define ao2_callback(c, flags, cb_fn, arg)
unsigned long ast_channel_outsmpl(const struct ast_channel *chan)
struct ast_autochan_list autochans
void ast_channel_generatordata_set(struct ast_channel *chan, void *value)
ast_timing_func_t timingfunc
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...
const struct ast_channel_tech * ast_channel_tech(const struct ast_channel *chan)
struct ast_generator * generator
struct ast_format * ast_channel_readformat(struct ast_channel *chan)
void ast_channel_sending_dtmf_tv_set(struct ast_channel *chan, struct timeval value)
Structure representing a snapshot of channel state.
struct ast_frame *(*const read_stream)(struct ast_channel *chan)
Read a frame (or chain of frames from the same stream), in standard format (see frame.h), with stream num.
int ast_channel_forward_endpoint(struct ast_channel *chan, struct ast_endpoint *endpoint)
Forward channel stasis messages to the given endpoint.
void * __ao2_alloc(size_t data_size, ao2_destructor_fn destructor_fn, unsigned int options, const char *tag, const char *file, int line, const char *func) attribute_warn_unused_result
struct ast_party_redirecting redirecting
Redirecting/Diversion information.
struct ast_format * ast_channel_writeformat(struct ast_channel *chan)
void ast_channel_macrocontext_set(struct ast_channel *chan, const char *value)
Structure to pass both assignedid values to channel drivers.
void ast_channel_visible_indication_set(struct ast_channel *chan, int value)
struct ast_sched_context * sched
ast_channel_state
ast_channel states
struct ast_frame * ast_channel_dtmff(struct ast_channel *chan)
char unique_id[AST_MAX_UNIQUEID]
struct stasis_topic * ast_endpoint_topic(struct ast_endpoint *endpoint)
Returns the topic for a specific endpoint.
void ast_channel_insmpl_set(struct ast_channel *chan, unsigned long value)
void ast_channel_internal_finalize(struct ast_channel *chan)
void ast_channel_fout_set(struct ast_channel *chan, unsigned int value)
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
void ast_channel_emulate_dtmf_duration_set(struct ast_channel *chan, unsigned int value)
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
struct ast_stream_topology * ast_stream_topology_create_from_format_cap(struct ast_format_cap *cap)
A helper function that, given a format capabilities structure, creates a topology and separates the m...
struct ast_cdr * ast_channel_cdr(const struct ast_channel *chan)
void ast_channel_varshead_set(struct ast_channel *chan, struct varshead *value)
void ast_channel_pbx_set(struct ast_channel *chan, struct ast_pbx *value)
void ast_channel_set_readformat(struct ast_channel *chan, struct ast_format *format)
void ast_channel_priority_set(struct ast_channel *chan, int value)
void ast_channel_adsicpe_set(struct ast_channel *chan, enum ast_channel_adsicpe value)
void ast_channel_internal_bridge_set(struct ast_channel *chan, struct ast_bridge *value)
struct ast_trans_pvt * ast_channel_writetrans(const struct ast_channel *chan)
int ast_alertpipe_readable(int alert_pipe[2])
Determine if the alert pipe is readable.
void ast_channel_dtmf_tv_set(struct ast_channel *chan, struct timeval *value)
void ast_channel_connected_set(struct ast_channel *chan, struct ast_party_connected_line *value)
struct ast_namedgroups * ast_channel_named_pickupgroups(const struct ast_channel *chan)
int ast_channel_hangupcause(const struct ast_channel *chan)
#define DEFINE_STRINGFIELD_SETTERS_AND_INVALIDATE_FOR(field, publish, assert_on_null, invalidate)
const char * ast_channel_exten(const struct ast_channel *chan)
struct ast_readq_list readq
void ast_channel_dialed_causes_clear(const struct ast_channel *chan)
Clear all cause information from the channel.
ast_alert_status_t ast_channel_internal_alert_read(struct ast_channel *chan)
void ast_channel_macropriority_set(struct ast_channel *chan, int value)
ast_group_t ast_channel_callgroup(const struct ast_channel *chan)
struct timeval ast_channel_answertime(struct ast_channel *chan)
int ast_atomic_fetchadd_int(volatile int *p, int v)
Atomically add v to *p and return the previous value of *p.
void ast_channel_internal_swap_topics(struct ast_channel *a, struct ast_channel *b)
Swap topics beteween two channels.
void ast_channel_generator_set(struct ast_channel *chan, struct ast_generator *value)
int ast_channel_is_t38_active(struct ast_channel *chan)
This function will check if T.38 is active on the channel.
#define ast_asprintf(ret, fmt,...)
A wrapper for asprintf()
void ast_alertpipe_close(int alert_pipe[2])
Close an alert pipe.
#define ast_strlen_zero(foo)
int ast_channel_is_multistream(struct ast_channel *chan)
Determine if a channel is multi-stream capable.
void ast_channel_callgroup_set(struct ast_channel *chan, ast_group_t value)
const char * ast_config_AST_SYSTEM_NAME
ssize_t ast_alertpipe_write(int alert_pipe[2])
Write an event to an alert pipe.
const struct ast_channel_tech * tech
struct ast_audiohook_list * ast_channel_audiohooks(const struct ast_channel *chan)
int ast_channel_priority(const struct ast_channel *chan)
void ast_channel_macroexten_set(struct ast_channel *chan, const char *value)
void ast_channel_blocker_set(struct ast_channel *chan, pthread_t value)
void ast_alertpipe_clear(int alert_pipe[2])
Sets the alert pipe file descriptors to default values.
void ast_channel_monitor_set(struct ast_channel *chan, struct ast_channel_monitor *value)
const char * ast_channel_context(const struct ast_channel *chan)
void ast_channel_internal_alertpipe_close(struct ast_channel *chan)
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)
void ast_channel_audiohooks_set(struct ast_channel *chan, struct ast_audiohook_list *value)
#define ast_str_tmp(init_len, __expr)
int ast_channel_blocker_tid(const struct ast_channel *chan)
struct stasis_topic * ast_channel_topic_all(void)
A topic which publishes the events for all channels.
#define ast_debug(level,...)
Log a DEBUG message.
struct ast_channel * ast_channel_masqr(const struct ast_channel *chan)
struct ast_framehook_list * ast_channel_framehooks(const struct ast_channel *chan)
int ast_channel_internal_alertpipe_init(struct ast_channel *chan)
const char * ast_stream_topology_to_str(const struct ast_stream_topology *topology, struct ast_str **buf)
Get a string representing the topology for debugging/display purposes.
void ast_channel_data_set(struct ast_channel *chan, const char *value)
int ast_alertpipe_writable(int alert_pipe[2])
Determine if the alert pipe is writable.
#define AST_VECTOR_INIT(vec, size)
Initialize a vector.
struct ast_stream * ast_stream_topology_get_first_stream_by_type(const struct ast_stream_topology *topology, enum ast_media_type type)
Gets the first active stream of a specific type from the topology.
General Asterisk PBX channel definitions.
static char dialcontext[AST_MAX_CONTEXT]
struct ast_sched_context * ast_channel_sched(const struct ast_channel *chan)
Asterisk file paths, configured in asterisk.conf.
void ast_channel_amaflags_set(struct ast_channel *chan, enum ama_flags value)
#define AST_VECTOR_ELEM_CLEANUP_NOOP(elem)
Vector element cleanup that does nothing.
#define DEFINE_STRINGFIELD_SETTERS_FOR(field, assert_on_null)
struct ast_party_id ast_channel_connected_effective_id(struct ast_channel *chan)
A set of tones for a given locale.
#define ast_string_field_init(x, size)
Initialize a field pool and fields.
const char * ast_channel_uniqueid(const struct ast_channel *chan)
static struct ast_threadstorage channel_errno
struct ast_audiohook_list * audiohooks
unsigned int ast_channel_fin(const struct ast_channel *chan)
int ast_channel_internal_alert_readable(struct ast_channel *chan)
void ast_channel_internal_swap_stream_topology(struct ast_channel *chan1, struct ast_channel *chan2)
void ast_channel_transfercapability_set(struct ast_channel *chan, unsigned short value)
#define AST_MAX_EXTENSION
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.
#define AST_STRING_FIELD(name)
Declare a string field.
void ast_channel_set_rawwriteformat(struct ast_channel *chan, struct ast_format *format)
void ast_channel_callid_set(struct ast_channel *chan, ast_callid callid)
Caller Party information.
void ast_channel_internal_swap_snapshots(struct ast_channel *a, struct ast_channel *b)
Swap snapshots beteween two channels.
struct ast_format * ast_channel_rawwriteformat(struct ast_channel *chan)
#define ao2_ref(o, delta)
void ast_channel_dtmff_set(struct ast_channel *chan, struct ast_frame *value)
struct ast_jb * ast_channel_jb(struct ast_channel *chan)
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
struct ast_party_id ast_channel_redirecting_effective_orig(struct ast_channel *chan)
#define ast_strdupa(s)
duplicate a string in memory from the stack
void ast_channel_vstreamid_set(struct ast_channel *chan, int value)
int ast_channel_unbridged_nolock(struct ast_channel *chan)
ast_channel_unbridged variant. Use this if the channel is already locked prior to calling...
struct ao2_container * dialed_causes
int ast_alertpipe_init(int alert_pipe[2])
Initialize an alert pipe.
static char language[MAX_LANGUAGE]
int ast_channel_internal_setup_topics(struct ast_channel *chan)
void ast_channel_masq_set(struct ast_channel *chan, struct ast_channel *value)
#define AST_VECTOR(name, type)
Define a vector structure.
struct stasis_topic * stasis_topic_create(const char *name)
Create a new topic.
void ast_channel_internal_set_stream_topology_change_source(struct ast_channel *chan, void *change_source)
void ast_channel_hold_state_set(struct ast_channel *chan, int value)
int ast_channel_visible_indication(const struct ast_channel *chan)
int ast_channel_fd_count(const struct ast_channel *chan)
Retrieve the number of file decriptor positions present on the channel.
#define DEFINE_STRINGFIELD_GETTER_FOR(field)
struct ast_bridge * ast_channel_internal_bridge(const struct ast_channel *chan)
int ast_channel_alert_write(struct ast_channel *chan)
void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value)
void ast_channel_blocker_tid_set(struct ast_channel *chan, int value)
Structure to describe a channel "technology", ie a channel driver See for examples: ...
int(* ast_timing_func_t)(const void *data)
struct ast_flags * ast_channel_snapshot_segment_flags(struct ast_channel *chan)
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
struct ast_party_caller * ast_channel_caller(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_softhangup_internal_flag_clear(struct ast_channel *chan, int value)
void ast_channel_internal_errno_set(enum ast_channel_error error)
#define ast_test_suite_event_notify(s, f,...)
struct ast_format * ast_channel_oldwriteformat(struct ast_channel *chan)
void ast_channel_dialed_set(struct ast_channel *chan, struct ast_party_dialed *value)
struct ast_party_dialed dialed
Dialed/Called information.
void ast_channel_cdr_set(struct ast_channel *chan, struct ast_cdr *value)
struct ast_trans_pvt * writetrans
struct ast_tone_zone * ast_channel_zone(const struct ast_channel *chan)
struct ast_datastore_list * ast_channel_datastores(struct ast_channel *chan)
void ast_channel_tech_pvt_set(struct ast_channel *chan, void *value)
Dialed/Called Party information.
Responsible for call detail data.
Structure that contains information about a bridge.
struct ast_hangup_handler_list hangup_handlers
int ast_channel_timingfd(const struct ast_channel *chan)
char * ast_tech_to_upper(char *dev_str)
Convert the tech portion of a device string to upper case.
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
int(*const write_stream)(struct ast_channel *chan, int stream_num, struct ast_frame *frame)
Write a frame on a specific stream, in standard format (see frame.h)
ast_alert_status_t ast_alertpipe_read(int alert_pipe[2])
Read an event from an alert pipe.
struct ast_party_dialed * ast_channel_dialed(struct ast_channel *chan)
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
void ast_channel_softhangup_internal_flag_set(struct ast_channel *chan, int value)
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
struct ast_pbx * ast_channel_pbx(const struct ast_channel *chan)
Internal channel functions for channel.c to use.
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.
struct ast_stream_topology * ast_stream_topology_alloc(void)
Create a stream topology.
struct ast_channel_monitor * ast_channel_monitor(const struct ast_channel *chan)
void ast_channel_answertime_set(struct ast_channel *chan, struct timeval *value)
void * ast_channel_get_stream_topology_change_source(struct ast_channel *chan)
Retrieve the source that initiated the last stream topology change.
int ast_alertpipe_readfd(int alert_pipe[2])
Get the alert pipe's read file descriptor.
ast_callid ast_channel_callid(const struct ast_channel *chan)
void ast_channel_internal_cleanup(struct ast_channel *chan)
void ast_callid_strnprint(char *buffer, size_t buffer_size, ast_callid callid)
copy a string representation of the callid into a target string
struct ast_framehook_list * framehooks
const char * ast_channel_data(const struct ast_channel *chan)
struct ast_namedgroups * named_pickupgroups
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_channel_hold_state(const struct ast_channel *chan)
Connected Line/Party information.
void ast_channel_set_is_t38_active(struct ast_channel *chan, int is_t38_active)
Sets the is_t38_active flag.
#define ao2_alloc(data_size, destructor_fn)
Redirecting Line information. RDNIS (Redirecting Directory Number Information Service) Where a call d...
int ast_channel_softhangup_internal_flag(struct ast_channel *chan)
struct stasis_topic * ast_channel_topic(struct ast_channel *chan)
A topic which publishes the events for a particular channel.
void ast_channel_set_writeformat(struct ast_channel *chan, struct ast_format *format)
#define SCOPE_EXIT_RTN(...)
Scope Exit with return.
General jitterbuffer state.
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_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.
struct ast_namedgroups * ast_ref_namedgroups(struct ast_namedgroups *groups)
void ast_channel_softhangup_internal_flag_add(struct ast_channel *chan, int value)
#define ast_channel_unlock(chan)
void ast_channel_internal_fd_set(struct ast_channel *chan, int which, int value)
void ast_channel_outsmpl_set(struct ast_channel *chan, unsigned long value)
#define AST_VECTOR_RESET(vec, cleanup)
Reset vector.
struct ast_filestream * vstream
pthread_t ast_channel_blocker(const struct ast_channel *chan)
void ast_channel_sending_dtmf_digit_set(struct ast_channel *chan, char value)
void * ast_channel_music_state(const struct ast_channel *chan)
struct ast_datastore_list datastores
#define SCOPE_ENTER(level,...)
Non RAII_VAR Scope Trace macros The advantage of these macros is that the EXITs will have the actual ...
struct stasis_forward * stasis_forward_cancel(struct stasis_forward *forward)
struct ast_format_cap * ast_channel_nativeformats(const struct ast_channel *chan)
void ast_channel_internal_alertpipe_clear(struct ast_channel *chan)
struct timeval creationtime
void ast_channel_writetrans_set(struct ast_channel *chan, struct ast_trans_pvt *value)
char ast_channel_sending_dtmf_digit(const struct ast_channel *chan)
struct ast_bridge_channel * ast_channel_internal_bridge_channel(const struct ast_channel *chan)
Vector container support.
#define ao2_find(container, arg, flags)
void ast_channel_state_set(struct ast_channel *chan, enum ast_channel_state value)
struct ast_timer * ast_channel_timer(const struct ast_channel *chan)
struct ast_channel_snapshot * ast_channel_snapshot(const struct ast_channel *chan)
Structure used to handle boolean flags.
struct timeval ast_channel_sending_dtmf_tv(const struct ast_channel *chan)
ast_alert_status_t ast_alertpipe_flush(int alert_pipe[2])
Consume all alerts written to the alert pipe.
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...
struct ast_party_connected_line connected_indicated
Channel Connected Line ID information that was last indicated.
void ast_channel_internal_swap_uniqueid_and_linkedid(struct ast_channel *a, struct ast_channel *b)
Swap uniqueid and linkedid beteween two channels.
struct ast_frame ast_null_frame
struct timeval * ast_channel_dtmf_tv(struct ast_channel *chan)
#define SCOPE_EXIT_RTN_VALUE(__return_value,...)
Scope Exit with return value.
int ast_channel_vstreamid(const struct ast_channel *chan)
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
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...
struct ast_channel * ast_channel_masq(const struct ast_channel *chan)
#define AST_VECTOR_GET(vec, idx)
Get an element from a vector.
struct ast_channel * chan
Structure that contains information regarding a channel in a bridge.
void ast_channel_timingfd_set(struct ast_channel *chan, int value)
void ast_channel_timingfunc_set(struct ast_channel *chan, ast_timing_func_t value)
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
struct ast_namedgroups * ast_channel_named_callgroups(const struct ast_channel *chan)
struct timeval ast_channel_creationtime(struct ast_channel *chan)
#define ao2_replace(dst, src)
unsigned int ast_channel_fout(const struct ast_channel *chan)
void ast_channel_sched_set(struct ast_channel *chan, struct ast_sched_context *value)
struct ast_hangup_handler_list * ast_channel_hangup_handlers(struct ast_channel *chan)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
const char * ast_channel_name(const struct ast_channel *chan)
void ast_channel_timer_set(struct ast_channel *chan, struct ast_timer *value)
void ast_channel_whentohangup_set(struct ast_channel *chan, struct timeval *value)
void ast_channel_internal_fd_clear_all(struct ast_channel *chan)
int ast_channel_rings(const struct ast_channel *chan)
void ast_channel_hangupcause_set(struct ast_channel *chan, int value)
#define AST_CALLID_BUFFER_LENGTH
enum ast_channel_adsicpe ast_channel_adsicpe(const struct ast_channel *chan)
#define AST_VECTOR_REPLACE(vec, idx, elem)
Replace an element at a specific position in a vector, growing the vector if needed.
void ast_channel_music_state_set(struct ast_channel *chan, void *value)
struct ast_readq_list * ast_channel_readq(struct ast_channel *chan)
ast_group_t ast_channel_pickupgroup(const struct ast_channel *chan)
Data structure associated with a single frame of data.
void ast_channel_fin_set(struct ast_channel *chan, unsigned int value)
struct ast_namedgroups * named_callgroups
void ast_channel_timingdata_set(struct ast_channel *chan, void *value)
void ast_channel_set_oldwriteformat(struct ast_channel *chan, struct ast_format *format)
struct ast_filestream * ast_channel_vstream(const struct ast_channel *chan)
struct ast_channel_id uniqueid
int error(const char *format,...)
void ast_channel_named_pickupgroups_set(struct ast_channel *chan, struct ast_namedgroups *value)
const char * ast_channel_macrocontext(const struct ast_channel *chan)
struct timeval whentohangup
void ast_channel_publish_snapshot(struct ast_channel *chan)
Publish a ast_channel_snapshot for a channel.
void ast_channel_snapshot_set(struct ast_channel *chan, struct ast_channel_snapshot *snapshot)
int ast_channel_macropriority(const struct ast_channel *chan)
ast_media_type
Types of media.
void ast_alertpipe_swap(int alert_pipe_1[2], int alert_pipe_2[2])
Swap the file descriptors from two alert pipes.
const char * ast_channel_macroexten(const struct ast_channel *chan)
void ast_channel_caller_set(struct ast_channel *chan, struct ast_party_caller *value)
void ast_channel_exten_set(struct ast_channel *chan, const char *value)
struct ast_trans_pvt * readtrans
ama_flags
Channel AMA Flags.
struct ast_trans_pvt * ast_channel_readtrans(const struct ast_channel *chan)
struct ast_namedgroups * ast_unref_namedgroups(struct ast_namedgroups *groups)
int ast_channel_fd_isset(const struct ast_channel *chan, int which)
static char context[AST_MAX_CONTEXT]
void ast_channel_tech_set(struct ast_channel *chan, const struct ast_channel_tech *value)
struct ast_channel_monitor * monitor
unsigned long ast_channel_insmpl(const struct ast_channel *chan)
static int pvt_cause_cmp_fn(void *obj, void *vstr, int flags)
struct stasis_forward * stasis_forward_all(struct stasis_topic *from_topic, struct stasis_topic *to_topic)
Create a subscription which forwards all messages from one topic to another.
void ast_channel_internal_fd_clear(struct ast_channel *chan, int which)
void ast_channel_streamid_set(struct ast_channel *chan, int value)
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.
struct ast_party_id ast_channel_redirecting_effective_to(struct ast_channel *chan)
void ast_stream_topology_free(struct ast_stream_topology *topology)
Unreference and destroy a stream topology.
void * ast_channel_tech_pvt(const struct ast_channel *chan)
struct ast_channel * __ast_channel_internal_alloc(void(*destructor)(void *obj), const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *file, int line, const char *function)
struct ast_filestream * stream
enum ama_flags ast_channel_amaflags(const struct ast_channel *chan)
struct ast_party_id ast_channel_redirecting_effective_from(struct ast_channel *chan)
static struct ast_timer * timer
const char * ast_channel_linkedid(const struct ast_channel *chan)
int ast_channel_fd(const struct ast_channel *chan, int which)
int ast_channel_internal_alert_readfd(struct ast_channel *chan)
static snd_pcm_format_t format
unsigned int ast_channel_emulate_dtmf_duration(const struct ast_channel *chan)
void * ast_channel_timingdata(const struct ast_channel *chan)
#define ast_string_field_free_memory(x)
free all memory - to be called before destroying the object
struct ast_generator * ast_channel_generator(const 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.
void ast_channel_readtrans_set(struct ast_channel *chan, struct ast_trans_pvt *value)
#define AST_VECTOR_SIZE(vec)
Get the number of elements in a vector.
void ast_channel_named_callgroups_set(struct ast_channel *chan, struct ast_namedgroups *value)
#define DIALED_CAUSES_BUCKETS
void ast_channel_stream_set(struct ast_channel *chan, struct ast_filestream *value)
static int uniqueint
The monotonically increasing integer counter for channel uniqueids.
void ast_channel_framehooks_set(struct ast_channel *chan, struct ast_framehook_list *value)
void ast_channel_internal_set_stream_topology(struct ast_channel *chan, struct ast_stream_topology *topology)
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
int ast_channel_fd_add(struct ast_channel *chan, int value)
Add a file descriptor to the channel without a fixed position.
enum ast_channel_error ast_channel_internal_errno(void)
static force_inline int attribute_pure ast_str_hash(const char *str)
Compute a hash value on a string.
int ast_channel_alert_writable(struct ast_channel *chan)
void ast_channel_context_set(struct ast_channel *chan, const char *value)
#define ao2_link(container, obj)