Joshua Colp [Wed, 30 Aug 2006 03:16:03 +0000 (03:16 +0000)]
Use an API call (ast_rtp_get_bridged) to return the RTP stream we are bridged to, and also use it in chan_sip so we know to ignore the no RTP activity checking
Joshua Colp [Wed, 30 Aug 2006 01:29:59 +0000 (01:29 +0000)]
If the RTP stack is already being operated in callback mode, then suspend it upon switching to P2P callback bridging. Once P2P callback bridging has ended, then restore callback mode.
Joshua Colp [Wed, 30 Aug 2006 01:22:46 +0000 (01:22 +0000)]
This is the last round of RTP bridge optimizations. Basically it introduces a way that under a straight bridge (ie: no transcoding and no DTMF detection) the core is not touched at all and no frames pass through (not even null frames). This is accomplished by stealing the file descriptors from the channel and using the provided IO context with a custom callback. When a channel is placed on hold this bridge is broken so audio can flow from the core to the other side. When a channel is off hold this bridge is re-established.
Kevin P. Fleming [Tue, 29 Aug 2006 23:33:59 +0000 (23:33 +0000)]
make menuselect configure process be silent when possible
don't use #ifdef inside a macro call... it appears various versions of gcc have bugs related to this
Steve Murphy [Tue, 29 Aug 2006 23:08:42 +0000 (23:08 +0000)]
This change fixes bug 7820. Way back in April this bug was reintroduced, it appears, when a bunch of restructuring was done. This code was basically left out during the restructuring. In the case of the failure in 7820, it is trying to match the extension _x. with _x., and failing, because the 'x' should only match 0 thru 9. I **could** upgrade the code so that that N,Z, and X match not only their intended number ranges, but also N,Z,and X respectively. And, moreover, X could also match N and Z, and Z could also match N. I have no idea why this bug took so long to turn up. I have no idea what a more thorough treatment of the code would do to working code, either. So I left it as it ***was***.
Russell Bryant [Tue, 29 Aug 2006 20:50:36 +0000 (20:50 +0000)]
Merge team/russell/frame_caching
There are some situations in Asterisk where ast_frame and/or iax_frame
structures are rapidly allocatted and freed (at least 50 times per second
for one call).
This code significantly improves the performance of ast_frame_header_new(),
ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping
a thread-local cache of these structures and using frames from the cache
whenever possible instead of calling malloc/free every time.
This commit also converts the ast_frame and iax_frame structures to use the
linked list macros.
Kevin P. Fleming [Sat, 26 Aug 2006 17:05:38 +0000 (17:05 +0000)]
ensure that cross-compiler info is removed from the enviroment before configuring menuselect
ensure that the user's LDFLAGS take precedence when linking the final binary
Kevin P. Fleming [Sat, 26 Aug 2006 16:45:35 +0000 (16:45 +0000)]
more optimizations for embedded systems:
when LOADABLE_MODULES is off, don't export symbols from the main binary
when LOADABLE_MODULES is off, and the compiler/linker support it, strip out code not used in the final binary
Kevin P. Fleming [Fri, 25 Aug 2006 16:14:00 +0000 (16:14 +0000)]
instead of reverting this supposedly 'stupid' change, let's try to get it working properly
also eliminate a warning from dlopen() because some flags were missing on the second dlopen() call
Russell Bryant [Thu, 24 Aug 2006 19:53:43 +0000 (19:53 +0000)]
Merged revisions 40994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r40994 | russell | 2006-08-24 15:41:26 -0400 (Thu, 24 Aug 2006) | 11 lines
Fix a few issues related to the handling of channel variables
- in pbx_builtin_serialize_variables(), the variable list traversal would stop
on a variables with empty name/values, which is not appropriate
- When removing the GROUP variables, use AST_LIST_REMOVE_CURRENT instead of
AST_LIST_REMOVE
- During masquerading, when copying the variables list from one channel to the
other, using AST_LIST_INSERT_TAIL is not valid for appending a whole list.
It leaves the tail pointer of the list invalid. Introduce a new macro,
AST_LIST_APPEND_LIST that appends a list properly.
(issue #7802, softins)
Jason Parker [Thu, 24 Aug 2006 01:21:41 +0000 (01:21 +0000)]
Okay, there are 3 reasons why I'm doing this.
1) Solaris sed doesn't have -r, which means things like \s and \S don't work.
2) GNU sed version 4.1.2 failed on a very simple test
echo "Test Test" | sed -r -e 's/\s/x/g'
should have returned "TestxxxTest", but did not (however, 4.1.4 did?).
3) The CFLAGS were never set, so that entire line actually did nothing. Now it's useful again.
Joshua Colp [Wed, 23 Aug 2006 20:39:23 +0000 (20:39 +0000)]
Add a lasting legacy from 1082... a Macro to do a pre acknowledgement message with option to reject. Thanks to patbaker82 for this. (issue #1082 reported by damin)
Kevin P. Fleming [Wed, 23 Aug 2006 19:28:13 +0000 (19:28 +0000)]
use RTLD_NOLOAD if it's available to make loading dynamic modules a little faster and less resource-intensive
also, keep trying to dlclose() a module until it actually goes away, since it may have other modules it brought in when it was loaded (thanks PCadach for pointing this problem out to me)
Kevin P. Fleming [Tue, 22 Aug 2006 21:57:16 +0000 (21:57 +0000)]
when loadable modules are disabled, if someone tries to load a module that does not exist, don't dereference a NULL pointer, just stop trying to load it...
Kevin P. Fleming [Mon, 21 Aug 2006 20:12:18 +0000 (20:12 +0000)]
use a customized configure macro to tell the script that uCLinux does not have fork() that works
drop all startup options and code related to forking if it is not available
Russell Bryant [Mon, 21 Aug 2006 19:42:29 +0000 (19:42 +0000)]
- simplify and improve astmm by using thread storage instead of a dynamic
allocation and free on every call of the function for preparing the string
that will be appended. Then, use the ast_dynamic_str() code instead of the
open coded version that is appended to when waiting for it to be delivered.
- use for loops for list traversals
- convert the manager sessions list to use list macros
- use atomic operations for num_sessions and usecounts
- convert some defines to the equivalent enum
Russell Bryant [Mon, 21 Aug 2006 19:35:28 +0000 (19:35 +0000)]
- use the atomic operations for incrementing the unique int
- free the string fields allocation if ast_create_channel() failes to open the
alert pipe
- formatting tweaks
Joshua Colp [Mon, 21 Aug 2006 19:33:42 +0000 (19:33 +0000)]
Allow an offset for SIP_HEADER so you can get more then 1 header of the same name if they exist. Why someone would want to grab something like Via headers from dialplan I don't exactly know, but okay. (issue #7563 reported by Corydon76)
Russell Bryant [Mon, 21 Aug 2006 19:18:09 +0000 (19:18 +0000)]
various cleanups, including ...
- Create an astmm_log() macro that logs the same message to both stderr as well
as the mmlog file if it is open instead of duplicating the code everywhere.
- Use for loops for list traversals instead of while loops
- reduce nesting
- ensure locking isn't put around more than is necessary
- localize a struct definition
- change the limit of the path to the mmlog to PATH_MAX instead of 80
Russell Bryant [Mon, 21 Aug 2006 17:22:24 +0000 (17:22 +0000)]
- use a common error message in all of the memory allocation macros
- add ast_asprintf() and ast_vasprintf()
- tweak doxygen comments
- simplify the definition of a flag macro
Kevin P. Fleming [Mon, 21 Aug 2006 02:11:39 +0000 (02:11 +0000)]
merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
- support for embedded modules
- support for static builds
- simpler cross-compilation support
- simpler module/loader interface (no exported symbols)