32 #include <sys/socket.h> 33 #include <netinet/in.h> 34 #include <arpa/inet.h> 55 #if (defined(LOW_MEMORY) || defined(MALLOC_DEBUG)) && !defined(NO_FRAME_CACHE) 56 #define NO_FRAME_CACHE 59 #if !defined(NO_FRAME_CACHE) 74 #define FRAME_CACHE_MAX_SIZE 20 84 fprintf(stderr,
"WARNING: %s", str);
94 if (len == (
int)
sizeof(
struct sockaddr_in)) {
95 addr.
ss.ss_family = AF_INET;
96 }
else if (len == (
int)
sizeof(
struct sockaddr_in6)) {
97 addr.
ss.ss_family = AF_INET6;
103 memcpy(&addr, value, len);
106 snprintf(output, maxlen,
"%s %s",
115 while (len-- && (i + 1) * 4 < maxlen) {
116 sprintf(output + (4 * i),
"\\x%02hhx", *((
unsigned char *)value + i));
126 strncpy(output, value, maxlen);
127 output[maxlen] =
'\0';
141 strncpy(output, value, maxlen);
142 output[maxlen] =
'\0';
145 memset(output,0,total_len);
151 if (len == (
int)
sizeof(
unsigned int))
159 if (len == (
int)
sizeof(
unsigned short))
167 if (len == (
int)
sizeof(
unsigned char))
168 snprintf(output, maxlen,
"%d", *((
unsigned char *)value));
177 if (len == (
int)
sizeof(
unsigned int)) {
178 tm.
tm_sec = (val & 0x1f) << 1;
179 tm.
tm_min = (val >> 5) & 0x3f;
180 tm.
tm_hour = (val >> 11) & 0x1f;
181 tm.
tm_mday = (val >> 16) & 0x1f;
182 tm.
tm_mon = ((val >> 21) & 0x0f) - 1;
183 tm.
tm_year = ((val >> 25) & 0x7f) + 100;
194 if (len == (
int)
sizeof(
struct sockaddr_in)) {
195 addr.
ss.ss_family = AF_INET;
196 }
else if (len == (
int)
sizeof(
struct sockaddr_in6)) {
197 addr.
ss.ss_family = AF_INET6;
203 memcpy(&addr, value, len);
214 if (len == (
int)
sizeof(
unsigned int))
225 if (len == (
int)
sizeof(
unsigned short)) {
226 sr = ntohs(*((
unsigned short *)value));
228 strcat(tmp,
",8khz");
230 strcat(tmp,
",11.025khz");
232 strcat(tmp,
",16khz");
234 strcat(tmp,
",22.05khz");
236 strcat(tmp,
",44.1khz");
238 strcat(tmp,
",48khz");
250 char *
version = (
char *) value;
251 if (version[0] == 0) {
252 if (len == (
int) (
sizeof(
iax2_format) +
sizeof(
char))) {
263 static void dump_prov_ies(
char *output,
int maxlen,
unsigned char *iedata,
int len);
272 void (*dump)(
char *output,
int maxlen,
void *
value,
int len);
355 for (x = 0; x <
ARRAY_LEN(infoelts); x++) {
356 if (infoelts[x].ie == ie)
357 return infoelts[x].
name;
373 strcpy(output,
"\n");
374 maxlen -= strlen(output); output += strlen(output);
378 if (ielen + 2> len) {
379 snprintf(tmp, (
int)
sizeof(tmp),
"Total Prov IE length of %d bytes exceeds remaining prov frame length of %d bytes\n", ielen + 2, len);
381 maxlen -= strlen(output);
382 output += strlen(output);
386 for (x=0;x<(int)
sizeof(prov_ies) / (int)
sizeof(prov_ies[0]); x++) {
387 if (prov_ies[x].ie == ie) {
388 if (prov_ies[x].
dump) {
389 prov_ies[x].
dump(interp, (
int)
sizeof(interp), iedata + 2, ielen);
390 snprintf(tmp, (
int)
sizeof(tmp),
" %-15.15s : %s\n", prov_ies[x].
name, interp);
392 maxlen -= strlen(output); output += strlen(output);
395 snprintf(interp, (
int)
sizeof(interp),
"%d bytes", ielen);
397 strcpy(interp,
"Present");
398 snprintf(tmp, (
int)
sizeof(tmp),
" %-15.15s : %s\n", prov_ies[x].
name, interp);
400 maxlen -= strlen(output); output += strlen(output);
406 snprintf(tmp, (
int)
sizeof(tmp),
" Unknown Prov IE %03d : Present\n", ie);
408 maxlen -= strlen(output); output += strlen(output);
410 iedata += (2 + ielen);
429 if (ielen + 2> len) {
430 snprintf(tmp, (
int)
sizeof(tmp),
"Total IE length of %d bytes exceeds remaining frame length of %d bytes\n", ielen + 2, len);
435 for (x = 0; x <
ARRAY_LEN(infoelts); x++) {
436 if (infoelts[x].ie == ie) {
437 if (infoelts[x].
dump) {
438 infoelts[x].
dump(interp, (
int)
sizeof(interp), iedata + 2, ielen);
439 snprintf(tmp, (
int)
sizeof(tmp),
" %-15.15s : %s\n", infoelts[x].
name, interp);
443 snprintf(interp, (
int)
sizeof(interp),
"%d bytes", ielen);
445 strcpy(interp,
"Present");
446 snprintf(tmp, (
int)
sizeof(tmp),
" %-15.15s : %s\n", infoelts[x].
name, interp);
453 snprintf(tmp, (
int)
sizeof(tmp),
" Unknown IE %03d : Present\n", ie);
456 iedata += (2 + ielen);
464 const char *cmd =
"Unknown";
596 const char *framelist[] = {
611 const char *cmds[] = {
652 const char *subclass;
672 snprintf(retries,
sizeof(retries),
"%03d", f->
retries);
676 strcpy(retries,
"Yes");
678 strcpy(retries,
" No");
685 snprintf(class2,
sizeof(class2),
"(%d?)", fh->
type);
688 class = framelist[(int)fh->type];
691 sprintf(subclass2,
"%c", fh->
csub);
692 subclass = subclass2;
695 subclass = subclass2;
698 snprintf(subclass2,
sizeof(subclass2),
"(%d?)", fh->
csub);
699 subclass = subclass2;
701 subclass = cmds[(int)fh->
csub];
704 snprintf(subclass2,
sizeof(subclass2),
"%d", fh->
csub);
705 subclass = subclass2;
708 snprintf(tmp,
sizeof(tmp),
709 "%s-Frame Retry[%s] -- OSeqno: %3.3d ISeqno: %3.3d Type: %s Subclass: %s\n",
713 snprintf(tmp,
sizeof(tmp),
" Timestamp: %05lums SCall: %5.5d DCall: %5.5d %s\n",
714 (
unsigned long)ntohl(fh->
ts),
728 if (datalen > ((
int)
sizeof(ied->
buf) - ied->
pos)) {
729 snprintf(tmp, (
int)
sizeof(tmp),
"Out of space for ie '%s' (%d), need %d have %d\n",
iax_ie2str(ie), ie, datalen, (
int)
sizeof(ied->
buf) - ied->
pos);
733 ied->
buf[ied->
pos++] = ie;
734 ied->
buf[ied->
pos++] = datalen;
735 memcpy(ied->
buf + ied->
pos, data, datalen);
750 } __attribute__((packed)) newval = {
version, };
758 newval = htonl(value);
764 unsigned short newval;
765 newval = htons(value);
799 char tmp[256], *tmp2;
802 memset(ies, 0, (
int)
sizeof(
struct iax_ies));
809 while(datalen >= 2) {
812 if (len > datalen - 2) {
813 errorf(
"Information element length exceeds message size\n");
842 if (len != (
int)
sizeof(
unsigned int)) {
843 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting capability to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
853 if (len != (
int)
sizeof(
char) +
sizeof(
iax2_format)) {
854 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting capability to be %d bytes long but was %d\n", (
int) (
sizeof(
iax2_format) +
sizeof(
char)), len);
863 if (len != (
int)
sizeof(
unsigned int)) {
864 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting format to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
866 }
else if (ies->
format == 0) {
874 if (len != (
int)
sizeof(
char) +
sizeof(
iax2_format)) {
875 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting format to be %d bytes long but was %d\n", (
int) (
sizeof(
iax2_format) +
sizeof(
char)), len);
887 if (len != (
int)
sizeof(
unsigned short)) {
888 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting version to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
894 if (len != (
int)
sizeof(
unsigned short)) {
895 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting adsicpe to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
901 if (len != (
int)
sizeof(
unsigned short)) {
902 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting samplingrate to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
908 ies->
dnid = (
char *)data + 2;
911 ies->
rdnis = (
char *)data + 2;
914 if (len != (
int)
sizeof(
unsigned short)) {
915 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting authmethods to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
921 if (len != (
int)
sizeof(
unsigned short)) {
922 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting encryption to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
941 if (len != (
int)
sizeof(
unsigned short)) {
942 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting refresh to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
948 if (len != (
int)
sizeof(
unsigned short)) {
949 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting dpstatus to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
955 if (len != (
int)
sizeof(
unsigned short)) {
956 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting callno to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
962 ies->
cause = (
char *)data + 2;
966 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting causecode to be single byte but was %d\n", len);
976 snprintf(tmp, (
int)
sizeof(tmp),
"Expected single byte Unknown command, but was %d long\n", len);
981 if (len != (
int)
sizeof(
unsigned short)) {
982 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting msgcount to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
994 if (len != (
int)
sizeof(
unsigned int)) {
995 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting transferid to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1001 if (len != (
int)
sizeof(
unsigned int)) {
1002 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting date/time to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1008 if (len != (
int)
sizeof(
unsigned short)) {
1009 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting firmwarever to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
1021 if (len != (
int)
sizeof(
unsigned int)) {
1022 snprintf(tmp, (
int)
sizeof(tmp),
"Expected block desc to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1036 if (len != (
int)
sizeof(
unsigned int)) {
1037 snprintf(tmp, (
int)
sizeof(tmp),
"Expected provisioning version to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1048 snprintf(tmp, (
int)
sizeof(tmp),
"Expected single byte callingpres, but was %d long\n", len);
1056 snprintf(tmp, (
int)
sizeof(tmp),
"Expected single byte callington, but was %d long\n", len);
1061 if (len != (
int)
sizeof(
unsigned short)) {
1062 snprintf(tmp, (
int)
sizeof(tmp),
"Expecting callingtns to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
1068 if (len != (
int)
sizeof(
unsigned int)) {
1069 snprintf(tmp, (
int)
sizeof(tmp),
"Expected jitter rr to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1076 if (len != (
int)
sizeof(
unsigned int)) {
1077 snprintf(tmp, (
int)
sizeof(tmp),
"Expected loss rr to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1084 if (len != (
int)
sizeof(
unsigned int)) {
1085 snprintf(tmp, (
int)
sizeof(tmp),
"Expected packets rr to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1092 if (len != (
int)
sizeof(
unsigned short)) {
1093 snprintf(tmp, (
int)
sizeof(tmp),
"Expected loss rr to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned short), len);
1100 if (len != (
int)
sizeof(
unsigned int)) {
1101 snprintf(tmp, (
int)
sizeof(tmp),
"Expected packets rr to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1108 if (len != (
int)
sizeof(
unsigned int)) {
1109 snprintf(tmp, (
int)
sizeof(tmp),
"Expected packets rr to be %d bytes long but was %d\n", (
int)
sizeof(
unsigned int), len);
1117 tmp2 = strchr(tmp,
'=');
1125 for (var2 = ies->
vars, prev =
NULL; var2; prev = var2, var2 = var2->
next) {
1126 if (strcmp(tmp, var2->
name) == 0) {
1135 snprintf(tmp,
sizeof(tmp),
"Assigned (%p)%s to (%p)%s\n", var->
name, var->
name, var->
value, var->
value);
1146 snprintf(tmp,
sizeof(tmp),
"Assigned (%p)%s to (%p)%s\n", var->
name, var->
name, var->
value, var->
value);
1157 snprintf(tmp, (
int)
sizeof(tmp),
"Expected OSP token block index to be 0~%d but was %u\n",
IAX_MAX_OSPBLOCK_NUM - 1, count);
1168 snprintf(tmp, (
int)
sizeof(tmp),
"Ignoring unknown information element '%s' (%d) of length %d\n",
iax_ie2str(ie), ie, len);
1173 datalen -= (len + 2);
1179 errorf(
"Invalid information element contents, strange boundary\n");
1202 ast_log(
LOG_ERROR,
"Losing frame data because destination buffer size '%d' bytes not big enough for '%d' bytes in the frame\n",
1206 #if __BYTE_ORDER == __LITTLE_ENDIAN 1222 #if !defined(NO_FRAME_CACHE) 1235 memset(fr, 0,
sizeof(*fr));
1250 if (!(fr =
ast_calloc(1,
sizeof(*fr) + datalen))) {
1256 if (!(fr =
ast_calloc(1,
sizeof(*fr) + datalen))) {
1265 if (!(fr =
ast_calloc(1,
sizeof(*fr) + datalen))) {
1287 #if !defined(NO_FRAME_CACHE) 1297 errorf(
"Attempt to double free frame detected\n");
1302 #if !defined(NO_FRAME_CACHE) 1326 #if !defined(NO_FRAME_CACHE)
struct ast_variable * next
struct sockaddr_storage ss
static void(* outputf)(const char *str)
#define IAX_IE_IAX_UNKNOWN
static void dump_int(char *output, int maxlen, void *value, int len)
static void dump_byte(char *output, int maxlen, void *value, int len)
static void frame_cache_cleanup(void *data)
#define IAX_IE_CAPABILITY2
static struct ast_threadstorage frame_cache
Asterisk locking-related definitions:
#define IAX_IE_CALLINGTNS
Asterisk main include file. File version handling, generic pbx functions.
#define AST_LIST_FIRST(head)
Returns the first entry contained in a list.
int iax_ie_append(struct iax_ie_data *ied, unsigned char ie)
void * ast_threadstorage_get(struct ast_threadstorage *ts, size_t init_size)
Retrieve thread storage.
This is just so iax_frames, a list head struct for holding a list of iax_frame structures, is defined.
int iax_get_oframes(void)
static void dump_prov_ies(char *output, int maxlen, unsigned char *iedata, int len)
static const struct iax2_ie prov_ies[]
const char * iax_ie2str(int ie)
#define PROV_IE_NEWAESKEY
static void dump_samprate(char *output, int maxlen, void *value, int len)
static void dump_prefs(char *output, int maxlen, void *value, int len)
struct iax_frame * iax_frame_new(int direction, int datalen, unsigned int cacheable)
const char * iax2_getformatname(iax2_format format)
iax2 wrapper function for ast_getformatname
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
int iax_ie_append_int(struct iax_ie_data *ied, unsigned char ie, unsigned int value)
void iax_frame_wrap(struct iax_frame *fr, struct ast_frame *f)
static void dump_ies(unsigned char *iedata, int len)
Structure for variables, used for configurations and for channel variables.
void iax_frame_subclass2str(enum iax_frame_subclass subclass, char *str, size_t len)
#define IAX_IE_MD5_RESULT
#define IAX_IE_FIRMWAREVER
void ast_swapcopy_samples(void *dst, const void *src, int samples)
#define IAX_IE_AUTOANSWER
static struct iax2_ie infoelts[]
#define IAX_IE_SAMPLINGRATE
Definitions to aid in the use of thread local storage.
#define FRAME_CACHE_MAX_SIZE
#define AST_LIST_REMOVE(head, elm, field)
Removes a specific entry from a list.
static void(* errorf)(const char *str)
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
Socket address structure.
int ast_atomic_fetchadd_int(volatile int *p, int v)
Atomically add v to *p and return the previous value of *p.
#define IAX_IE_CALLING_NUMBER
int iax_ie_append_byte(struct iax_ie_data *ied, unsigned char ie, unsigned char dat)
Implementation of the IAX2 protocol.
struct ast_frame_subclass subclass
#define IAX_IE_CALLING_ANI
static void dump_string_hex(char *output, int maxlen, void *value, int len)
static void dump_ipaddr(char *output, int maxlen, void *value, int len)
static void dump_addr(char *output, int maxlen, void *value, int len)
#define IAX_IE_DEVICETYPE
#define IAX_IE_ENCRYPTION
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
Configuration File Parser.
int iax_get_iframes(void)
Handle unaligned data access.
#define IAX_MAX_OSPBLOCK_NUM
int iax_ie_append_addr(struct iax_ie_data *ied, unsigned char ie, const struct ast_sockaddr *addr)
unsigned char * calltokendata
static void dump_short(char *output, int maxlen, void *value, int len)
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
#define DIRECTION_OUTGRESS
#define ast_opt_cache_media_frames
#define DIRECTION_INGRESS
unsigned char iax_unknown
uint64_t htonll(uint64_t host64)
char * osptokenblock[IAX_MAX_OSPBLOCK_NUM]
#define IAX_IE_SERVICEIDENT
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
Asterisk internal frame definitions.
void(* dump)(char *output, int maxlen, void *value, int len)
#define IAX_IE_CALLING_NAME
int iax_ie_append_raw(struct iax_ie_data *ied, unsigned char ie, const void *data, int datalen)
#define IAX_IE_PROVISIONING
#define IAX_IE_AESPROVISIONING
int iax_ie_append_versioned_uint64(struct iax_ie_data *ied, unsigned char ie, unsigned char version, uint64_t value)
#define PROV_IE_SERVERPORT
#define ast_variable_new(name, value, filename)
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
AST_LIST_HEAD_NOLOCK(contactliststruct, contact)
static unsigned int get_unaligned_uint32(const void *p)
static unsigned short get_unaligned_uint16(const void *p)
char * iax_provflags2str(char *buf, int buflen, unsigned int flags)
static void internalerror(const char *str)
#define IAX_IE_CALLED_NUMBER
IAX2 Provisioning protocol.
static void dump_versioned_codec(char *output, int maxlen, void *value, int len)
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
static void dump_prov_flags(char *output, int maxlen, void *value, int len)
Implementation of Inter-Asterisk eXchange, version 2 iax2-parser::c iax2-parser.h chan_iax2...
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
static void dump_prov(char *output, int maxlen, void *value, int len)
int iax2_codec_pref_string(struct iax2_codec_pref *pref, char *buf, size_t size)
Dump audio codec preference list into a string.
#define IAX_IE_AUTHMETHODS
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
static char * ast_sockaddr_stringify(const struct ast_sockaddr *addr)
Wrapper around ast_sockaddr_stringify_fmt() with default format.
void iax_frame_free(struct iax_frame *fr)
void iax_set_error(void(*func)(const char *))
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
#define IAX_IE_FWBLOCKDESC
static char version[AST_MAX_EXTENSION]
uint64_t ntohll(uint64_t net64)
#define ast_calloc(num, len)
A wrapper for calloc()
static void put_unaligned_uint64(void *p, uint64_t datum)
#define IAX_IE_CODEC_PREFS
static void dump_datetime(char *output, int maxlen, void *value, int len)
int ast_sockaddr_is_ipv4_mapped(const struct ast_sockaddr *addr)
Determine if this is an IPv4-mapped IPv6 address.
int ast_strftime(char *buf, size_t len, const char *format, const struct ast_tm *tm)
Special version of strftime(3) that handles fractions of a second. Takes the same arguments as strfti...
int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen)
#define AST_THREADSTORAGE_CUSTOM(a, b, c)
Define a thread storage variable, with custom initialization and cleanup.
#define IAX_IE_CALLINGTON
struct ast_variable * vars
#define IAX_IE_CALLINGPRES
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
int iax_ie_append_str(struct iax_ie_data *ied, unsigned char ie, const char *str)
#define IAX_IE_RR_DROPPED
struct ast_sockaddr apparent_addr
#define IAX_IE_MUSICONHOLD
int ast_sockaddr_is_ipv4(const struct ast_sockaddr *addr)
Determine if the address is an IPv4 address.
Data structure associated with a single frame of data.
#define IAX_IE_RSA_RESULT
unsigned int ospblocklength[IAX_MAX_OSPBLOCK_NUM]
#define PROV_IE_ALTSERVER
#define IAX_IE_FWBLOCKDATA
#define IAX_IE_CALLED_CONTEXT
int iax_ie_append_short(struct iax_ie_data *ied, unsigned char ie, unsigned short value)
union ast_frame::@263 data
void iax_set_output(void(*func)(const char *))
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
enum ast_frame_type frametype
#define IAX_IE_APPARENT_ADDR
struct iax_frame_list list
Media Format Bitfield Compatibility API.
struct ast_format * format
#define IAX_IE_TRANSFERID
void iax2_codec_pref_convert(struct iax2_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 void internaloutput(const char *str)
void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, struct ast_sockaddr *addr, int datalen)
static void dump_string(char *output, int maxlen, void *value, int len)
#define IAX_IE_CAPABILITY
static uint64_t get_unaligned_uint64(const void *p)
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.