Commit Graph

745 Commits

Author SHA1 Message Date
Corey Farrell 5dde111719 Build System: Add support for checking alembic branches.
* Add 'check-alembic' target to root Makefile.
* Create build_tools/make_check_alembic to do the actual checks.

ASTERISK-25685

Change-Id: Ibb3cae7d1202ac23dc70b0f3b5801571ad46b004
2016-01-21 17:15:35 -06:00
Corey Farrell b0bf189908 Fix cli display of build options.
A previous commit reduced the AST_BUILDOPTS compiler define to
only include options that affected ABI.  This included some options
that were previously displayed by cli "core show settings".  This
change corrects the CLI display while still restricting buildopts.h
to ABI effecting options only.

ASTERISK-25434 #close
Reported by: Rusty Newton

Change-Id: Id07af6bedd1d7d325878023e403fbd9d3607e325
2015-11-04 09:15:51 -05:00
Matt Jordan 80cf4960ff Makefile: Add a rule 'basic-pbx' that installs the Basic PBX configs
This patch adds a rule for installing the Super Awesome Company based 'Basic
PBX' configuration files. As part of adding this rule, a bit of the content
that makes up installing the configuration files under the 'samples' target
was refactored into a make subroutine for usage by additional later config
make targets.

Change-Id: I6c2e27906f73e2919a2b691da0be20ae70302404
2015-10-31 13:40:17 -05:00
Scott Griepentrog d6472d96b3 Scripts: check file versions of Asterisk and dependencies
To help in diagnosing mismatched modules and libraries, this
script scans for version, repository, and source information
and reports what is found.

ASTERISK-25376 #close
Reported by: Ashley Sanders

Change-Id: Ib0642d0fb96712476f59760d6d137a24633fe2d6
2015-09-25 15:07:44 -05:00
David M. Lee 9fca378b36 Fixes for OS X
* Add some type casting so tv_usec can really be a long, instead of
   some strange platform specific type.

 * Add some .dylib style files to .gitignore.

 * Switch from using -Xlinker to -Wl,. For [reasons unknown][], newer
   versions of GCC, when compiling the Homebrew formula for Asterisk,
   are not properly passing the -Xlinker options to the linker. Given
   that -Wl, does exactly the [same thing][], and does it properly, this
   patch changes the -Xlinker options to use -Wl, instead.

 [reasons unknown]: http://bit.ly/1SUbEYx
 [same thing]: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

Change-Id: Id5e6b3c6cc86282ea5fca630dc3991137c5bf4dd
2015-06-05 11:23:16 -05:00
Sebastian Kemper c624e4bae1 General: Fix recent menuselect-related cross compile regression
MAKE_MENUSELECT currently sets CC to CC, which is the compiler for the
target platform. But menuselect is to be run on the build system, so
BUILD_CC needs to be used instead - like it was in the past, before the
recent changes (https://reviewboard.asterisk.org/r/4370/). This is the
patch for ASTERISK-25074.

ASTERISK-25074 #close
Reported by: Sebastian Kemper
Tested by: Sebastian Kemper

Change-Id: I8a2b1fc5deb6ad2b80f49baca35b1b13d468ebf8
2015-05-12 08:01:27 -05:00
George Joseph cf637f2510 doc: Make progdocs play nice with git
Moved contrib/asterisk-ng-doxygen to doc/asterisk-ng-doxygen.in

Changed /Makefile to copy asterisk-ng-doxygen.in to
asterisk-ng-doxygen then modify it with version instead of
modifying asterisk-ng-doxygen directly.  Updated clean
targets as well.

Updated /.gitignore and doc/.gitignore.

Change-Id: I38712d3e334fa4baec19d30d05de8c6f28137622
2015-05-07 22:26:31 -06:00
Corey Farrell c232ff3af0 Git Migration: Create doc/rest-api when needed.
Create the directory './doc/rest-api' at the start of 'make ari-stubs'
to prevent an error when documentation is generated.  The directory is
also added to git ignores.

ASTERISK-25027
Reported by: Corey Farrell

Change-Id: Iaccc7f0138501c23aa78feaca2f3cce9e68cbc1b
2015-04-29 06:24:51 -05:00
Corey Farrell abf10a1d4c Build System: Enable use of ~/.asterisk.makeopts and /etc/asterisk.makeopts.
The Makefile claims that you can set default menuselect options by creating
~/.asterisk.makeopts or /etc/asterisk.makeopts, but they are never read.
The rule for menuselect.makeopts is only allowed to run if the active target
is 'menuselect', but the menuselect target doesn't depend on
menuselect.makeopts.  A dot (wildcard character) was added so the rule will
be active for the targets that cause it to run: nmenuselect, cmenuselect,
and gmenuselect.

ASTERISK-13271 #close
Reported by: John Nemeth

Change-Id: Ibde804ff196283def49ccb9432fbf224a22586e2
2015-04-15 15:29:17 -05:00
Matthew Jordan 29304d10a0 Add support for the clang compiler; update RAII_VAR to use BlocksRuntime
RAII_VAR, which is used extensively in Asterisk to manage reference counted
resources, uses a GCC extension to automatically invoke a cleanup function
when a variable loses scope. While this functionality is incredibly useful
and has prevented a large number of memory leaks, it also prevents Asterisk
from being compiled with clang.

This patch updates the RAII_VAR macro such that it can be compiled with clang.
It makes use of the BlocksRuntime, which allows for a closure to be created
that performs the actual cleanup.

Note that this does not attempt to address the numerous warnings that the clang
compiler catches in Asterisk.

Much thanks for this patch goes to:
* The folks on StackOverflow who asked this question and Leushenko for
  providing the answer that formed the basis of this code:
  http://stackoverflow.com/questions/24959440/rewrite-gcc-cleanup-macro-with-nested-function-for-clang
* Diederik de Groot, who has been extremely patient in working on getting this
  patch into Asterisk.

Review: https://reviewboard.asterisk.org/r/4370/

ASTERISK-24133
ASTERISK-23666
ASTERISK-20399
ASTERISK-20850 #close
Reported by: Diederik de Groot
patches:
  RAII_CLANG.patch uploaded by Diederik de Groot (License 6600)
........

Merged revisions 432807 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 432808 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-12 12:40:23 +00:00
Tzafrir Cohen 4219c40775 install init.d files on GNU/kFreeBSD
Review: https://reviewboard.asterisk.org/r/4118/
........

Merged revisions 426926 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 426927 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 426933 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 426934 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-31 16:52:42 +00:00
Corey Farrell bf684b63a3 REF_DEBUG: Install refcounter.py to $(ASTDATADIR)/scripts
This change ensures refcounter.py is installed to a place where it
can be found by the Asterisk testsuite if REF_DEBUG is enabled.

ASTERISK-24432 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4094/
........

Merged revisions 426830 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 426831 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 426832 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 426833 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-31 03:09:48 +00:00
George Joseph 5e10e369b1 build: Force -fsigned-char on platforms where the default for char is unsigned
gcc on the ARM platform defaults 'char' to 'unsigned char' whereas Intel and
SPARC default to 'signed char'.  This is only an issue in the rare cases where
negative values are assigned to a 'char' but this this patch insures
compatibility by detecting platforms that default to 'unsigned' and adding an
'-fsigned-char' flag to _ASTCFLAGS.

If compiling for ARM (native or cross-compile) be sure to run ./bootstrap.sh
and ./configure to regenerate the build files.  You shouldn't have to do this
for Intel or SPARC.

Tested-by: George Joseph

Review: https://reviewboard.asterisk.org/r/4091/
........

Merged revisions 425964 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425965 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-19 17:09:38 +00:00
Walter Doekes c0ac874106 build: Relax badshell tilde test to allow for ~ in middle of DESTDIR.
The main Makefile has a target test called 'badshell' that tests if
DESTDIR does not happen to have an an-expanded tilde (~).  This might
be the case if you run: make install DESTDIR=~/somewhere/

That test also disallowed valid tildes in directory names. The test is
now changed to only trigger on a tilde at the start of the path.

ASTERISK-13797 #close
Reported by: Tzafrir Cohen

Review: https://reviewboard.asterisk.org/r/4064/
........

Merged revisions 425291 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 425292 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 425293 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425294 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-12 07:57:06 +00:00
David M. Lee b89491e39c Only install dahdi_span_config_hook if DAHDI is enabled
This patch changes the install to only install the hook script if
DAHDI is enabled. It also adds the script to the uninstall task, and
moves the DAHDI_UDEV_HOOK_DIR variable so that it's not between the
_MAKEOPTS variables and their comment.

This allows installs which specify a --prefix to work normally, as
long as they don't enable DAHDI.

Review: https://reviewboard.asterisk.org/r/3972/
........

Merged revisions 423281 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18 15:07:12 +00:00
Matthew Jordan fc0fecb476 configs: Move sample config files into a subdirectory of configs
This moves all samples configs from configs/ to configs/samples. This allows
for additional sets of sample configuration files to be added in the future.

Review: https://reviewboard.asterisk.org/r/3804/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-17 21:17:28 +00:00
Tzafrir Cohen da469fd9f6 dahdi_span_config_hook: automatically register new dahdi channels
Install a hook script for DAHDI to register new spans with Asterisk
automatically by running:

  asterisk -rx 'dahdi create channel FIRST LAST'

Review: https://reviewboard.asterisk.org/r/3157/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 14:08:02 +00:00
George Joseph 682357dced astobj2: Add an ao2_replace macro to astobj2.h
This macro replaces one object reference with another cleaning up the original.

param dst Pointer to the object that will be cleaned up.
param src Pointer to the object replacing it.

src's ref count is bumped if it's non-NULL.
dst's ref count is decremented if it's non-NULL.
src is assigned to dst,

This patch was reviewed on IRC by coreyfarrell and mjordan.
 
Tested by: George Joseph
........

Merged revisions 416995 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-22 18:53:26 +00:00
Walter Doekes 3b0ad74e17 safe_asterisk: Overwrite old safe_asterisk on make install.
From now on, make install will overwrite safe_asterisk with the
latest version. You need to move any local modifications to files
inside /etc/asterisk/startup.d, if you have any.

See also commits r394939 and r397938.

ASTERISK-21965 #close
Patches:
  safe_asterisk.patch uploaded by jkister (License 6232, modified by me)
........

Merged revisions 415748 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-12 07:52:59 +00:00
Matthew Jordan 7e506c185c buildsystem: Unbreak the build (infloop) on Asterisk 11+
Apparently r408084 ( https://reviewboard.asterisk.org/r/3212/ ) broke the
build. This patch fixes it by ignoring the .lastclean dependencies if the
MENUSELECT_EMBED variable is not defined.

patches:
  tmp.diff uploaded by wdoekes (License 5674)

Review: https://reviewboard.asterisk.org/r/3228/
........

Merged revisions 408193 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 408194 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-16 03:06:11 +00:00
Walter Doekes 3a55eb88d2 buildsystem: Don't force main to depend on everything else.
Directory 'main' only needs to depend on embedded modules. If no
module embedding is selected, the dependency is dropped.

Review: https://reviewboard.asterisk.org/r/3212/
........

Merged revisions 408083 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 408084 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 408085 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 13:31:48 +00:00
Tzafrir Cohen 199c7de764 install_subst: helper script for installing with path substitution
A helper script to copy a source file substituting any
__ASTERISK_<foo>_DIR__ with the content of $AST<foo>DIR.

Review: https://reviewboard.asterisk.org/r/3202/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 08:52:07 +00:00
Matthew Jordan f46b30bd36 func_pjsip_endpoint: Add PJSIP_ENDPOINT function for querying endpoint details
This patch adds a new function, PJSIP_ENDPOINT, which lets the dialplan query,
for any endpoint, any property configured on an endpoint. This function is a
companion to the CHANNEL function, which can be used to extract the endpoint
name for a channel.

Review: https://reviewboard.asterisk.org/r/3035
........

Merged revisions 403616 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-11 12:31:57 +00:00
David M. Lee 14dc5776d2 This is just a quick script for dumping swagger-ui into static-http,
so that it can be served by the Asterisk web server.

I had to change the Makefile in order to recursively install content
from the static-http directory, hence the code review instead of just
putting it in.

Review: https://reviewboard.asterisk.org/r/2924/
........

Merged revisions 401261 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-18 21:51:01 +00:00
Tzafrir Cohen e2204a1e61 man pages for astdb2bdb and astdb2sqlite3
Review: https://reviewboard.asterisk.org/r/2898/
........

Merged revisions 400279 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 400281 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02 18:28:03 +00:00
David M. Lee 32d325439f Fixed 'make clean' for wiki docs
........

Merged revisions 398198 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-03 17:19:30 +00:00
Matthew Jordan 449afdd9e8 Revert r394939 due to (numerous) objections
The patch from ASTERISK-21965 was committed perhaps a bit too hastily. Walter
and Tzafrir have pointed out numerous issues with the approach and have
propsed an alternative in r/2757. Since it's not a time critical issue and
is not worth holding up the release of 12 for it, I've gone ahead and reverted
r394939 from 12/trunk and re-opened ASTERISK-21965.
........

Merged revisions 397938 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 20:22:08 +00:00
Matthew Jordan 3f0148cd67 Recursively search for '.c' files when making documentation with 'make full'
Without this, documentation defined in sub-folders is ignored. Since having
properly generated documentation is especially important in Asterisk 12 -
not having it can cause a module to not load - 'make full' needs to look in
all .c files.
........

Merged revisions 397924 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 16:05:23 +00:00
Kinsey Moore 03090a88ba Fix documentation replication issues
This prevents XML documentation duplication by expanding channel and
bridge snapshot tags into channel and bridge snapshot parameter sets
with a given prefix or defaulting to no prefix. This also prevents
documentation from becoming fractured and out of date by keeping all
variations of the documentation in template form such that it only
needs to be updated once and keeps maintenance to a minimum.

Review: https://reviewboard.asterisk.org/r/2708/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01 17:07:52 +00:00
Matthew Jordan 54803338b4 Always install safe_asterisk; add configuration file support
This patch modifies the behavior of safe_asterisk in two ways:
(1) It modifies the Asterisk Makefile such that safe_asterisk is always
    installed on a 'make install'. This was done as bugfixes in the
    safe_asterisk script were not applied in previous version of Asterisk
    without first removing the old version of the script.
(2) In order to keep a newly installed version of safe_asterisk from impacting
    local modifications, a new config file - safe_asterisk.conf.sample - has
    been provided. Settings that were previously modified in safe_asterisk can
    be set there instead.

(closes issue ASTERISK-21965)
Reported by: Jeremy Kister
patches:
  safe_asterisk.patch uploaded by jkister (License 6232)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 18:12:00 +00:00
David M. Lee a75fd32212 ARI - channel recording support
This patch is the first step in adding recording support to the
Asterisk REST Interface.

Recordings are stored in /var/spool/recording. Since recordings may be
destructive (overwriting existing files), the API rejects attempts to
escape the recording directory (avoiding issues if someone attempts to
record to ../../lib/sounds/greeting, for example).

(closes issue ASTERISK-21594)
(closes issue ASTERISK-21581)
Review: https://reviewboard.asterisk.org/r/2612/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 17:58:45 +00:00
David M. Lee c9a3d4562d Update events to use Swagger 1.3 subtyping, and related aftermath
This patch started with the simple idea of changing the /events data
model to be more sane. The original model would send out events like:

    { "stasis_start": { "args": [], "channel": { ... } } }

The event discriminator was the field name instead of being a value in
the object, due to limitations in how Swagger 1.1 could model objects.
While technically sufficient in communicating event information, it was
really difficult to deal with in terms of client side JSON handling.

This patch takes advantage of a proposed extension[1] to Swagger which
allows type variance through the use of a discriminator field. This had
a domino effect that made this a surprisingly large patch.

 [1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ

In changing the models, I also had to change the swagger_model.py
processor so it can handle the type discriminator and subtyping. I took
that a big step forward, and using that information to generate an
ari_model module, which can validate a JSON object against the Swagger
model.

The REST and WebSocket generators were changed to take advantage of the
validators. If compiled with AST_DEVMODE enabled, JSON objects that
don't match their corresponding models will not be sent out. For REST
API calls, a 500 Internal Server response is sent. For WebSockets, the
invalid JSON message is replaced with an error message.

Since this took over about half of the job of the existing JSON
generators, and the .to_json virtual function on messages took over the
other half, I reluctantly removed the generators.

The validators turned up all sorts of errors and inconsistencies in our
data models, and the code. These were cleaned up, with checks in the
code generator avoid some of the consistency problems in the future.

 * The model for a channel snapshot was trimmed down to match the
   information sent via AMI. Many of the field being sent were not
   useful in the general case.
 * The model for a bridge snapshot was updated to be more consistent
   with the other ARI models.

Another impact of introducing subtyping was that the swagger-codegen
documentation generator was insufficient (at least until it catches up
with Swagger 1.2). I wanted it to be easier to generate docs for the API
anyways, so I ported the wiki pages to use the Asterisk Swagger
generator. In the process, I was able to clean up many of the model
links, which would occasionally give inconsistent results on the wiki. I
also added error responses to the wiki docs, making the wiki
documentation more complete.

Finally, since Stasis-HTTP will now be named Asterisk REST Interface
(ARI), any new functions and files I created carry the ari_ prefix. I
changed a few stasis_http references to ari where it was non-intrusive
and made sense.

(closes issue ASTERISK-21885)
Review: https://reviewboard.asterisk.org/r/2639/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:41 +00:00
Jason Parker 5b40420813 Fix typo with XML docs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 20:25:55 +00:00
David M. Lee 6e6652518d Fix build problem on OS X Mountain Lion (10.8)
For about forever, our build flags for OS X have been slightly off, but
good enough to build and run. Apparently they aren't good enough any more.

Previously, we would compile with macosx-version-min unset and link with
it set. This combination, using GCC 4.8, on Mountain Lion, would create a
bad executable ("Illegal Instruction: 4", or something like that)

This patch consistently sets macosx-version-min for both compiling and
linking, which makes everything happy enough to build and run.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-19 22:52:23 +00:00
Walter Doekes 390b994fce Let find do its own globbing.
Previously a stray .c file would cause xmldocs to not get built.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 07:57:28 +00:00
David M. Lee 1c21b8575b This patch adds a RESTful HTTP interface to Asterisk.
The API itself is documented using Swagger, a lightweight mechanism for
documenting RESTful API's using JSON. This allows us to use swagger-ui
to provide executable documentation for the API, generate client
bindings in different languages, and generate a lot of the boilerplate
code for implementing the RESTful bindings. The API docs live in the
rest-api/ directory.

The RESTful bindings are generated from the Swagger API docs using a set
of Mustache templates.  The code generator is written in Python, and
uses Pystache. Pystache has no dependencies, and be installed easily
using pip. Code generation code lives in rest-api-templates/.

The generated code reduces a lot of boilerplate when it comes to
handling HTTP requests. It also helps us have greater consistency in the
REST API.

(closes issue ASTERISK-20891)
Review: https://reviewboard.asterisk.org/r/2376/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-22 14:58:53 +00:00
Jason Parker f4870aa71c Don't unnecessarily rebuild things on every run of 'make'.
Review: https://reviewboard.asterisk.org/r/2449/
........

Merged revisions 385745 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 385768 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-15 17:26:49 +00:00
Walter Doekes 5bf283d406 Clean up Makefile "warning" clutter when makeopts doesn't exist.
Review: https://reviewboard.asterisk.org/r/2304


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08 18:24:50 +00:00
David M. Lee 0da0797cb0 Fixed spurious rebuilds of func_version.
func_version.so was being rebuilt every time, because build.h was
changing every build, because of the cleantest dependency that was
added in r384410 to fix parallel make bugs.

Now build.h will only be created if it does not exist, which was the
original behavior of the Makefile.
........

Merged revisions 384544 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 384545 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-02 17:35:45 +00:00
David M. Lee 2d45dbc79b Fix parallel make problems.
Occasionally, make -j would fail due to missing includes, or other
unusual errors.

This was due to the 'cleantest' target, which was designed to force a
make clean when some change in the code would cause the typical
depedency checking to fail. Several targets in the main Makefile did
not depend upon cleantest, hence would run in parallel to it. By
adding the dependency, make -j runs happily now.

Review: https://reviewboard.asterisk.org/r/2418/
........

Merged revisions 384410 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 384411 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-01 13:34:51 +00:00
Matthew Jordan d04ab3c645 Add CLI configuration documentation
This patch allows a module to define its configuration in XML in source, such
that it can be parsed by the XML documentation engine. Documentation is
generated in a two-pass approach:

1. The documentation is first generated from the XML pulled from the source
2. The documentation is then enhanced by the registration of configuration
   options that use the configuration framework

This patch include configuration documentation for the following modules:
 * chan_motif
 * res_xmpp
 * app_confbridge
 * app_skel
 * udptl

Two new CLI commands have been added:
 * config show help - show configuration help by module, category, and item
 * xmldoc dump - dump the in-memory representation of the XML documentation to
   a new XML file.

Review: https://reviewboard.asterisk.org/r/2278
Review: https://reviewboard.asterisk.org/r/2058

patches:
  on review 2058 uploaded by twilson



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 13:38:12 +00:00
Jason Parker eb61bb96b7 Fix how we build pjproject.
Allow parallel builds, better tolerate failures, build faster.

This also stops running dependencies before top-level configure has been run.

(closes issue ASTERISK-20815)

Review: https://reviewboard.asterisk.org/r/2292/
........

Merged revisions 380816 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-04 19:52:14 +00:00
David M. Lee bc97a4ded1 Up the minimum OS X version to 10.6.
* This allows us to remove some special-case build logic.
 * 10.5 is down to less that 8% of the OS X market share. 10.4 is down to 
   under 2%.
 * Apple is no longer releasing security updates for 10.5 and earlier.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18 22:42:38 +00:00
David M. Lee 7bd50bc0c4 Specify the -rpath linker flag when prefix != /usr.
This allows Asterisk to start without having to specify the
LD_LIBRARY_PATH. This can be disabled by passing --disable-rpath to
configure.

(closes issue ASTERISK-20407)
Reported by: David M. Lee
Review: https://reviewboard.asterisk.org/r/2132/
........

Merged revisions 379475 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-18 21:35:09 +00:00
Richard Mudgett b0c3d288f2 build_tools: Allow Asterisk to report git SHAs in version string.
Make git more attractive for managing work-in-progress.  Especially
convenient when a potential patch set needs to be tested on multiple
platforms since one can use git to keep all the test environments in sync
independent of a subversion server.

Now the Asterisk version will show the exact git SHA5 that was used when
building (still appended by "M" if there are local modifications) from a
git clone of the Asterisk repository so the developer can more easily know
what is actually under test.

You will now get this:

  $ asterisk -V
  Asterisk GIT-1698298

Instead of this:

  $ asterisk -V
  Asterisk UNKNOWN__and_probably_unsupported

This has zero impact for those not using git with the exception of an
extra test in the configure script to gather git's path.  This is
necessary to prevent "sudo make install" from failing since git may not be
in the path in make's shell environment.

(closes issue ASTERISK-20483)
Reported by: Shaun Ruffell
Patches:
      0001-build_tools-Allow-Asterisk-to-report-git-SHAs-in-ver.patch (license #5417) patch uploaded by Shaun Ruffell
      Modified
........

Merged revisions 375189 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375190 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375191 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 20:13:17 +00:00
Andrew Latham 6c20cf2d8a Doxygen Updates - Title update
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing.  Update title that was left behind many years ago.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18 14:17:40 +00:00
Andrew Latham ec0747d4f6 Multiplatform Makefile Update
Paul Belanger pointed out that using sed in the Makefile is an issue with multiple platforms.  We are cleaning up the Doxygen config as a following step so I just switched the sed inplace changes to be an echo append instead.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-13 17:38:41 +00:00
Andrew Latham 4c2711d4db Test for Asterisk Version info
Doxygen uses the ASTERISKVERSION as a sub header. If a SVN export is done and no .svn or .version file exists it defualts to UNKNOWN__and_probably_unsupported which is honest but not great for the online docs.  During the "make progdocs" I added a test for this and just warned and ommitted the version.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-13 16:05:12 +00:00
Andrew Latham 83b13ebc04 Add check for Doxygen
The autoconf configuration system had a test for DOT but not for Doxygen.  I added the test for Doxygen and did an overhaul of the Makefile check to a much simpler process.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-13 15:06:39 +00:00
Andrew Latham fd98835f1f Doxygen Updates Janitor Work
* Whitespace, doc-blocks, spelling, case, missing and incorrect tags.
* Add cleanup to Makefile for the Doxygen configuration update
* Start updating Doxygen configuration for cleaner output
* Enable inclusion of configuration files into documentation
* remove mantisworkflow...
* update documentation README
* Add markup to Tilghman's email and talk with him about updating his email, he knows...
* no code changes on this commit other than the mentioned Makefile change

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-22 20:43:30 +00:00
David M. Lee f8d815e19f Add -fnested-functions compile flag, if needed.
In order to use nested functions on some versions of GCC (e.g. GCC on OS X),
the -fnested-functions flag must be passed to the compiler. This patch adds
detection logic to ./configure to add the flag if necessary. It also adds
a comment to utils.h as to why the nested function needs a prototype.

(closes issue ASTERISK-20399)
Reported by: David M. Lee
Review: https://reviewboard.asterisk.org/r/2102/
........

Merged revisions 373119 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-18 15:50:35 +00:00
David M. Lee 3e17426e89 Corrects the astsbindir setting when installing the sample asterisk.conf.
(closes issue ASTERISK-20406)
........

Merged revisions 372863 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 372864 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-11 18:09:22 +00:00
Matthew Jordan 8018b879a2 Clean up doxygen warnings
This patch fixes numerous doxygen warnings across Asterisk.  It also updates
the makefile to regenerate the doxygen configuration on the local system
before running doxygen to help prevent warnings/errors on the local system.

Much thanks to Andrew for tackling one of the Asterisk janitor projects!

(issue ASTERISK-20259)
Reported by: Andrew Latham
Patches:
  doxygen_partial.diff uploaded by Andrew Latham (license 5985)
  make_progdocs.diff uploaded by Andrew Latham (license 5985)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 14:23:28 +00:00
Matthew Jordan 82a7409c15 Add AMI event documentation
This patch adds the core changes necessary to support AMI event documentation
in the source files of Asterisk, and adds documentation to those AMI events
defined in the core application modules.  Event documentation is built from
the source by two new python scripts, located in build_tools:
get_documentation.py and post_process_documentation.py.

The get_documentation.py script mirrors the actions of the existing AWK
get_documentation scripts, except that it will scan the entirety of a source
file for Asterisk documentation.  Upon encountering it, if the documentation
happens to be an AMI event, it will attempt to extract information about the
event directly from the manager event macro calls that raise the event.  The
post_process_documentation.py script combines manager event instances that
are the same event but documented in multiple source files.  It generates
the final core-[lang].xml file.

As this process can take longer to complete than a typical 'make all', it
is only performed if a new make target, 'full', is chosen.

Review: https://reviewboard.asterisk.org/r/1967/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25 17:59:34 +00:00
Matthew Jordan a8e895c1a0 Replace MODULES_DIR with ASTMODDIR in Makefile's INSTALLDIRS
Post Asterisk 10, the MODULES_DIR variable no longer exists, and was replaced
with ASTMODDIR.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-13 14:55:30 +00:00
Matthew Jordan 2362ee5738 Do not install empty directories; add ASTLIBDIR
r368830 modified the installation script to only create a directory if that
directory does not exist.  If some directory variable was empty, it would attempt
to create the empty location.  It also failed to create the ASTLIBDIR directory.
This patch fixes it such that the correct directories are made and only created if
a value specifying them actually exists.
........

Merged revisions 368852 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 368853 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-13 14:31:24 +00:00
Matthew Jordan 019010e611 Do not perform install on existing directories
If a directory already exists, performing a 'make install' will remove the
permissions associated with the current directory and replace them with the
permissions of the user executing the install.

This patch changes this behavior to only perform an install on the directory
if the directory does not exist.  Thus, if a user later changes the permissions
on that directory, those permissions will be preserved in subsequent installs.

Review: https://reviewboard.asterisk.org/r/1986

Review: https://reviewboard.asterisk.org/r/1864

(closes issue ASTERISK-19492)
Reported by: Karl Fife
Tested by: Paul Belanger, Tilghman Lesher
patches:
  ASTERISK-19492 by pabelanger
  (uploaded by mjordan)
........

Merged revisions 368830 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 368831 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-12 18:41:50 +00:00
Terry Wilson d54717c39e Add new config-parsing framework
This framework adds a way to register the various options in a config
file with Asterisk and to handle loading and reloading of that config
in a consistent and atomic manner.

Review: https://reviewboard.asterisk.org/r/1873/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01 16:33:25 +00:00
Tzafrir Cohen 879f6417c6 pass BUILD_CFLGAS and BUILD_LDFLAGS to menuselect
Allow menuselect to get its set of CFLAGS and LDFLAGS through the
environment of Make:

  make BUILD_CFLAGS="whatever" BUILD_LDFLAGS="whatever"

Review: https://reviewboard.asterisk.org/r/1907/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-09 19:26:08 +00:00
Kinsey Moore 8696daadf8 Simplify build system architecture optimization
This change to the build system rips out any usage of PROC along with
architecture-specific optimizations in favor of using -march=native where it is
supported.  This fixes broken builds on 64bit Intel systems and results in
better optimized code on systems running GCC 4.2+.

Review: https://reviewboard.asterisk.org/r/1852/
(closes issue ASTERISK-19462)
........

Merged revisions 361955 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 361956 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-12 15:25:47 +00:00
Sean Bright 2969b00468 Add --enable-dev-mode=strict to configure.
Passing -Wshadow to gcc enables shadow warnings.  From the gcc manual:

    Warn whenever a local variable or type declaration shadows another
    variable, parameter, type, or class member (in C++), or whenever a
    built-in function is shadowed.

Asterisk will not currently compile with this option set, but a number of bugs
have been discovered by enabling this flag on specific files.  The long-term
goal is to eliminate all of the suspect code that causes this warning to be
emitted.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08 16:21:49 +00:00
Sean Bright ced8b052e1 Whitespace only change to the Makefile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08 16:12:11 +00:00
Kevin P. Fleming c6489d7b32 Correct serious flaw in the top-level Makefile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 21:34:52 +00:00
Kevin P. Fleming 92ef8a6fe1 Address OpenSSL initialization issues when using third-party libraries.
When Asterisk is used with various third-party libraries (CURL, PostgresSQL,
many others) that have the ability themselves to use OpenSSL, it is possible
for conflicts to arise in how the OpenSSL libraries are initialized and
shutdown. This patch addresses these conflicts by 'wrapping' the important
functions from the OpenSSL libraries in a new shared library that is part
of Asterisk itself, and is loaded in such a way as to ensure that *all*
calls to these functions will be dispatched through the Asterisk wrapper
functions, not the native functions.

This new library is optional, but enabled by default. See the CHANGES file
for documentation on how to disable it.

Along the way, this patch also makes a few other minor changes:

* Changes MODULES_DIR to ASTMODDIR throughout the build system, in order to
  more closely match what is used during run-time configuration.

* Corrects some errors in the configure script where AC_CHECK_TOOLS was used
  instead of AC_PATH_PROG.

* Adds a new variable for linker flags in the build system (DYLINK), used for
  producing true shared libraries (as opposed to the dynamically loadable
  modules that the build system produces for 'regular' Asterisk modules).

* Moves the Makefile bits that handle installation and uninstallation of the
  main Asterisk binary into main/Makefile from the top-level Makefile.

* Moves a couple of useful preprocessor macros from optional_api.h to
  asterisk.h.

Review: https://reviewboard.asterisk.org/r/1006/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-30 21:21:16 +00:00
Kevin P. Fleming 9ee8a74461 Remove "asterisk/version.h" in favor of "asterisk/ast_version.h".
A long time ago, in a land far far away, we added "asterisk/ast_version.h",
which provides the ast_get_version() and ast_get_version_num() functions. These
were added so that modules that needed the version information for the Asterisk
instance they were loaded in could actually get it (as opposed the version that
they were compiled against). We changed everything in the tree to use the
new mechanism (although later main/test.c was added using the old method).
However, the old mechanism was never removed, and as a result, new code is
still trying to use it.

This commit removes asterisk/version.h and replaces it with a header that
will generate a compile-time error if you try to use it (the error message
tells you which header you should use instead). It also removes the Makefile
and build_tools bits that generated the file, and it updates main/test.c to
use the 'proper' method of getting the Asterisk version information.

This is an API change and thus is being committed for trunk only, but it's
a fairly minor one and definitely improves the situation for out-of-tree
modules.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-25 21:31:28 +00:00
Walter Doekes a9698d0241 Fix support for parallel building with make (-j).
Previously make -j <N> would cause a race between doing cleanup of
certain files (defaults.h, menuselect, ...) and creating them anew.
Add a new target that depends on cleanup only and has a submake doing
the rest as command string. This way the cleanup goes first.

(closes issue ASTERISK-18751)
Tested by: Jeremy Kister
Reviewed by: Paul Belanger
Review: https://reviewboard.asterisk.org/r/1660


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-17 19:45:19 +00:00
Terry Wilson 980ab2d018 Add ASTSBINDIR to the list of configurable paths
This patch also makes astdb2sqlite3 and astcanary use the configured
directory instead of relying on $PATH.

(closes issue ASTERISK-18959)
Review: https://reviewboard.asterisk.org/r/1613/
........

Merged revisions 347344 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-07 20:15:29 +00:00
Richard Mudgett f1440edfa7 Merged revisions 339407 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339407 | rmudgett | 2011-10-04 17:56:25 -0500 (Tue, 04 Oct 2011) | 15 lines
  
  Merged revisions 339406 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r339406 | rmudgett | 2011-10-04 17:54:15 -0500 (Tue, 04 Oct 2011) | 8 lines
    
    Make always create the MOH directory (/var/lib/asterisk/moh).
    
    (closes issue ASTERISK-18409)
    Reported by: abelbeck
    Patches:
          asterisk-1.8-makefile-moh.patch (license #5903) patch uploaded by abelbeck
    Tested by: abelbeck, Michael Keuter
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-04 22:59:07 +00:00
Tilghman Lesher 5e7121b44f Merged revisions 336734 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336734 | tilghman | 2011-09-19 15:29:40 -0500 (Mon, 19 Sep 2011) | 18 lines
  
  Merged revisions 336733 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r336733 | tilghman | 2011-09-19 15:27:03 -0500 (Mon, 19 Sep 2011) | 11 lines
    
    Various changes to allow 1.8 to compile on Mac OS X Lion (10.7)
    
    * Makefile workaround for 10.6 extended to work on 10.7 and later.
    * Now uses the 'weak' symbol for Lion systems, which no longer support
      'weak_import'
    
    Closes ASTERISK-17612.
    Closes ASTERISK-18213.
    
    Tested by: tilghman, oej.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 20:31:09 +00:00
Jason Parker d1a46d2e7a Merged revisions 333268 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r333268 | qwell | 2011-08-25 14:01:18 -0500 (Thu, 25 Aug 2011) | 9 lines
  
  Merged revisions 333267 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r333267 | qwell | 2011-08-25 14:00:55 -0500 (Thu, 25 Aug 2011) | 2 lines
    
    Fix for DESTDIR spaces patch.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-25 19:01:39 +00:00
Jason Parker 00a8f14fb1 Merged revisions 333203 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r333203 | qwell | 2011-08-25 10:29:56 -0500 (Thu, 25 Aug 2011) | 15 lines
  
  Merged revisions 333201 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r333201 | qwell | 2011-08-25 10:27:06 -0500 (Thu, 25 Aug 2011) | 8 lines
    
    Fix installation into directories containing spaces.
    
    This also vastly simplifies the logic in sounds/Makefile
    
    (Closes issue ASTERISK-18290)
    Reported by: Paul Belanger
    Review: https://reviewboard.asterisk.org/r/1379/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-25 15:30:46 +00:00
Tilghman Lesher 318f0f5514 Merged revisions 332369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332369 | tilghman | 2011-08-17 14:24:59 -0500 (Wed, 17 Aug 2011) | 17 lines
  
  Merged revisions 332355 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332355 | tilghman | 2011-08-17 14:21:36 -0500 (Wed, 17 Aug 2011) | 10 lines
    
    Re-add support for spaces in pathnames, including now spaces in DESTDIR.
    
    This was initially added to 1.8 prior to release, primarily to support the
    standard paths on Mac OS X, but was partially reverted recently in Subversion,
    due to the lack of support for spaces in DESTDIR.  This commit restores support
    for the standard paths on Mac OS X, and also includes support for spaces in
    DESTDIR.

    (closes issue ASTERISK-18290)
    Reported by: pabelanger
    
    Review: https://reviewboard.asterisk.org/r/1326/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17 19:30:50 +00:00
Kevin P. Fleming 6855bb873f Merged revisions 328879 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/2.0

................
  r328879 | kpfleming | 2011-07-19 16:31:16 -0500 (Tue, 19 Jul 2011) | 23 lines
  
  Merged revisions 328878 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328878 | kpfleming | 2011-07-19 16:29:07 -0500 (Tue, 19 Jul 2011) | 17 lines
    
    Revert partial attempt at handling pathnames with spaces.
    
    Revision 299794 attempted to improve the build system to be able to handle
    pathnames (primarily DESTDIR) with spaces in them, since this is common on
    some platforms (including Mac OSX). Unfortunately, the changes were incomplete
    and did not actually provide the desired behavior, and as a side effect the
    functionality that ensured that stale headers in the Asterisk 'include' directory
    were removed got broken. In addition, the check for stale (and possibly
    incompatible) modules in the Asterisk 'modules' directory also got broken, and
    would never report any stale modules. Users upgrading to this version or later
    versions would then see unexpected module load errors.
    
    Since there are few users who actually want to install Asterisk into paths
    that contain spaces, and a proper fix for the build system would take many hours,
    the best solution for now is to just revert the partial solution.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19 21:32:54 +00:00
Jason Parker 881d139b84 Merged revisions 327888 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r327888 | qwell | 2011-07-12 14:38:44 -0500 (Tue, 12 Jul 2011) | 1 line
  
  Fix uninstall target, so that modules dir gets cleared again.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12 19:39:04 +00:00
Terry Wilson efd040cd11 Replace Berkeley DB with SQLite 3
There were some bugs in the very ancient version of Berkeley DB that Asterisk
used. Instead of spending the time tracking down the bugs in the Berkeley code
we move to the much better documented SQLite 3.

Conversion of the old astdb happens at runtime by running the included
astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave
identically to the old Berkeley backend, but in the future we could offer a
much more robust interface.

We do not include the SQLite 3 library in the source tree, but instead rely
upon the distribution-provided libraries. SQLite is so ubiquitous that this
should not place undue burden on administrators.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-06 20:58:12 +00:00
Terry Wilson e2ee02daaa Merged revisions 323932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323932 | twilson | 2011-06-16 10:58:22 -0500 (Thu, 16 Jun 2011) | 4 lines
  
  Don't assume ASTDBDIR exists
  
  It most likely doesn't on FreeBSD
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-16 15:59:17 +00:00
Russell Bryant b802909d07 Merged revisions 317530 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317530 | russell | 2011-05-05 18:46:54 -0500 (Thu, 05 May 2011) | 10 lines
  
  If the configure script runs, force a rebuild of menuselect-tree.
  
  Some contents in the menuselect tree are dependent on configure script
  parameters, namely --enable-dev-mode.
  
  (closes issue #17219)
  Reported by: Nick_Lewis
  Patches:
        issue_17219.rev1.txt uploaded by russell (license 2)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 23:47:23 +00:00
Leif Madsen c85a903198 Merged revisions 317058 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317058 | lmadsen | 2011-05-05 08:27:56 -0400 (Thu, 05 May 2011) | 7 lines
  
  Remove unused directory and clear up some documentation.
  
  (closes issue #19193)
  Reported by: bchia
  Patches: 
        cel-csv.diff uploaded by lathama (license 1028)
  Tested by: lathama, Marquis42
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 12:28:40 +00:00
Kevin P. Fleming 7cf70df999 Use "-march=native" when possible.
Recent versions of GCC have a tuning option value of 'native', which causes
the compiler to optimize the build for the CPU the compile is performed on.
Since most people are building Asterisk on the machine they plan to run it on,
the configure script and build system will now use this value unless a different
value is specified by the user in CFLAGS when the configure script is executed.
In addition, this value will be used for building the GSM and LPC10 codecs as
well, in preference to the logic that has been in their Makefiles forever to
optimize for certain types of CPUs.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-11 15:09:23 +00:00
Stefan Schmidt f6834d3247 fix wrong text of rerun menuselect after user interface warning
the warning, if no user interface for menuselect warning was found is not right.
you have to rerun configure before make menuselect after installing a proper user interface.

(closes issue 0018594)
Reported by: Dovid



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-12 15:59:28 +00:00
Tilghman Lesher a58b2fb395 XML validation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-06 17:50:57 +00:00
David Ruggles 08e6f86d23 update safe_asterisk script
change defaults to make a little more sense. Default log location is now asterisk log location and default email notification has been changed to root on the local machine

Review: https://reviewboard.asterisk.org/r/1067/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-06 01:41:57 +00:00
Paul Belanger cd26019823 Merged revisions 299907 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r299907 | pabelanger | 2010-12-29 13:22:23 -0500 (Wed, 29 Dec 2010) | 2 lines
  
  Properly quote varibles for MAC OS X
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-29 18:24:19 +00:00
Tilghman Lesher fb3520e439 Merged revisions 299794 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r299794 | tilghman | 2010-12-27 14:41:04 -0600 (Mon, 27 Dec 2010) | 2 lines
  
  Mac OS X spaces-in-pathnames fix.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-27 20:42:01 +00:00
Tilghman Lesher 5656e5020f Merged revisions 297821 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r297821 | tilghman | 2010-12-07 16:51:05 -0600 (Tue, 07 Dec 2010) | 18 lines
  
  Merged revisions 297819 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r297819 | tilghman | 2010-12-07 16:40:45 -0600 (Tue, 07 Dec 2010) | 11 lines
    
    Merged revisions 297818 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r297818 | tilghman | 2010-12-07 16:35:50 -0600 (Tue, 07 Dec 2010) | 4 lines
      
      Use non-deprecated APIs for CoreAudio
      
      Review: https://reviewboard.asterisk.org/r/1040/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@297822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-07 22:54:00 +00:00
Paul Belanger 3960c9b41f Merged revisions 297406 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r297406 | pabelanger | 2010-12-02 15:09:29 -0500 (Thu, 02 Dec 2010) | 21 lines
  
  Merged revisions 297405 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r297405 | pabelanger | 2010-12-02 15:06:43 -0500 (Thu, 02 Dec 2010) | 14 lines
    
    Merged revisions 297404 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r297404 | pabelanger | 2010-12-02 15:01:08 -0500 (Thu, 02 Dec 2010) | 7 lines
      
      Resolve compile error under FreeBSD
      
      We now set _ASTCFLAGS+=-march=i686 for i386 processors, still allowing ASTCFLAGS
      to override the setting.
      
      Review: https://reviewboard.asterisk.org/r/1043/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@297407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-02 20:11:32 +00:00
Russell Bryant 893ca656af Merged revisions 294740 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r294740 | russell | 2010-11-11 16:13:38 -0600 (Thu, 11 Nov 2010) | 11 lines
  
  Remove most of the contents of the doc dir in favor of the wiki content.
  
  This merge does the following things:
  
   * Removes most of the contents from the doc/ directory in favor
     of the wiki - http://wiki.asterisk.org/
  
   * Updates the build_tools/prep_tarball script to know how to export
     the contents of the wiki in both PDF and plain text formats so that
     the documentation is still included in Asterisk release tarballs.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-11 22:14:25 +00:00
Terry Wilson b043365e98 Merged revisions 291575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r291575 | twilson | 2010-10-13 15:24:44 -0700 (Wed, 13 Oct 2010) | 8 lines
  
  Add a simple AMI client web page
  
  This patch uses the XML docs to parse all of the available AMI commands
  and allows you to enter the command name and be presented with a form with
  the available fields. You can then rapidly tab through the fields and submit
  the command and view the response. It is much faster/easier than having to
  use telnet for testing purposes.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-13 22:34:32 +00:00
Tilghman Lesher 7157b48150 Merged revisions 289104 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r289104 | tilghman | 2010-09-28 13:18:43 -0500 (Tue, 28 Sep 2010) | 4 lines
  
  Solaris compatibility fixes
  
  Review: https://reviewboard.asterisk.org/r/942/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-28 18:20:20 +00:00
Russell Bryant fc9d1879ce Merged revisions 283629 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r283629 | russell | 2010-08-26 07:48:45 -0500 (Thu, 26 Aug 2010) | 2 lines
  
  Remove public keys that are no longer useful.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-26 12:49:09 +00:00
Paul Belanger 7f08adba61 Merged revisions 279314 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r279314 | pabelanger | 2010-07-24 16:47:52 -0400 (Sat, 24 Jul 2010) | 7 lines
  
  Remove duplicate -c flag when using $(INSTALL)
  
  (closes issue #17695)
  Reported by: pabelanger
  Patches:
        Makefile.diff uploaded by pabelanger (license 224)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-24 20:49:39 +00:00
Paul Belanger 7d96f2d01e Portability updates for Makefiles.
When possible, use $(INSTALL).  This allows us to use the functionality within
install for setting directory / file permissions, a requirement for unprivileged
installation.

Also move any directory we plan to create within the installdirs macro. Plus
various other formatting issues.

(issue #17436)
Reported by: pabelanger
Patches:
      non-root.patch.v8 uploaded by pabelanger (license 224)
Tested by: pabelanger

Review: https://reviewboard.asterisk.org/r/654/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 13:26:41 +00:00
Russell Bryant e5c4c90064 Allow xmllint to be used for XML docs validation.
xmllint seems to be more commonly available since it comes with libxml2.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-17 13:10:47 +00:00
Paul Belanger 16027cd399 Remove ASTBINDIR variable
(closes issue #17031)
Reported by: pabelanger
Patches:
      Makefile.ASTBINDIR.v2.patch uploaded by pabelanger (license 224)
Tested by: pabelanger, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-10 20:30:44 +00:00
Tilghman Lesher a0baefec79 Merged revisions 268050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r268050 | tilghman | 2010-06-04 14:38:57 -0500 (Fri, 04 Jun 2010) | 6 lines
  
  Build menuselect with the build environment's compiler, not the host (target)'s compiler.
  
  (closes issue #17464)
   Reported by: pprindeville
   Tested by: tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-04 19:40:00 +00:00
Tilghman Lesher 8d6ee962c7 Add kqueue(2) implementation to Asterisk in various places.
This will save a considerable amount of CPU on the BSDs, including Mac OS X,
as it eliminates several places in the code that we previously used a busy
loop.  Additionally, this adds a res_timing interface, using kqueue timers.

Review: https://reviewboard.asterisk.org/r/543/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-13 05:37:31 +00:00
Russell Bryant 865bdbc954 Restore previous asterisk.conf syntax, where the directories aren't commented out.
This fixes some breakage in the test suite, that uses the contents of asterisk.conf
to discover the install layout on the system.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@261364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-05 20:48:15 +00:00
Paul Belanger 3cea79e5fd New static asterisk.conf.sample file.
This simply moves the functionality from the Makefile (cleaning it up) into an external
asterisk.conf.samples file.  Also updates formatting (easier to read) and grammar
changes to asterisk.conf.samples.

(closes issue #17027)
Reported by: pabelanger
Patches:
      0017027.asterisk.conf.v6.patch uploaded by pabelanger (license 224)
Tested by: qwell, lmadsen, pabelanger, chappell

Review: https://reviewboard.asterisk.org/r/616/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@261124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-05 00:22:32 +00:00
Paul Belanger 624c2449ff Merged revisions 260661-260662 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r260661 | pabelanger | 2010-05-03 12:41:30 -0400 (Mon, 03 May 2010) | 10 lines
  
  non-root make install PREFIX=/tmp fails.
  Prepend libdir when executing mkpkgconfig allowing non-root installs to work.
  
  (closes issue #17268)
  Reported by: pabelanger
  Patches:
        issue17268.patch uploaded by pabelanger (license 224)
  Tested by: pabelanger
........
  r260662 | pabelanger | 2010-05-03 12:54:41 -0400 (Mon, 03 May 2010) | 3 lines
  
  Should have removed /usr/lib/ part. Thanks Qwell.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@260663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-03 17:06:48 +00:00
Jason Parker 038af9fada Merged revisions 259748 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r259748 | qwell | 2010-04-28 14:17:38 -0500 (Wed, 28 Apr 2010) | 7 lines
  
  Remove usage of `id` since it isn't useful and was causing breakge.
  
  Solaris `id` doesn't support the -u argument.  Instead of figuring out how to
  fix this to work on Solaris, I decided to check why it was necessary and where
  else it was used.  It was only used in one place, and it hasn't been needed
  for a very long time (I question whether it was ever needed).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@259760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-28 19:19:54 +00:00