PJSIP CLI functions header file.
- Author
George Joseph <george.joseph@fairview5.com>
Definition in file cli_functions.h.
int pjsip_channel_cli_register |
( |
void |
| ) |
|
Registers the channel cli commands.
- Since
- 13.9.0
- Return values
-
Definition at line 462 of file cli_commands.c.
References ao2_ref, ast_cli_register_multiple, ast_sip_cli_formatter_entry::get_container, ast_sip_cli_formatter_entry::get_id, ast_sip_cli_formatter_entry::iterate, ast_sip_cli_formatter_entry::name, ast_sip_cli_formatter_entry::print_body, ast_sip_cli_formatter_entry::print_header, and ast_sip_cli_formatter_entry::retrieve_by_id.
Referenced by load_module().
465 if (!channel_formatter) {
466 ast_log(LOG_ERROR,
"Unable to allocate memory for channel_formatter\n");
469 channel_formatter->
name =
"channel";
470 channel_formatter->
print_header = cli_channel_print_header;
471 channel_formatter->
print_body = cli_channel_print_body;
472 channel_formatter->
get_container = cli_channel_get_container;
473 channel_formatter->
iterate = cli_channel_iterate;
475 channel_formatter->
get_id = cli_channel_get_id;
478 if (!channelstats_formatter) {
479 ao2_ref(channel_formatter, -1);
480 ast_log(LOG_ERROR,
"Unable to allocate memory for channelstats_formatter\n");
483 channelstats_formatter->
name =
"channelstat";
484 channelstats_formatter->
print_header = cli_channelstats_print_header;
485 channelstats_formatter->
print_body = cli_channelstats_print_body;
486 channelstats_formatter->
get_container = cli_channelstats_get_container;
487 channelstats_formatter->
iterate = cli_channelstats_iterate;
488 channelstats_formatter->
retrieve_by_id = cli_channel_retrieve_by_id;
489 channelstats_formatter->
get_id = cli_channel_get_id;
491 ast_sip_register_cli_formatter(channel_formatter);
492 ast_sip_register_cli_formatter(channelstats_formatter);
struct ao2_container *(* get_container)(const char *regex)
CLI Formatter Registry Entry.
int(* iterate)(void *container, ao2_callback_fn callback, void *args)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
void *(* retrieve_by_id)(const char *id)
const char *(* get_id)(const void *obj)
ao2_callback_fn * print_header
ao2_callback_fn * print_body