17861e6bc52e80474e68e112833ed9265bad21b8
[asterisk/asterisk.git] / tests / test_abstract_jb.c
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 2012, Matt Jordan
5  *
6  * Matt Jordan <mjordan@digium.com>
7  *
8  * See http://www.asterisk.org for more information about
9  * the Asterisk project. Please do not directly contact
10  * any of the maintainers of this project for assistance;
11  * the project provides a web site, mailing lists and IRC
12  * channels for your use.
13  *
14  * This program is free software, distributed under the terms of
15  * the GNU General Public License Version 2. See the LICENSE file
16  * at the top of the source tree.
17  */
18
19 /*!
20  * \file
21  * \brief Abstract Jitterbuffer Tests
22  *
23  * \author \verbatim Matt Jordan <mjordan@digium.com> \endverbatim
24  *
25  * Tests the abstract jitter buffer API.  This tests both adaptive and fixed
26  * jitter buffers.  Functions defined in abstract_jb that are not part of the
27  * abstract jitter buffer API are not tested by this unit test.
28  *
29  * \ingroup tests
30  */
31
32 /*** MODULEINFO
33         <depend>TEST_FRAMEWORK</depend>
34         <support_level>core</support_level>
35  ***/
36
37 #include "asterisk.h"
38
39 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
40
41 #include "asterisk/utils.h"
42 #include "asterisk/module.h"
43 #include "asterisk/test.h"
44 #include "asterisk/abstract_jb.h"
45 #include "asterisk/frame.h"
46
47 #define DEFAULT_FRAME_MS 160
48 #define DEFAULT_CONFIG_FLAGS 0
49 #define DEFAULT_CONFIG_SIZE (DEFAULT_FRAME_MS) * 10
50 #define DEFAULT_CONFIG_RESYNC_THRESHOLD (DEFAULT_FRAME_MS) * 2
51 #define DEFAULT_CONFIG_TARGET_EXTRA -1
52
53 /*! \internal \brief Destructor for a jitter buffer
54  * \param jb The jitter buffer to destroy
55  * \note This will destroy all frames still in the jitter buffer
56  */
57 static void dispose_jitterbuffer(struct ast_jb *jb)
58 {
59         if (!jb || !jb->impl || !jb->jbobj) {
60                 return;
61         }
62
63         jb->impl->empty_and_reset(jb->jbobj);
64
65         jb->impl->destroy(jb->jbobj);
66         jb->impl = NULL;
67         jb->jbobj = NULL;
68 }
69
70 /*! \internal \brief Create a test frame
71  * \param timestamp the time in ms of the frame
72  * \param seqno the frame's sequence number
73  * \returns a malloc'd frame
74  */
75 static struct ast_frame *create_test_frame(long timestamp,
76                 int seqno)
77 {
78         struct ast_frame f = {0};
79
80         f.subclass.format.id = AST_FORMAT_SLINEAR;
81         f.frametype = AST_FRAME_VOICE;
82         f.src = "TEST";
83         f.ts = timestamp;
84         f.len = DEFAULT_FRAME_MS;
85         f.seqno = seqno;
86
87         return ast_frisolate(&f);
88 }
89
90 /*! \internal
91  * \brief Test two numeric (long int) values.
92 */
93 #define LONG_INT_TEST(actual, expected) do { \
94         if ((actual) != (expected)) { \
95                 ast_test_status_update(test, #actual ": expected [%ld]; actual [%ld]\n", (long int)(expected), (long int)(actual)); \
96                 return AST_TEST_FAIL; \
97         } } while (0)
98
99 /*! \internal
100  * \brief Test two numeric (int) values.
101 */
102 #define INT_TEST(actual, expected) do { \
103         if ((actual) != (expected)) { \
104                 ast_test_status_update(test, #actual ": expected [%d]; actual [%d]\n", (expected), (actual)); \
105                 return AST_TEST_FAIL; \
106         } } while (0)
107
108 /*! \internal
109  * \brief Test two string values
110 */
111 #define STRING_TEST(actual, expected) do { \
112         if (strcmp((actual), (expected))) { \
113                 ast_test_status_update(test, #actual ": expected [%s]; actual [%s]\n", (expected), (actual)); \
114                 return AST_TEST_FAIL; \
115         } } while (0)
116
117 /*! \internal
118  * \brief Verify that two frames have the same properties
119  */
120 #define VERIFY_FRAME(actual, expected) do { \
121         INT_TEST((actual)->frametype, (expected)->frametype); \
122         INT_TEST((actual)->seqno, (expected)->seqno); \
123         LONG_INT_TEST((actual)->ts, (expected)->ts); \
124         LONG_INT_TEST((actual)->len, (expected)->len); \
125         STRING_TEST((actual)->src, (expected)->src); \
126 } while (0)
127
128 /*! \internal
129  * \brief Get the implementation for a jitter buffer
130  */
131 #define OBTAIN_JITTERBUFFER_IMPL(impl, ast_jb_type, literal_name) do { \
132         (impl) = ast_jb_get_impl((ast_jb_type)); \
133         if (!(impl)) { \
134                 ast_test_status_update(test, "Error: no %s jitterbuffer defined\n", (literal_name)); \
135                 return AST_TEST_FAIL; \
136         } \
137         if (strcmp((impl)->name, (literal_name))) { \
138                 ast_test_status_update(test, "Error: requested %s jitterbuffer and received %s\n", (literal_name), (impl)->name); \
139                 return AST_TEST_FAIL; \
140         } } while (0)
141
142 /*! \internal
143  * \brief Make a jitter buffer configuration object with default values
144  */
145 #define MAKE_DEFAULT_CONFIG(conf, impl) do { \
146         (conf)->flags = DEFAULT_CONFIG_FLAGS; \
147         strcpy((conf)->impl, (impl)->name); \
148         (conf)->max_size = DEFAULT_CONFIG_SIZE; \
149         (conf)->resync_threshold = DEFAULT_CONFIG_RESYNC_THRESHOLD; \
150         (conf)->target_extra = DEFAULT_CONFIG_TARGET_EXTRA; \
151         } while (0)
152
153 /*! \internal \brief A container object for the jitter buffers, used for all tests*/
154 static struct ast_jb default_jb = {
155         .impl = NULL,
156         .jbobj = NULL
157 };
158
159 /*! \internal \brief Construct a test name */
160 #define TEST_NAME(type_name, specifier) type_name ## _  ## specifier
161
162 #define TEST_NAME2(test_name) #test_name
163 #define STRINGIFY_TESTNAME(test_name) TEST_NAME2(test_name)
164
165 /*! \internal \brief Test nominal construction of a jitter buffer
166  * \param type_name The enum type of the jitter buffer to create
167  * \param literal_type_name The literal name of the type - "fixed" or "adaptive"
168  */
169 #define test_create_nominal(type_name, literal_type_name) AST_TEST_DEFINE(TEST_NAME(type_name, create)) {\
170         RAII_VAR(struct ast_jb *, jb, &default_jb, dispose_jitterbuffer); \
171         const struct ast_jb_impl *impl; \
172         struct ast_jb_conf conf; \
173 \
174         switch (cmd) { \
175         case TEST_INIT: \
176                 info->name = STRINGIFY_TESTNAME(TEST_NAME(type_name, create)); \
177                 info->category = "/main/abstract_jb/"; \
178                 info->summary = "Test nominal creation of a " literal_type_name " jitterbuffer"; \
179                 info->description = \
180                         "Tests nominal creation of a " literal_type_name " jitterbuffer using the " \
181                         " jitterbuffer API."; \
182                 return AST_TEST_NOT_RUN; \
183         case TEST_EXECUTE: \
184                 break; \
185         } \
186  \
187         ast_test_status_update(test, "Executing " STRINGIFY_TESTNAME(TEST_NAME(type_name,  create))"...\n"); \
188         OBTAIN_JITTERBUFFER_IMPL(impl, (type_name), (literal_type_name)); \
189         MAKE_DEFAULT_CONFIG(&conf, impl); \
190  \
191         jb->jbobj = impl->create(&conf); \
192         jb->impl = impl; \
193         if (!jb->jbobj) { \
194                 ast_test_status_update(test, "Error: Failed to adaptive jitterbuffer\n"); \
195                 return AST_TEST_FAIL; \
196         } \
197  \
198         return AST_TEST_PASS; \
199 }
200
201 /*! \internal \brief Test putting the initial frame into a jitter buffer
202  * \param type_name The enum type of the jitter buffer to create
203  * \param literal_type_name The literal name of the type - "fixed" or "adaptive"
204  */
205 #define test_put_first(type_name, literal_type_name) AST_TEST_DEFINE(TEST_NAME(type_name,  put_first)) {\
206         RAII_VAR(struct ast_jb *, jb, &default_jb, dispose_jitterbuffer); \
207         const struct ast_jb_impl *impl; \
208         struct ast_jb_conf conf; \
209         RAII_VAR(struct ast_frame *, expected_frame, NULL, ast_frame_dtor); \
210         RAII_VAR(struct ast_frame *, actual_frame, NULL, ast_frame_dtor); \
211         int res; \
212 \
213         switch (cmd) { \
214         case TEST_INIT: \
215                 info->name = STRINGIFY_TESTNAME(TEST_NAME(type_name,  put_first)); \
216                 info->category = "/main/abstract_jb/"; \
217                 info->summary = "Test putting a frame into a " literal_type_name " jitterbuffer"; \
218                 info->description = \
219                         "This tests putting a single frame into a " literal_type_name " jitterbuffer " \
220                         "when the jitterbuffer is empty and verifying that it is indeed " \
221                         "the first frame on the jitterbufffer"; \
222                 return AST_TEST_NOT_RUN; \
223         case TEST_EXECUTE: \
224                 break; \
225         } \
226 \
227         ast_test_status_update(test, "Executing " STRINGIFY_TESTNAME(TEST_NAME(type_name,  create))"...\n"); \
228         OBTAIN_JITTERBUFFER_IMPL(impl, (type_name), (literal_type_name)); \
229         MAKE_DEFAULT_CONFIG(&conf, impl); \
230         jb->jbobj = impl->create(&conf); \
231         jb->impl = impl; \
232         if (!jb->jbobj) { \
233                 ast_test_status_update(test, "Error: Failed to adaptive jitterbuffer\n"); \
234                 return AST_TEST_FAIL; \
235         } \
236 \
237         expected_frame = create_test_frame(1000, 0); \
238         res = jb->impl->put_first(jb->jbobj, \
239                 expected_frame, \
240                 1100); \
241         if (res != AST_JB_IMPL_OK) { \
242                 ast_test_status_update(test, "Error: Got %d back from put_first (expected %d)\n", \
243                         res, AST_JB_IMPL_OK); \
244                 return AST_TEST_FAIL; \
245         } \
246 \
247         res = jb->impl->remove(jb->jbobj, &actual_frame); \
248         if (!actual_frame || res != AST_JB_IMPL_OK) { \
249                 ast_test_status_update(test, "Error: failed to retrieve first frame\n"); \
250                 return AST_TEST_FAIL; \
251         } \
252         expected_frame = create_test_frame(1000, 0); \
253         VERIFY_FRAME(actual_frame, expected_frame); \
254         return AST_TEST_PASS; \
255 }
256
257 /*! \internal \brief Test putting a voice frames into a jitter buffer
258  * \param type_name The enum type of the jitter buffer to create
259  * \param literal_type_name The literal name of the type - "fixed" or "adaptive"
260  */
261 #define test_put(type_name, literal_type_name) AST_TEST_DEFINE(TEST_NAME(type_name, put)) {\
262         RAII_VAR(struct ast_jb *, jb, &default_jb, dispose_jitterbuffer); \
263         const struct ast_jb_impl *impl; \
264         struct ast_jb_conf conf; \
265         RAII_VAR(struct ast_frame *, expected_frame, NULL, ast_frame_dtor); \
266         RAII_VAR(struct ast_frame *, actual_frame, NULL, ast_frame_dtor); \
267         int res; \
268         long next; \
269         int i; \
270 \
271         switch (cmd) { \
272         case TEST_INIT: \
273                 info->name = STRINGIFY_TESTNAME(TEST_NAME(type_name, put)); \
274                 info->category = "/main/abstract_jb/"; \
275                 info->summary = "Test putting frames onto a " literal_type_name " jitterbuffer"; \
276                 info->description = \
277                         "This tests putting multiple frames into a " literal_type_name " jitterbuffer"; \
278                 return AST_TEST_NOT_RUN; \
279         case TEST_EXECUTE: \
280                 break; \
281         } \
282 \
283         ast_test_status_update(test, "Executing "STRINGIFY_TESTNAME(TEST_NAME(type_name, put))"...\n"); \
284         OBTAIN_JITTERBUFFER_IMPL(impl, (type_name), (literal_type_name)); \
285         MAKE_DEFAULT_CONFIG(&conf, impl); \
286         jb->jbobj = impl->create(&conf); \
287         jb->impl = impl; \
288 \
289         expected_frame = create_test_frame(1000, 0); \
290         jb->impl->put_first(jb->jbobj, expected_frame, 1100); \
291         for (i = 1; i < 10; i++) { \
292                 expected_frame = create_test_frame(1000 + i * DEFAULT_FRAME_MS, 0); \
293                 res = jb->impl->put(jb->jbobj, \
294                         expected_frame, \
295                         1100 + i * DEFAULT_FRAME_MS); \
296                 if (res != AST_JB_IMPL_OK) { \
297                         ast_test_status_update(test, "Error: On frame %d, got %d back from put (expected %d)\n", \
298                                 i, res, AST_JB_IMPL_OK); \
299                         return AST_TEST_FAIL; \
300                 } \
301         } \
302 \
303         for (i = 0; i < 10; i++) { \
304                 expected_frame = create_test_frame(1000 + i * DEFAULT_FRAME_MS, 0); \
305                 next = jb->impl->next(jb->jbobj); \
306                 res = jb->impl->get(jb->jbobj, &actual_frame, next, DEFAULT_FRAME_MS); \
307                 if (res != AST_JB_IMPL_OK) { \
308                         ast_test_status_update(test, "Error: failed to retrieve frame %i at time %ld\n", \
309                                 i, next); \
310                         return AST_TEST_FAIL; \
311                 } \
312                 VERIFY_FRAME(actual_frame, expected_frame); \
313                 ast_frfree(expected_frame); \
314                 expected_frame = NULL; \
315         } \
316         return AST_TEST_PASS; \
317 }
318
319 /*! \internal \brief Test overflowing the limits of a jitter buffer
320  * \param type_name The enum type of the jitter buffer to create
321  * \param literal_type_name The literal name of the type - "fixed" or "adaptive"
322  * \param overflow_limit The number of frames at which we expect the buffer to overflow
323  */
324 #define test_put_overflow(type_name, literal_type_name, overflow_limit) AST_TEST_DEFINE(TEST_NAME(type_name, put_overflow)) {\
325         RAII_VAR(struct ast_jb *, jb, &default_jb, dispose_jitterbuffer); \
326         const struct ast_jb_impl *impl; \
327         struct ast_jb_conf conf; \
328         RAII_VAR(struct ast_frame *, expected_frame, NULL, ast_frame_dtor); \
329         int res; \
330         int i; \
331 \
332         switch (cmd) { \
333         case TEST_INIT: \
334                 info->name = STRINGIFY_TESTNAME(TEST_NAME(type_name,  put_overflow)); \
335                 info->category = "/main/abstract_jb/"; \
336                 info->summary = "Test putting frames onto a " literal_type_name " jitterbuffer " \
337                         "that ends up overflowing the maximum allowed slots in the buffer"; \
338                 info->description = \
339                         "This tests putting multiple frames into a " literal_type_name " jitterbuffer " \
340                         "until the jitterbuffer overflows"; \
341                 return AST_TEST_NOT_RUN; \
342         case TEST_EXECUTE: \
343                 break; \
344         } \
345 \
346         ast_test_status_update(test, "Executing "STRINGIFY_TESTNAME(TEST_NAME(type_name, put_overflow))"...\n"); \
347         OBTAIN_JITTERBUFFER_IMPL(impl, (type_name), (literal_type_name)); \
348         MAKE_DEFAULT_CONFIG(&conf, impl); \
349         jb->jbobj = impl->create(&conf); \
350         jb->impl = impl; \
351 \
352         expected_frame = create_test_frame(1000, 0); \
353         jb->impl->put_first(jb->jbobj, expected_frame, 1100); \
354         for (i = 1; i <= (overflow_limit); i++) { \
355                 expected_frame = create_test_frame(1000 + i * DEFAULT_FRAME_MS, 0); \
356                 res = jb->impl->put(jb->jbobj, \
357                         expected_frame, \
358                         1100 + i * DEFAULT_FRAME_MS); \
359                 if (res != AST_JB_IMPL_OK) { \
360                         ast_test_status_update(test, "Error: On frame %d, got %d back from put (expected %d)\n", \
361                                 i, res, AST_JB_IMPL_OK); \
362                         return AST_TEST_FAIL; \
363                 } \
364         } \
365 \
366         for (i = (overflow_limit)+1; i < (overflow_limit) + 5; i++) { \
367                 expected_frame = create_test_frame(1000 + i * DEFAULT_FRAME_MS, 0); \
368                 res = jb->impl->put(jb->jbobj, \
369                         expected_frame, \
370                         1100 + i * DEFAULT_FRAME_MS); \
371                 if (res != AST_JB_IMPL_DROP) { \
372                         expected_frame = NULL; \
373                         ast_test_status_update(test, "Error: On frame %d, got %d back from put (expected %d)\n", \
374                                 i, res, AST_JB_IMPL_DROP); \
375                         return AST_TEST_FAIL; \
376                 } \
377                 ast_frfree(expected_frame); \
378                 expected_frame = NULL;\
379         } \
380 \
381         return AST_TEST_PASS; \
382 }
383
384 /*! \internal \brief Test putting voice frames into a jitter buffer out of order
385  * \param type_name The enum type of the jitter buffer to create
386  * \param literal_type_name The literal name of the type - "fixed" or "adaptive"
387  * \param synch_limit The synchronization limit for this particular type of jitter buffer
388  */
389 #define test_put_out_of_order(type_name, literal_type_name, synch_limit) AST_TEST_DEFINE(TEST_NAME(type_name, put_out_of_order)) {\
390         RAII_VAR(struct ast_jb *, jb, &default_jb, dispose_jitterbuffer); \
391         const struct ast_jb_impl *impl; \
392         struct ast_jb_conf conf; \
393         RAII_VAR(struct ast_frame *, actual_frame, NULL, ast_frame_dtor); \
394         RAII_VAR(struct ast_frame *, expected_frame, NULL, ast_frame_dtor); \
395         int res; \
396         long next; \
397         int i; \
398 \
399         switch (cmd) { \
400         case TEST_INIT: \
401                 info->name = STRINGIFY_TESTNAME(TEST_NAME(type_name, put_out_of_order)); \
402                 info->category = "/main/abstract_jb/"; \
403                 info->summary = "Test putting out of order frames onto a " literal_type_name " jitterbuffer"; \
404                 info->description = \
405                         "This tests putting multiple frames into a " literal_type_name " jitterbuffer " \
406                         "that arrive out of order.  Every 3rd frame is put in out of order."; \
407                 return AST_TEST_NOT_RUN; \
408         case TEST_EXECUTE: \
409                 break; \
410         } \
411 \
412         ast_test_status_update(test, "Executing " STRINGIFY_TESTNAME(TEST_NAME(type_name, put_out_of_order)) "...\n"); \
413         OBTAIN_JITTERBUFFER_IMPL(impl, (type_name), (literal_type_name)); \
414         MAKE_DEFAULT_CONFIG(&conf, impl); \
415         conf.resync_threshold = (synch_limit); \
416         jb->jbobj = impl->create(&conf); \
417         jb->impl = impl; \
418 \
419         expected_frame = create_test_frame(1000, 0); \
420         jb->impl->put_first(jb->jbobj, expected_frame, 1100); \
421         for (i = 1; i <= 10; i++) { \
422                 if (i % 3 == 1 && i != 10) { \
423                         expected_frame = create_test_frame(1000 + ((i + 1) * DEFAULT_FRAME_MS), 0); \
424                 } else if (i % 3 == 2) { \
425                         expected_frame = create_test_frame(1000 + ((i - 1) * DEFAULT_FRAME_MS), 0); \
426                 } else { \
427                         expected_frame = create_test_frame(1000 + i * DEFAULT_FRAME_MS, 0); \
428                 } \
429                 res = jb->impl->put(jb->jbobj, \
430                         expected_frame, \
431                         1100 + i * DEFAULT_FRAME_MS); \
432                 if (res != AST_JB_IMPL_OK) { \
433                         ast_test_status_update(test, "Error: On frame %d, got %d back from put (expected %d)\n", \
434                                 i, res, AST_JB_IMPL_OK); \
435                         return AST_TEST_FAIL; \
436                 } \
437         } \
438 \
439         for (i = 0; i <= 10; i++) { \
440                 expected_frame = create_test_frame(1000 + i * DEFAULT_FRAME_MS, 0); \
441                 next = jb->impl->next(jb->jbobj); \
442                 res = jb->impl->get(jb->jbobj, &actual_frame, next, DEFAULT_FRAME_MS); \
443                 if (res != AST_JB_IMPL_OK) { \
444                         ast_test_status_update(test, "Error: failed to retrieve frame at %ld\n", \
445                                 next); \
446                         return AST_TEST_FAIL; \
447                 } \
448                 VERIFY_FRAME(actual_frame, expected_frame); \
449                 ast_frfree(expected_frame); \
450                 expected_frame = NULL; \
451         } \
452 \
453         return AST_TEST_PASS; \
454 }
455
456
457 test_create_nominal(AST_JB_ADAPTIVE, "adaptive")
458
459 test_put_first(AST_JB_ADAPTIVE, "adaptive")
460
461 test_put(AST_JB_ADAPTIVE, "adaptive")
462
463 test_put_overflow(AST_JB_ADAPTIVE, "adaptive", 10)
464
465 test_put_out_of_order(AST_JB_ADAPTIVE, "adaptive", DEFAULT_FRAME_MS * 2)
466
467 test_create_nominal(AST_JB_FIXED, "fixed")
468
469 test_put_first(AST_JB_FIXED, "fixed")
470
471 test_put(AST_JB_FIXED, "fixed")
472
473 test_put_overflow(AST_JB_FIXED, "fixed", 12)
474
475 test_put_out_of_order(AST_JB_FIXED, "fixed", DEFAULT_CONFIG_RESYNC_THRESHOLD)
476
477 static int unload_module(void)
478 {
479         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_ADAPTIVE, create));
480         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_ADAPTIVE, put_first));
481         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_ADAPTIVE, put));
482         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_ADAPTIVE, put_overflow));
483         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_ADAPTIVE, put_out_of_order));
484
485         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_FIXED, create));
486         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_FIXED, put_first));
487         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_FIXED, put));
488         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_FIXED, put_overflow));
489         AST_TEST_UNREGISTER(TEST_NAME(AST_JB_FIXED, put_out_of_order));
490
491         return 0;
492 }
493
494 static int load_module(void)
495 {
496         AST_TEST_REGISTER(TEST_NAME(AST_JB_ADAPTIVE, create));
497         AST_TEST_REGISTER(TEST_NAME(AST_JB_ADAPTIVE, put_first));
498         AST_TEST_REGISTER(TEST_NAME(AST_JB_ADAPTIVE, put));
499         AST_TEST_REGISTER(TEST_NAME(AST_JB_ADAPTIVE, put_overflow));
500         AST_TEST_REGISTER(TEST_NAME(AST_JB_ADAPTIVE, put_out_of_order));
501
502         AST_TEST_REGISTER(TEST_NAME(AST_JB_FIXED, create));
503         AST_TEST_REGISTER(TEST_NAME(AST_JB_FIXED, put_first));
504         AST_TEST_REGISTER(TEST_NAME(AST_JB_FIXED, put));
505         AST_TEST_REGISTER(TEST_NAME(AST_JB_FIXED, put_overflow));
506         AST_TEST_REGISTER(TEST_NAME(AST_JB_FIXED, put_out_of_order));
507
508         return AST_MODULE_LOAD_SUCCESS;
509 }
510
511 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Abstract JitterBuffer API Tests");