summaryrefslogtreecommitdiff
path: root/funcs
AgeCommit message (Collapse)Author
2007-11-12Based on a note in asterisk-dev by Brian Capouch, I determined I too ↵Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@89186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08Make func_env build again.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08Add the FILE() dialplan function and deprecate ReadFile.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08improve linked-list macros in two ways:Kevin P. Fleming
- 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: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01This commits the performance mods that give the priority processing engine ↵Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@88166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-28Add a simple dialgroup function. By taking one of the simpler uses of QueueTilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@87264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-28Merged revisions 87262 via svnmerge from Tilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@87263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-27Make sure a channel exists before attempting to start or stop channelRussell Bryant
autoservice in func_lock and func_shell. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26Merged revisions 87120 via svnmerge from Tilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@87121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26Use the same delimited character as the FILTER function in FIELDQTY and CUT.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-23Merged revisions 86902 via svnmerge from Steve Murphy
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: https://origsvn.digium.com/svn/asterisk/trunk@86903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵Jason Parker
didn't make much sense git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19Convert NEW_CLI to AST_CLI.Jason Parker
Closes issue #11039, as suggested by seanbright. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16Merged revisions 85850 via svnmerge from Joshua Colp
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: https://origsvn.digium.com/svn/asterisk/trunk@85851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15Document my changes from FridayTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-12Enable ranges, hexadecimal, octal, and special backslashed characters for ↵Tilghman Lesher
the FILTER function git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11See if I can fix this borked ANI2 code I addedMatthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11Add ANI2 support to func_calleridMatthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-30* The documentation for the LOCK() function says that it will block for up toRussell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@84143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19put the channel in autoservice when executing func_shellRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19Merged revisions 83177 via svnmerge from Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@83178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12Merged revisions 82285 via svnmerge from Tilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@82290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-06Add EXTENSION_STATE() function that can retrieve the state of an extension thatRussell Bryant
has a hint. (closes issue #10635, adamgundy) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-06Rename the DEVSTATE() function to DEVICE_STATE() to better conform to how otherRussell Bryant
functions are named. (inspired by issue #10635) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-06Merge HINT() dialplan function from my sandbox branch into trunk. This functionRussell Bryant
will let you retrieve the list of devices or name associated with a hint. (inspired by issue #10635) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-03Merged revisions 81415 via svnmerge from Tilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@81431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28Add proper channel locking around the uses of datastore_add and _find. ThereRussell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@81262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28* Constify the uid field of channel datastoresRussell Bryant
* 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: https://origsvn.digium.com/svn/asterisk/trunk@81260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23Merged revisions 80547 via svnmerge from Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@80550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23Merged revisions 80539 via svnmerge from Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@80540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-21use ast_atomic_fetchadd_int for incrementing resultcountRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17store and destroy implementations for realtime pgsql (closes issue #10372)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Revise dialplan locks to permit multiple locks per channel, but with ↵Tilghman Lesher
deadlock avoidance git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Don't reload a configuration file if nothing has changed.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10Store custom device states in astdb so that they will persist a restart. As aRussell Bryant
side benefit, this simplifies the code a bit, too. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10Merge a set of device state improvements from team/russell/events.Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@79027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08Merge audiohooks branch into trunk. This is a new API for developers to ↵Joshua Colp
listen and manipulate the audio going through a channel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31Add some documentation detailing an aspect of dialplan functions, as ↵Tilghman Lesher
requested by Russell git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31Add func_lock, which creates dialplan mutexes, and note that the Macro apps ↵Tilghman Lesher
are now deprecated. (Closes issue #10264) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31Mostly cleanup of documentation to substitute the pipe with the comma, but a ↵Tilghman Lesher
few other formatting cleanups, too. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26Do a massive conversion for using the ast_verb() macroRussell Bryant
(closes issue #10277, patches by mvanbaak) Basically, this changes ... if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3, "Something\n"); to ... ast_verb(3, "Something\n"); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23Merge the dialplan_aesthetics branch. Most of this patch simply converts ↵Tilghman Lesher
applications using old methods of parsing arguments to using the standard macros. However, the big change is that the really old way of specifying application and arguments separated by a comma will no longer work (e.g. NoOp,foo|bar). Instead, the way that has been recommended since long before 1.0 will become the only method available (e.g. NoOp(foo,bar). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19After some study, thought, comparing, etc. I've backed out the previous ↵Steve Murphy
universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵Tilghman Lesher
microsecond, instead of only to the second git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18Clean up func_curl a bit.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵Steve Murphy
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16For my next trick I will make it so dialplan functions no longer need to ↵Joshua Colp
call ast_module_user_add and ast_module_user_remove. These are now called in the ast_func_read and ast_func_write functions outside of the module. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16It is no longer required for each module that deals with a channel to call ↵Joshua Colp
ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16Cast the 2nd argument to iconv() to a void *, as some systems define it as aRussell Bryant
(const char *), while others define it as (char *). This is done to suppress compiler warnings about it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09Merged revisions 73985 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r73985 | tilghman | 2007-07-08 23:03:20 -0500 (Sun, 08 Jul 2007) | 2 lines Doxygen formatting fixes; fixes errors while 'make progdocs'. (Closes issue #10104) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73994 65c4cc65-6c06-0410-ace0-fbb531ad65f3