aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
AgeCommit message (Collapse)AuthorFilesLines
2007-12-09normalize subdirs' Makefile by using ASTTOPDIR and not .. to referencerizzo1-1/+1
the top level directory. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92022 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29Merged revisions 90145 via svnmerge from russell1-2/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90145 | russell | 2007-11-28 18:20:34 -0600 (Wed, 28 Nov 2007) | 5 lines This set of changes is to make some callerID handling thread-safe. The ast_set_callerid() function needed to lock the channel. Also, the handlers for the CALLERID() dialplan function needed to lock the channel when reading or writing callerid values directly on the channel structure. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90146 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27Merged revisions 89631 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89631 | tilghman | 2007-11-27 09:38:03 -0600 (Tue, 27 Nov 2007) | 3 lines Default result of STAT should be "0" not "". Reported via the -users mailing list, fixed by me. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89632 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22remove some useless includesrizzo5-19/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89521 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo15-15/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19Make the SYSINFO documentation reflect which options were compiled inrussell1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89439 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19remove unnecessary headersrizzo1-7/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89431 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19remove some unnecessary includes.rizzo2-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89430 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo27-30/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19Adding SYSINFO() dialplan function for retrieval of system informationmmichelson1-0/+122
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89421 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17more removal of duplicate #include linesrizzo2-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89349 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16remove a bunch of duplicate includesrizzo4-4/+0
Reproduce with grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo32-138/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Based on a note in asterisk-dev by Brian Capouch, I determined I too ↵murf1-1/+1
agressive in not initializing arrays passed to pbx_substitute_variables_xxxx; I reviewed the code (again) and hopefully found every possible spot where substitute_variables is called conditionally, and made sure the char array involved was set to a null string. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89186 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08Make func_env build again.file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89121 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08Add the FILE() dialplan function and deprecate ReadFile.tilghman1-0/+61
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89114 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08improve linked-list macros in two ways:kpfleming1-1/+1
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01This commits the performance mods that give the priority processing engine ↵murf4-7/+3
in the pbx, a 25-30% speed boost. The two updates used, are, first, to merge the ast_exists_extension() and the ast_spawn_extension() where they are called sequentially in a loop in the code, into a slightly upgraded version of ast_spawn_extension(), with a few extra args; and, second, I modified the substitute_variables_helper_full, so it zeroes out the byte after the evaluated string instead of demanding you pre-zero the buffer; I also went thru the code and removed the code that zeroed this buffer before every call to the substitute_variables_helper_full. The first fix provides about a 9% speedup, and the second the rest. These figures come from the 'PIPS' benchmark I describe in blogs, conf. reports, etc. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-28Add a simple dialgroup function. By taking one of the simpler uses of Queuetilghman1-0/+224
away from Queue, we simplify the lives of people who do not need all the bells and whistles. Also, this is part of the functions that people need to reimplement Queue in the dialplan, as a set of logic, rather than as a single app with hundreds of options. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87264 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-28Merged revisions 87262 via svnmerge from tilghman4-4/+92
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87262 | tilghman | 2007-10-28 08:46:55 -0500 (Sun, 28 Oct 2007) | 7 lines Add autoservice to several more functions which might delay in their responses. Also, make sure that func_odbc functions have a channel on which to set variables. Reported by russell Fixed by tilghman Closes issue #11099 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87263 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-27Make sure a channel exists before attempting to start or stop channelrussell2-7/+17
autoservice in func_lock and func_shell. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87233 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26Merged revisions 87120 via svnmerge from tilghman1-2/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87120 | tilghman | 2007-10-26 08:54:30 -0500 (Fri, 26 Oct 2007) | 7 lines The addition of autoservice to func_curl additionally made func_curl dependent on the existence of a channel, with no real reason. This should make func_curl once again work without a channel. Reported by jmls. Fixed by tilghman. Closes issue #11090 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87121 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26Use the same delimited character as the FILTER function in FIELDQTY and CUT.tilghman2-95/+12
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87103 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-23Merged revisions 86902 via svnmerge from murf1-2/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r86902 | murf | 2007-10-23 15:18:08 -0600 (Tue, 23 Oct 2007) | 1 line closes issue #11052 -- where nothing after the ? will allow un-initialized variable values to corrupt and crash asterisk on 64-bit platforms ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86903 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵qwell1-1/+1
didn't make much sense git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19Convert NEW_CLI to AST_CLI.qwell1-1/+1
Closes issue #11039, as suggested by seanbright. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-16Merged revisions 85850 via svnmerge from file1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85850 | file | 2007-10-16 11:52:22 -0300 (Tue, 16 Oct 2007) | 4 lines Check to make sure a value has been given to the VMCOUNT dialplan function. (closes issue #10996) Reported by: marsosa ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85851 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15Document my changes from Fridaytilghman1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85633 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-12Enable ranges, hexadecimal, octal, and special backslashed characters for ↵tilghman1-2/+103
the FILTER function git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85522 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11See if I can fix this borked ANI2 code I addedmattf1-7/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85498 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-11Add ANI2 support to func_calleridmattf1-0/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85496 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-30* The documentation for the LOCK() function says that it will block for up torussell1-3/+10
3 seconds while waiting on a lock when other locks are currently held to avoid deadlocks. Change the code to reflect this. * Since trying to grab a lock may block for some time, put the channel in autoservice so that audio is still read from the channel and that any active generators on the channel don't pause. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84143 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19put the channel in autoservice when executing func_shellrussell1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83181 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19Merged revisions 83177 via svnmerge from russell1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83177 | russell | 2007-09-19 14:34:25 -0500 (Wed, 19 Sep 2007) | 4 lines Using curl can take a substantial amount of time, so the channel should be autoserviced while waiting for it to complete. (closes issue #10725, reported by mnicholson) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83178 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12Merged revisions 82285 via svnmerge from tilghman1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82285 | tilghman | 2007-09-12 15:12:06 -0500 (Wed, 12 Sep 2007) | 4 lines Working on issue #10531 exposed a rather nasty 64-bit issue on ast_mktime, so we updated the localtime.c file from source. Next we'll have to write ast_strptime to match. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82290 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06Add EXTENSION_STATE() function that can retrieve the state of an extension thatrussell1-0/+135
has a hint. (closes issue #10635, adamgundy) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81813 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06Rename the DEVSTATE() function to DEVICE_STATE() to better conform to how otherrussell1-11/+11
functions are named. (inspired by issue #10635) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81784 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06Merge HINT() dialplan function from my sandbox branch into trunk. This functionrussell1-0/+63
will let you retrieve the list of devices or name associated with a hint. (inspired by issue #10635) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81783 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-03Merged revisions 81415 via svnmerge from tilghman1-14/+17
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81415 | tilghman | 2007-08-31 14:16:52 -0500 (Fri, 31 Aug 2007) | 2 lines The IF() function was not allowing true values that had embedded colons (closes issue #10613) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81431 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-28Add proper channel locking around the uses of datastore_add and _find. Thererussell1-1/+6
are still more places in the tree that I have not yet changed if someone wants to go through and find the places they are used without the channel locked. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81262 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-28* Constify the uid field of channel datastoresrussell1-2/+2
* Convert some spaces to tabs in func_volume * Add a note in channel.h making it clear that none of the datastore API calls lock the channel they are given, so the channel should be locked before calling the functions that take a channel argument. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81260 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23Merged revisions 80547 via svnmerge from russell1-5/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80547 | russell | 2007-08-23 14:29:44 -0500 (Thu, 23 Aug 2007) | 3 lines Revert very broken fix for issue #10540 ... none of these values take ms so I don't know what I was thinking ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80550 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23Merged revisions 80539 via svnmerge from russell1-1/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80539 | russell | 2007-08-23 14:21:53 -0500 (Thu, 23 Aug 2007) | 4 lines Fix func_timeout to take values in floating point so 1.5 actually means 1.5 seconds instead of being rounded. (closes issue #10540, reported by spendergrass, patch by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80540 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-21use ast_atomic_fetchadd_int for incrementing resultcountrussell1-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80226 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17store and destroy implementations for realtime pgsql (closes issue #10372)tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79859 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Revise dialplan locks to permit multiple locks per channel, but with ↵tilghman1-36/+130
deadlock avoidance git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79813 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-2/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-10Store custom device states in astdb so that they will persist a restart. As arussell1-48/+35
side benefit, this simplifies the code a bit, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79098 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-10Merge a set of device state improvements from team/russell/events.russell1-1/+1
The way a device state change propagates is kind of silly, in my opinion. A device state provider calls a function that indicates that the state of a device has changed. Then, another thread goes back and calls a callback for the device state provider to find out what the new state is before it can go send it off to whoever cares. I have changed it so that you can include the state that the device has changed to in the first function call from the device state provider. This removes the need to have to call the callback, which locks up critical containers to go find out what the state changed to. This change set changes the "simple" device state providers to use the new method. This includes parking, meetme, and SLA. I have also mostly converted chan_agent in my branch, but still have some more things to think through before presenting the plan for converting channel drivers to ensure all of the right events get generated ... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79027 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-08Merge audiohooks branch into trunk. This is a new API for developers to ↵file1-0/+163
listen and manipulate the audio going through a channel. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78649 f38db490-d61c-443f-a65b-d21fe96a405b