https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90470 | russell | 2007-12-02 12:18:52 -0600 (Sun, 02 Dec 2007) | 6 lines
The other day when I went through making changes as a result of the ao2_link()
change, I added some code to set pointers to NULL after they were unreferenced.
This pointed out that in this place, the object was unreferenced before the
code was done using it. So, move the unref down a little bit.
(crash reported by jmls on IRC)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90432 | tilghman | 2007-12-02 03:34:23 -0600 (Sun, 02 Dec 2007) | 7 lines
Clarify the return value on autoservice. Specifically, if you started
autoservice and autoservice was already on, it would erroneously return an
error.
Reported by: adiemus
Patch by: dimas
(Closes issue #11433)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This works in much the same way as the automonitor, except that instead of using the monitor
app, it uses the mixmonitor app. By providing an 'x' or 'X' as a dial or queue option, a DTMF
sequence may be entered (as defined in features.conf) to start the one-touch mixmonitor.
This patch also introduces some new API calls to the audiohooks code for searching for an audiohook
by type and for searching for a running audiohook by type.
Big thanks to joetester for writing the initial patch, testing it and patiently waiting for it to
be committed.
(closes issue #10185, reported and patched by xmarksthespot)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90348 | russell | 2007-11-30 13:26:04 -0600 (Fri, 30 Nov 2007) | 8 lines
Change the behavior of ao2_link(). Previously, in inherited a reference.
Now, it automatically increases the reference count to reflect the reference
that is now held by the container.
This was done to be more consistent with ao2_unlink(), which automatically
releases the reference held by the container. It also makes it so it is
no longer possible for a pointer to be invalid after ao2_link() returns.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90163 | mmichelson | 2007-11-29 13:38:39 -0600 (Thu, 29 Nov 2007) | 6 lines
This patch handles the case where a queue member with a negative penalty is added
via the manager. If a negative value is submitted for a member penalty, we set it to 0.
(closes issue #11411, reported and patched by Laureano)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
........
r90147 | russell | 2007-11-28 18:36:59 -0600 (Wed, 28 Nov 2007) | 1 line
fix some formatting i accidentally changed
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90145 | russell | 2007-11-28 18:20:34 -0600 (Wed, 28 Nov 2007) | 5 lines
This set of changes is to make some callerID handling thread-safe.
The ast_set_callerid() function needed to lock the channel. Also, the handlers
for the CALLERID() dialplan function needed to lock the channel when reading
or writing callerid values directly on the channel structure.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This was mostly to note whether a channel needed to be locked or not before
calling these functions. However, I added some other things, too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r90059 | mmichelson | 2007-11-28 16:08:50 -0600 (Wed, 28 Nov 2007) | 13 lines
Removing some seemingly pointless code. This sets a channel variable for every priority
executed in the dialplan if you have debug set to anything non-zero. This seems pointless
due to the fact that these channel variables are not referenced anywhere else in the code and
their names are esoteric enough that they would not be practical to reference in the dialplan. Plus
the fact that this behavior isn't documented anywhere means that the change is not likely to cause
any disruption. If anything, this may actually cause a slight performance increase if running with
debug on.
The motivating influence for this code change is the eventwhencalled option for queues. If set to
vars, all channel variables will be output to the manager. These unnecessary channel variables make
the output a lot more difficult to deal with.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
........
r89999 | mmichelson | 2007-11-28 11:30:47 -0600 (Wed, 28 Nov 2007) | 6 lines
Recording greetings when using IMAP storage was causing zero-length files to be stored.
Since greetings are not retrieved from IMAP anyway, it is pointless to attempt storing them there.
(closes issue #11359, reported by spditner, patched by me)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
the diff to trunk.
This just removes some checks on the return value of alloca(), as behavior
is undefined if it runs out of stack space, and we don't check it anywhere else.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1. When moh is started, we search first in memory to find the class. If we do not
find it in memory, we search realtime instead.
2. When moh is restarted (as in, it had been started on this particular channel, stopped,
and now we're starting it again), if using the "files" mode, then realtime will always
be rechecked. If you are using other modes, however, we will simply reattach to the external
running process which was playing moh earlier in the call. This is a necessary compromise so that
we don't end up with too many background processes.
3. musiconhold.conf has a general section now. It has one option: cachertclasses. If set to yes,
then moh classes found in realtime will be added to the in-memory list. This has the advantage
of not requiring database lookups each time moh is started, but it has the disadvantage of not
truly being realtime.
I have tested this for functionality, and it passes. I also tested this under valgrind and there
are no memory problems reported under typical use.
Special thanks to Sergee for implementing this feature and enduring my complaints on the bugtracker!
(closes issue #11196, reported and patched by sergee)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89893 | russell | 2007-11-27 18:20:13 -0600 (Tue, 27 Nov 2007) | 4 lines
- update documentation for some of the goto functions to note that they
handle locking the channel as needed
- update ast_explicit_goto() to lock the channel as needed
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch is an optimization for chan_iax2. This module is now heavily
multi-threaded. However, there is still a good number of globally shared
resources that prevent things from happen asynchronously. One of those things
was the global IAX frame queue. This queue was used to hold frames that have
been deferred for transmitting by another thread, and frames that may need to
get retransmitted.
I changed the frame queue to be per-call, since almost all of the frame queue
handling only cares about frames specific to a call number.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89837 | mmichelson | 2007-11-27 17:10:05 -0600 (Tue, 27 Nov 2007) | 12 lines
Two changes with regards to the 'eventwhencalled' option of queues.conf
1) Due to some signed vs. unsigned silliness, setting 'eventwhencalled' to
'vars' or 'yes' did exactly the same thing. Thus the sign change of the
ast_true call.
2) The vars2manager function overwrote a \n for every channel variable it parsed, resulting
in bizarre output for the channel variables. This patch remedies this.
(related to issue #11385, however I'm not sure if this will actually be enough to close it)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89790 | russell | 2007-11-27 15:45:51 -0600 (Tue, 27 Nov 2007) | 41 lines
Merge changes from team/russell/autoservice_1.4
This set of changes fixes an issue that was reported to me on IRC yesterday.
The user, d1mas, was using chan_zap for incoming calls and was having DTMF
recognition issues in some situations. Specifically, he noticed that the
problem occurred when using DISA or WaitExten. He also noticed that when
using Read, the problem did not occur. His system also used DUNDi for
dialplan lookups.
So, he theorized that if the DUNDi lookups blocked for some period of time,
that audio from the zap channel could get lost. If the audio got lost, then
it wouldn't be run through the DTMF detector, and digits could get lost.
He was correct, and the following set of changes fixes the problem. However,
the changes go a little bit further than what was necessary to fix this exact
problem.
1) I updated pbx_extension_helper() to autoservice the associated channel to
handle cases where extension lookups may take a long time. This would
normally be a dialplan switch that does some lookup over the network, such
as the DUNDi or IAX2 switches.
This ensures that even while a DUNDi lookup is blocking, the channel will be
continuously serviced.
2) I made a change to the autoservice code. This is actually something that
has bothered me for a long time. When a channel is in autoservice, _all_
frames get thrown away. However, some frames really shouldn't be thrown
away. The most notable examples are signalling (CONTROL) frames, and DTMF.
So, this patch queues up important frames while a channel is in autoservice.
When autoservice is stopped on the channel, the queued up frames get stuck
back on the channel so that they can get processed instead of thrown away.
3) I made another change to the autoservice code to handle the case where
autoservice is started on channels recursively.
Previously, you could call ast_autoservice_start() multiple times on a
channel, and it would stop the first time ast_autoservice_stop() gets
called. Now, it will ensure that autoservice doesn't actually stop until
the final call to ast_autoservice_stop().
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89791 65c4cc65-6c06-0410-ace0-fbb531ad65f3