116 .
type =
"frametrace",
172 if (!(framedata =
ast_calloc(1,
sizeof(*framedata)))) {
176 interface.
data = framedata;
178 if (!strcasecmp(
data,
"black")) {
192 id = datastore->
data;
348 ast_verbose(
"SubClass: STREAM_TOPOLOGY_REQUEST_CHANGE\n");
351 ast_verbose(
"SubClass: STREAM_TOPOLOGY_CHANGED\n");
354 ast_verbose(
"SubClass: STREAM_TOPOLOGY_SOURCE_CHANGED\n");
438 .
name =
"FRAME_TRACE",
450 e->
command =
"channel dump frames";
452 "Usage: channel dump frames <channel>\n"
453 " List all frames queued to a channel.\n";
465 ast_cli(
a->fd,
"%s is not a known channel\n",
a->argv[3]);
472 ast_cli(
a->fd,
"%5s %6s %6s %-15s (%-20s) - %s\n",
"#",
"Seqno",
"Stream",
"Frame Type",
"Frame Subclass",
"Src");
Asterisk main include file. File version handling, generic pbx functions.
#define ast_calloc(num, len)
A wrapper for calloc()
General Asterisk PBX channel definitions.
const char * ast_channel_name(const struct ast_channel *chan)
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
int ast_channel_datastore_remove(struct ast_channel *chan, struct ast_datastore *datastore)
Remove a datastore from a channel.
#define ast_channel_lock(chan)
struct ast_readq_list * ast_channel_readq(struct ast_channel *chan)
#define ast_channel_unref(c)
Decrease channel reference count.
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
#define ast_channel_unlock(chan)
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.
Standard Command Line Interface.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define AST_CLI_DEFINE(fn, txt,...)
void ast_cli(int fd, const char *fmt,...)
char * ast_complete_channels(const char *line, const char *word, int pos, int state, int rpos)
Command completion for the list of active channels.
#define ast_cli_register_multiple(e, len)
Register multiple commands.
static void show_frame(struct video_desc *env, int out)
#define ast_datastore_alloc(info, uid)
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
void ast_verbose(const char *fmt,...)
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
@ AST_FRAMEHOOK_EVENT_WRITE
@ AST_FRAMEHOOK_EVENT_READ
int ast_framehook_detach(struct ast_channel *chan, int framehook_id)
Detach an framehook from a channel.
#define AST_FRAMEHOOK_INTERFACE_VERSION
static const struct ast_datastore_info frame_trace_datastore
static char * handle_dump_frames(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static struct ast_cli_entry cli_frames[]
static int frame_trace_helper(struct ast_channel *chan, const char *cmd, char *data, const char *value)
static void print_frame(struct ast_frame *frame)
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Frame Trace for internal ast_frame debugging.")
static struct ast_custom_function frame_trace_function
static struct ast_frame * hook_event_cb(struct ast_channel *chan, struct ast_frame *frame, enum ast_framehook_event event, void *data)
static void hook_destroy_cb(void *framedata)
static void datastore_destroy_cb(void *data)
static int load_module(void)
static int unload_module(void)
static struct @172 frametype2str[]
char * strcasestr(const char *, const char *)
char * ast_frame_type2str(enum ast_frame_type frame_type, char *ftype, size_t len)
Copy the discription of a frame type into the provided string.
char * ast_frame_subclass2str(struct ast_frame *f, char *subclass, size_t slen, char *moreinfo, size_t mlen)
Copy the discription of a frame's subclass into the provided string.
ast_frame_type
Frame types.
@ AST_FRAME_BRIDGE_ACTION_SYNC
@ AST_FRAME_BRIDGE_ACTION
ast_control_frame_type
Internal control frame subtype field values.
@ AST_CONTROL_RECORD_CANCEL
@ AST_CONTROL_STREAM_TOPOLOGY_SOURCE_CHANGED
@ AST_CONTROL_STREAM_RESTART
@ AST_CONTROL_STREAM_SUSPEND
@ AST_CONTROL_RADIO_UNKEY
@ AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE
@ AST_CONTROL_STREAM_REVERSE
@ AST_CONTROL_REDIRECTING
@ AST_CONTROL_TAKEOFFHOOK
@ AST_CONTROL_T38_PARAMETERS
@ AST_CONTROL_READ_ACTION
@ AST_CONTROL_RECORD_STOP
@ AST_CONTROL_RECORD_MUTE
@ AST_CONTROL_STREAM_STOP
@ AST_CONTROL_STREAM_TOPOLOGY_CHANGED
@ AST_CONTROL_CONNECTED_LINE
@ AST_CONTROL_STREAM_FORWARD
@ AST_CONTROL_RECORD_SUSPEND
@ AST_CONTROL_MASQUERADE_NOTIFY
@ AST_CONTROL_PVT_CAUSE_CODE
@ AST_CONTROL_UPDATE_RTP_PEER
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
Asterisk module definitions.
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Core PBX routines and definitions.
#define ast_custom_function_register(acf)
Register a custom function.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Main Channel structure associated with a channel.
descriptor for a cli entry.
Data structure associated with a custom dialplan function.
Structure for a data store type.
Structure for a data store object.
struct ast_format * format
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data
enum ast_frame_type frametype
int values[ARRAY_LEN(frametype2str)]