Russell Bryant [Fri, 28 Jul 2006 19:17:56 +0000 (19:17 +0000)]
As discussed and decided on the asterisk-dev mailing list ...
- Fix some breakage I introduced a while ago that made the timestamps option
not functional for CLI verbose output.
- Remove the use of the timestamps option for log output, since it was not
functional.
- clarify text referring to the timestamps option so that it is clear that it
only applies to CLI verbose output
Make a copy of the request URI in check_user_full instead of modifying the one on the structure, and also strip params properly from the user portion of the SIP URI so as to preserve the domain (issue #7552 reported by dan42)
Kevin P. Fleming [Fri, 28 Jul 2006 18:03:57 +0000 (18:03 +0000)]
more slinfactory structure definition to inside implementation module
make read/write/hold work on samples, not bytes
add an API call to find out how many samples are available in a slinfactory
Kevin P. Fleming [Thu, 27 Jul 2006 23:16:08 +0000 (23:16 +0000)]
more simplification, and correct a bug i introduced in the last commit
fix prototype for a channel walking function to use a const input pointer
use existing channel walk by name prefix instead of reproducing that code in this app
Kevin P. Fleming [Thu, 27 Jul 2006 23:00:27 +0000 (23:00 +0000)]
remove local channel finding wrappers
move guts of dialplan application into separate function, so it can be shared bythe new application i'm about to add :-)
Kevin P. Fleming [Thu, 27 Jul 2006 22:20:52 +0000 (22:20 +0000)]
various cleanups:
use API call for finding channel by name prefix
code formatting to match guidelines (lost about half the of the indenting)
remove useless automatic variable initializations
don't set the spying channel's read format to SLINEAR when we don't do anything with the voice frames we read from it anyway
use proper option argument checking for volume argument
Fix crash when using the "regexten" option with MALLOC_DEBUG enabled. This was
not reported in the bug tracker but the same bug has been demonstrated in other
places in the code.
Russell Bryant [Wed, 26 Jul 2006 23:12:47 +0000 (23:12 +0000)]
fix setting the CFLAGS for building codec libs so that they are built with
astmm support and astmm doesn't get really upset and complain that it is being
asked to free memory that was never allocated
Russell Bryant [Tue, 25 Jul 2006 19:51:31 +0000 (19:51 +0000)]
This exact deadlock situation that I observed can't happen in trunk due to the
recent hold changes so that MOH is not started on the bridged channel directly.
However, the change is still not a bad idea.
Merged revisions 38200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
This resolves a deadlock that a tech support customer was getting frequently
when his users would answer call waiting. If another thread is currently
holding the zt_pvt lock for the first channel, unlock both channels and let
asterisk retry the native bridge, just like what is done for the second channel
directly below these changes.
Steve Murphy [Mon, 24 Jul 2006 20:58:27 +0000 (20:58 +0000)]
Added a small fix to exclude the AMD optimized assembly file from being included in the compile.
I don't particular like the approach, which basically tries to exclude the file based on
NOT being in a list of arches. This, IMHO, is backwards, it should be a list of AMD arches
instead. "Better to light a candle, than to curse the darkness", is apropo here. But since I don't
have an exhaustive list of what those arches could be, I leave as-is for now.
Start out with cleared RTP payload structures instead of defaults. This should prevent issues where if a stream (audio/stream) is not present and it's RTP payload structure is combined with the overall capability then the capability would be every codec that Asterisk supports.
Russell Bryant [Sun, 23 Jul 2006 15:21:44 +0000 (15:21 +0000)]
ast_malloc is sufficient here, since snprintf is called on the buffer
immediately after it gets allocated, which will automatically NULL terminate
the string
Russell Bryant [Sun, 23 Jul 2006 15:19:16 +0000 (15:19 +0000)]
Merge team/russell/ast_cli_tls into the trunk.
This improves the performance of ast_cli() by not doing a heap memory
allocation and deallocation every single time the function is called. Instead,
a thread-specific buffer is allocatted the first time the function is called
and automatically free'd when the thread exits. Also note that this buffer will
only be allocatted in threads that actually call this function, which is
probably only the threads spawned to service connected asterisk consoles.
This does introduce a new limitation on the maximum length of the resulting
string from the arguments passed to ast_cli. Previously there was no limit
since it was just allocating a buffer big enough every time the function was
called. The current buffer size is 16kB. If there is ever a case where we want
to print more than 16k characters in a single call to ast_cli(), this will have
to be increased.
Russell Bryant [Sun, 23 Jul 2006 05:06:47 +0000 (05:06 +0000)]
resolve another XXX comment by implementing proper handling of control frames
in ast_write(), which is to call the channel's indicate function if it exists
Russell Bryant [Sun, 23 Jul 2006 04:58:56 +0000 (04:58 +0000)]
take the advice of an XXX comment and use an atomic operation to decrement a
variable. Also, change a use of strdup to ast_strdup and remove a duplicated
error message.
Russell Bryant [Sun, 23 Jul 2006 02:41:02 +0000 (02:41 +0000)]
various cleanups regarding coding guidelines issues
- malloc to ast_malloc
- malloc + memset to ast_calloc
- sizeof(struct foo) to sizeof(*bar)
- remove indentation of the entire body of a function by returning immediately
on an allocation failure
(issue #7581, tempest1)
Russell Bryant [Sat, 22 Jul 2006 00:33:56 +0000 (00:33 +0000)]
use ast_atomic_fetchadd_int in chan_zap, sip, and iax2 for usecount handling
and fix a couple little things in passing
- usecnt was not initialized in chan_iax2
- ast_update_use_count() was not called after incrementing the count in chan_sip
Russell Bryant [Sat, 22 Jul 2006 00:08:21 +0000 (00:08 +0000)]
remove an XXX comment and document that ast_autoservice_start() will return -1
if the channel is already in the autoservice list.
Why is this a valid case to return -1, you ask? Well, there should never be
any code where it is not clear if the channel is in autoservice or not because
trying to read frames from a channel that is in the autoservice list will lead
to bad results because more than one thread will be waiting on frames to arrive
on the channel and then trying to read them.
This corrects the crash condition present in #7575, but I'm not really sure if it's the "right" fix. Please review and make any adjustments you see necessary.
Russell Bryant [Fri, 21 Jul 2006 17:31:28 +0000 (17:31 +0000)]
Merge a new implementation of ast_inet_ntoa, our thread safe replacement for
inet_ntoa, which uses thread specific data (aka thread local storage) instead
of stack allocatted buffers to store the result.
Only bitmaskify the RTP payload structure for video if an RTP structure exists for it... otherwise the default values will cause codec combination madness
Russell Bryant [Thu, 20 Jul 2006 16:18:07 +0000 (16:18 +0000)]
add a verbose message to the AGI command, STREAM FILE, similar to the
verbose messages when using Playback, Background, or the GET DATA command
(issue #7297, softins)
Kevin P. Fleming [Wed, 19 Jul 2006 20:44:39 +0000 (20:44 +0000)]
merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
Expand speech API so that the developer can interact with the engine more directly and use specific functions of the connector even if a generic API call is not available
Bug 7513 - ensure that each time we do a query, the results are returned in the
same logical order, so that when we iterate over the list, we get all results,
not some results repeated, due to insufficient sorting.
Kevin P. Fleming [Sat, 15 Jul 2006 19:59:35 +0000 (19:59 +0000)]
more Makefile cleanup and consistency stuff
don't reuse LIBS variable from top-level Makefile (oops)
build Asterisk binary after subdirs (preparing for embedded modules)
North Antara [Fri, 14 Jul 2006 21:49:20 +0000 (21:49 +0000)]
There was an issue with ADSI and iax2, where on an iaxy with a normal phone connected,
in vm_authenticate, it was try to start ADSI on the channel, and it WOULD because it
was "supported", according to the iaxy. There is now a config option (adsi=yes) for
this, which defaults to no. (config sample coming shortly)
yeah, ummm... This frame pointer should not be static. This situation only
exists in 1.2 (pointed out by Constantine Filin on the asterisk-dev mailing list)