If the SLA thread is not started, then reload causes a memory leak.
(closes issue #13889)
Reported by: eliel
Patches:
app_meetme.c.patch uploaded by eliel (license 64)
........
Revert revision 132506, since it occasionally caused IAX2 HANGUP packets not
to be sent, and instead, schedule a task to destroy the iax2 pvt structure
10 seconds later. This allows the IAX2 HANGUP packet to be queued,
transmitted, and ACKed before the pvt is destroyed.
(closes issue #13645)
Reported by: dzajro
Patches:
20081111__bug13645__3.diff.txt uploaded by Corydon76 (license 14)
Tested by: vazir
Reviewed: http://reviewboard.digium.com/r/51/
........
This change adds an announce_thread responsible for playing announcements to an existing conference. This allows all announcing to be immediately stopped if necessary but more importantly allows other threads that need to play something to not block. There are multiple benefits to this, but the actual bug is for solving the scenario for a channel to be unusable after hang up for the entire duration of the parting announcement. The parting announcement can be extremely long depending on what the user recorded upon joining the conference.
Reviewed by Russell on Review Board:
http://reviewboard.digium.com/r/25/
When doing some tests, I was having a crash at the end of every call
if an attended transfer occurred during the call. I traced the cause to
the CDR on one of the channels being NULL. murf suggested a check in
the end bridge callback to be sure the CDR is non-NULL before proceeding,
so that's what I'm adding.
Russell Bryant [Wed, 12 Nov 2008 17:38:20 +0000 (17:38 +0000)]
Merged revisions 156164 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r156164 | russell | 2008-11-12 11:29:52 -0600 (Wed, 12 Nov 2008) | 7 lines
Move the sanity check that makes sure "always fork" is not set along with the
console option to be after the code that reads options from asterisk.conf.
This resolves a situation where Asterisk can start taking up 100% when
misconfigured.
(Thanks to Bryce Porter (x86 on IRC) for letting me log in to his system to
figure out what was causing the 100% CPU problem.)
Mark Michelson [Wed, 12 Nov 2008 15:33:11 +0000 (15:33 +0000)]
Add a couple of AC_SUBST calls to the AST_C_COMPILE_CHECK
macro. These missing calls were discovered when working on
timerfd support in a separate branch.
- Add 'database del', 'database put' and 'set music' AGI commands XML documentation.
- Add to the DTD the possibility to put a parameter inside an <enum>.
Implement AGI XML documentation parsing functions.
A new <agi> element is used to describe the XML documentation.
We have the usual synopsis,syntax,description and seealso for AGI commands.
The CLI 'agi show commands' command was changed to show all the documentation se
ctions.
Kevin P. Fleming [Tue, 11 Nov 2008 17:57:20 +0000 (17:57 +0000)]
use some fancy compiler magic (thanks to Matthew Woehlke on the gcc-help mailing list) to restore type-safety to S_OR by going back to a macro, but preserve the side-effect-safe usage of the macro arguments
Channel drivers assume that when their indicate callback
is invoked, that the channel on which the callback was called
is locked. This patch corrects an instance in chan_agent where
a channel's indicate callback is called directly without first
locking the channel.
This was leading to some observed locking issues in chan_local,
but considering that all channel drivers operate under the
same expectations, the generic fix in chan_agent is the right
way to go.
Move all the XML documentation API from pbx.c to xmldoc.c.
Export the XML documentation API:
ast_xmldoc_build_synopsis()
ast_xmldoc_build_syntax()
ast_xmldoc_build_description()
ast_xmldoc_build_seealso()
ast_xmldoc_build_arguments()
ast_xmldoc_printable()
ast_xmldoc_load_documentation()
Sean Bright [Sun, 9 Nov 2008 01:59:59 +0000 (01:59 +0000)]
In order to move away from nested function use, some changes to the recently introduced
ast_channel_search_locked need to be made. Specifically, the caller needs to be able to
pass arbitrary data which in turn is passed to the callback. This patch addresses all
of the nested functions currently in asterisk trunk.
Use static functions here instead of nested ones. This requires a small
change to the ast_bridge_config struct as well. To understand the reason
for this change, see the following post:
Mark Michelson [Fri, 7 Nov 2008 23:41:44 +0000 (23:41 +0000)]
Set the invite state to INV_CANCELLED in a place that
makes more sense. Where it was set before, it was impossible
to actually delay sending a CANCEL if we had not yet received
a provisional response to an INVITE.
Sean Bright [Fri, 7 Nov 2008 22:39:30 +0000 (22:39 +0000)]
Add ability to pass arbitrary data to the ao2_callback_fn (called from
ao2_callback and ao2_find). Currently, passing OBJ_POINTER to either
of these mandates that the passed 'arg' is a hashable object, making
searching for an ao2 object based on outside criteria difficult.
Reviewed by Russell and Mark M. via ReviewBoard:
http://reviewboard.digium.com/r/36/
Mark Michelson [Fri, 7 Nov 2008 21:14:49 +0000 (21:14 +0000)]
Remove one more instance of the sample configuration
lying about what's possible. The tz cannot be set in a
context like this. It can only be set in the general
section or per-mailbox.
Thanks to sasargen on #asterisk-dev for pointing this out
Tilghman Lesher [Fri, 7 Nov 2008 20:13:32 +0000 (20:13 +0000)]
Send call release with unallocated cause instead of normal call clearing, when
invalid extension is called.
(closes issue #13408)
Reported by: adomjan
Patches:
chan_dahdi.c-ss7-unallocated-2 uploaded by adomjan (license 487)
Sean Bright [Fri, 7 Nov 2008 16:18:52 +0000 (16:18 +0000)]
Convert open-coded linked list in indications to the AST_LIST_* macros. This
cleans the code up some and should make it more maintainable as time goes on.
Reviewed by Russell, Kevin, Mark M., and Tilghman via ReviewBoard:
http://reviewboard.digium.com/r/34/
Russell Bryant [Fri, 7 Nov 2008 15:01:02 +0000 (15:01 +0000)]
Clarify which part of OBJ_MULTIPLE is not implemented, and under what case it
is perfectly fine to use. (Inspired by a question I received about my last
commit.)
Russell Bryant [Fri, 7 Nov 2008 14:50:30 +0000 (14:50 +0000)]
Fix some code in chan_sip that was intended to unlink multiple objects from a
container. The OBJ_MULTIPLE flag must be provided here. Otherwise, this would
only remove a single object.
make S_OR and S_COR safe to use even if the parameters are function calls or have side effects. it still bothers me that these are called S_OR and not something like ast_string_or, but that's water over the bridge
The documentation listed the ability to set 'maxmsg' per
context. The truth is that you can only set this in the general section
or per mailbox. Thus I am updating the sample config file to be more
accurate.
Thanks to sasargen on IRC for bringing up this issue.
Simplify the output of [See Also].
Functions are printed without parenthesis like: FUNTION
Applications are printed with parenthesis like: AppName()
Cli commands are printed like: 'core show application'
The other type of references are printed as they are inside the <ref> tag.
Sean Bright [Tue, 4 Nov 2008 23:23:39 +0000 (23:23 +0000)]
Introduce a new API call ast_channel_search_locked, which iterates through the
channel list calling a caller-defined callback. The callback returns non-zero
if a match is found. This should speed up some of the code that I committed
earlier today in chan_sip (which is also updated by this commit).
Reviewed by russellb and kpfleming via ReviewBoard:
http://reviewboard.digium.com/r/28/
Tilghman Lesher [Tue, 4 Nov 2008 23:03:00 +0000 (23:03 +0000)]
Switch to using a thread condition to signal that a child thread is ready for
work, rather than a busy wait.
(closes issue #13011)
Reported by: jpgrayson
Patches:
chan_iax2_find_idle.patch uploaded by jpgrayson (license 492)
On busy systems, it's possible for the values checked within a single line
of code to change, unless the structure is locked to ensure a consistent
state.
(closes issue #13717)
Reported by: kowalma
Patches:
20081102__bug13717.diff.txt uploaded by Corydon76 (license 14)
Tested by: kowalma
........
Sean Bright [Tue, 4 Nov 2008 17:00:45 +0000 (17:00 +0000)]
Allow devices that accept dialog-info+xml (like snoms) to get the Caller ID of
the calling party when subscribed to the state of an extension that is ringing.
This has some limitations which are documented in sip.conf.sample.
improve configure script to remember the previous value of each dependency in build_tools/menuselect-deps, so that (once it has been written) menuselect can use this information to warn the user when a previously met dependency is no longer met
along the way, change tags used in configure script, menuselect-deps and code for various dependencies to be consistently named
Attempting to expunge a mailbox when the mailstream is NULL will crash Asterisk.
(Closes issue #13829)
Reported by: jaroth
Patch by: me (modified jaroth's patch)
........
Olle Johansson [Mon, 3 Nov 2008 15:16:33 +0000 (15:16 +0000)]
Adding a separation of remote authentication and our authentication.
remotesecret => our password for a remote service
secret => our authentication when someone calls us
Secret => still has both functions if remotesecret is not used.
instead of trying to forcibly load res_agi when app_stack is loaded (even if the administrator didn't want it loaded), use GCC weak symbols to determine whether it was loaded already or not; if it was loaded, then use it.