aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2007-08-06Extend the ast_senddigit and ast_dtmf_stream API calls to allow the duration ↵file2-2/+4
of the DTMF digit(s) to be specified and make the SendDTMF application have the capability to use it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78278 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-06Change the fsk filter used in CID and TDD decode to an integer based ↵dbailey1-20/+30
implementation git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78227 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-06Merged revisions 78103 via svnmerge from mmichelson1-2/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78103 | mmichelson | 2007-08-03 15:25:22 -0500 (Fri, 03 Aug 2007) | 7 lines Changed the behavior of sip's realtime_peer function to match the corresponding way of matching for non-realtime peers. Now matches are made on both the IP address and port number, or if the insecure setting is set to "port" then just match on the IP address. In order to accomplish this, I also added a new API call, ast_category_root, which returns the first variable of an ast_category struct ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78186 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-06Merged revisions 78184 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78184 | russell | 2007-08-06 11:50:54 -0500 (Mon, 06 Aug 2007) | 5 lines Fix the return value of AST_LIST_REMOVE(). This shouldn't be causing any problems, though, because the only code that uses the return value only checks to see if it is NULL. (closes issue #10390, pointed out by mihai) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78185 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-05Merged revisions 78143 via svnmerge from russell1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78143 | russell | 2007-08-04 23:15:31 -0500 (Sat, 04 Aug 2007) | 2 lines Fix compilation failure when MALLOC_DEBUG is enabled, but DEBUG_THREADS is not ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78144 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-05Fix building res_crypto on systems that init locks with constructors.russell1-4/+4
The problem was that res_crypto now has a RWLIST named "keys". The macro for defining this list defines a function used as a constructor for the list called "init_keys". However, there was another function called init_keys in this module for a CLI command. The fix is just to prepend the generated functions with underscores. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78138 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-03Merged revisions 78095 via svnmerge from russell1-6/+64
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78095 | russell | 2007-08-03 14:39:49 -0500 (Fri, 03 Aug 2007) | 28 lines Add some improvements to lock debugging. These changes take effect with DEBUG_THREADS enabled and provide the following: * This will keep track of which locks are held by which thread as well as which lock a thread is waiting for in a thread-local data structure. A reference to this structure is available on the stack in the dummy_start() function, which is the common entry point for all threads. This information can be easily retrieved using gdb if you switch to the dummy_start() stack frame of any thread and print the contents of the lock_info variable. * All of the thread-local structures for keeping track of this lock information are also stored in a list so that the information can be dumped to the CLI using the "core show locks" CLI command. This introduces a little bit of a performance hit as it requires additional underlying locking operations inside of every lock/unlock on an ast_mutex. However, the benefits of having this information available at the CLI is huge, especially considering this is only done in DEBUG_THREADS mode. It means that in most cases where we debug deadlocks, we no longer have to request access to the machine to analyze the contents of ast_mutex_t structures. We can now just ask them to get the output of "core show locks", which gives us all of the information we needed in most cases. I also had to make some additional changes to astmm.c to make this work when both MALLOC_DEBUG and DEBUG_THREADS are enabled. I disabled tracking of one of the locks in astmm.c because it gets used inside the replacement memory allocation routines, and the lock tracking code allocates memory. This caused infinite recursion. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78096 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01Merged revisions 77869 via svnmerge from file1-2/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r77869 | file | 2007-08-01 14:56:59 -0300 (Wed, 01 Aug 2007) | 2 lines Add some fixes for building on Solaris. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77870 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-01Merged revisions 77863 via svnmerge from file1-2/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r77863 | file | 2007-08-01 14:22:35 -0300 (Wed, 01 Aug 2007) | 2 lines Extend autoconf logic to determine which version of gethostbyname_r is on the system. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Merged revisions 77831 via svnmerge from file1-2/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r77831 | file | 2007-07-31 13:17:09 -0300 (Tue, 31 Jul 2007) | 2 lines Add a flag to the speech API that allows an engine to set whether it received results or not. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77833 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-30Add support for call forwarding and timeouts to the dialing API.file1-4/+20
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77801 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-30Merged revisions 77788 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r77788 | russell | 2007-07-30 14:13:31 -0500 (Mon, 30 Jul 2007) | 10 lines (closes issue #10279) Reported by: seanbright Patches: res_agi.carefulwrite.1.4.07252007.patch uploaded by seanbright (license 71) res_agi.carefulwrite.trunk.07252007.patch uploaded by seanbright (license 71) Allow the "agi_network: yes" line to be printed out in the AGI debug output. Also, allow partial writes to be handled when writing out this line just like it is for all of the others. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77789 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-30Cleanup of res_agi, ensuring thread safety (closes issue #10288)tilghman1-3/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77787 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-24Merged revisions 76937 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r76937 | tilghman | 2007-07-24 17:12:43 -0500 (Tue, 24 Jul 2007) | 10 lines Merged revisions 76934 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r76934 | tilghman | 2007-07-24 17:11:33 -0500 (Tue, 24 Jul 2007) | 2 lines Oops, res contains the error code, not errno. I was wondering why a mutex was reporting "No such file or directory"... ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76940 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23Enhance AGI with several fixes:tilghman1-2/+5
- Makes the structures handling external AGI commands a bit more thread-safe - Makes AGI transparently work with both live and hungup channels - DeadAGI is hence no longer necessary and is deprecated - CLI bug fixes - Commands will refuse to run if the channel is dead and the command is nonsensical for dead channels. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76707 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23Merge the dialplan_aesthetics branch. Most of this patch simply converts ↵tilghman1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@76703 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23(closes issue #10271)russell4-50/+51
Reported by: snuffy Patches: doxygen-updates.diff uploaded by snuffy (license 35) Another big batch of doxygen documentation updates git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76559 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23(closes issue #10192)russell2-4/+38
Reported by: bbryant Patches: 20070720__core_debug_by_file.patch uploaded by bbryant (license 36) (with some modifications by me) Tested by: russell, bbryant This set of changes introduces the ability to set the core debug or verbose levels on a per-file basis. Interestingly enough, in 1.4, you have the ability to set core debug for a single file, but that functionality was accidentally lost in the conversion of the CLI commands to the new format. This patch improves upon what was in 1.4 by letting you set it for more than 1 file, and by also supporting verbose. *** Janitor Project *** This patch also introduces a new macro, ast_verb(), which is similar to ast_debug(). Setting the per file verbose value only works for messages that use this macro. Converting existing uses of ast_verbose() can be done like: if (option_debug > 2) ast_verbose(VERBOSE_PREFIX_3 "Something useful\n"); ... ast_verb(3, "Something useful\n"); git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76555 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23Use autoconf logic to determine byte swapping macro presence. This should ↵file1-0/+10
now also use other macros if present. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76523 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-21Add support for using /dev/urandom to get random numbers on systems that ↵file2-4/+3
support it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76296 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-20expose struct ast_ha so external code can do things such as printing itrizzo1-1/+15
(e.g. chan_sip.c in a subsequent commit). Obviously exposing the internals of a data structure is far from ideal (especially in a case like this where the implementation is very inefficient and will need to be changed at some point). On the other hand, it was also unclear what additional APIs should we provide instead, and because exposing the stucture has no impact on source and binary compatibility, this seemed to me the best option at this time. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76034 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-19After some study, thought, comparing, etc. I've backed out the previous ↵murf11-14/+89
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: http://svn.digium.com/svn/asterisk/trunk@75983 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵tilghman3-6/+32
microsecond, instead of only to the second git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵murf10-15/+15
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75400 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17Make trunk build once again.file1-5/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75381 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17Introduce ast_parse_arg() , a generic function to parse stringsrizzo1-0/+82
in a consistent way. This is meant to replace the custom code which is repeated all over the place in the various files when parsing config files, CLI entries and other string information. Right now the code supports parsing int32, uint32 and sockaddr_in with optional default values and bound checks. It contains minimal error checking, but that can be easily extended as the need arises. Being a new API i am introducing this only in trunk, though I believe that once the interface has been ironed out it might become a worthwhile addition to 1.4 as well - basically, the first time we will need to fix a piece of argument parsing code, we might as well bring in this change and use the new API instead. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75379 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Change the function name slightly... just for kpfleming!file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75260 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Add in check for the GCC attribute deprecated. It may be used soon!file1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75259 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16For my next trick I will make it so dialplan functions no longer need to ↵file1-2/+8
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: http://svn.digium.com/svn/asterisk/trunk@75255 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Applications no longer need to call ast_module_user_add and ↵file1-2/+22
ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Merge a bunch of doxygen updates to header files. This includes changes torussell26-410/+566
use the \retval tag for documenting return values, fixing various warnings when generating the documentation, and various other things. (closes issue #10203, snuffy) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-13Small improvement to the STUN support so it can be used byrizzo1-1/+16
sockets other than RTP ones. The main change is a new API function in main/rtp.c (see there for a description) int ast_stun_request(int s, struct sockaddr_in *dst, const char *username, struct sockaddr_in *answer) which can be used to send an STUN request on a socket, and optionally wait for a reply and store the STUN_MAPPED_ADDRESS into the 'answer' argument (obviously, the version that waits for a reply is blocking, but this is no different from DNS resolutions). Internally there are minor modifications to let stun_handle_packet() be somewhat configurable on how to parse the body of responses. At the moment i am not committing any change to the clients, but adding STUN client support is extremely simple, e.g. chan_sip.c could do something like this: + add a variable to store the stun server address; static struct sockaddr_in stunaddr = { 0, }; /*!< stun server address */ + add code to parse a config file of the form "stunaddr=my.stun.server.org:3478" (not shown for brevity); + right after binding the main sip socket, talk to the stun server to determine the externally visible address if (stunaddr.sin_addr.s_addr != 0) ast_stun_request(sipsock, &stunaddr, NULL, &externip); so now 'externip' is set with the externally visible address. so it is really trivial. Similarly ast_stun_request could be called when creating the RTP socket (possibly adding a struct sockaddr_in field in the struct ast_rtp to store the externalip). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75034 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-11Use linkedlist macros for UDPTL protocol list.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74703 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-11Use the linkedlists.h AST_LIST_NEXT macro for modifying the list of results.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74616 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-11Merged revisions 74572 via svnmerge from file1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r74572 | file | 2007-07-11 14:03:08 -0300 (Wed, 11 Jul 2007) | 2 lines Instead of figuring out kernel versions that have compiler.h and not... let's just use autoconf to check for it's presence. (issue #10174 reported by francesco_r) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74575 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-11Allow the native formats of a channel to influence the audio that is going ↵file1-1/+1
to the engine. The best format will try to be chosen with an ultimate fallback to signed linear if possible. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74570 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-11Change the speech API to allow passing the format through to the engine.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74551 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-10Merged revisions 74374 via svnmerge from qwell1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 (closes issue #10133) ................ r74374 | qwell | 2007-07-10 13:39:30 -0500 (Tue, 10 Jul 2007) | 13 lines Merged revisions 74373 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r74373 | qwell | 2007-07-10 13:37:23 -0500 (Tue, 10 Jul 2007) | 5 lines Use res_ndestroy on systems that have it. Otherwise, use res_nclose. This prevents a memleak on NetBSD - and possibly others. Issue 10133, patch by me, reported and tested by scw ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74375 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-10Fix building that was broken by recent monitor.h changes. Thanks Russell ↵qwell1-0/+5
for pointing this out (and pointing out what I probably did to prevent gcc from fixing it - don't ctrl-C builds) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74272 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09(closes issue #7596)qwell1-1/+1
Reported by: julien23 Patches submitted by: julien23 Add the ability to disable recording the input or output streams in res_monitor. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09Implementation of a feature that will disable "missed calls" counters on SIP ↵oej1-0/+3
phones. If the call is answered by another phone, other phones won't display the call as "missed". You can also add an option to the dial command so that you can have a "followme" scenario and not count the calls as "missed" when you cancel the call. Thanks to Ramon and Frank for feedback on this feature. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74024 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09Merged revisions 73985 via svnmerge from tilghman2-10/+13
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: http://svn.digium.com/svn/asterisk/trunk@73994 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-08Restore EXP2 and LOG2 functions, by providing mathematical identify ↵tilghman1-4/+68
functions, when the underlying C functions are not available. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73911 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-07These changes fix 10145 and 10150, a prob with BSD and exp2/log2 not ↵murf1-32/+16
existing, as well as the bootstrap needing a small upgrade for openbsd. Many thanks to mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73821 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-05In regards to changes for 9508, expr2 system choking on floating point ↵murf1-2/+4
numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73449 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-29Fix my recent change for sending large files via the http server. This coderussell1-3/+0
*must* write the file to the FILE *, and not the raw fd. Otherwise, it breaks TLS support. Thanks to rizzo for catching this! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72738 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-29Merge changes from team/russell/http_filetxferrussell2-1/+4
Handle transferring large files from the built-in http server. Previously, the code attempted to malloc a block as large as the file itself. Now it uses the sendfile() system call so that the file isn't copied into userspace at all if it is available. Otherwise, it just uses a read/write of small chunks at a time. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72701 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-28Remove the ill-advised ast_restrdupa API call and related structurestilghman1-18/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72492 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Issue 9990 - New API ast_mkdir, which creates parent directories as ↵tilghman1-0/+10
necessary (and is faster than an outcall to mkdir -p) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71040 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-21Add manager events for RTCP statistics.qwell1-1/+1
Also adds a new "reporting" permission for manager, since it can be incredibly spammy. This permission was discussed on the -dev mailing list some months back. Issue 8613, patch by johann8384, with some minor changes by me. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70961 f38db490-d61c-443f-a65b-d21fe96a405b