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.
(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.
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)
(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.
Joshua Colp [Thu, 30 Aug 2007 21:17:21 +0000 (21:17 +0000)]
(closes issue #10565)
Reported by: tootai
Make sure the external IP address has the standard SIP port set for when the user does not specify the port in the externip setting.
Steve Murphy [Thu, 30 Aug 2007 21:16:20 +0000 (21:16 +0000)]
Merged revisions 81392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r81392 | murf | 2007-08-30 15:11:48 -0600 (Thu, 30 Aug 2007) | 1 line
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 20:55:19 +0000 (20:55 +0000)]
(closes issue #10336)
Reported by: junky
Patches:
minivm_output2.diff uploaded by junky (license 177)
Change console output of minivm show stats to be more simple for external parsing.
Mark Michelson [Thu, 30 Aug 2007 18:52:44 +0000 (18:52 +0000)]
Added note to sample queues.conf file to line up with most recent change regarding setinterfacevar.
MEMBERREALTIME indicates whether a member is realtime.
(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.
Joshua Colp [Thu, 30 Aug 2007 14:42:41 +0000 (14:42 +0000)]
(closes issue #10603)
Reported by: jmls
Patches:
pbx.diff uploaded by jmls (license 141)
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.
Steve Murphy [Wed, 29 Aug 2007 20:55:40 +0000 (20:55 +0000)]
This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
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
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.
Joshua Colp [Wed, 29 Aug 2007 15:19:11 +0000 (15:19 +0000)]
Add API calls for iterating through an event. This should allow events to have multiple information elements (while there was nothing preventing it before you could not actually access any except the first one).
Russell Bryant [Tue, 28 Aug 2007 19:12:53 +0000 (19:12 +0000)]
Change the audiohook lock and unlock wrappers to macros instead of inline
functions. As inline functions, the lock debug information will show that
these are always locked in audiohooks.h instead of the file where the lock was
actually acquired.
Russell Bryant [Tue, 28 Aug 2007 18:41:18 +0000 (18:41 +0000)]
Add proper channel locking around the uses of datastore_add and _find. There
are still more places in the tree that I have not yet changed if someone wants
to go through and find the places they are used without the channel locked.
Russell Bryant [Tue, 28 Aug 2007 18:32:56 +0000 (18:32 +0000)]
* Constify the uid field of channel datastores
* Convert some spaces to tabs in func_volume
* Add a note in channel.h making it clear that none of the datastore API calls
lock the channel they are given, so the channel should be locked before
calling the functions that take a channel argument.
Add support for configurable file locking methods. The default is "lockfile",
which is the old behavior. There is an additional option, "flock", which is
intended for use in situations where the lockfile method will not work, such as
with SMB/CIFS mounts.
Joshua Colp [Tue, 28 Aug 2007 14:37:09 +0000 (14:37 +0000)]
(closes issue #10579)
Reported by: ornati
Make sure the called channel during the attended transfer process becomes associated with the calling channel so that the ast_waitfor_* call works properly under epoll.
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.
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:28:14 +0000 (17:28 +0000)]
Merged revisions 81074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r81074 | russell | 2007-08-27 12:27:48 -0500 (Mon, 27 Aug 2007) | 3 lines
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
(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:55:45 +0000 (17:55 +0000)]
Merged revisions 80895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80895 | russell | 2007-08-25 12:37:39 -0500 (Sat, 25 Aug 2007) | 7 lines
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.
Russell Bryant [Fri, 24 Aug 2007 21:23:14 +0000 (21:23 +0000)]
Merged revisions 80849 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80849 | russell | 2007-08-24 16:22:50 -0500 (Fri, 24 Aug 2007) | 5 lines
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:25:39 +0000 (20:25 +0000)]
Merged revisions 80820 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80820 | russell | 2007-08-24 15:24:05 -0500 (Fri, 24 Aug 2007) | 7 lines
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)
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 19:03:39 +0000 (19:03 +0000)]
Merged revisions 80789 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80789 | murf | 2007-08-24 12:52:15 -0600 (Fri, 24 Aug 2007) | 1 line
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.
........
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).
........
Steve Murphy [Thu, 23 Aug 2007 23:37:33 +0000 (23:37 +0000)]
an unreported crash I debugged, looked like it was backing up way too far after hitting the syntax error. An inspection of the code revealed that error tokens in lists were not rearranged when the rules were rearranged as part of a code neatening-up process. By moving the error tokens to where they should be, I also reduced the number of shift/reduce conflicts to 3 instead of 8. This introduces subtle differences in error messages, so the regressions had to be updated.
Russell Bryant [Thu, 23 Aug 2007 20:20:17 +0000 (20:20 +0000)]
Merged revisions 80573 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80573 | russell | 2007-08-23 15:16:41 -0500 (Thu, 23 Aug 2007) | 5 lines
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:22:49 +0000 (19:22 +0000)]
Merged revisions 80539 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80539 | russell | 2007-08-23 14:21:53 -0500 (Thu, 23 Aug 2007) | 4 lines
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)
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:54:19 +0000 (16:54 +0000)]
Blocked revisions 80497 via svnmerge
........
r80497 | russell | 2007-08-23 11:53:52 -0500 (Thu, 23 Aug 2007) | 5 lines
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.