Wed Jan 8 2020 09:49:46

Asterisk developer's documentation


dialplan_functions.c
Go to the documentation of this file.
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 2010, Digium, Inc.
5  *
6  * See http://www.asterisk.org for more information about
7  * the Asterisk project. Please do not directly contact
8  * any of the maintainers of this project for assistance;
9  * the project provides a web site, mailing lists and IRC
10  * channels for your use.
11  *
12  * This program is free software, distributed under the terms of
13  * the GNU General Public License Version 2. See the LICENSE file
14  * at the top of the source tree.
15  */
16 
17 /*!
18  * \file
19  * \brief sip channel dialplan functions and unit tests
20  */
21 
22 /*** MODULEINFO
23  <support_level>core</support_level>
24  ***/
25 
26 #include "asterisk.h"
27 
28 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 397112 $")
29 
30 #include <math.h>
31 
32 #include "asterisk/channel.h"
33 #include "asterisk/rtp_engine.h"
34 #include "asterisk/pbx.h"
35 #include "asterisk/acl.h"
36 
37 #include "include/sip.h"
38 #include "include/globals.h"
39 #include "include/dialog.h"
40 #include "include/dialplan_functions.h"
41 #include "include/sip_utils.h"
42 
43 
44 int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *preparse, char *buf, size_t buflen)
45 {
46  struct sip_pvt *p = chan->tech_pvt;
47  char *parse = ast_strdupa(preparse);
48  int res = 0;
50  AST_APP_ARG(param);
52  AST_APP_ARG(field);
53  );
54 
55  /* Check for zero arguments */
56  if (ast_strlen_zero(parse)) {
57  ast_log(LOG_ERROR, "Cannot call %s without arguments\n", funcname);
58  return -1;
59  }
60 
62 
63  /* Sanity check */
64  if (!IS_SIP_TECH(chan->tech)) {
65  ast_log(LOG_ERROR, "Cannot call %s on a non-SIP channel\n", funcname);
66  return 0;
67  }
68 
69  memset(buf, 0, buflen);
70 
71  if (p == NULL) {
72  return -1;
73  }
74 
75  if (!strcasecmp(args.param, "peerip")) {
76  ast_copy_string(buf, ast_sockaddr_isnull(&p->sa) ? "" : ast_sockaddr_stringify_addr(&p->sa), buflen);
77  } else if (!strcasecmp(args.param, "recvip")) {
78  ast_copy_string(buf, ast_sockaddr_isnull(&p->recv) ? "" : ast_sockaddr_stringify_addr(&p->recv), buflen);
79  } else if (!strcasecmp(args.param, "from")) {
80  ast_copy_string(buf, p->from, buflen);
81  } else if (!strcasecmp(args.param, "uri")) {
82  ast_copy_string(buf, p->uri, buflen);
83  } else if (!strcasecmp(args.param, "useragent")) {
84  ast_copy_string(buf, p->useragent, buflen);
85  } else if (!strcasecmp(args.param, "peername")) {
86  ast_copy_string(buf, p->peername, buflen);
87  } else if (!strcasecmp(args.param, "t38passthrough")) {
88  ast_copy_string(buf, (p->t38.state == T38_DISABLED) ? "0" : "1", buflen);
89  } else if (!strcasecmp(args.param, "rtpdest")) {
90  struct ast_sockaddr addr;
91  struct ast_rtp_instance *stream;
92 
93  if (ast_strlen_zero(args.type))
94  args.type = "audio";
95 
96  if (!strcasecmp(args.type, "audio"))
97  stream = p->rtp;
98  else if (!strcasecmp(args.type, "video"))
99  stream = p->vrtp;
100  else if (!strcasecmp(args.type, "text"))
101  stream = p->trtp;
102  else
103  return -1;
104 
105  /* Return 0 to suppress a console warning message */
106  if (!stream) {
107  return 0;
108  }
109 
111  snprintf(buf, buflen, "%s", ast_sockaddr_stringify(&addr));
112  } else if (!strcasecmp(args.param, "rtpsource")) {
113  struct ast_sockaddr sa;
114  struct ast_rtp_instance *stream;
115 
116  if (ast_strlen_zero(args.type))
117  args.type = "audio";
118 
119  if (!strcasecmp(args.type, "audio"))
120  stream = p->rtp;
121  else if (!strcasecmp(args.type, "video"))
122  stream = p->vrtp;
123  else if (!strcasecmp(args.type, "text"))
124  stream = p->trtp;
125  else
126  return -1;
127 
128  /* Return 0 to suppress a console warning message */
129  if (!stream) {
130  return 0;
131  }
132 
134 
135  if (ast_sockaddr_isnull(&sa)) {
136  struct ast_sockaddr dest_sa;
137  ast_rtp_instance_get_remote_address(stream, &dest_sa);
138  ast_ouraddrfor(&dest_sa, &sa);
139  }
140 
141  snprintf(buf, buflen, "%s", ast_sockaddr_stringify(&sa));
142  } else if (!strcasecmp(args.param, "rtpqos")) {
143  struct ast_rtp_instance *rtp = NULL;
144 
145  if (ast_strlen_zero(args.type)) {
146  args.type = "audio";
147  }
148 
149  if (!strcasecmp(args.type, "audio")) {
150  rtp = p->rtp;
151  } else if (!strcasecmp(args.type, "video")) {
152  rtp = p->vrtp;
153  } else if (!strcasecmp(args.type, "text")) {
154  rtp = p->trtp;
155  } else {
156  return -1;
157  }
158 
159  if (ast_strlen_zero(args.field) || !strcasecmp(args.field, "all")) {
160  char quality_buf[AST_MAX_USER_FIELD];
161 
162  if (!ast_rtp_instance_get_quality(rtp, AST_RTP_INSTANCE_STAT_FIELD_QUALITY, quality_buf, sizeof(quality_buf))) {
163  return -1;
164  }
165 
166  ast_copy_string(buf, quality_buf, buflen);
167  return res;
168  } else {
169  struct ast_rtp_instance_stats stats;
170  int i;
171  struct {
172  const char *name;
173  enum { INT, DBL } type;
174  union {
175  unsigned int *i4;
176  double *d8;
177  };
178  } lookup[] = {
179  { "txcount", INT, { .i4 = &stats.txcount, }, },
180  { "rxcount", INT, { .i4 = &stats.rxcount, }, },
181  { "txjitter", DBL, { .d8 = &stats.txjitter, }, },
182  { "rxjitter", DBL, { .d8 = &stats.rxjitter, }, },
183  { "remote_maxjitter", DBL, { .d8 = &stats.remote_maxjitter, }, },
184  { "remote_minjitter", DBL, { .d8 = &stats.remote_minjitter, }, },
185  { "remote_normdevjitter", DBL, { .d8 = &stats.remote_normdevjitter, }, },
186  { "remote_stdevjitter", DBL, { .d8 = &stats.remote_stdevjitter, }, },
187  { "local_maxjitter", DBL, { .d8 = &stats.local_maxjitter, }, },
188  { "local_minjitter", DBL, { .d8 = &stats.local_minjitter, }, },
189  { "local_normdevjitter", DBL, { .d8 = &stats.local_normdevjitter, }, },
190  { "local_stdevjitter", DBL, { .d8 = &stats.local_stdevjitter, }, },
191  { "txploss", INT, { .i4 = &stats.txploss, }, },
192  { "rxploss", INT, { .i4 = &stats.rxploss, }, },
193  { "remote_maxrxploss", DBL, { .d8 = &stats.remote_maxrxploss, }, },
194  { "remote_minrxploss", DBL, { .d8 = &stats.remote_minrxploss, }, },
195  { "remote_normdevrxploss", DBL, { .d8 = &stats.remote_normdevrxploss, }, },
196  { "remote_stdevrxploss", DBL, { .d8 = &stats.remote_stdevrxploss, }, },
197  { "local_maxrxploss", DBL, { .d8 = &stats.local_maxrxploss, }, },
198  { "local_minrxploss", DBL, { .d8 = &stats.local_minrxploss, }, },
199  { "local_normdevrxploss", DBL, { .d8 = &stats.local_normdevrxploss, }, },
200  { "local_stdevrxploss", DBL, { .d8 = &stats.local_stdevrxploss, }, },
201  { "rtt", DBL, { .d8 = &stats.rtt, }, },
202  { "maxrtt", DBL, { .d8 = &stats.maxrtt, }, },
203  { "minrtt", DBL, { .d8 = &stats.minrtt, }, },
204  { "normdevrtt", DBL, { .d8 = &stats.normdevrtt, }, },
205  { "stdevrtt", DBL, { .d8 = &stats.stdevrtt, }, },
206  { "local_ssrc", INT, { .i4 = &stats.local_ssrc, }, },
207  { "remote_ssrc", INT, { .i4 = &stats.remote_ssrc, }, },
208  { NULL, },
209  };
210 
212  return -1;
213  }
214 
215  for (i = 0; !ast_strlen_zero(lookup[i].name); i++) {
216  if (!strcasecmp(args.field, lookup[i].name)) {
217  if (lookup[i].type == INT) {
218  snprintf(buf, buflen, "%u", *lookup[i].i4);
219  } else {
220  snprintf(buf, buflen, "%f", *lookup[i].d8);
221  }
222  return 0;
223  }
224  }
225  ast_log(LOG_WARNING, "Unrecognized argument '%s' to %s\n", preparse, funcname);
226  return -1;
227  }
228  } else if (!strcasecmp(args.param, "secure_signaling")) {
229  snprintf(buf, buflen, "%s", p->socket.type == SIP_TRANSPORT_TLS ? "1" : "");
230  } else if (!strcasecmp(args.param, "secure_media")) {
231  snprintf(buf, buflen, "%s", p->srtp ? "1" : "");
232  } else {
233  res = -1;
234  }
235  return res;
236 }
237 
238 #ifdef TEST_FRAMEWORK
239 static int test_sip_rtpqos_1_new(struct ast_rtp_instance *instance, struct sched_context *sched, struct ast_sockaddr *addr, void *data)
240 {
241  /* Needed to pass sanity checks */
242  ast_rtp_instance_set_data(instance, data);
243  return 0;
244 }
245 
246 static int test_sip_rtpqos_1_destroy(struct ast_rtp_instance *instance)
247 {
248  /* Needed to pass sanity checks */
249  return 0;
250 }
251 
252 static struct ast_frame *test_sip_rtpqos_1_read(struct ast_rtp_instance *instance, int rtcp)
253 {
254  /* Needed to pass sanity checks */
255  return &ast_null_frame;
256 }
257 
258 static int test_sip_rtpqos_1_write(struct ast_rtp_instance *instance, struct ast_frame *frame)
259 {
260  /* Needed to pass sanity checks */
261  return 0;
262 }
263 
264 static int test_sip_rtpqos_1_get_stat(struct ast_rtp_instance *instance, struct ast_rtp_instance_stats *stats, enum ast_rtp_instance_stat stat)
265 {
267  memcpy(stats, s, sizeof(*stats));
268  return 0;
269 }
270 
271 AST_TEST_DEFINE(test_sip_rtpqos_1)
272 {
273  int i, res = AST_TEST_PASS;
274  struct ast_rtp_engine test_engine = {
275  .name = "test",
276  .new = test_sip_rtpqos_1_new,
277  .destroy = test_sip_rtpqos_1_destroy,
278  .read = test_sip_rtpqos_1_read,
279  .write = test_sip_rtpqos_1_write,
280  .get_stat = test_sip_rtpqos_1_get_stat,
281  };
282  struct ast_sockaddr sa = { {0, } };
283  struct ast_rtp_instance_stats mine = { 0, };
284  struct sip_pvt *p = NULL;
285  struct ast_channel *chan = NULL;
286  struct ast_str *varstr = NULL, *buffer = NULL;
287  struct {
288  const char *name;
289  enum { INT, DBL } type;
290  union {
291  unsigned int *i4;
292  double *d8;
293  };
294  } lookup[] = {
295  { "txcount", INT, { .i4 = &mine.txcount, }, },
296  { "rxcount", INT, { .i4 = &mine.rxcount, }, },
297  { "txjitter", DBL, { .d8 = &mine.txjitter, }, },
298  { "rxjitter", DBL, { .d8 = &mine.rxjitter, }, },
299  { "remote_maxjitter", DBL, { .d8 = &mine.remote_maxjitter, }, },
300  { "remote_minjitter", DBL, { .d8 = &mine.remote_minjitter, }, },
301  { "remote_normdevjitter", DBL, { .d8 = &mine.remote_normdevjitter, }, },
302  { "remote_stdevjitter", DBL, { .d8 = &mine.remote_stdevjitter, }, },
303  { "local_maxjitter", DBL, { .d8 = &mine.local_maxjitter, }, },
304  { "local_minjitter", DBL, { .d8 = &mine.local_minjitter, }, },
305  { "local_normdevjitter", DBL, { .d8 = &mine.local_normdevjitter, }, },
306  { "local_stdevjitter", DBL, { .d8 = &mine.local_stdevjitter, }, },
307  { "txploss", INT, { .i4 = &mine.txploss, }, },
308  { "rxploss", INT, { .i4 = &mine.rxploss, }, },
309  { "remote_maxrxploss", DBL, { .d8 = &mine.remote_maxrxploss, }, },
310  { "remote_minrxploss", DBL, { .d8 = &mine.remote_minrxploss, }, },
311  { "remote_normdevrxploss", DBL, { .d8 = &mine.remote_normdevrxploss, }, },
312  { "remote_stdevrxploss", DBL, { .d8 = &mine.remote_stdevrxploss, }, },
313  { "local_maxrxploss", DBL, { .d8 = &mine.local_maxrxploss, }, },
314  { "local_minrxploss", DBL, { .d8 = &mine.local_minrxploss, }, },
315  { "local_normdevrxploss", DBL, { .d8 = &mine.local_normdevrxploss, }, },
316  { "local_stdevrxploss", DBL, { .d8 = &mine.local_stdevrxploss, }, },
317  { "rtt", DBL, { .d8 = &mine.rtt, }, },
318  { "maxrtt", DBL, { .d8 = &mine.maxrtt, }, },
319  { "minrtt", DBL, { .d8 = &mine.minrtt, }, },
320  { "normdevrtt", DBL, { .d8 = &mine.normdevrtt, }, },
321  { "stdevrtt", DBL, { .d8 = &mine.stdevrtt, }, },
322  { "local_ssrc", INT, { .i4 = &mine.local_ssrc, }, },
323  { "remote_ssrc", INT, { .i4 = &mine.remote_ssrc, }, },
324  { NULL, },
325  };
326 
327  switch (cmd) {
328  case TEST_INIT:
329  info->name = "test_sip_rtpqos";
330  info->category = "/channels/chan_sip/";
331  info->summary = "Test retrieval of SIP RTP QOS stats";
332  info->description =
333  "Verify values in the RTP instance structure can be accessed through the dialplan.";
334  return AST_TEST_NOT_RUN;
335  case TEST_EXECUTE:
336  break;
337  }
338 
339  ast_rtp_engine_register2(&test_engine, NULL);
340  /* Have to associate this with a SIP pvt and an ast_channel */
341  if (!(p = sip_alloc(NULL, NULL, 0, SIP_NOTIFY, NULL))) {
342  res = AST_TEST_NOT_RUN;
343  goto done;
344  }
345 
346  if (!(p->rtp = ast_rtp_instance_new("test", sched, &bindaddr, &mine))) {
347  res = AST_TEST_NOT_RUN;
348  goto done;
349  }
351  if (!(chan = ast_dummy_channel_alloc())) {
352  res = AST_TEST_NOT_RUN;
353  goto done;
354  }
355  chan->tech = &sip_tech;
356  chan->tech_pvt = dialog_ref(p, "Give the owner channel a reference to the dialog");
357  p->owner = chan;
358 
359  varstr = ast_str_create(16);
360  buffer = ast_str_create(16);
361  if (!varstr || !buffer) {
362  res = AST_TEST_NOT_RUN;
363  goto done;
364  }
365 
366  /* Populate "mine" with values, then retrieve them with the CHANNEL dialplan function */
367  for (i = 0; !ast_strlen_zero(lookup[i].name); i++) {
368  ast_str_set(&varstr, 0, "${CHANNEL(rtpqos,audio,%s)}", lookup[i].name);
369  if (lookup[i].type == INT) {
370  int j;
371  char cmpstr[256];
372  for (j = 1; j < 25; j++) {
373  *lookup[i].i4 = j;
374  ast_str_substitute_variables(&buffer, 0, chan, ast_str_buffer(varstr));
375  snprintf(cmpstr, sizeof(cmpstr), "%d", j);
376  if (strcmp(cmpstr, ast_str_buffer(buffer))) {
377  res = AST_TEST_FAIL;
378  ast_test_status_update(test, "%s != %s != %s\n", ast_str_buffer(varstr), cmpstr, ast_str_buffer(buffer));
379  break;
380  }
381  }
382  } else {
383  double j, cmpdbl = 0.0;
384  for (j = 1.0; j < 10.0; j += 0.3) {
385  *lookup[i].d8 = j;
386  ast_str_substitute_variables(&buffer, 0, chan, ast_str_buffer(varstr));
387  if (sscanf(ast_str_buffer(buffer), "%lf", &cmpdbl) != 1 || fabs(j - cmpdbl > .05)) {
388  res = AST_TEST_FAIL;
389  ast_test_status_update(test, "%s != %f != %s\n", ast_str_buffer(varstr), j, ast_str_buffer(buffer));
390  break;
391  }
392  }
393  }
394  }
395 
396 done:
397  ast_free(varstr);
398  ast_free(buffer);
399 
400  /* This unlink and unref will take care of destroying the channel, RTP instance, and SIP pvt */
401  if (p) {
403  dialog_unref(p, "Destroy test object");
404  }
405  ast_rtp_engine_unregister(&test_engine);
406  return res;
407 }
408 #endif
409 
410 /*! \brief SIP test registration */
412 {
413  AST_TEST_REGISTER(test_sip_rtpqos_1);
414 }
415 
416 /*! \brief SIP test registration */
418 {
419  AST_TEST_UNREGISTER(test_sip_rtpqos_1);
420 }
421 
static char * ast_sockaddr_stringify_addr(const struct ast_sockaddr *addr)
Wrapper around ast_sockaddr_stringify_fmt() to return an address only.
Definition: netsock2.h:240
Main Channel structure associated with a channel.
Definition: channel.h:742
Asterisk main include file. File version handling, generic pbx functions.
struct ast_frame ast_null_frame
Definition: frame.c:131
#define AST_MAX_USER_FIELD
Definition: cdr.h:72
int ast_rtp_instance_get_stats(struct ast_rtp_instance *instance, struct ast_rtp_instance_stats *stats, enum ast_rtp_instance_stat stat)
Retrieve statistics about an RTP instance.
Definition: rtp_engine.c:1604
void * tech_pvt
Definition: channel.h:744
void sip_dialplan_function_register_tests(void)
SIP test registration.
#define LOG_WARNING
Definition: logger.h:144
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
Definition: strings.h:497
unsigned int txcount
Definition: rtp_engine.h:237
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application&#39;s arguments.
Definition: app.h:572
void ast_str_substitute_variables(struct ast_str **buf, ssize_t maxlen, struct ast_channel *chan, const char *templ)
Definition: pbx.c:4468
Definition: sched.c:57
#define AST_TEST_REGISTER(cb)
Definition: test.h:127
unsigned int rxploss
Definition: rtp_engine.h:263
struct sip_pvt * sip_alloc(ast_string_field callid, struct ast_sockaddr *addr, int useglobal_nat, const int intended_method, struct sip_request *req)
Allocate sip_pvt structure, set defaults and link in the container. Returns a reference to the object...
Definition: chan_sip.c:7988
struct ast_str * ast_str_create(size_t init_len)
Create a malloc&#39;ed dynamic length string.
Definition: strings.h:420
Socket address structure.
Definition: netsock2.h:63
static int ast_sockaddr_isnull(const struct ast_sockaddr *addr)
Checks if the ast_sockaddr is null. &quot;null&quot; in this sense essentially means uninitialized, or having a 0 length.
Definition: netsock2.h:93
void dialog_unlink_all(struct sip_pvt *dialog)
Unlink a dialog from the dialogs container, as well as any other places that it may be currently stor...
Definition: chan_sip.c:3080
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
Definition: strings.h:874
int ast_ouraddrfor(const struct ast_sockaddr *them, struct ast_sockaddr *us)
Get our local IP address when contacting a remote host.
Definition: acl.c:705
void sip_dialplan_function_unregister_tests(void)
SIP test registration.
General Asterisk PBX channel definitions.
int ast_rtp_engine_unregister(struct ast_rtp_engine *engine)
Unregister an RTP engine.
Definition: rtp_engine.c:222
void ast_rtp_instance_set_data(struct ast_rtp_instance *instance, void *data)
Set the data portion of an RTP instance.
Definition: rtp_engine.c:364
ast_rtp_instance_stat
Definition: rtp_engine.h:147
#define ast_test_status_update(a, b, c...)
Definition: test.h:129
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Definition: strings.h:63
Access Control of various sorts.
int ast_rtp_instance_set_remote_address(struct ast_rtp_instance *instance, const struct ast_sockaddr *address)
Set the address of the remote endpoint that we are sending RTP to.
Definition: rtp_engine.c:391
char * ast_rtp_instance_get_quality(struct ast_rtp_instance *instance, enum ast_rtp_instance_stat_field field, char *buf, size_t size)
Retrieve quality statistics about an RTP instance.
Definition: rtp_engine.c:1609
int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *preparse, char *buf, size_t buflen)
Core PBX routines and definitions.
unsigned int rxcount
Definition: rtp_engine.h:239
#define ast_strdupa(s)
duplicate a string in memory from the stack
Definition: utils.h:663
#define LOG_ERROR
Definition: logger.h:155
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
Definition: strings.h:364
static struct @350 args
unsigned int local_ssrc
Definition: rtp_engine.h:291
struct ast_sockaddr bindaddr
Definition: chan_sip.c:1146
#define AST_TEST_UNREGISTER(cb)
Definition: test.h:128
static char * ast_sockaddr_stringify(const struct ast_sockaddr *addr)
Wrapper around ast_sockaddr_stringify_fmt() with default format.
Definition: netsock2.h:210
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...
Definition: logger.c:1207
static void parse(struct mgcp_request *req)
Definition: chan_mgcp.c:1858
static const char name[]
unsigned int txploss
Definition: rtp_engine.h:261
#define ast_free(a)
Definition: astmm.h:97
void * ast_rtp_instance_get_data(struct ast_rtp_instance *instance)
Get the data portion of an RTP instance.
Definition: rtp_engine.c:369
void ast_rtp_instance_get_remote_address(struct ast_rtp_instance *instance, struct ast_sockaddr *address)
Get the address of the remote endpoint that we are sending RTP to.
Definition: rtp_engine.c:447
const char * name
Definition: rtp_engine.h:312
struct ast_rtp_instance * ast_rtp_instance_new(const char *engine_name, struct sched_context *sched, const struct ast_sockaddr *sa, void *data)
Create a new RTP instance.
Definition: rtp_engine.c:308
static const char type[]
Definition: chan_nbs.c:57
void ast_rtp_instance_get_local_address(struct ast_rtp_instance *instance, struct ast_sockaddr *address)
Get the local address that we are expecting RTP on.
Definition: rtp_engine.c:430
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:223
Data structure associated with a single frame of data.
Definition: frame.h:142
#define AST_TEST_DEFINE(hdr)
Definition: test.h:126
#define AST_APP_ARG(name)
Define an application argument.
Definition: app.h:555
struct ast_channel_tech sip_tech
Definition of this channel for PBX channel registration.
Definition: chan_sip.c:1596
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the &#39;standard&#39; argument separation process for an application.
Definition: app.h:604
struct ast_channel * ast_dummy_channel_alloc(void)
Create a fake channel structure.
Definition: channel.c:1391
Pluggable RTP Architecture.
struct ast_channel_tech * tech
Definition: channel.h:743
int ast_rtp_engine_register2(struct ast_rtp_engine *engine, struct ast_module *module)
Register an RTP engine.
Definition: rtp_engine.c:188
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
Definition: asterisk.h:180
unsigned int remote_ssrc
Definition: rtp_engine.h:293