Joshua Colp [Mon, 8 Oct 2007 15:03:07 +0000 (15:03 +0000)]
Don't keep trying to native bridge if either of the channels are involved in a masquerade operation to be done.
(closes issue #10696)
Reported by: tbelder
Russell Bryant [Mon, 8 Oct 2007 03:28:34 +0000 (03:28 +0000)]
Enable file dependency tracking for _all_ builds, and not just for builds with
dev-mode enabled. I have seen enough problems caused by this that I don't think
it's worth keeping. I want to continue to encourage anybody that is interested
to continue to run Asterisk from svn. Furthermore, I do not want their systems
to break when we change a structure definition in a header file. :)
Philippe Sultan [Sun, 7 Oct 2007 16:15:39 +0000 (16:15 +0000)]
Presence packets from a client who's connected with our Jabber ID are
valid, therefore, those clients must be considered as buddies. The resource
string helps us make the distinction between clients.
Joshua Colp [Fri, 5 Oct 2007 18:55:36 +0000 (18:55 +0000)]
Update the remembered RTP peer information when putting an endpoint on hold or taking it off hold so that the RTP stack does not initiate a needless reinvite.
(closes issue #10868)
Reported by: mavince
Russell Bryant [Fri, 5 Oct 2007 16:44:21 +0000 (16:44 +0000)]
Do deadlock avoidance in a couple more places. You can't lock two channels
at the same time without doing extra work to make sure it succeeds.
(closes issue #10895, patch by me)
Steve Murphy [Wed, 3 Oct 2007 18:20:07 +0000 (18:20 +0000)]
closes issue #10870 ; where a CUT() function call in a switch expr doesn't execute correctly, because the commas in the function args are not converted to vertbars before the func is called. I modified just the switch code to convert the commas to vertbars if there, but if more of these sort of probs are found, I may have to resort to something a little more fundamental. We'll see, I guess.
Steve Murphy [Wed, 3 Oct 2007 14:23:00 +0000 (14:23 +0000)]
closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue.
Russell Bryant [Tue, 2 Oct 2007 20:06:07 +0000 (20:06 +0000)]
* Don't build the menuselect-tree for the tarball, as it requires running the
configure script first
* Change the Makefile to note that menuselect-tree depends on the configure
script.
Russell Bryant [Tue, 2 Oct 2007 14:12:35 +0000 (14:12 +0000)]
Use snprintf instead of sprintf in one place. There is no vulnerability here
due to various buffer sizes around the code, but I still didn't like seeing a
non length-limited copy of data coming off of the wire into a stack buffer, as
this would be a problem in the future if buffer sizes elsewhere got changed or
size limitations removed ...
Russell Bryant [Mon, 1 Oct 2007 21:07:06 +0000 (21:07 +0000)]
Fulfull a feature request from Qwell on the "core show locks" output. It will
now note the lock type for each lock that a thread holds.
(mutex, rdlock, or wrlock)
Steve Murphy [Mon, 1 Oct 2007 20:27:52 +0000 (20:27 +0000)]
closes issue #10777 -- by returning a null for the parse tree when there's really nothing there, and making sure we don't try to do checking on a null tree.
Russell Bryant [Mon, 1 Oct 2007 19:56:28 +0000 (19:56 +0000)]
Add another sanity check in the AGI read loop. We really don't care about
EAGAIN unless we didn't read an entire line. If there is a newline at the
end if the read buffer, break, because we got the whole thing.
(reported and patched by bmd)
Joshua Colp [Mon, 1 Oct 2007 13:57:42 +0000 (13:57 +0000)]
Fix randomness. save_pos was being set to 0 initially instead of -1, causing it to jump to position 0 when moh started.
(closes issue #10859)
Reported by: jamesgolovich
Patches:
asterisk-mohpos2.diff.txt uploaded by jamesgolovich (license 176)
Steve Murphy [Sat, 29 Sep 2007 21:47:53 +0000 (21:47 +0000)]
This issue sort of closes 10786; All config files support #include with globbing (you know, *,[chars],?,{list,list},etc), so I've updated the AEL system to support this also.
Russell Bryant [Wed, 26 Sep 2007 21:15:15 +0000 (21:15 +0000)]
Add a log message that was requested by the masses in the developer tutorial
session at Astricon. chan_sip did not output any message when a call was
rejected because the extension was not found. This adds a verbose message
(at verbose level 3) to note when this happens.
Steve Murphy [Sat, 22 Sep 2007 19:39:16 +0000 (19:39 +0000)]
This closes issue #10788 -- The exact same fixes are made here for the first arg in the for(arg1; arg2; arg3) {} statement, as were done for the 3rd arg. It can now be an assignment that will embedded in a Set() app, or a macro call, or an app call.
Steve Murphy [Sat, 22 Sep 2007 16:41:43 +0000 (16:41 +0000)]
This closes issue #10788 -- the 3rd arg in the for statement is now wrapped in Set() only if there's an '=' in that string. Otherwise, if it begins with '&', then a Macro call is generated; otherwise it is made into an app call. A bit more accomodating, keeps the new guys happy, and the guys with ael-1 code should be happy, too
Russell Bryant [Fri, 21 Sep 2007 14:37:20 +0000 (14:37 +0000)]
gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2.
(closes issue #10774, patch from qwell)
Fix video under certain circumstances. It would have been possible for the formats on the channel to not contain the video format.
(closes issue #10782)
Reported by: cwhuang
Russell Bryant [Thu, 20 Sep 2007 21:16:48 +0000 (21:16 +0000)]
When daemonizing, don't change working directory to "/". It makes it not be
able to do a core dump when not running as uid=root.
(closes issue #10766, xrg)
Make sure the minimum T1 timer value is obeyed in all cases.
(closes issue #10768)
Reported by: flefoll
Patches:
chan_sip.c.trunk.83071.retrans-patch uploaded by flefoll (license 244)
chan_sip.c.br14.83070.retrans-patch uploaded by flefoll (license 244)
Russell Bryant [Wed, 19 Sep 2007 19:50:48 +0000 (19:50 +0000)]
The System() and TrySystem() applications can take a substantial amount of
time to execute while not servicing the channel. So, put the channel in
autoservice while the command is being executed.
(closes issue #10726, reported by mnicholson)
Russell Bryant [Wed, 19 Sep 2007 19:34:25 +0000 (19:34 +0000)]
Using curl can take a substantial amount of time, so the channel should be
autoserviced while waiting for it to complete.
(closes issue #10725, reported by mnicholson)
Russell Bryant [Wed, 19 Sep 2007 19:13:29 +0000 (19:13 +0000)]
When handling a reload of chan_iax2, don't use an ao2_callback() to POKE all
peers. Instead, use an iterator. By using an iterator, the peers container
is not locked while the POKE is being done. It can cause a deadlock if the
peers container is locked because poking a peer will try to lock pvt structs,
while there is a lot of other code that will hold a pvt lock when trying to
go lock the peers container.
(reported to me directly by Loic Didelot. Thank you for the debug info!)
Russell Bryant [Wed, 19 Sep 2007 15:10:14 +0000 (15:10 +0000)]
Fix up another potential race condition. Do the loop decrementing use count
on events with the eventq protected from being changed.
(reported on IRC by Ivan)
Protect the CDR record from modification by pbx_exec so that the application data contains the Queue data.
(closes issue #10761)
Reported by: snar
Patches:
app-queue-mixmonitor.patch uploaded by snar (license 245)
(closes issue #10760)
Reported by: dimas
Patches:
chan_sip.patch uploaded by dimas (license 88)
Read in subscribecontext option in general to be the default.
added 'astdtmf' option to allow configuring the asterisk dtmf detector instead of the mISDN_dsp ones. also added the patch from irroot #10190, so that dtmf tones detected by the asterisk detector are passed outofband to asterisk, to make any use of dtmf tones at all.
Russell Bryant [Wed, 19 Sep 2007 00:19:49 +0000 (00:19 +0000)]
Change the description of app_flash to note how it can be a useful tool instead
of just saying that it is generally a worthless feature.
(Thanks to Jim Van Meggelen for pointing it out and providing the proposed text)
Russell Bryant [Tue, 18 Sep 2007 22:42:27 +0000 (22:42 +0000)]
Add a new patch to handle interrupting the fgets() call when using FastAGI.
This version of the patch maintains the original behavior of the code when
not using FastAGI.
(closes issue #10553)
Reported by: juggie
Patches:
res_agi_fgets-4.patch uploaded by juggie (license 24)
res_agi_fgets_1.4svn.patch uploaded by juggie (license 24)
Slight mods by me
Tested by: juggie, festr
Russell Bryant [Tue, 18 Sep 2007 20:56:43 +0000 (20:56 +0000)]
Fix a memory leak that can occur on systems under higher load. The issue is
that when events are appended to the master event queue, they use the number
of active sessions as a use count so it will know when all active sessions
at the time the event happened have consumed it. However, the handling of
the number of sessions was not properly synchronized, so the use count was
not always correct, causing an event to disappear early, or get stuck in
the event queue for forever.
(closes issue #9238, reported by bweschke, patch from Ivan, modified by me)
Mark Michelson [Tue, 18 Sep 2007 20:09:02 +0000 (20:09 +0000)]
Moving the logic for handling an empty membername to the create_member function so that there is a common place
where this occurs instead of being spread out to several different places.
Russell Bryant [Tue, 18 Sep 2007 16:31:01 +0000 (16:31 +0000)]
When copying the contents from the wildcard peer, do a deep copy instead of
shallow copy so that it doesn't crash when beging destroyed.
(closes issue #10546, patch by me)
Russell Bryant [Mon, 17 Sep 2007 20:16:25 +0000 (20:16 +0000)]
Put a memset in ast_localtime() instead of a couple places in app_voicemail
to prevent the problem everywhere instead of just a couple of places.
(related to issue #10746)
Russell Bryant [Mon, 17 Sep 2007 20:00:32 +0000 (20:00 +0000)]
Initialize some memory to fix crashes when leaving voicemail. This problem
was fixed by running Asterisk under valgrind.
(closes issue #10746, reported by arcivanov, patched by me)
*** IMPORTANT NOTE: We need to check to see if this same bug exists elsewhere.
Russell Bryant [Mon, 17 Sep 2007 16:46:59 +0000 (16:46 +0000)]
Handle the case where there are multiple dynamic features with the same digit
mapping, but won't always match the activated on/by access controls. In that
case, the code needs to keep trying features for a match.
(reported by Atis on the asterisk-dev list, patched by me)
Steve Murphy [Fri, 14 Sep 2007 21:19:27 +0000 (21:19 +0000)]
closes issue #10668; thanks to arkadia for his patch; had to leave out the bit about ending the previous cdr in the fork; it would destroy current implementations.
Russell Bryant [Fri, 14 Sep 2007 15:42:42 +0000 (15:42 +0000)]
Remove chan_usbradio from the main 1.4 branch. It can't live here because we
have a strict policy to not include new features in release branches. However,
I'm going to merge it into trunk, and I also have a special 1.4 based branch that
includes this module.
svn co http://svn.digium.com/svn/asterisk/team/jdixon/chan_usbradio-1.4
Jason Parker [Thu, 13 Sep 2007 20:11:40 +0000 (20:11 +0000)]
Fix a crash that could occur in cdr_csv when mutliple threads tried to close the same file.
Do we actually need the locking here? What happens if you open the same file twice, and
two threads try to write to it at the same time? Is fputs() going to write out the entire
line at once? I suspect that it could be possible for the second fopen to run during the
first fputs, so the position could be in the middle of the previously written line...
Issue 10347, initial patch by explidous (but I removed all of the paranoia stuff..)
Russell Bryant [Thu, 13 Sep 2007 18:45:59 +0000 (18:45 +0000)]
Only compile in tracking astobj2 statistics if dev-mode is enabled. Also, when
dev mode is enabled, register the CLI command that can be used to run the astobj2
test and print out statistics.
Mark Michelson [Thu, 13 Sep 2007 16:25:59 +0000 (16:25 +0000)]
Added logic to handle the unlikely case that someone has two queues with the same name.
Asterisk will log a warning message letting the user know that one was already defined with that
name and is it skipping all further instances. This also will work for realtime queues but in order
for that to happen, the user would have to trigger a perfectly timed reload as a realtime queue is being
looked up, which is highly unlikely (but taken care of nonetheless).