39 #include "asterisk/pbx.h"
68 static const char app[] =
"DumpChan";
73 long elapsed_seconds = 0;
74 int hour = 0, min = 0, sec = 0;
91 elapsed_seconds = now.tv_sec - c->
cdr->
start.tv_sec;
92 hour = elapsed_seconds / 3600;
93 min = (elapsed_seconds % 3600) / 60;
94 sec = elapsed_seconds % 60;
104 "ConnectedLineIDNum= %s\n"
105 "ConnectedLineIDName=%s\n"
115 "RawWriteFormat= %s\n"
116 "RawReadFormat= %s\n"
117 "WriteTranscode= %s %s\n"
118 "ReadTranscode= %s %s\n"
119 "1stFileDescriptor= %d\n"
122 "TimetoHangup= %ld\n"
123 "ElapsedTime= %dh%dm%ds\n"
125 "IndirectBridge= %s\n"
184 static char *line =
"================================================================================";
193 "Dumping Info For Channel: %s:\n"
Main Channel structure associated with a channel.
char * str
Subscriber phone number (Malloced)
#define AST_MODULE_INFO_STANDARD(keystr, desc)
struct ast_party_connected_line connected
Channel Connected Line ID information.
Asterisk main include file. File version handling, generic pbx functions.
static int load_module(void)
char * str
Subscriber phone number (Malloced)
struct ast_party_caller caller
Channel Caller ID information.
const ast_string_field uniqueid
struct ast_party_id id
Connected party ID.
#define ast_test_flag(p, flag)
Support for translation of data formats. translate.c.
struct ast_party_name name
Subscriber name.
struct ast_party_id from
Who is redirecting the call (Sent to the party the call is redirected toward)
char context[AST_MAX_CONTEXT]
static int dumpchan_exec(struct ast_channel *chan, const char *data)
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
void ast_verbose(const char *fmt,...)
static int unload_module(void)
struct ast_party_redirecting redirecting
Redirecting/Diversion information.
char * str
Subscriber name (Malloced)
static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
#define ast_str_alloca(init_len)
const char * ast_state2str(enum ast_channel_state)
Gives the string form of a given channel state.
const ast_string_field linkedid
int ast_unregister_application(const char *app)
Unregister an application.
char * ast_print_group(char *buf, int buflen, ast_group_t group)
print call- and pickup groups into buffer
struct ast_party_id id
Caller party ID.
General Asterisk PBX channel definitions.
struct ast_party_dialed::@155 number
Dialed/Called number.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
const ast_string_field parkinglot
struct ast_channel * _bridge
struct ast_party_dialed dialed
Dialed/Called information.
struct ast_trans_pvt * writetrans
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
enum ast_channel_state _state
struct ast_channel * ast_bridged_channel(struct ast_channel *chan)
Find bridged channel.
const ast_string_field name
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 S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
char * ast_getformatname_multiple(char *buf, size_t size, format_t format)
Get the names of a set of formats.
struct timeval whentohangup
struct ast_trans_pvt * readtrans
struct ast_str * ast_str_thread_get(struct ast_threadstorage *ts, size_t init_len)
Retrieve a thread locally stored dynamic string.
unsigned char valid
TRUE if the name information is valid/present.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
struct ast_channel_tech * tech
unsigned char valid
TRUE if the number information is valid/present.
const ast_string_field language
char exten[AST_MAX_EXTENSION]
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
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.
struct ast_party_number number
Subscriber phone number.