aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
AgeCommit message (Collapse)AuthorFilesLines
2008-01-18Convert func_odbc to use SQLExecDirect for speedtilghman1-5/+5
(closes issue #10723) Reported by: mnicholson Patches: func-odbc-direct-execute1.diff uploaded by mnicholson (license 96) Tested by: Corydon76, mnicholson, falves11 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99018 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Reset default CUT delimiter back to '-'tilghman1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99015 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Merged revisions 97697 via svnmerge from file1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97697 | file | 2008-01-10 11:07:12 -0400 (Thu, 10 Jan 2008) | 6 lines Don't try to copy the category from the group if no category exists. (closes issue #11724) Reported by: IgorG Patches: group_count.v1.patch uploaded by IgorG (license 20) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97698 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Added a new module, res_phoneprov, which allows auto-provisioning of phonestwilson1-0/+39
based on configuration templates that use Asterisk dialplan function and variable substitution. It should be possible to create phone profiles and templates that work for the majority of phones provisioned over http. It is currently only intended to provision a single user account per phone. An example profile and set of templates for Polycom phones is provided. NOTE: Polycom firmware is not included, but should be placed in AST_DATA_DIR/phoneprov/configs to match up with the included templates. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97634 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-08Merged revisions 97152 via svnmerge from file1-0/+18
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97152 | file | 2008-01-08 15:53:52 -0400 (Tue, 08 Jan 2008) | 4 lines If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel. (closes issue #11077) Reported by: m4him ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97153 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-05Now that the version.h file was getting properly regenerated every time the svnrussell1-15/+11
revision changed, every module that used the version was getting rebuilt after every svn update. This severly annoyed me pretty quickly, so I have improved the situation. Now, instead of generating version.h, main/version.c is generated. version.c includes the version information, as well as a couple of API calls for modules to retrieve the version. So now, only version.c will get rebuilt, and the main asterisk binary relinked, which is must faster than rebuilding http.c, manager.c, asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ... The only minor change in behavior here is that the version information reported by chan_sip, for example, is the version of the Asterisk core, and not necessarily the Asterisk version that the chan_sip module came from. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96717 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02Change instances of AST_NONSTANDARD_APP_ARGS(foo, bar, ',') to ↵mmichelson2-3/+3
AST_STANDARD_APP_ARGS(foo, bar) (closes issue #11668, reported and patched by mvanbaak) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95994 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-01implement "configure" checks for libiconv, and add therizzo1-0/+1
iconv dependency for func_iconv. This fixes some build issues on CYGWIN and FreeBSD and probably other platforms where libiconv is not there by default git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95624 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-31Merged revisions 95470 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r95470 | tilghman | 2007-12-31 14:27:26 -0600 (Mon, 31 Dec 2007) | 3 lines Allow the default "0" to be returned if the STAT fails (Closes issue #11659) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95490 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27This function checks more than just contexts...oej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94827 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-26Add a new dialplan function, DIALPLAN_EXISTS(), which allows you to check forrussell1-0/+106
the existence of a dialplan target. (closes issue #11579) Reported by: irroot Patches: func_dialplan2.c uploaded by irroot (license 52) -- Additional changes by me. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94799 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17Merged revisions 93180 via svnmerge from kpfleming1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r93180 | kpfleming | 2007-12-16 22:44:51 -0800 (Sun, 16 Dec 2007) | 23 lines In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html, rizzo brought up some issues related to the way that the metadata required for menuselect and the rest of the build system is extracted from the source files. Since I had a few hours to kill on an airplane today, I decided to improve this situation... so now the system caches the extracted metadata and uses it to build the menuselect 'tree' as much as it can. The result of this is that when a single source file is changed, only the metadata for that file needs to be extracted again, and the rest is used from the cache files. I also reduced the number of forked processes required to do the metadata extraction; it was actually possible to do most of what we needed in the Makefiles themselves without using any shell scripts at all! On my laptop, these changes resulted in an 80% decrease in the time required for the 'menuselect.makeopts' automatic check to occur after editing a single source file. While doing this work I also cleaned up a few minor things in the Makefiles, adding a check for 'awk' to the configure script and changed all remaining places we use 'grep' or 'awk' to use the ones found by the configure script, and changed the 'prep_tarball' script to build the menuselect metadata so that tarballs of Asterisk will include it and won't require the user to wait while it is extracted after unpacking. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93184 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14I needed to increment the numbers used on the VERBOSITY_ATLEAST calls by 1.mmichelson1-1/+1
Thanks to kpfleming for pointing this out. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93065 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate.mmichelson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93063 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14After reading Russell's e-mail to the dev list stating that checking ↵mmichelson1-1/+1
option_verbose is not equivalent to the check done by ast_verb, I wrote a macro, VERBOSITY_LEVEL, which does this check. I did a quick look in the source and used this macro in some places where option_verbose was used. I also converted some verbose messages in logger.c to use ast_verb instead of ast_verbose. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Reintroduce an optimization that was lost when converting trunk to use ast_verb.mmichelson1-2/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92976 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10Put into Makefile.moddir_rules the common instructions used torizzo1-9/+1
generate loadable and embedded module lists. Individual Makefiles now are a lot simpler, possibly as simple as this: -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps MODULE_PREFIX=cdr_ all: _all include $(ASTTOPDIR)/Makefile.moddir_rules and also more flexible because in a single directory we can combine various types of modules (app_, cdr_, func_, ... ) by simply listing them in the MODULE_PREFIX variable. The individual Makefiles can also create list of modules to be excluded by listing them in the variablel MODULE_EXCLUDE (see an example in channels/Makefile). With this change it becomes trivial to integrate a directory with locally created/modified sources into the main build. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92082 f38db490-d61c-443f-a65b-d21fe96a405b
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