summaryrefslogtreecommitdiff
path: root/funcs
AgeCommit message (Collapse)Author
2009-07-30Fixes numerous spelling errors. Patch submitted by alecdavis.David Brooks
(closes issue #15595) Reported by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21Merged revisions 207945 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r207945 | tilghman | 2009-07-21 17:38:54 -0500 (Tue, 21 Jul 2009) | 8 lines Force an error if a blank is passed to QUOTE (because the documentation states the argument is not optional). This change makes URIENCODE and QUOTE behave similarly, since the documentation states that the argument is not optional, for both. (closes issue #15439) Reported by: pkempgen Patches: 20090706__issue15439.diff.txt uploaded by tilghman (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21Merged revisions 207647 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines Ensure that user-provided CFLAGS and LDFLAGS are honored. This commit changes the build system so that user-provided flags (in ASTCFLAGS and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided by the build system itself, so that the user can effectively override the build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now be provided *either* in the environment before running 'make', or as variable assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS is no longer necessary, so they are no longer documented, but are still supported so as not to break existing build systems that supply them when building Asterisk. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-16TIMEOUT(absolute) returned negative value.David Vossel
(closes issue #15513) Reported by: ys git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-16Merged revisions 206807 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r206807 | tilghman | 2009-07-16 11:27:35 -0500 (Thu, 16 Jul 2009) | 6 lines Fix a memory leak. (closes issue #15517) Reported by: adomjan Patches: func_realtime.c-ast_variable_destroy.diff uploaded by adomjan (license 487) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-09Convert func_odbc to use ast_dummy_alloc_channel()Matthew Nicholson
Review: https://reviewboard.asterisk.org/r/290/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-02Support setting and receiving Reverse Charging Indication over ISDN PRI.Sean Bright
This is a continuation of revision 885 to LibPRI (Capture and expose the Reverse Charging Indication IE on ISDN PRI) which added the ability to get/set Reverse Charging Indication in LibPRI. This patch adds the ability to specify RCI on the outbound leg of a PRI call from within Asterisk, by prefixing the dialed number with a capital 'C' like: ...,Dial(DAHDI/g1/C4445556666) And to read it off an inbound channel: exten => s,1,Set(RCI=${CHANNEL(reversecharge)}) Thanks again to rmudgett for the thorough review. (closes issue #13760) Reported by: mrgabu Review: https://reviewboard.asterisk.org/r/303/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26Merge the new Channel Event Logging (CEL) subsystem.Russell Bryant
CEL is the new system for logging channel events. This was inspired after facing many problems trying to represent what is possible to happen to a call in Asterisk using CDR records. For more information on CEL, see the built in HTML or PDF documentation generated from the files in doc/tex/. Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard work developing this code. Also, thanks to Matt Nicholson (mnicholson) and Sean Bright (seanbright) for their assistance in the final push to get this code ready for Asterisk trunk. Review: https://reviewboard.asterisk.org/r/239/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18Clarify CUT code, and in the process, fix a bug in trunk onlyTilghman Lesher
(closes issue #15320) Reported by: chappell Patches: cut_fix.patch uploaded by chappell (license 8) cut_clarify.patch uploaded by chappell (license 8) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15More 'static' qualifiers on module global variables.Kevin P. Fleming
The 'pglobal' tool is quite handy indeed :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06Move function SYSINFO documentation to XML.Eliel C. Sardanons
Move function SYSINFO static documentation to the new AstXML form. (issue #15245) Reported by: eliel Patches: func_sysinfo_static_conversion.txt uploaded by lmadsen (license 10) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01Add INCrement and DECrement functionsTilghman Lesher
(closes issue #15025) Reported by: greenfieldtech Patches: func_math.c.patch_v4 uploaded by greenfieldtech (license 369) slightly modified by me Tested by: greenfieldtech, lmadsen git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-31Fix documentation for FIELDQTY.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-27Recorded merge of revisions 197194 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r197194 | tilghman | 2009-05-27 14:09:42 -0500 (Wed, 27 May 2009) | 5 lines Use a different determinator on whether to print the delimiter, since leading fields may be blank. (closes issue #15208) Reported by: ramonpeek Patch by me, though inspired in part by a patch from ramonpeek ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12add 'const' qualifiers in various places where they should have beenKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-11Recorded merge of revisions 193544 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r193544 | lmadsen | 2009-05-11 13:35:17 -0400 (Mon, 11 May 2009) | 7 lines Document CHANNEL(transfercapability) in CLI documentation. (issue #15073) Reported by: pkempgen Patches: 20090511__issue15073.diff.txt uploaded by tilghman (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-08Fix the spelling of UNAVAILABLE in func_devstate CLI completion.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-07Second result should not contain data from the first result.Tilghman Lesher
(closes issue #15039) Reported by: jims Patches: 20090506__issue15039.diff.txt uploaded by tilghman (license 14) Tested by: jims git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29Merge str_substitution branch.Tilghman Lesher
This branch adds additional methods to dialplan functions, whereby the result buffers are now dynamic buffers, which can be expanded to the size of any result. No longer are variable substitutions limited to 4095 bytes of data. In addition, the common case of needing buffers much smaller than that will enable substitution to only take up the amount of memory actually needed. The existing variable substitution routines are still available, but users of those API calls should transition to using the dynamic-buffer APIs. Reviewboard: http://reviewboard.digium.com/r/174/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27Make PTP DivertingLegInformation3 message behavior closer to the specifications.Richard Mudgett
* Wait for a DivertingLegInformation3 message after receiving a DivertingLegInformation1 message to complete the redirecting-to information before queuing a redirecting update to the other channel. * A DivertingLegInformation2 message should be responded to with a DivertingLegInformation3 when the COLR is determined. If the call could or does experience another redirection, you should manually determine the COLR to send to the switch by setting REDIRECTING(to-pres) to the COLR and setting REDIRECTING(to-num) = ${EXTEN}. * A DivertingLegInformation2 message must have an original called number if the redirection count is greater than one. Since Asterisk does not keep track of this information, we can only indicate that the number is not available due to interworking. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24There is no need to use the struct ast_party_connected_line.source update ↵Richard Mudgett
values. The messages sent by a technology when a connected line update is received are best determined by the current call state of the channel. The struct ast_party_connected_line.source value is really only useful as a possible tracing aid. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24Convert the ast_channel data structure over to the astobj2 framework.Russell Bryant
There is a lot that could be said about this, but the patch is a big improvement for performance, stability, code maintainability, and ease of future code development. The channel list is no longer an unsorted linked list. The main container for channels is an astobj2 hash table. All of the code related to searching for channels or iterating active channels has been rewritten. Let n be the number of active channels. Iterating the channel list has gone from O(n^2) to O(n). Searching for a channel by name went from O(n) to O(1). Searching for a channel by extension is still O(n), but uses a new method for doing so, which is more efficient. The ast_channel object is now a reference counted object. The benefits here are plentiful. Some benefits directly related to issues in the previous code include: 1) When threads other than the channel thread owning a channel wanted access to a channel, it had to hold the lock on it to ensure that it didn't go away. This is no longer a requirement. Holding a reference is sufficient. 2) There are places that now require less dealing with channel locks. 3) There are places where channel locks are held for much shorter periods of time. 4) There are places where dealing with more than one channel at a time becomes _MUCH_ easier. ChanSpy is a great example of this. Writing code in the future that deals with multiple channels will be much easier. Some additional information regarding channel locking and reference count handling can be found in channel.h, where a new section has been added that discusses some of the rules associated with it. Mark Michelson also assisted with the development of this patch. He did the conversion of ChanSpy and introduced a new API, ast_autochan, which makes it much easier to deal with holding on to a channel pointer for an extended period of time and having it get automatically updated if the channel gets masqueraded. Mark was also a huge help in the code review process. Thanks to David Vossel for his assistance with this branch, as well. David did the conversion of the DAHDIScan application by making it become a wrapper for ChanSpy internally. The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch. Review: http://reviewboard.digium.com/r/203/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-23Fix example that could fail in certain circumstancesTerry Wilson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-22Fix building of chan_h323 with gcc-3.3Jeff Peeler
There seems to be a bug with old versions of g++ that doesn't allow a structure member to use the name list. Rename list member to group_list in ast_group_info and change the few places it is used. (closes issue #14790) Reported by: stuarth git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-22Add funcs for manipulating delimited lists in the dialplanTerry Wilson
Adds PUSH and POP for appending to and retrieving/removing from the end of a list and UNSHIFT and SHIFT for insert to and retrieiving/ removing from the beginning of a list. Review: http://reviewboard.digium.com/r/230 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-08If the first column is empty, output a delimiter anyway.Tilghman Lesher
(closes issue #14848) Reported by: john8675309 Patches: 20090408__bug14848.diff.txt uploaded by tilghman (license 14) Tested by: john8675309 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-06Silly svn. These files didn't get merged over in the merge of the issue8824 ↵Mark Michelson
branch. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17Add support for the "name" option in the CHANNEL() function.Russell Bryant
Review: http://reviewboard.digium.com/r/199/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-16Fix an off-by-one error in the FILE() function, and extend FILE()'s length ↵Tilghman Lesher
parameter to work like variable substitution. Previously, FILE() returned one less character than specified, due to the terminating NULL. Both the offset and length parameters now behave identically to the way variable substitution offsets and lengths also work. (closes issue #14670) Reported by: BMC git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-19ODBC transaction supportTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Merge a large set of updates to the Asterisk indications API.Russell Bryant
This patch includes a number of changes to the indications API. The primary motivation for this work was to improve stability. The object management in this API was significantly flawed, and a number of trivial situations could cause crashes. The changes included are: 1) Remove the module res_indications. This included the critical functionality that actually loaded the indications configuration. I have seen many people have Asterisk problems because they accidentally did not have an indications.conf present and loaded. Now, this code is in the core, and Asterisk will fail to start without indications configuration. There was one part of res_indications, the dialplan applications, which did belong in a module, and have been moved to a new module, app_playtones. 2) Object management has been significantly changed. Tone zones are now managed using astobj2, and it is no longer possible to crash Asterisk by issuing a reload that destroys tone zones while they are in use. 3) The API documentation has been filled out. 4) The API has been updated to follow our naming conventions. 5) Various bits of code throughout the tree have been updated to account for the API update. 6) Configuration parsing has been mostly re-written. 7) "Code cleanup" The code is from svn/asterisk/team/russell/indications/. Review: http://reviewboard.digium.com/r/149/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Add assertions in the quest to track down a refcount leak.Tilghman Lesher
(closes issue #14485) Reported by: davevg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-31Don't increment the loop, now that incrementing is taken care of by theTilghman Lesher
decoder function. (closes issue #14363) Reported by: andrew53 Patches: func_strings_filter.patch uploaded by andrew53 (license 519) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-30Parameter position reversed in documentationTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28Fix some signedness problems in func_aes.cMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@171797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-27Adding AES_ENCRYPT and AES_DECRYPT dialplan functions. David Vossel
(closes issue #14301) Reported by: amorsen review: http://reviewboard.digium.com/r/128/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@171757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19ast_str_SQLGetData is *not* part of the ast_str API, it's part of the ↵Kevin P. Fleming
ast_odbc API and just happens to use an ast_str as the buffer; move all of it to res_odbc.c and res_odbc.h, renaming appropriately along the way fix some minor coding style issues in strings.h and add some attribute_pure annotations to functions in the ast_str API git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB ↵Kevin P. Fleming
logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC this stops modules from being linked against both sets of libraries on systems that have both installed git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13Merged revisions 168561 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines Revert unnecessary indications API change from rev 122314 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13Merged revisions 168546 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168546 | tilghman | 2009-01-13 11:48:00 -0600 (Tue, 13 Jan 2009) | 6 lines If either conditional is NULL, don't try copying it. (closes issue #14226) Reported by: caspy Patches: 20090113__bug14226.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-28Fix a typo in the XML documentation of the AUDIOHOOK_INHERIT dialplan function.Eliel C. Sardanons
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22Fix a file playback crash and explicitly initialize values in func_timeout.cMark Michelson
A crash was brought up on the bugtracker. The first run through valgrind was full of legitimate complaints of uninitialized values in func_timeout when setting a response timeout. These were fixed but the crash persisted. A second run through showed the real problem. The reference counting used for filestreams was incorrect because there were some missing increments when a frame was read from a format module. (closes issue #14118) Reported by: blitzrage Patches: 14118v2.patch uploaded by putnopvut (license 60) Tested by: blitzrage git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19Remove the verbatim tag from the author lineMark Michelson
I could have sworn I already did that before, though... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19Adding a new dialplan function AUDIOHOOK_INHERITMark Michelson
This function is being added as a method to allow for an audiohook to move to a new channel during a channel masquerade. The most obvious use for such a facility is for MixMonitor when a transfer is performed. Prior to the addition of this functionality, if a channel running MixMonitor was transferred by another party, then the recording would stop once the transfer had completed. By using AUDIOHOOK_INHERIT, you can make MixMonitor continue recording the call even after the transfer has completed. It has also been determined that since this is seen by most as a bug fix and is not an invasive change, this functionality will also be backported to 1.4 and merged into the 1.6.0 branches, even though they are feature-frozen. (closes issue #13538) Reported by: mbit Patches: 13538.patch uploaded by putnopvut (license 60) Tested by: putnopvut Review: http://reviewboard.digium.com/r/102/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16Add timezone to the possible fields in a timespec.Tilghman Lesher
(closes issue #14028) Reported by: mostyn Patches: timezone-v2.patch uploaded by mostyn (license 398) (with additional code guideline fixes and a memory leak fix by me - license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11Merged revisions 163253 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r163253 | russell | 2008-12-11 15:46:29 -0600 (Thu, 11 Dec 2008) | 8 lines Fix some observed slowdowns in dialplan processing. The change is to remove autoservice usage from dialplan functions that do not need it because they do not perform operations that potentially block. (closes issue #13940) Reported by: tbelder ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09Avoid allocating memory for a thread that don't need it. Also, this memory ↵Eliel C. Sardanons
was not being freed until the main thread ends. (That is never). (closes issue #14040) Reported by: eliel Patches: func_odbc.c.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-04Jcolp pointed out that num will also match numberRichard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160856 65c4cc65-6c06-0410-ace0-fbb531ad65f3