67static const char app[] =
"DumpChan";
71 long elapsed_seconds = 0;
72 int hour = 0,
min = 0, sec = 0;
85 hour = elapsed_seconds / 3600;
86 min = (elapsed_seconds % 3600) / 60;
87 sec = elapsed_seconds % 60;
98 "ConnectedLineIDNum= %s\n"
99 "ConnectedLineIDName=%s\n"
109 "RawWriteFormat= %s\n"
110 "RawReadFormat= %s\n"
111 "WriteTranscode= %s %s\n"
112 "ReadTranscode= %s %s\n"
113 "1stFileDescriptor= %d\n"
116 "TimetoHangup= %ld\n"
117 "ElapsedTime= %dh%dm%ds\n"
158 bridge ? bridge->
uniqueid :
"(Not bridged)",
177 static char *line =
"================================================================================";
186 "Dumping Info For Channel: %s:\n"
static int dumpchan_exec(struct ast_channel *chan, const char *data)
static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
static int load_module(void)
static int unload_module(void)
Asterisk main include file. File version handling, generic pbx functions.
General Asterisk PBX channel definitions.
const char * ast_channel_linkedid(const struct ast_channel *chan)
const char * ast_channel_name(const struct ast_channel *chan)
const char * ast_channel_blockproc(const struct ast_channel *chan)
const char * ast_channel_data(const struct ast_channel *chan)
struct ast_format * ast_channel_rawreadformat(struct ast_channel *chan)
unsigned int ast_channel_fin(const struct ast_channel *chan)
int ast_channel_rings(const struct ast_channel *chan)
#define ast_channel_lock(chan)
struct ast_trans_pvt * ast_channel_readtrans(const struct ast_channel *chan)
struct ast_format_cap * ast_channel_nativeformats(const struct ast_channel *chan)
struct ast_party_redirecting * ast_channel_redirecting(struct ast_channel *chan)
struct ast_trans_pvt * ast_channel_writetrans(const struct ast_channel *chan)
ast_group_t ast_channel_pickupgroup(const struct ast_channel *chan)
struct ast_flags * ast_channel_flags(struct ast_channel *chan)
int ast_channel_priority(const struct ast_channel *chan)
struct ast_party_connected_line * ast_channel_connected(struct ast_channel *chan)
const char * ast_channel_uniqueid(const struct ast_channel *chan)
const char * ast_channel_context(const struct ast_channel *chan)
char * ast_print_group(char *buf, int buflen, ast_group_t group)
Print call and pickup groups into buffer.
const char * ast_channel_parkinglot(const struct ast_channel *chan)
const char * ast_channel_appl(const struct ast_channel *chan)
int ast_channel_fd(const struct ast_channel *chan, int which)
struct ast_format * ast_channel_rawwriteformat(struct ast_channel *chan)
unsigned int ast_channel_fout(const struct ast_channel *chan)
struct ast_bridge * ast_channel_get_bridge(const struct ast_channel *chan)
Get the bridge associated with a channel.
struct ast_party_dialed * ast_channel_dialed(struct ast_channel *chan)
struct timeval * ast_channel_whentohangup(struct ast_channel *chan)
struct ast_format * ast_channel_writeformat(struct ast_channel *chan)
ast_group_t ast_channel_callgroup(const struct ast_channel *chan)
const char * ast_channel_language(const struct ast_channel *chan)
const char * ast_state2str(enum ast_channel_state state)
Gives the string form of a given channel state.
const struct ast_channel_tech * ast_channel_tech(const struct ast_channel *chan)
int ast_channel_get_duration(struct ast_channel *chan)
Obtain how long the channel since the channel was created.
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
const char * ast_channel_exten(const struct ast_channel *chan)
#define ast_channel_unlock(chan)
struct ast_format * ast_channel_readformat(struct ast_channel *chan)
ast_channel_state
ast_channel states
Application convenience functions, designed to give consistent look and feel to Asterisk apps.
#define VERBOSITY_ATLEAST(level)
#define ast_verb(level,...)
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
int ast_unregister_application(const char *app)
Unregister an application.
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
Core PBX routines and definitions.
int pbx_builtin_serialize_variables(struct ast_channel *chan, struct ast_str **buf)
Create a human-readable string, specifying all variables and their corresponding values.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one.
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define ast_str_alloca(init_len)
struct ast_str * ast_str_thread_get(struct ast_threadstorage *ts, size_t init_len)
Retrieve a thread locally stored dynamic string.
Structure that contains information about a bridge.
const ast_string_field uniqueid
Main Channel structure associated with a channel.
Support for dynamic strings.
Support for translation of data formats. translate.c.
const char * ast_translate_path_to_str(struct ast_trans_pvt *t, struct ast_str **str)
Puts a string representation of the translation path into outbuf.
#define ast_test_flag(p, flag)