aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2010-09-30More Solaris compatibility fixestilghman2-3/+12
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@289543 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-28Solaris compatibility fixestilghman2-0/+5
Review: https://reviewboard.asterisk.org/r/942/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@289104 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-10Merged revisions 285930 via svnmerge from tilghman1-6/+0
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r285930 | tilghman | 2010-09-09 20:16:32 -0500 (Thu, 09 Sep 2010) | 14 lines Merged revisions 285889 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r285889 | tilghman | 2010-09-09 19:13:45 -0500 (Thu, 09 Sep 2010) | 7 lines Fix Mac OS X build. This also fixes a rather grievous calculation error for the offset of ast_fdset, which was masked on Linux and FreeBSD, because these platforms check the first 256 FDs regardless of the bitmask setting (due to backwards compatibility). ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285931 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-09Merged revisions 285710 via svnmerge from bbryant1-0/+253
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r285710 | bbryant | 2010-09-09 14:50:13 -0400 (Thu, 09 Sep 2010) | 8 lines Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent. (closes issue #16903) Reported by: Nick_Lewis Patches: pbx.c-specificity.patch uploaded by Nick Lewis (license 657) Tested by: Nick_Lewis ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285711 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-29Remove res_crypto dependency.pabelanger1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@280446 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-29crypto_loaded_test depends on res_crypto, else test will fail.pabelanger1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@280414 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-25Add trailing backslash to silence warning message. pabelanger1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@279442 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-21make func_file unit test's category consistent with other testsdvossel1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278539 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-19Remove the fe80:1234::1234 test case from test_acl.cmmichelson1-1/+0
The ACL test was failing on Mac OS X because it would convert the above invalid link-local address into fe80::1234 while reporting no error from getaddrinfo(). Linux does not do this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277872 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-19Make ACLs IPv6-capable.mmichelson1-33/+171
ACLs can now be configured to match IPv6 networks. This is only relevant for ACLs in chan_sip for now since other channel drivers do not support IPv6 addressing. However, once those channel drivers are outfitted to support IPv6 addressing, the ACLs will already be ready for IPv6 support. https://reviewboard.asterisk.org/r/791 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277814 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16updated devicestate test for device state changesmnicholson1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@277409 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-16Fix trunk build for Mac OS X 10.6tilghman1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276870 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14Remove the old stub files, preferring the optional_api method.tilghman1-0/+103
(closes issue #17475) Reported by: tilghman Review: https://reviewboard.asterisk.org/r/695/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276490 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-14ast_callerid restructuringrmudgett1-4/+11
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276347 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-13FILE() now supports line-mode and writing (altering) files.tilghman1-0/+394
(closes issue #16461) Reported by: skyman Patches: 20100622__issue16461.diff.txt uploaded by tilghman (license 14) Tested by: tilghman Review: https://reviewboard.asterisk.org/r/737/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276114 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09Kill some startup warnings and errors and make some messages more helpful in ↵tilghman17-26/+26
tracking down the source. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275105 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-10Fix an off by one error that caused a unit test to occasionally crash.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@269711 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02Generic Advice of Charge.rmudgett1-0/+690
Asterisk Generic AOC Representation - Generic AOC encode/decode routines. (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame) - AST_CONTROL_AOC frame type to represent generic encoded AOC data - Manager events for AOC-S, AOC-D, and AOC-E messages Asterisk App Support - app_dial AOC-S pass-through support on call setup - app_queue AOC-S pass-through support on call setup AOC Unit Tests - AOC Unit Tests for encode/decode routines - AOC Unit Test for manager event representation. SIP AOC Support - Pass-through of generic AOC-D and AOC-E messages to snom phones via the snom AOC specification. - Creation of chan_sip page3 flags for the addition of the new 'snom_aoc_enabled' sip.conf option. IAX AOC Support - Natively supports AOC pass-through through the use of the new AST_CONTROL_AOC frame type DAHDI AOC Support - ETSI PRI full AOC Pass-through support - 'aoc_enable' chan_dahdi.conf option for independently enabling pass-through of AOC-S, AOC-D, AOC-E. - 'aoce_delayhangup' option for retrieving AOC-E on disconnect. - DAHDI A() dial string option for requesting AOC services. example usage: ;requests AOC-S, AOC-D, and AOC-E on call setup exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e)) Review: https://reviewboard.asterisk.org/r/552/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267096 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-01Support setting locale per-mailbox (changes date/time languages for email, ↵tilghman1-0/+183
pager messages). (closes issue #14333) Reported by: klaus3000 Patches: 20090515__issue14333.diff.txt uploaded by tilghman (license 14) app_voicemail.c-svn-trunk-rev211675-patch.txt uploaded by klaus3000 (license 65) Tested by: klaus3000 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266828 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-13Add kqueue(2) implementation to Asterisk in various places.tilghman1-13/+9
This will save a considerable amount of CPU on the BSDs, including Mac OS X, as it eliminates several places in the code that we previously used a busy loop. Additionally, this adds a res_timing interface, using kqueue timers. Review: https://reviewboard.asterisk.org/r/543/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@262852 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-06Add test case for removing random elements from a heap.russell1-2/+99
I modified the original patch for trunk to use the unit test API. (issue #17277) Reported by: cappucinoking Patches: test_heap.diff uploaded by cappucinoking (license 1036) Tested by: cappucinoking, russell git-svn-id: http://svn.digium.com/svn/asterisk/trunk@261500 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-22Add ast_event subscription unit test and fix some ast_event API bugs.russell1-16/+363
This patch introduces another test in test_event.c that exercises most of the subscription related ast_event API calls. I made some minor additions to the existing event allocation test to increase API coverage by the test code. Finally, I made a list in a comment of API calls not yet touched by the test module as a to-do list for future test development. During the development of this test code, I discovered a number of bugs in the event API. 1) subscriptions to AST_EVENT_ALL were not handled appropriately in a couple of different places. The API allows a subscription to all event types, but with IE parameters, just as if it was a subscription to a specific event type. However, the parameters were being ignored. This affected ast_event_check_subscriber() and event distribution to subscribers. 2) Some of the logic in ast_event_check_subscriber() for checking subscriptions against query parameters was wrong. Review: https://reviewboard.asterisk.org/r/617/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@258632 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-15Merged revisions 257544 via svnmerge from tilghman1-1/+85
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r257544 | tilghman | 2010-04-15 16:23:24 -0500 (Thu, 15 Apr 2010) | 6 lines Allow application options with arguments to contain parentheses, through a variety of escaping techniques. Fixes SWP-1194 (ABE-2143). Review: https://reviewboard.asterisk.org/r/604/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@257560 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-12test_substitution expects func_curl to be present to work.russell1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256783 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-11Add ASTERISK_FILE_VERSION() macrorussell1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256745 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-09Fix some compiler errors that popped up after the CCSS merge.mmichelson1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256529 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-25Add unit test for testing ACL functionality.mmichelson1-0/+244
There are two unit tests contained here. 1. "Invalid ACL" This attempts to read a bunch of badly formatted ACL entries and add them to a host access rule. The goal of this test is to be sure that all invalid entries are rejected as they should be. 2. "ACL" This sets up four ACLs. One is a permit all, one is a deny all, and the other two have specific rules about which subnets are allowed and which are not. Then a set of test addresses is used to determine whether we would allow those addresses to access us when each ACL is applied. This test, by the way, was what resulted in AST-2010-003's creation. Review: https://reviewboard.asterisk.org/r/532 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@254557 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-23Change the name of the category 'TEST' to match the name of the subdirtzafrir1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@254001 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-17Switch to using intptr_t, as suggested by Kevin Fleming on the -dev listtilghman1-11/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253113 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-17Argh.tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253004 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-17Fix bamboo compile error by calculating an integer with the same size as a ↵tilghman1-1/+11
pointer. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252980 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-16Mask out previous arguments on each nested invocation of Gosub.tilghman1-0/+164
(closes issue #16758) Reported by: wdoekes Patches: 20100316__issue16758.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/561/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252976 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-16Re-enable test_time on non-Linux.russell1-8/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252849 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-16Fix test_time on Mac OS X (and other platforms without inotify)tilghman1-2/+9
Reviewboard: https://reviewboard.asterisk.org/r/554/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252846 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-16Disable this test on non-Linux for now.russell1-0/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252759 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-13Resolve compiler warning by paying attention to system() return value.russell1-1/+4
This resolves the last compile failure on bamboo. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252229 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-12Test script to verify that timezone cache is properly removed on zonefile ↵tilghman1-0/+114
alteration. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252133 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-11Fix tests on 32-bit systems.tilghman1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251881 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10Add new unit test for stringfields.jpeeler1-0/+308
(Copied from reviewboard) Tests the following: 1. Basic allocation and setting of string fields. 2. Shrinking a string field and re-expanding it. 3. Growing the last allocation in a string field pool. 4. Setting a string to a large value such that a new string field pool must be allocated. In each part, we make sure that the string field is accurate (has the correct value in it), make sure that the 2 bytes before the string field has the correct capacity for the field, and for tests 2-4, we make sure that the string field is where we expect it to be in memory. Also tested: 5. Shrinking a string field and partially re-expanding it. 6. Setting strings in such a way as to create three separate string field pools and then removing the middle pool. There is a bug fix in the init function, which ensures the embedded_pool is set to NULL which is important for stack allocated structures. Review: https://reviewboard.asterisk.org/r/185/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251736 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10It's amazing what writing a test will find.tilghman1-0/+2
(issue #16900) Reported by: bluecrow76 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251677 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02base64 unit testdvossel1-0/+54
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@250235 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-24Add ASTERISK_FILE_VERSION macro.russell1-2/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248533 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-23Unit test for ast_str API.mmichelson1-0/+261
Review: https://reviewboard.asterisk.org/r/517 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248489 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-22Tweak copyright and author lines.russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248225 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-17Add support for GROUP_MATCH_COUNT regex matching on categoryjpeeler1-0/+159
Current support for regex matching was previously only available on the group. Also, error reporting for regex failures has been added. In addition to this feature enhancement a unit test has been written to check the regular expression logic to ensure the count operation is working as expected. (closes issue #16642) Reported by: kobaz Patches: groupmatch2.patch uploaded by kobaz (license 834) Review: https://reviewboard.asterisk.org/r/503/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@247295 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-17modified device2extension_test's categorydvossel1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@247282 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-17unit test for combined device state mapping and device to exten state mappingdvossel1-0/+288
Review: https://reviewboard.asterisk.org/r/516/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@247262 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-16Add unit test for dialplan pattern matching.mmichelson1-0/+330
This test works by reading input from arrays to build a sample dialplan. From there, patterns are attempted to be matched against said dialplan, with the expected match given. We then search in our example dialplan to see if we find a match and if what we find matches what we expected it to match. (closes issue #16809) Reported by: lmadsen Tested by: mmichelson Review: https://reviewboard.asterisk.org/r/504/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246942 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-11fixes some test description formatting inconsistencies so log file looks nicedvossel2-4/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246338 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-11astobj2 unit test and bug fixdvossel1-0/+379
A bug was discovered during the creation of the astobj2 unit test. When OBJ_MULTIPLE | OBJ_UNLINK is used, the objects being returned had a ref count issue. This patch resolves that. Review: https://reviewboard.asterisk.org/r/496/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246299 f38db490-d61c-443f-a65b-d21fe96a405b