summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2008-01-05Now that the version.h file was getting properly regenerated every time the svnRussell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@96717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-04[commit message]Kevin P. Fleming
(closes issue #10393) Reported by: tzafrir Patches: chan_alarm_asterisk.diff uploaded by tzafrir (license 46) (modified by me and added configure script support) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03Document recent API additionTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02Don't use AST_C_DEFINE_CHECK for the two pthread things that may not ↵Joshua Colp
actually be definitions, they could be enums for example. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02Fix a typo in a comment. AST_STANDARD_APP_ARGS uses ',' as the separator,Mark Michelson
not '|'. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02improve AC_C_DEFINE_CHECK to not try to evaluate the macro being checked ↵Kevin P. Fleming
for, but just check for its existence finish implementation of check for Zaptel HWGAIN support add check for Zaptel ECHOCANCEL_PARAMS support git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02and now just to keep the libresample party going... if the functions from ↵Kevin P. Fleming
libresample are going to be in the main Asterisk binary, it makes sense for the header that defines them to be available without any special CFLAGS and to out-of-tree modules building against /usr/include/asterisk git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02There are three instances of the module definition macros,Luigi Rizzo
which make maintaining this file very error prone. This commit merges the embedded and !embedded versions, and fixes the C++ version. Eventually we should move to a single version of the macro. Too bad C++ doesn't like the C-style struct initializers .foo = some_value git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-01implement "configure" checks for libiconv, and add theLuigi Rizzo
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: https://origsvn.digium.com/svn/asterisk/trunk@95624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31fix a spelling error in a commentRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31Add CV_STRINGFIELD() macro. This lets you set a config variable to a string ↵Russell Bryant
field. (from team/russell/chan_console) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31Regenerate configure script to include check for portaudio.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27Merged revisions 94828-94829 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94828 | russell | 2007-12-27 08:33:21 -0600 (Thu, 27 Dec 2007) | 9 lines Change ast_translator_best_choice() to only pay attention to audio formats. This fixes a problem where Asterisk claims that a translation path can not be found for channels involving video. (closes issue #11638) Reported by: cwhuang Tested by: cwhuang Patch suggested by cwhuang, with some additional changes by me. ........ r94829 | russell | 2007-12-27 08:44:29 -0600 (Thu, 27 Dec 2007) | 2 lines Use the constant that I really meant to use here ... ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20add some macros to simplify parsing the config file,Luigi Rizzo
see description in config.h . They are a variant of the set of macros i used in chan_oss.c, structured in a way to be more robust to the presence of spurious ';' - basically, they define wrappers for 'do {' and '} while (0)', plus some helper functions to deal with simple cases such as ast_copy_string, ast_malloc, strtoul, ast_true ... The prefix (CV_ as 'Config Variable') tries to be easy to remember and has been chosen to not conflict with other existing macros in the tree. For the time being, I have only updated the three source files in the tree that used the old M_* macros. Hopefully, more files will be converted. NOTE: I understand that inventing my own dialect of C is generally wrong; however, the lack of adequate support in the language encourages lazy programming practices (such as ignoring errors, bounds, etc.) and this increases the chance of vulnerability in the code, especially because we are parsing user input here. Hopefully, these macros and the use of ast_parse_arg (in config.h) should encourage the programmer to write more robust code. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20modify http://svn.digium.com/view/asterisk?view=rev&rev=93603Luigi Rizzo
so that paths and filename are writable by asterisk.c without causing segfaults. This involves defining the variables as const char *, and having them point to as static, writable buffer defined in asterisk.c On passing, fix some errors in using these variables in some files in utils/ , and in res/snmp/agent.c which was redefining a variable without using paths.h (not applicable to 1.4) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19Merged revisions 94077 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94077 | russell | 2007-12-19 16:48:48 -0600 (Wed, 19 Dec 2007) | 4 lines Check for the existence of the soxmix application on the target platform and have the result available in autoconfig.h. (part of issue #11589) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19Add a couple of new time API calls - ast_tvdiff_sec and ast_tvdiff_usecRussell Bryant
(closes issue #11270) Reported by: dimas Patches: tvdiff_us-4.patch uploaded by dimas (license 88) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19Add a new API function, written at least twice in app_voicemail.cLuigi Rizzo
and likely in other places too. This is quite useful when placing mail/html stuff in config files. /*! \brief Convert some C escape sequences (\b\f\n\r\t) into the equivalent characters. \brief s The string to be converted (will be modified). \return The converted string. */ char *ast_unescape_c(char *s); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19add support for PARSE_DOUBLE, and remove identifiers forLuigi Rizzo
types not supported (INT16 and UINT16) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19Properly document AST_EXT_TOOL_CHECK() and use it to check forLuigi Rizzo
NETSMP and GTK (GTK is not used thoug). AST_EXT_TOOL_CHECK() could be used for checking curl status as well, perhaps with a small addition because we currently seem to require a curl version greater than X.Y.Z Add a NETSMP_INCLUDE entry in makeopts.in We don't have yet any macros for using pkg-config to check for a specific package (right now there is only gtk2+ in the category). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18remove a leftover line with only a '#' (wonder whyLuigi Rizzo
the compiler does not complain!) and variables that are only used in asterisk.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18make configuration variable const so they are not accidentallyLuigi Rizzo
modified. This requires casting the strings in asterisk.c when writing to them, so we do it through a macro to do it consistently. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18minor cleanupsKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17Merged revisions 93336 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r93336 | tilghman | 2007-12-17 15:12:42 -0600 (Mon, 17 Dec 2007) | 6 lines Today is tomorrow's yesterday, and yesterday's tomorrow is today, and tomorrow's tomorrow is the day after tomorrow, so who cares if you recycle anyway? If this confuses you, that's nothing compared to what this fixes. ;-) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17Merged revisions 93180 via svnmerge from Kevin P. Fleming
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: https://origsvn.digium.com/svn/asterisk/trunk@93184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-16HUGE improvements to QoS/CoS handling by IgorGOlle Johansson
- Refer to the proper documentation - Implement separate signalling/media QoS/CoS in many channels using RTP - Improve warnings and verbose messages - Deprecate some old settings Minor modifications by me, a big effort from IgorG. Thanks! Reported by: IgorG Patches: qoscleanup-89394-4-trunk.patch uploaded by IgorG (license 20) Tested by: IgorG (closes issue #11145) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-15Typo fixed earlier, that wasn't a typo after all.Olle Johansson
Didn't a clever guy once say "Compile before you commit" ? :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-15 fix a typo from revision 93138Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14include mmap header if detected by configureLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14After reading Russell's e-mail to the dev list stating that checking ↵Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@93042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14Merged revisions 92875 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92875 | mmichelson | 2007-12-13 19:24:06 -0600 (Thu, 13 Dec 2007) | 7 lines When compiling with DETECT_DEADLOCKS, don't spam the CLI with messages about possible deadlocks. Instead just print the intended single message every five seconds. (closes issue 11537, reported and patched by dimas) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13Move usage of the old LOCAL_USER_* macros to the new ast_module_user_* ↵Joshua Colp
functions in a few documentation places. (closes issue #11533) Reported by: IgorG Patches: oldmacroclean.v1.diff uploaded by IgorG (license 20) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12Merged revisions 92463 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92463 | tilghman | 2007-12-12 10:52:56 -0600 (Wed, 12 Dec 2007) | 4 lines Test directly for the API that fixed AST-2007-026, to ensure that older versions of PostgreSQL are no longer acceptable. (Closes issue #11526) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11Doxygen updates, formatting. Olle Johansson
misdn stuff needs a lot of doxygenification (Hello, Qwell :-) ) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11Trunk build would fail due to the nonexistence of zaptel hwgainMark Michelson
structures missing. Patched configure to check for this stuff and put a #ifdef around the offending code in chan_zap. Thanks to file for overseeing this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11* In unaligned.h, remove some unnecessary casts and mark the arg of the Russell Bryant
get_unaligned functions as const * In event.c, use get_unaligned_uint32() in a couple of places to fix issues on architectures that don't allow unaligned access git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11A lot of doxygen updatesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11Doxygen updatesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-08some platforms (e.g. FreeBSD4) need netinet/in.h to be includedLuigi Rizzo
before arpa/inet.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07Merged revisions 91828 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r91828 | russell | 2007-12-07 15:17:24 -0600 (Fri, 07 Dec 2007) | 6 lines Fix another bug in the DEBUG_THREADS code. The ast_mutex_init() function had the mutex attribute object marked as static. This means that multiple threads initializing locks at the same time could step on each other and end up with improperly initialized locks. (found when tracking down locking issues related to issue #11080) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07Merged revisions 91826 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r91826 | russell | 2007-12-07 15:11:08 -0600 (Fri, 07 Dec 2007) | 6 lines I love fixing lock related errors in the lock debugging code. That's about as ironic as it gets in Asterisk programming land. Anyway, I spotted this bug while trying to track down why systems are locking up and acting weird in issue #11080. The mutex attribute object was marked as static in this function when it should not have been. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07Add count of total number of calls processed by asterisk during it's lifetime.Jason Parker
Add number of total calls and current calls to SNMP. Closes issue #10057, patch by jcmoore. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06Merged revisions 91366 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r91366 | oej | 2007-12-06 13:54:11 +0100 (Tor, 06 Dec 2007) | 4 lines Make sure logger is reloaded at general reload in the cli. (Discovered during Asterisk training in Portugal) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05Change cdr_manager to use a "CDR" level, rather than the (overcrowded) ↵Tilghman Lesher
"call" level. (Closes issue #11015) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05Merged revisions 91070 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r91070 | russell | 2007-12-04 18:35:31 -0600 (Tue, 04 Dec 2007) | 11 lines Fix some crashes in chan_iax2 that were reported as happening on Mac systems. It turns out that the problem was the Mac version of the ast_atomic_fetchadd_int() function. The Mac atomic add function returns the _new_ value, while this function is supposed to return the old value. So, the crashes happened on unreferencing objects. If the reference count was decreased to 1, ao2_ref() thought that it had been decreased to zero, and called the destructor. However, there was still an outstanding reference around. (closes issue #11176) (closes issue #11289) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04Add support for monitoring MWI on FXO lines.Russell Bryant
This introduces two new options for zapata.conf: mwimonitor and mwimonitornotify. The mwimonitor option enables MWI monitoring. When the MWI state on a line changes, then the script specified by mwimonitornotify will be executed for custom handling of the state change, similar to the externnotify option of voicemail.conf. Also, when the MWI state on an FXO line changes, an internal Asterisk event is generated to indicate the new state of the associated mailbox. That may, any module that cares about MWI information will get notified and can handle it just as if app_voicemail had sent this notification. (BE-253, original patch from markster, with some minor modifications by me to add comments, documentation, and internal event support) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04Merged revisions 90735 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90735 | mmichelson | 2007-12-03 17:12:17 -0600 (Mon, 03 Dec 2007) | 22 lines A big one... This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop. This is accomplished by creating a datastore on the calling channel which has a linked list of all devices dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore is detached from the channel and destroyed. This change also introduces some side effects to the code which I shall enumerate here: 1. Datastore inheritance has been backported from trunk into 1.4 2. A large chunk of code has been removed from app_dial. This chunk is the section of code which handles the call forward case after the channel has been requested but before it has been called. This was removed because call-forwarding still works fine without it, it makes the code less error-prone should it need changing, and it made this set of changes much less painful to just have the forwarding handled in one place in each module. 3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore which is attached to the channel may be created and attached in either app_dial or app_queue, so they need a common place to find the datastore info. This approach was taken in case similar datastores are needed in the future, there will be a common place to add them. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03Merged revisions 90753 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90753 | tilghman | 2007-12-03 17:50:51 -0600 (Mon, 03 Dec 2007) | 5 lines Solaris requires the inclusion of sys/loadavg.h for getloadavg(). Reported by: snuffy Patch by: snuffy,tilghman (Closes issue #11430) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03Add AGI commands for speech recognition. These mirror the dialplan ↵Joshua Colp
applications mostly but present the information in a nicer fashion. The SPEECH RECOGNIZE command for example will return the results instead of having to query the dialplan functions. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90656 65c4cc65-6c06-0410-ace0-fbb531ad65f3