Mark Michelson [Tue, 11 Sep 2007 16:05:56 +0000 (16:05 +0000)]
All instances of ao2_iterators which were just named 'i' have been renamed
to 'mem_iter' so that when refcounted queues are merged into trunk, there will be
little confusion regarding iterator names, especially when a queue and member iterator
are used in the same function.
Russell Bryant [Tue, 11 Sep 2007 16:03:42 +0000 (16:03 +0000)]
The sample dundi.conf claims support for a wildcard peer entry - [*], but the
code did not support it. This patch makes it work.
(closes issue #10546, patch by dds, with some changes by me)
Russell Bryant [Sat, 8 Sep 2007 13:42:26 +0000 (13:42 +0000)]
(closes issue #10672)
Bump the cleancount so that a "make clean" will be forced. This is needed
because my fix in revision 81599 made a change to a data structure in file.h,
and since file dependency tracking is only on with dev-mode enabled, file
format modules that don't get rebuilt may crash, as is the case with this issue.
This makes me wonder - how much faster does the code build without the file
dependency tracking enabled? If it doesn't make much of a difference, then it
may be worth just keeping it on all of the time, or perhaps just not in release
tarballs, so that this type of issue is avoided.
Russell Bryant [Thu, 6 Sep 2007 22:28:57 +0000 (22:28 +0000)]
(closes issue #9724, closes issue #10374)
Reported by: kenw
Patches:
9724.txt uploaded by russell (license 2)
Tested by: kenw, russell
Resolve a deadlock that occurs when doing a SIP transfer to parking.
I come across this type of deadlock fairly often it seems. It is very important
to mind the boundary between the channel driver and the core in respect to the
channel lock and the channel-pvt lock. Channel drivers lock to lock the
pvt and then the channel once it calls into the core, while the core will do
it in the opposite order. The way this is avoided is by having channel drivers
either release their pvt lock while calling into the core, or such as in this
case, unlocking the pvt just long enough to acquire the channel lock.
(closes issue #10122)
Reported by: stevefeinstein
Patches:
meetme-unmute-manager.diff uploaded by qwell (license 4)
Tested by: stevefeinstein
After looking over the code I agree with Qwell. Setting the file descriptor to conference each time just causes a fight back and forth.
Russell Bryant [Wed, 5 Sep 2007 20:53:41 +0000 (20:53 +0000)]
Fix an issue that can occur when you do an attended transfer to parking. If
you complete the transfer before the announcement of the parking spot finishes,
then the channel being parked will hear the remainder of the announcement.
These changes make it so that will not happen anymore.
Basically, res_features sets a flag on the channel is playing the announcement
to so that the file streaming core knows that it needs to watch out for a
channel masquerade, and if it occurs, to abort the announcement.
Russell Bryant [Tue, 4 Sep 2007 18:37:44 +0000 (18:37 +0000)]
Remove the typedefs on ao2_container and ao2_iterator. This is simply because
we don't typedef objects anywhere else in Asterisk, so we might as well make
this follow the same convention.
there is no point in sending 401 Unauthorized to a UAS that sent us a properly-formatted Authentication header with the expected username and nonce but an incorrect response (which indicates the shared secret does not match)... instead, let's send 403 Forbidden so that the UAS doesn't retry with the same authentication credentials repeatedly
(closes issue #10632)
Reported by: jamesgolovich
Patches:
asterisk-iaxfirmwareleak.diff.txt uploaded by jamesgolovich (license 176)
Fix memory leak when unloading chan_iax2. The firmware files were not being freed.
(closes issue #10610)
Reported by: john
Patches:
dns.c.patch uploaded by john (license 218)
Tested by: mvanbaak
Don't return a match if no SRV record actually exists.
Russell Bryant [Mon, 3 Sep 2007 18:57:53 +0000 (18:57 +0000)]
Remove a couple of calls to ast_string_field_free_pools() on peers in error
handling blocks in the code for building peers. The peer object destructor
does this and doing it twice will cause a crash.
(closes issue #10625, reported by and patched by pnlarsson)
Mark Michelson [Fri, 31 Aug 2007 19:48:55 +0000 (19:48 +0000)]
Fixed broken behavior of a reload on realtime queues. Prior to this patch, if a reload was issued and
a realtime queue had callers waiting in it, then the queue would be removed from the queue list, but it would
not actually be freed (in fact, a debug message warning about a memory leak would come up). With this patch,
reloads do not touch realtime queues at all.
Joshua Colp [Thu, 30 Aug 2007 23:53:41 +0000 (23:53 +0000)]
(closes issue #10009)
Reported by: dimas
Don't output a bridge failed warning message if it failed because one of the channels was part of the masquerade process. That is perfectly normal.
Mark Michelson [Thu, 30 Aug 2007 22:05:56 +0000 (22:05 +0000)]
Removing an extraneous (and possibly misleading) log message. Firstly, if the announce file isn't found, the
streaming functions will report it. Secondly, not all non-zero returns from play_file mean that the announce file
wasn't found. Positive return values simply mean that a digit was pressed (most likely to skip through the announcement).
(closes issue #10612, reported and patched by dimas)
Joshua Colp [Thu, 30 Aug 2007 21:23:50 +0000 (21:23 +0000)]
(closes issue #10514)
Reported by: casper
Patches:
chan_sip.c.80129.diff uploaded by casper (license 55)
Remove needless check for AUTH_UNKNOWN_DOMAIN. It was impossible for it to ever be that value.
Steve Murphy [Thu, 30 Aug 2007 21:11:48 +0000 (21:11 +0000)]
via issue 10599, where 'CDR already initialized' messages are being generated. Since all channels will have an init'd CDR attached at creation time, this message is now particularly useless. Removed.
Joshua Colp [Thu, 30 Aug 2007 14:53:43 +0000 (14:53 +0000)]
(closes issue #10603)
Reported by: jmls
Patches:
pbx.diff uploaded by jmls (license 141)
Backport changes from 81372. Add REASON dialplan variable for when an originated call fails and the failed extension is executed.
Fixed a severe issue where a misdn_read would lock the channel, but read would
not return because it blocks. later chan_misdn would try to queue a frame like
a AST_CONTROL_ANSWER which could result in a deadlock situation. misdn_read
will now not block forever anymore, and we don't queue the ANSWER frame at all
when we already was called with misdn_answer -> answer would be called twice.
Also we don't explicitly send a RELEASE_COMPLETE on receiption of a RELEASE
anymore, because mISDN does that for us, this resulted in a problem on some
switches, which would block our port after some calls for a short while.
Mark Michelson [Wed, 29 Aug 2007 16:35:29 +0000 (16:35 +0000)]
This patch, in essence, will correctly pause a realtime queue member and reflect those
changes in the realtime engine.
(issue #10424, reported by irroot, patch by me)
This patch creates a new function called update_realtime_member_field, which is a generic
function which will allow any one field of a realtime queue member to be updated. This patch
only uses this function to update the paused status of a queue member, but it lays the foundation
for persisting the state of a realtime member the same way that static members' state is maintained
when using the persistentmembers setting
Mark Michelson [Wed, 29 Aug 2007 15:52:42 +0000 (15:52 +0000)]
This fix creates a more accurate way of detecting whether realtime members were deleted.
(closes issue 10541, reported by Alric, patched by me)
The REALLY nice things about this patch is that queue members now have a "realtime" field
which will be true if the member is a realtime member. This means we can check this value
prior to certain processing if it should ONLY be done for realtime members.
Mark Michelson [Mon, 27 Aug 2007 22:40:19 +0000 (22:40 +0000)]
Resolve a potential deadlock. In this case, a single queue is locked, then the queue list. In changethread(), the queue list is
locked, and then each individual queue is locked. Under the right circumstances, this could deadlock. As such, I have unlocked
the individual queue before locking the queue list, and then locked the queue back after the queue list is unlocked.
Mark Michelson [Mon, 27 Aug 2007 21:08:48 +0000 (21:08 +0000)]
DTMF begin frames should be ignored so that when an agent acks a call with the '#' key,
he doesn't cause a queue's announce file to be interrupted. Also went ahead and did the
same for the '*' key and for ending a call.
(closes issue #10528, reported by deskhack, patched by me)
Russell Bryant [Mon, 27 Aug 2007 17:27:48 +0000 (17:27 +0000)]
Add a \todo to note that this module leaks most of the memory it allocates on
unload and should be fixed (when I'm not in the middle of something else ...).
This patch fixes a few problems with music on hold.
* Fix issues with starting at the beginning of a file when it shouldn't.
* Fix the inuse counter to be decremented even if the class had not been
set to be deleted when not in use anymore
* Don't arbitrarily limit the number of MOH files to 255
Joshua Colp [Mon, 27 Aug 2007 15:01:59 +0000 (15:01 +0000)]
(closes issue #10561)
Reported by: jesselang
Patches:
chan_sip-ChannelReload-20080825.patch uploaded by jesselang (license 202)
Remove an extra \r\n to make the ChannelReload event conform with every other event.
Russell Bryant [Sat, 25 Aug 2007 17:37:39 +0000 (17:37 +0000)]
Fix some issues with the handling of the scheduler in chan_iax2. Most of the
places that scheduled items to be executed by the scheduler thread did not
signal the scheduler thread to wake up so that it could recalculate the time
until the next action. These changes will make the scheduler thread more
responsive and ensure that actions get executed as close to when intended as
possible instead of it being possible for very long delays.
An empty string is an empty callerid ... so zap it. This closes issue #10502, which was pointed out by dswartz. Thank you, and may the swartz be with you
Russell Bryant [Fri, 24 Aug 2007 21:22:50 +0000 (21:22 +0000)]
If dnsmgr is in use, and no DNS servers are available when Asterisk first
starts, then don't give up on poking peers. Allow the poke to get rescheduled
so that it will work once the dnsmgr is able to resolve the host.
(closes issue #10521, patch by jamesgolovich)
Russell Bryant [Fri, 24 Aug 2007 20:24:05 +0000 (20:24 +0000)]
Improve the debouncing logic in the DTMF detector to fix some reliability
issues. Previously, this code used a shift register of hits and non-hits.
However, if the start of the digit isn't clean, it is possible for the
leading edge detector to miss the digit. These changes replace the flawed
shift register logic and also does the debouncing on the trailing edge as well.
(closes issue #10535, many thanks to softins for the patch)
BJ Weschke [Fri, 24 Aug 2007 19:52:06 +0000 (19:52 +0000)]
A minor correction to the available logic of autofill. If a queue member is paused, they're not really "available" so don't count them as such. Somewhat related to issue #10155
Steve Murphy [Fri, 24 Aug 2007 18:52:15 +0000 (18:52 +0000)]
From a complaint by jmls, I realize that the message in cdr_disposition is unnecessary. To get failure disposition, just return -1; no use having more than one case do that.
Philippe Sultan [Fri, 24 Aug 2007 11:42:46 +0000 (11:42 +0000)]
Closes issue #10509
Googletalk calls are answered too early, which results in CDRs wrongly
stating that a call was ANSWERED when the calling party cancelled a
call before before being established.
We must not answer the call upon reception of a 'transport-accept' iq
packet, but this packet still needs to be acknowledged, otherwise the
remote peer would close the call (like in #8970).
Russell Bryant [Thu, 23 Aug 2007 20:16:41 +0000 (20:16 +0000)]
When executing a dynamic feature, don't look it up a second time by digit pattern
after we already looked it up by name. This causes broken behavior if there is
more than one feature defined with the same digit pattern.
(closes issue #10539, reported by bungalow, patch by me)
Russell Bryant [Thu, 23 Aug 2007 19:21:53 +0000 (19:21 +0000)]
Fix func_timeout to take values in floating point so 1.5 actually means
1.5 seconds instead of being rounded.
(closes issue #10540, reported by spendergrass, patch by me)
Kevin P. Fleming [Thu, 23 Aug 2007 17:08:25 +0000 (17:08 +0000)]
report the actual channel number that was unregistered, instead of assuming that the interface list consists of channels 1 through <x> with no gaps in the sequence
Russell Bryant [Thu, 23 Aug 2007 16:53:52 +0000 (16:53 +0000)]
This is a hack to maintain old behavior of chan_iax2. This ensures that if
the peers and users are being stored in a linked list, that they go in the
list in the same order that the older code used. This is necessary to maintain
the behavior of which peers and users get matched when traversing the container.