34 #include "asterisk/_private.h"
47 #if !defined(LOW_MEMORY)
62 #define FRAME_CACHE_MAX_SIZE 10
74 #define SMOOTHER_SIZE 8000
105 {
AST_FORMAT_G726,
"g726", 8000,
"G.726 RFC3551", 40, 10, 300, 10, 20 },
107 {
AST_FORMAT_SLINEAR,
"slin", 8000,
"16 bit Signed Linear PCM", 160, 10, 70, 10, 20,
AST_SMOOTHER_FLAG_BE },
109 {
AST_FORMAT_G729A,
"g729", 8000,
"G.729A", 10, 10, 230, 10, 20,
AST_SMOOTHER_FLAG_G729 },
115 {
AST_FORMAT_SLINEAR16,
"slin16", 16000,
"16 bit Signed Linear PCM (16kHz)", 320, 10, 70, 10, 20,
AST_SMOOTHER_FLAG_BE },
125 {
AST_FORMAT_SIREN7,
"siren7", 16000,
"ITU G.722.1 (Siren7, licensed from Polycom)", 80, 20, 80, 20, 20 },
126 {
AST_FORMAT_SIREN14,
"siren14", 32000,
"ITU G.722.1 Annex C, (Siren14, licensed from Polycom)", 120, 20, 80, 20, 20 },
137 ast_log(
LOG_NOTICE,
"Dropping extra frame of G.729 since we already have a VAD frame at the end\n");
157 memset(s, 0,
sizeof(*s));
164 if (s->
size == bytes) {
205 return (s->
flags & flag);
218 ast_log(
LOG_WARNING,
"Smoother was working on %s format frames, now trying to feed %s?\n",
303 #if !defined(LOW_MEMORY)
309 memset(f, 0,
sizeof(*f));
328 #if !defined(LOW_MEMORY)
346 #if !defined(LOW_MEMORY)
450 if (out->
src != fr->
src) {
465 memset(&fr->
data, 0,
sizeof(fr->
data));
480 #if !defined(LOW_MEMORY)
492 srclen = strlen(f->
src);
496 #if !defined(LOW_MEMORY)
503 memset(out, 0,
sizeof(*out));
545 src = (
char *) out->
src;
559 unsigned short *dst_s = dst;
560 const unsigned short *src_s = src;
562 for (i = 0; i < samples; i++)
563 dst_s[i] = (src_s[i]<<8) | (src_s[i]>>8);
569 return &AST_FORMAT_LIST[idx];
581 char *ret =
"unknown";
582 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
583 if (AST_FORMAT_LIST[x].
bits == format) {
584 ret = AST_FORMAT_LIST[x].
name;
595 char *start, *end = buf;
599 snprintf(end, size,
"0x%llx (", (
unsigned long long) format);
604 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
605 if (AST_FORMAT_LIST[x].
bits & format) {
606 snprintf(end, size,
"%s|", AST_FORMAT_LIST[x].
name);
623 {
"slinear",
"slin"},
624 {
"slinear16",
"slin16"},
626 {
"g722.1",
"siren7"},
627 {
"g722.1c",
"siren14"},
646 all = strcasecmp(name,
"all") ? 0 : 1;
647 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
649 !strcasecmp(AST_FORMAT_LIST[x].name,name) ||
651 format |= AST_FORMAT_LIST[x].
bits;
663 char *ret =
"unknown";
664 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
665 if (AST_FORMAT_LIST[x].bits == codec) {
666 ret = AST_FORMAT_LIST[x].
desc;
680 e->
command =
"core show codecs [audio|video|image|text]";
682 "Usage: core show codecs [audio|video|image|text]\n"
683 " Displays codec mapping\n";
693 ast_cli(a->
fd,
"Disclaimer: this command is for informational purposes only.\n"
694 "\tIt does not indicate anything about your configuration.\n");
696 ast_cli(a->
fd,
"%19s %9s %20s TYPE %8s %s\n",
"INT",
"BINARY",
"HEX",
"NAME",
"DESCRIPTION");
697 ast_cli(a->
fd,
"-----------------------------------------------------------------------------------\n");
698 for (i = 0; i < 63; i++) {
701 if (!strcasecmp(a->
argv[3],
"audio")) {
705 }
else if (!strcasecmp(a->
argv[3],
"video")) {
709 }
else if (!strcasecmp(a->
argv[3],
"image")) {
710 if (i != 16 && i != 17) {
713 }
else if (!strcasecmp(a->
argv[3],
"text")) {
722 snprintf(hex,
sizeof(hex),
"(0x%llx)", 1ULL << i);
723 ast_cli(a->
fd,
"%19llu (1 << %2d) %20s %5s %8s (%s)\n", 1ULL << i, i, hex,
725 i == 16 || i == 17 ?
"image" :
744 long long type_punned_codec;
748 e->
command =
"core show codec";
750 "Usage: core show codec <number>\n"
751 " Displays codec mapping\n";
760 if (sscanf(a->
argv[3],
"%30lld", &type_punned_codec) != 1) {
763 codec = type_punned_codec;
765 for (i = 0; i < 63; i++)
766 if (codec & (1LL << i)) {
772 ast_cli(a->
fd,
"Codec %lld not found\n", (
long long) codec);
780 const char noname[] =
"unknown";
781 char ftype[40] =
"Unknown Frametype";
783 char subclass[40] =
"Unknown Subclass";
785 char moreinfo[40] =
"";
789 const char *
message =
"Unknown";
809 strcpy(ftype,
"DTMF Begin");
814 strcpy(ftype,
"DTMF End");
819 strcpy(ftype,
"Control");
822 strcpy(subclass,
"Hangup");
825 strcpy(subclass,
"Ring");
828 strcpy(subclass,
"Ringing");
831 strcpy(subclass,
"Answer");
834 strcpy(subclass,
"Busy");
837 strcpy(subclass,
"Take Off Hook");
840 strcpy(subclass,
"Line Off Hook");
843 strcpy(subclass,
"Congestion");
846 strcpy(subclass,
"Flash");
849 strcpy(subclass,
"Wink");
852 strcpy(subclass,
"Option");
855 strcpy(subclass,
"Key Radio");
858 strcpy(subclass,
"Unkey Radio");
861 strcpy(subclass,
"Hold");
864 strcpy(subclass,
"Unhold");
873 message =
"Negotiation Requested";
875 message =
"Negotiation Request Terminated";
877 message =
"Negotiated";
879 message =
"Terminated";
883 snprintf(subclass,
sizeof(subclass),
"T38_Parameters/%s", message);
886 strcpy(subclass,
"Stop generators");
889 snprintf(subclass,
sizeof(subclass),
"Unknown control '%d'", f->
subclass.
integer);
893 strcpy(ftype,
"Null Frame");
894 strcpy(subclass,
"N/A");
898 strcpy(ftype,
"IAX Specific");
899 snprintf(subclass,
sizeof(subclass),
"IAX Frametype %d", f->
subclass.
integer);
902 strcpy(ftype,
"Text");
903 strcpy(subclass,
"N/A");
907 strcpy(ftype,
"Image");
911 strcpy(ftype,
"HTML");
914 strcpy(subclass,
"URL");
918 strcpy(subclass,
"Data");
921 strcpy(subclass,
"Begin");
924 strcpy(subclass,
"End");
927 strcpy(subclass,
"Load Complete");
930 strcpy(subclass,
"No Support");
933 strcpy(subclass,
"Link URL");
937 strcpy(subclass,
"Unlink");
940 strcpy(subclass,
"Link Reject");
943 snprintf(subclass,
sizeof(subclass),
"Unknown HTML frame '%d'\n", f->
subclass.
integer);
948 strcpy(ftype,
"Modem");
951 strcpy(subclass,
"T.38");
954 strcpy(subclass,
"V.150");
957 snprintf(subclass,
sizeof(subclass),
"Unknown MODEM frame '%d'\n", f->
subclass.
integer);
962 snprintf(ftype,
sizeof(ftype),
"Unknown Frametype '%u'", f->
frametype);
965 ast_verbose(
"%s [ TYPE: %s (%u) SUBCLASS: %s (%d) '%s' ] [%s]\n",
974 ast_verbose(
"%s [ TYPE: %s (%u) SUBCLASS: %s (%d) ] [%s]\n",
1004 int x, differential = (int)
'A', mem;
1018 for (x = 0; x <
sizeof(
format_t) * 8; x++) {
1021 to[x] = right ? (from[x] + differential) : (from[x] - differential);
1029 size_t total_len, slen;
1032 memset(buf, 0, size);
1036 for (x = 0; x <
sizeof(
format_t) * 8; x++) {
1042 slen = strlen(formatname);
1043 if (slen > total_len)
1045 strncat(buf, formatname, total_len - 1);
1049 strncat(buf,
"|", total_len - 1);
1054 strncat(buf,
")", total_len - 1);
1058 return size - total_len;
1065 if ((idx >= 0) && (idx <
sizeof(pref->
order))) {
1066 slot = pref->
order[idx];
1069 return slot ? AST_FORMAT_LIST[slot - 1].
bits : 0;
1080 if (!pref->
order[0])
1083 memcpy(&oldorder, pref,
sizeof(oldorder));
1084 memset(pref, 0,
sizeof(*pref));
1086 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1087 slot = oldorder.
order[x];
1091 if (AST_FORMAT_LIST[slot-1].bits != format) {
1092 pref->
order[y] = slot;
1101 int x, newindex = 0;
1105 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1106 if (AST_FORMAT_LIST[x].bits == format) {
1113 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1114 if (!pref->
order[x]) {
1115 pref->
order[x] = newindex;
1127 int x, newindex = 0;
1130 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1131 if (AST_FORMAT_LIST[x].bits == format) {
1141 for (x = 0; x <
sizeof(
format_t) * 8; x++) {
1142 if (!pref->
order[x] || pref->
order[x] == newindex)
1151 if (only_if_existing && !pref->
order[x])
1156 for (; x > 0; x--) {
1162 pref->
order[0] = newindex;
1171 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1172 if (AST_FORMAT_LIST[x].bits == format) {
1183 framems = AST_FORMAT_LIST[idx].
def_ms;
1185 if (AST_FORMAT_LIST[idx].inc_ms && framems % AST_FORMAT_LIST[idx].inc_ms)
1186 framems -= framems % AST_FORMAT_LIST[idx].
inc_ms;
1188 if (framems < AST_FORMAT_LIST[idx].min_ms)
1189 framems = AST_FORMAT_LIST[idx].
min_ms;
1191 if (framems > AST_FORMAT_LIST[idx].max_ms)
1192 framems = AST_FORMAT_LIST[idx].
max_ms;
1194 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1195 if (pref->
order[x] == (idx + 1)) {
1207 int x, idx = -1, framems = 0;
1210 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1212 fmt = AST_FORMAT_LIST[x];
1223 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1224 if (pref->order[x] == (idx + 1)) {
1225 framems = pref->framing[x];
1232 framems = AST_FORMAT_LIST[idx].
def_ms;
1234 if (AST_FORMAT_LIST[idx].
inc_ms && framems % AST_FORMAT_LIST[idx].
inc_ms)
1235 framems -= framems % AST_FORMAT_LIST[idx].
inc_ms;
1237 if (framems < AST_FORMAT_LIST[idx].
min_ms)
1238 framems = AST_FORMAT_LIST[idx].
min_ms;
1240 if (framems > AST_FORMAT_LIST[idx].
max_ms)
1241 framems = AST_FORMAT_LIST[idx].
max_ms;
1254 for (x = 0; x <
ARRAY_LEN(AST_FORMAT_LIST); x++) {
1255 slot = pref->
order[x];
1259 if (formats & AST_FORMAT_LIST[slot-1].
bits) {
1260 ret = AST_FORMAT_LIST[slot-1].
bits;
1267 ast_debug(4,
"Could not find preferred codec - %s\n", find_best ?
"Going for the best codec" :
"Returning zero codec");
1274 int errors = 0, framems = 0;
1275 char *
parse = NULL, *
this = NULL, *psize = NULL;
1279 while ((
this =
strsep(&parse,
","))) {
1281 if ((psize = strrchr(
this,
':'))) {
1283 ast_debug(1,
"Packetization for codec: %s is %s\n",
this, psize);
1284 framems = atoi(psize);
1292 ast_log(
LOG_WARNING,
"Cannot %s unknown format '%s'\n", allowing ?
"allow" :
"disallow",
this);
1308 if (strcasecmp(
this,
"all")) {
1315 }
else if (!allowing) {
1316 memset(pref, 0,
sizeof(*pref));
1351 while(pos < maxlen) {
1364 int rem = 8 - (bit % 8);
1365 unsigned char ret = 0;
1367 if (n <= 0 || n > 8)
1371 ret = (data[byte] << (n - rem));
1372 ret |= (data[byte + 1] >> (8 - n + rem));
1374 ret = (data[byte] >> (rem - n));
1377 return (ret & (0xff >> (8 - n)));
1382 static const int SpeexWBSubModeSz[] = {
1389 if (((len * 8 - off) >= 5) &&
1392 off += SpeexWBSubModeSz[c];
1394 if (((len * 8 - off) >= 5) &&
1397 off += SpeexWBSubModeSz[c];
1399 if (((len * 8 - off) >= 5) &&
1401 ast_log(
LOG_WARNING,
"Encountered corrupt speex frame; too many wideband frames in a row.\n");
1412 static const int SpeexSubModeSz[] = {
1417 static const int SpeexInBandSz[] = {
1427 while ((len * 8 - bit) >= 5) {
1436 if ((len * 8 - bit) < 5)
1446 }
else if (c == 14) {
1450 bit += SpeexInBandSz[c];
1451 }
else if (c == 13) {
1463 bit += SpeexSubModeSz[c] - 5;
1486 samples = 240 * (f->
datalen / 50);
1489 samples = 160 * (f->
datalen / 33);
1501 samples += (((
char *)(f->
data.
ptr))[7] & 0x1) * 8;
1516 samples = f->
datalen * (16000 / 4000);
1520 samples = (int) f->
datalen * ((
float) 32000 / 6000);
1524 samples = (int) f->
datalen * ((
float) 48000 / 8000);
1539 len = (samples / 240) * 20;
1542 len = (samples / 240) * 50;
1545 len = (samples / 160) * 33;
1567 len = samples / (16000 / 4000);
1571 len = (int) samples / ((
float) 32000 / 6000);
1575 len = (int) samples / ((
float) 48000 / 8000);
1588 short adjust_value = abs(adjustment);
1596 for (count = 0; count < f->
samples; count++) {
1597 if (adjustment > 0) {
1599 }
else if (adjustment < 0) {
1610 short *data1, *data2;
1622 count < f1->samples;
1623 count++, data1++, data2++)
This is just so ast_frames, a list head struct for holding a list of ast_frame structures, is defined.
void ast_frame_free(struct ast_frame *fr, int cache)
Requests a frame to be allocated.
union ast_frame_subclass subclass
struct ast_smoother * ast_smoother_new(int bytes)
#define AST_CLI_DEFINE(fn, txt,...)
void ast_smoother_free(struct ast_smoother *s)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
struct ast_frame ast_null_frame
int ast_frame_clear(struct ast_frame *frame)
Clear all audio samples from an ast_frame. The frame must be AST_FRAME_VOICE and AST_FORMAT_SLINEAR.
void * ast_threadstorage_get(struct ast_threadstorage *ts, size_t init_size)
Retrieve thread storage.
char * strsep(char **str, const char *delims)
void ast_frame_dump(const char *name, struct ast_frame *f, char *prefix)
#define FRAME_CACHE_MAX_SIZE
Maximum ast_frame cache size.
int ast_codec_pref_string(struct ast_codec_pref *pref, char *buf, size_t size)
Dump audio codec preference list into a string.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
struct ast_frame * ast_smoother_read(struct ast_smoother *s)
#define ast_test_flag(p, flag)
Support for translation of data formats. translate.c.
char order[sizeof(format_t)*8]
#define AST_FORMAT_G723_1
int ast_codec_pref_setsize(struct ast_codec_pref *pref, format_t format, int framems)
Set packet size for codec.
static char * show_codecs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Convenient Signal Processing routines.
void ast_smoother_set_flags(struct ast_smoother *smoother, int flags)
descriptor for a cli entry.
static void __frame_free(struct ast_frame *fr, int cache)
void ast_verbose(const char *fmt,...)
static unsigned char get_n_bits_at(unsigned char *data, int n, int bit)
int ast_tvzero(const struct timeval t)
Returns true if the argument is 0,0.
format_t ast_codec_pref_index(struct ast_codec_pref *pref, int index)
Codec located at a particular place in the preference index.
#define AST_LIST_NEXT(elm, field)
Returns the next entry in the list after the given entry.
enum ast_control_t38 request_response
#define AST_FORMAT_H263_PLUS
static int g723_samples(unsigned char *buf, int maxlen)
int __ast_smoother_feed(struct ast_smoother *s, struct ast_frame *f, int swap)
void ast_smoother_reset(struct ast_smoother *s, int bytes)
format_t ast_best_codec(format_t fmts)
Pick the best audio codec.
static force_inline int ast_format_rate(format_t format)
Get the sample rate for a given format.
#define ast_copy_flags(dest, src, flagz)
struct ast_frame * ast_frisolate(struct ast_frame *fr)
Makes a frame independent of any static storage.
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
struct ast_format_list * ast_get_format_list(size_t *size)
Definitions to aid in the use of thread local storage.
void ast_cli(int fd, const char *fmt,...)
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
void ast_smoother_reconfigure(struct ast_smoother *s, int bytes)
Reconfigure an existing smoother to output a different number of bytes per frame. ...
static void framer_shutdown(void)
static struct ast_threadstorage frame_cache
static struct ast_frame * ast_frame_header_new(void)
int ast_codec_pref_append(struct ast_codec_pref *pref, format_t format)
Append a audio codec to a preference list, removing it first if it was already there.
#define ast_opt_dont_warn
struct ast_format_list ast_codec_pref_getsize(struct ast_codec_pref *pref, format_t format)
Get packet size for codec.
#define ast_debug(level,...)
Log a DEBUG message.
#define AST_SMOOTHER_FLAG_BE
General Asterisk PBX channel definitions.
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
#define AST_FORMAT_T140RED
void ast_codec_pref_remove(struct ast_codec_pref *pref, format_t format)
Remove audio a codec from a preference list.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Asterisk internal frame definitions.
#define AST_FORMAT_TEXT_MASK
static int smoother_frame_feed(struct ast_smoother *s, struct ast_frame *f, int swap)
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
#define AST_FORMAT_G726_AAL2
int ast_register_atexit(void(*func)(void))
Register a function to be executed before Asterisk exits.
static force_inline void ast_slinear_saturated_add(short *input, short *value)
struct timeval ast_samp2tv(unsigned int _nsamp, unsigned int _rate)
Returns a timeval corresponding to the duration of n samples at rate r. Useful to convert samples to ...
static force_inline void ast_slinear_saturated_multiply(short *input, short *value)
static struct callattempt * find_best(struct callattempt *outgoing)
find the entry with the best metric, or NULL
A set of macros to manage forward-linked lists.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
#define AST_FORMAT_SLINEAR16
char * term_color(char *outbuf, const char *inbuf, int fgcolor, int bgcolor, int maxout)
static const char * ast_expand_codec_alias(const char *in)
#define AST_LIST_HEAD_NOLOCK(name, type)
Defines a structure to be used to hold a list of specified type (with no lock).
#define ast_strdupa(s)
duplicate a string in memory from the stack
format_t ast_getformatbyname(const char *name)
Gets a format from a name.
char * ast_getformatname(format_t format)
Get the name of a format.
#define AST_FORMAT_SIREN7
#define AST_HTML_LDCOMPLETE
#define AST_SMOOTHER_FLAG_G729
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define AST_FORMAT_TESTLAW
struct timeval ast_tvadd(struct timeval a, struct timeval b)
Returns the sum of two timevals a + b.
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
format_t ast_codec_choose(struct ast_codec_pref *pref, format_t formats, int find_best)
Select the best audio format according to preference list from supplied options. If "find_best" is no...
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
#define AST_FORMAT_VIDEO_MASK
static void parse(struct mgcp_request *req)
#define AST_HTML_NOSUPPORT
#define AST_FORMAT_AUDIO_MASK
static force_inline void ast_slinear_saturated_divide(short *input, short *value)
#define AST_FORMAT_SIREN14
static int speex_samples(unsigned char *data, int len)
struct ast_format_list * ast_get_format_list_index(int index)
int ast_smoother_test_flag(struct ast_smoother *s, int flag)
struct ao2_container * cache
unsigned int opt_needs_swap
#define AST_THREADSTORAGE_CUSTOM(a, b, c)
Define a thread storage variable, with custom initialization and cleanup.
#define AST_FORMAT_SLINEAR
Standard Command Line Interface.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
int ast_codec_get_samples(struct ast_frame *f)
Returns the number of samples contained in the frame.
int ast_cli_register_multiple(struct ast_cli_entry *e, int len)
Register multiple commands.
int ast_smoother_get_flags(struct ast_smoother *smoother)
static struct ast_cli_entry my_clis[]
int ast_frame_adjust_volume(struct ast_frame *f, int adjustment)
Adjusts the volume of the audio samples contained in a frame.
char * ast_getformatname_multiple(char *buf, size_t size, format_t format)
Get the names of a set of formats.
Data structure associated with a single frame of data.
void ast_codec_pref_convert(struct ast_codec_pref *pref, char *buf, size_t size, int right)
Shift an audio codec preference list up or down 65 bytes so that it becomes an ASCII string...
static struct ast_format_list AST_FORMAT_LIST[]
Definition of supported media formats (codecs)
static int speex_get_wb_sz_at(unsigned char *data, int len, int bit)
char framedata[SMOOTHER_SIZE+AST_FRIENDLY_OFFSET]
Handy terminal functions for vt* terms.
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
enum ast_frame_type frametype
static int g723_len(unsigned char buf)
#define AST_FORMAT_MP4_VIDEO
void ast_swapcopy_samples(void *dst, const void *src, int samples)
int ast_frame_slinear_sum(struct ast_frame *f1, struct ast_frame *f2)
Sums two frames of audio samples.
#define AST_HTML_LINKREJECT
static void frame_cache_cleanup(void *data)
static snd_pcm_format_t format
union ast_frame::@172 data
int ast_codec_get_len(format_t format, int samples)
Returns the number of bytes for the number of samples of the given format.
struct ast_frame * ast_frdup(const struct ast_frame *fr)
Copies a frame.
int ast_parse_allow_disallow(struct ast_codec_pref *pref, format_t *mask, const char *list, int allowing)
Parse an "allow" or "deny" line in a channel or device configuration and update the capabilities mask...
static char * show_codec_n(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
#define ast_calloc_cache(a, b)
void ast_codec_pref_prepend(struct ast_codec_pref *pref, format_t format, int only_if_existing)
Prepend an audio codec to a preference list, removing it first if it was already there.
static char prefix[MAX_PREFIX]
#define AST_FORMAT_SPEEX16
char * ast_codec2str(format_t codec)
Get a name from a format Gets a name from a format.