Russell Bryant [Sun, 2 Nov 2008 05:47:13 +0000 (05:47 +0000)]
Modify the Makefile logic for extracting documentation.
- Build the documentation when you run "make", as opposed to "make install"
- Only rebuild the documentation when source code has been changed
Sean Bright [Sun, 2 Nov 2008 04:14:20 +0000 (04:14 +0000)]
There is a troublesome assert() in the alsa/control.h header that causes
GCC 4.3.2 to complain that the passed argument will always evaluate to
true. So to get things to compile, disable assert when building
chan_usbradio.so.
Russell Bryant [Sat, 1 Nov 2008 21:10:07 +0000 (21:10 +0000)]
Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format. Currently, a new format is available for
applications and dialplan functions. A good number of conversions to the new format
are also included.
For more information, see the following message to asterisk-dev:
Mark Michelson [Fri, 31 Oct 2008 20:05:46 +0000 (20:05 +0000)]
* Fixed timeout logic in the dialing API as setting timeouts
had no effect
* Updated dialing API documentation to indicate that timeouts
are specified in milliseconds
* Added a new timeout argument to the Page application. If time
expires, any endpoints which have not answered will be hung up.
Terry Wilson [Fri, 31 Oct 2008 18:55:33 +0000 (18:55 +0000)]
Recent CDR fixes moved execution of the 'h' exten into the bridging code, so variables that were set after ast_bridge_call was called would not show up in the 'h' exten. Added a callback function to handle setting variables, etc. from w/in the bridging code. Calls back into a nested function within the function calling ast_bridge_call
Tilghman Lesher [Fri, 31 Oct 2008 17:18:49 +0000 (17:18 +0000)]
Failover for func_odbc, allowing an INSERT query to be performed when the UPDATE query initially
affects 0 rows.
(closes issue #13083)
Reported by: Corydon76
Patches:
20081031__bug13083.diff.txt uploaded by Corydon76 (license 14)
Russell Bryant [Thu, 30 Oct 2008 19:28:06 +0000 (19:28 +0000)]
Fix a bug in AST_SCHED_REPLACE_UNREF(). The reference count of the object
_must_ be increased before creating the scheduler entry. Otherwise, you
create a race condition where the reference count may hit zero and the
object can disappear out from under you. This could also would have
incorrectly decreased the reference count in the case that the scheduler
add failed.
Mark Michelson [Thu, 30 Oct 2008 19:23:16 +0000 (19:23 +0000)]
I just noticed this construct and thought it was
silly to have a bunch of case statements with duplicated
code in each case. Instead, just use the built-in fallthrough
capability of case statements and reduce the code to
a single instance
Russell Bryant [Thu, 30 Oct 2008 19:21:53 +0000 (19:21 +0000)]
Modify the documentation of the sip_registry struct
- Remove a comment that says that the monitor thread is the only one that
ever touches these objects. This is no longer the case with TCP. Also,
I would eventually like to get the scheduler in its own thread, so this
is just a poor assumption to make.
- Note that reference counting of these objects with respect to scheduler
entries is not complete. There are some leaked references when deleting
scheduler entries.
Mark Michelson [Thu, 30 Oct 2008 16:38:19 +0000 (16:38 +0000)]
After seeing another problem in #asterisk stemming from
the low default value of featuredigittimeout, I decided it
was high time to change it. I have changed the default to
2000 ms based on a suggestion from Leif Madsen.
Mark Michelson [Wed, 29 Oct 2008 20:53:53 +0000 (20:53 +0000)]
If there was no named defined in a voicemail.conf mailbox
entry, then app_directory would crash when attempting to
read that entry from the file. We now check for the NULL
or empty string properly so that there will be no crash.
A little documentation cross-ref between features and
dial and queue... I wasted some time (stupidly) trying
to get the one-touch parking stuff working, because it
didn't occur to me that I had to also have the corresponding
options in the dial command! Duh! (In all this time, I never
set this up before!)
So, to keep some poor fool from suffering the same fate,
I made the features.conf.sample file mention the corresponding
opts in dial/queue; and the docs for dial/app specifically
mention the corresponding decls in the feature.conf file.
I hope this doesn't spoil some vast, eternal plan...
The magic trick to avoid this crash is not to
try to find the channel by name in the list,
which is slow and resource consuming, but rather
to pay attention to the result codes from the
ast_bridge_call, to which I added the
AST_PBX_NO_HANGUP_PEER_PARKED value, which
now are returned when a channel is parked.
Why? because CDR's aren't generated via parking,
so nothing is needed, but if a transfer occurred,
there are critical things I need.
If you get AST_PBX_KEEPALIVE,
then don't touch the channel pointer.
If you get AST_PBX_NO_HANGUP_PEER, or
AST_PBX_NO_HANGUP_PEER_PARKED, then don't
touch the peer pointer.
Updated the several places where the results
from a bridge were not being properly obeyed,
and fixed some code I had introduced so that
the results of the bridge were not overridden
(in trunk).
All the places that previously tested for
AST_PBX_NO_HANGUP_PEER now have to check for
both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED.
I tested this against the 4 common parking
scenarios:
1. A calls B; B answers; A parks B; B hangs up while A is getting the parking
slot announcement, immediately after being put on hold.
2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but
before the park times out.
3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold.
4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out.
No crash.
I also ran the scenarios above against valgrind, and accesses looked good.
Tilghman Lesher [Tue, 28 Oct 2008 21:38:26 +0000 (21:38 +0000)]
Only re-add the io port if it was closed, otherwise reload causes a memory
leak.
(closes issue #13785)
Reported by: eliel
Patches:
chan_mgcp.c.patch uploaded by eliel (license 64)
Reset all DIAL variables back to blank, in case Dial is called multiple times
per call (which could otherwise lead to inconsistent status reports).
(closes issue #13216)
Reported by: ruddy
Patches:
20081014__bug13216.diff.txt uploaded by Corydon76 (license 14)
Tested by: ruddy
........
Inherit ALL elements of CallerID across a local channel.
(closes issue #13368)
Reported by: Peter Schlaile
Patches:
20080826__bug13368.diff.txt uploaded by Corydon76 (license 14)
........
Tilghman Lesher [Mon, 27 Oct 2008 16:24:11 +0000 (16:24 +0000)]
Oops, only delete the ARG variables once upon release. The following section
would have removed them again (removing variables from 2 stack frames, instead
of just one).
Since passing \0 as the second argument to strchr is valid (and will
match the trailing \0 of a string) we need to check that first, otherwise
we end up with incorrect results. Fix suggested by reporter.
Russell Bryant [Sat, 25 Oct 2008 11:02:11 +0000 (11:02 +0000)]
Merged revisions 151905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r151905 | russell | 2008-10-25 05:59:02 -0500 (Sat, 25 Oct 2008) | 8 lines
Move AMI initialization to occur after loading modules. This prevents a
deadlock when someone tries to initiate a module reload from the AMI just
as Asterisk is starting.
(closes issue #13778)
Reported by: hotsblanc
Fix suggested by hotsblanc
Backport fix from 1.6.0 that allows you to set parkedcalltransfers=no|caller|callee|both, but default to both which would be the equivalent of the existing behaviour.
The problem was that if someone parked a call, the callee and caller would both get assigned the builtin transfer feature, which would not only be potentially giving someone the ability to transfer themselves when they shouldn't have it, but would also dissallow reinviting the media off of the call.
(closes issue #12854)
Reported by: davidw
Patches:
parkingfix4.diff.txt uploaded by otherwiseguy
Tested by: davidw, otherwiseguy
........
BJ Weschke [Wed, 22 Oct 2008 20:45:03 +0000 (20:45 +0000)]
revert the changes in issue #13705 - it's being re-opened as while the results fixed the complaint in the issue, it introduced other more undesirable issues than what was already reported
Mark Michelson [Wed, 22 Oct 2008 20:05:14 +0000 (20:05 +0000)]
Change some logical ands to bitwise ands and add
messages alerting that a channel is being ignored
if the PROC_DAHDI_NOCHAN option is set in process_dahdi.
Mark Michelson [Tue, 21 Oct 2008 23:54:41 +0000 (23:54 +0000)]
Make the sip_standard_port function more granular by allowing separate
type and port arguments. This is necessary because when building our From
and Contact headers, we need to be absolutely sure that we are placing our
source port there and not the peer's source port.
Mark Michelson [Tue, 21 Oct 2008 23:27:45 +0000 (23:27 +0000)]
If a peer uses any transport other than UDP, then MWI will
fail for that peer since sip_alloc will allocate a sip_pvt with
a default transport of UDP. This change resets the socket type
immediately after allocating the sip_pvt in sip_send_mwi_from_peer,
so that the proceeding call to create_addr_from_peer does not fail
right away. The socket data from the peer is properly copied to
the sip_pvt in create_addr_from_peer.
Tilghman Lesher [Tue, 21 Oct 2008 15:20:50 +0000 (15:20 +0000)]
Default file modes should always be full read and write, to allow the system
administrator to make the decision of what permissions will actually be given,
through the use of the process umask.
(Closes issue# 13751)
break up acinclude.m4 into individual files, which will make it easier to maintain, easier to add new macros (less patching) and will ease maintenance of these macros across Asterisk branches
........
Kevin P. Fleming [Sun, 19 Oct 2008 19:11:28 +0000 (19:11 +0000)]
cleaup of the TCP/TLS socket API:
1) rename 'struct server_args' to 'struct ast_tcptls_session_args', to follow coding guidelines
2) make ast_make_file_from_fd() static and rename it to something that indicates what it really is for (again coding guidelines)
3) rename address variables inside 'struct ast_tcptls_session_args' to be more descriptive (dare i say it... coding guidelines)
4) change ast_tcptls_client_start() to use the new 'remote_address' field of the session args for the destination of the connection, and use the 'local_address' field to bind() the socket to the proper source address, if one is supplied
5) in chan_sip, ensure that we pass in the PP address we are bound to when creating outbound (client) connections, so that our connections will appear from the correct address
Olle Johansson [Sun, 19 Oct 2008 07:20:40 +0000 (07:20 +0000)]
Adding changes from train and flight back home from SIPit23 in Lannion, France.
- Additional comments on TCP/TLS implementation
- Some additions for new drafts/rfcs (no new functionality really, mostly documentation)
- Other random small fixes
Michiel van Baak [Sat, 18 Oct 2008 09:02:36 +0000 (09:02 +0000)]
dont use deprecated commands in the init scripts.
(closes issue #13720)
Reported by: decryptus_proformatique
Patches:
contrib_initd_module_reload.patch uploaded by decryptus (license 555)
With mods by me to fix stop commands as well
BJ Weschke [Sat, 18 Oct 2008 02:18:33 +0000 (02:18 +0000)]
Using the GetVar handler in AMI is potentially dangerous (insta-crash [tm]) when you use a dialplan function that requires a channel and then you don't provide one or provide an invalid one in the Channel: parameter. We'll handle this situation exactly the same way it was handled in pbx.c back on r61766.
We'll create a bogus channel for the function call and destroy it when we're done. If we have trouble allocating the bogus channel then we're not going to try executing the function call at all and run the risk of crashing.
Merge in patch for #13454. Includes CallRereouting dialplan application, option for discard of remote hold messages, and using the alternate logical channel mapping in Q.SIG instead of the default physical channel mapping.
Correctly allow chan_dahdi to compile against older versions of Zaptel.
Don't always define HAVE_ZAPTEL_CHANALARMS (since we check if it's defined..)
Minor cleanup to make things clear.
Olle Johansson [Fri, 17 Oct 2008 08:13:13 +0000 (08:13 +0000)]
Make sure we support nested functions with GCC 4.01 OS/X. This might not be OS/X only,
but I'll leave it to kpfleming to add this to the configure script for testing.
Tilghman Lesher [Fri, 17 Oct 2008 04:28:13 +0000 (04:28 +0000)]
Fix option handling code.
(closes issue #11040)
Reported by: DEA
Patches:
rt-meetme-flag-fixes-v2.txt uploaded by DEA (license 3)
with additional fixes by me