Commit Graph

357 Commits

Author SHA1 Message Date
Matthew Jordan 758b13858b main/tcptls: Add checks for OpenSSL Elliptic Curve support
The patch for ASTERISK-23905 that added PFS support in Asterisk depends on the
elliptic curve library support being present in OpenSSL. As it turns out, some
versions of OpenSSL don't have this library - notably the version running on
our build agents.

This patch fixes the build by providing a configure check for the specific
library calls that the PFS patch relies on.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 16:55:44 +00:00
George Joseph 1a6db55404 build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
ast_ext_tool_check.m4 isn't handling cases where a path to a package is
provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config
tool (E.G. mysql_config) and the package has its own subdirectories in include
or lib.  For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql
but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.
libxml2 has the same problem with its includes.  They're in 
${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.
Both cause configure to fail and there are others in the same boat.

The problem is caused by logic in ast_ext_tool_check that overrides the result
of the config tool's --cflags and --libs options if package_DIR is set.

This patch prepends package_DIR (if specified) to the -L and -I results from
the package's config tool instead of overriding them.

A regenerated ./configure and include/asterisk/autoconfig.h.in are included
but can be regenerated by running ./bootstrap.sh at any time.

Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-20 23:18:36 +00:00
Richard Mudgett 8b6ab4782a chan_dahdi/sig_pri: Prevent unnecessary PROGRESS events when overlap dialing is enabled.
When overlap dialing is enabled, the lack of inband audio available
information in the SETUP_ACKNOWLEDGE events causes an interoperability
problem with SIP.  sig_pri doesn't know if there is dialtone present when
a SETUP_ACKNOWLEDGE is received so it assumes it is there and posts an
AST_CONTROL_PROGRESS frame.  The SIP channel driver then sends out a 183
Session Progress and blocks the desired 180 Ringing message when the
ALERTING message comes in.

* Made the configure script detect if the installed version of libpri
supports the SETUP_ACKNOWLEDGE enhancements.

* Using the new API, made generate an AST_CONTROL_PROGRESS frame on an
incoming SETUP_ACKNOWLEDGE message when the message indicates inband audio
is present instead of assuming that dialtone is present.

* Using the new API, made SETUP_ACKNOWLEDGE send out an inband audio
available indication only if dialtone is expected.  The change also makes
the fallback behaviour of sending the PROGRESS message better by sending
it only if dialtone is expected.

* Changed receiving a PROCEEDING message to not generate an
AST_CONTROL_PROGRESS frame if the progress indication ie indicates
non-end-to-end-ISDN.  This helps interoperability with SIP.

* Changed sending a PROCEEDING message in response to an
AST_CONTROL_PROCEEDING frame to not indicate inband audio available.  It
was silly to do so anyway because the channel driver doesn't know if
inband audio is even available.  This helps interoperability with SIP.

This patch and a corresponding change in libpri work together to allow
Asterisk to control the inband audio available progress indication ie on
the SETUP_ACKNOWLEDGE message when dialtone is present.

AST-1338 #close
Reported by: Tyler Stewart

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 00:35:31 +00:00
George Joseph 64045f0b57 This patch adds support for spinlocks in Asterisk.
There are cases in Asterisk where it might be desirable to lock
a short critical code section but not incur the context switch
and yield penalty of a mutex or rwlock.  The primary spinlock
implementations execute exclusively in userspace and therefore
don't incur those penalties.  Spinlocks are NOT meant to be a
general replacement for mutexes.  They should be used only for
protecting short blocks of critical code such as simple compares
and assignments.  Operations that may block, hold a lock, or
cause the thread to give up it's timeslice should NEVER be
attempted in a spinlock.

The first use case for spinlocks is in astobj2 - internal_ao2_ref.
Currently the manipulation of the reference counter is done with
an ast_atomic_fetchadd_int which works fine.  When weak reference
containers are introduced however, there's an additional comparison
and assignment that'll need to be done while the lock is held.
A mutex would be way too expensive here, hence the spinlock.
Given that lock contention in this situation would be infrequent,
the overhead of the spinlock is only a few more machine instructions
than the current ast_atomic_fetchadd_int call.

ASTERISK-23553 #close
Review: https://reviewboard.asterisk.org/r/3405/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-23 20:13:30 +00:00
David M. Lee 38a619af97 Corrected cross-platform stat nanosecond code
When nanosecond time resolution was added for identifying config file
changes, it didn't cover all of the myriad of ways that one might obtain
nanosecond time resolution off of struct stat.

Rather than complicate the #if even further figuring out one system from
the next, this patch directly tests for the three struct members I know
about today, and #ifdef's accordingly.

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 16:58:21 +00:00
Kevin Harwell ade5c8a2a4 cdr_radius, cel_radius: build agains libfreeradius-client
Asterisk's RADIUS module currently build against libradiusclient-ng, but this
project has been superseeded by libfreeradius-client. The API is 99% compatible
except that the header name has changed, the library name has changed, and
the configuration file location has changed.

(closes issue ASTERISK-22980)
Reported by: Jeremy Lainé
Patches:
     freeradius-client.patch uploaded by sharky (license 6561)
........

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 23:23:15 +00:00
Joshua Colp b8025e789d res_pjsip_session: Add support for PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE flag.
Newer versions of PJSIP have changed to using a flag for the
PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE instead of a define. This adds a
configure check to detect the presence of the flag and use it if found.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 18:01:36 +00:00
Joshua Colp c321b1f454 Fix a configure issue with PJSIP transaction group lock detection.
The configure check did not use the provided paths for pjproject
if provided when looking for transaction group lock support.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-26 22:34:08 +00:00
Joshua Colp 1b14a78d14 res_pjsip: Add support for building against pjproject with SIP transaction group lock support.
SIP transaction group lock support has been backported into our pjproject. Since the code
now internally uses a group lock the code is now changed to unlock it if present. Note
that the act of finding the transaction is what actually returns it locked.

For further information about group locks check out the wiki page at:
http://trac.pjsip.org/repos/wiki/Group_Lock

(issue ASTERISK-22818)
Reported by: Matt Jordan
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-16 13:51:04 +00:00
Kinsey Moore 3578bc30fd Detect and use xsltCleanupGlobals when available
This introduces usage of an additional libxslt cleanup function,
xsltCleanupGlobals, when the configure script detects that it is
available. Early versions of the library did not include this function.

(closes issue ASTERISK-22570)
Reported by: Corey Farrell
Patches:
    xsltCleanupGlobals.patch uploaded by Corey Farrell (License 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03 18:00:15 +00:00
David M. Lee 2de42c2a25 Multiple revisions 399887,400138,400178,400180-400181
........
  r399887 | dlee | 2013-09-26 10:41:47 -0500 (Thu, 26 Sep 2013) | 1 line
  
  Minor performance bump by not allocate manager variable struct if we don't need it
........
  r400138 | dlee | 2013-09-30 10:24:00 -0500 (Mon, 30 Sep 2013) | 23 lines
  
  Stasis performance improvements
  
  This patch addresses several performance problems that were found in
  the initial performance testing of Asterisk 12.
  
  The Stasis dispatch object was allocated as an AO2 object, even though
  it has a very confined lifecycle. This was replaced with a straight
  ast_malloc().
  
  The Stasis message router was spending an inordinate amount of time
  searching hash tables. In this case, most of our routers had 6 or
  fewer routes in them to begin with. This was replaced with an array
  that's searched linearly for the route.
  
  We more heavily rely on AO2 objects in Asterisk 12, and the memset()
  in ao2_ref() actually became noticeable on the profile. This was
  #ifdef'ed to only run when AO2_DEBUG was enabled.
  
  After being misled by an erroneous comment in taskprocessor.c during
  profiling, the wrong comment was removed.
  
  Review: https://reviewboard.asterisk.org/r/2873/
........
  r400178 | dlee | 2013-09-30 13:26:27 -0500 (Mon, 30 Sep 2013) | 24 lines
  
  Taskprocessor optimization; switch Stasis to use taskprocessors
  
  This patch optimizes taskprocessor to use a semaphore for signaling,
  which the OS can do a better job at managing contention and waiting
  that we can with a mutex and condition.
  
  The taskprocessor execution was also slightly optimized to reduce the
  number of locks taken.
  
  The only observable difference in the taskprocessor implementation is
  that when the final reference to the taskprocessor goes away, it will
  execute all tasks to completion instead of discarding the unexecuted
  tasks.
  
  For systems where unnamed semaphores are not supported, a really
  simple semaphore implementation is provided. (Which gives identical
  performance as the original taskprocessor implementation).
  
  The way we ended up implementing Stasis caused the threadpool to be a
  burden instead of a boost to performance. This was switched to just
  use taskprocessors directly for subscriptions.
  
  Review: https://reviewboard.asterisk.org/r/2881/
........
  r400180 | dlee | 2013-09-30 13:39:34 -0500 (Mon, 30 Sep 2013) | 28 lines
  
  Optimize how Stasis forwards are dispatched
  
  This patch optimizes how forwards are dispatched in Stasis.
  
  Originally, forwards were dispatched as subscriptions that are invoked
  on the publishing thread. This did not account for the vast number of
  forwards we would end up having in the system, and the amount of work it
  would take to walk though the forward subscriptions.
  
  This patch modifies Stasis so that rather than walking the tree of
  forwards on every dispatch, when forwards and subscriptions are changed,
  the subscriber list for every topic in the tree is changed.
  
  This has a couple of benefits. First, this reduces the workload of
  dispatching messages. It also reduces contention when dispatching to
  different topics that happen to forward to the same aggregation topic
  (as happens with all of the channel, bridge and endpoint topics).
  
  Since forwards are no longer subscriptions, the bulk of this patch is
  simply changing stasis_subscription objects to stasis_forward objects
  (which, admittedly, I should have done in the first place.)
  
  Since this required me to yet again put in a growing array, I finally
  abstracted that out into a set of ast_vector macros in
  asterisk/vector.h.
  
  Review: https://reviewboard.asterisk.org/r/2883/
........
  r400181 | dlee | 2013-09-30 13:48:57 -0500 (Mon, 30 Sep 2013) | 28 lines
  
  Remove dispatch object allocation from Stasis publishing
  
  While looking for areas for performance improvement, I realized that an
  unused feature in Stasis was negatively impacting performance.
  
  When a message is sent to a subscriber, a dispatch object is allocated
  for the dispatch, containing the topic the message was published to, the
  subscriber the message is being sent to, and the message itself.
  
  The topic is actually unused by any subscriber in Asterisk today. And
  the subscriber is associated with the taskprocessor the message is being
  dispatched to.
  
  First, this patch removes the unused topic parameter from Stasis
  subscription callbacks.
  
  Second, this patch introduces the concept of taskprocessor local data,
  data that may be set on a taskprocessor and provided along with the data
  pointer when a task is pushed using the ast_taskprocessor_push_local()
  call. This allows the task to have both data specific to that
  taskprocessor, in addition to data specific to that invocation.
  
  With those two changes, the dispatch object can be removed completely,
  and the message is simply refcounted and sent directly to the
  taskprocessor.
  
  Review: https://reviewboard.asterisk.org/r/2884/
........

Merged revisions 399887,400138,400178,400180-400181 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30 18:55:27 +00:00
David M. Lee 9bed50db41 optional_api: Fix linking problems between modules that export global symbols
With the new work in Asterisk 12, there are some uses of the
optional_api that are prone to failure. The details are rather involved,
and captured on [the wiki][1].

This patch addresses the issue by removing almost all of the magic from
the optional API implementation. Instead of relying on weak symbol
resolution, a new optional_api.c module was added to Asterisk core.

For modules providing an optional API, the pointer to the implementation
function is registered with the core. For modules that use an optional
API, a pointer to a stub function, along with a optional_ref function
pointer are registered with the core. The optional_ref function pointers
is set to the implementation function when it's provided, or the stub
function when it's now.

Since the implementation no longer relies on magic, it is now supported
on all platforms. In the spirit of choice, an OPTIONAL_API flag was
added, so we can disable the optional_api if needed (maybe it's buggy on
some bizarre platform I haven't tested on)

The AST_OPTIONAL_API*() macros themselves remained unchanged, so
existing code could remain unchanged. But to help with debugging the
optional_api, the patch limits the #include of optional API's to just
the modules using the API. This also reduces resource waste maintaining
optional_ref pointers that aren't used.

Other changes made as a part of this patch:
 * The stubs for http_websocket that wrap system calls set errno to
   ENOSYS.

 * res_http_websocket now properly increments module use count.

 * In loader.c, the while() wrappers around dlclose() were removed. The
   while(!dlclose()) is actually an anti-pattern, which can lead to
   infinite loops if the module you're attempting to unload exports a
   symbol that was directly linked to.

 * The special handling of nonoptreq on systems without weak symbol
   support was removed, since we no longer rely on weak symbols for
   optional_api.

 [1]: https://wiki.asterisk.org/wiki/x/wACUAQ

(closes issue ASTERISK-22296)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2797/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 13:40:27 +00:00
Joshua Colp dd33217762 Add the bucket API.
Bucket is a URI based API for the creation, retrieval, updating, and deletion
of "buckets" and files contained within them.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 21:49:47 +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
David M. Lee dcf03554a0 Shuffle RESTful URL's around.
This patch moves the RESTful URL's around to more appropriate
locations for release.

The /stasis URL's are moved to /ari, since Asterisk REST Interface was
a more appropriate name than Stasis-HTTP. (Most of the code still has
stasis_http references, but they will be cleaned up after there are no
more outstanding branches that would have merge conflicts with such a
change).

A larger change was moving the ARI events WebSocket off of the shared
/ws URL to its permanent home on /ari/events. The Swagger code
generator was extended to handle "upgrade: websocket" and
"websocketProtocol:" attributes on an operation.

The WebSocket module was modified to better handle WebSocket servers
that have a single registered protocol handler. If a client
connections does not specify the Sec-WebSocket-Protocol header, and
the server has a single protocol handler registered, the WebSocket
server will go ahead and accept the client for that subprotocol.

(closes issue ASTERISK-21857)
Review: https://reviewboard.asterisk.org/r/2621/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:00 +00:00
David M. Lee 6d805dc04b Correct autoconf script for finding UUID support.
The library that provides UUID support varies greatly from system to
system. On most Linux distros, it's in libuuid. On OpenBSD, it's in
libe2fs-uuid. On OS X, it is in libsystem.

This patch plays hide-and-seek with UUID support, looking for it in the
three places we know about. It also corrects the Makefile so that it uses
the configured library name and include path.

(closes issue ASTERISK-21816)
Reported by: Brad Latus (snuffy)
Tested by: Brad Latus (snuffy)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-03 15:57:42 +00:00
Kinsey Moore 1ead1853f2 Use srtp_shutdown when available
This allows the SRTP library to be shut down properly when the
functionality is offered by libsrtp.

Review: https://reviewboard.asterisk.org/r/2538/
(closes issue ASTERISK-21719)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-15 12:42:04 +00:00
Mark Michelson 74f2318051 Merge the pimp_my_sip branch into trunk.
The pimp_my_sip branch is being merged at this point because
it offers basic functionality, and from an API standpoint, things
are complete.

SIP work is *not* feature-complete; however, with the completion
of the SUBSCRIBE/NOTIFY API, all APIs (except a PUBLISH API) have
been created, and thus it is possible for developers to attempt
to create new SIP work.

API documentation can be found in the doxygen in the code, but
usability documentation is still lacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-25 18:25:31 +00:00
David M. Lee cf9324b25e Move more channel events to Stasis; move res_json.c to main/json.c.
This patch started out simply as fixing the bouncing tests introduced
in r382685, but required some other changes to give it a decent
implementation.

To fix the bouncing tests, the UserEvent and Newexten AMI events
needed to be refactored to dispatch via Stasis. Dispatching directly
to AMI resulted in those events sometimes getting ahead of the
associated Newchannel events, which would understandably confuse anyone.

I found that instead of creating a zillion different message types and
structures associated with them, it would be preferable to define a
message type that has a channel snapshot and a blob of structured data
with a small bit of additional information. The JSON object model
provides a very nice way of representing structured data, so I went
with that.

 * Move JSON support from res_json.c to main/json.c
   * Made libjansson-dev a required dependency
 * Added an ast_channel_blob message type, which has a channel
   snapshot and JSON blob of data.
 * Changed UserEvent and Newexten events so that they are dispatched
   via ast_channel_blob messages on the channel's topic.
 * Got rid of the ast_channel_varset message; used ast_channel_blob
   instead.
 * Extracted the manager functions converting Stasis channel events to
   AMI events into manager_channel.c.

(issue ASTERISK-21096)
Review: https://reviewboard.asterisk.org/r/2381/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22 14:06:46 +00:00
Jason Parker 1cb917096b Switch to using external pjproject libraries.
ICE/STUN/TURN support in res_rtp_asterisk is also now optional.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 19:08:59 +00:00
Matthew Jordan 148b6e7fba Update configure script to be compatible with ptlib 2.10.9
With ptlib 2.10.9, the configure script fails due to grep returning multiple
matches for the pattern it searches for. This patch updates the pattern
matching to return only the actual version for the symbol searched for,
PTLIB_VERSION.

(closes issue ASTERISK-20980)
Reported by: Stefan Reuter
patches:
  ASTERISK-20980-1.patch uploaded by Stefan Reuter (license 5339)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29 02:12:04 +00:00
Walter Doekes e6a3674150 Add builtin roundf() for systems lacking it.
(closes issue ASTERISK-16854)
Review: https://reviewboard.asterisk.org/r/2276
Reported-by: Ovidiu Sas
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-19 20:54:07 +00:00
David M. Lee 7695ea2643 Add JSON API for Asterisk.
This provides a JSON API by pulling in and wrapping the Jansson JSON
library[1]. The Asterisk API basically mirrors the Jansson
functionality, with a few minor tweaks.

 * Some names have been asteriskified to protect the innocent.
 * Jansson provides both reference-stealing and reference-borrowing
   versions of several API's. The Asterisk API is exclusively
   reference-stealing for operations that put elements into arrays and
   objects.
 * No support for doubles, since we usually don't need that.
 * Coming along for the ride is the ast_test_validate macro, which made
   the unit tests much easier to write.

 [1]: http://www.digip.org/jansson/

(issue ASTERISK-20887)
(closes issue ASTERISK-20888)
Review: https://reviewboard.asterisk.org/r/2264/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-11 22:31:42 +00:00
David M. Lee 24b0d2365b Bail configure if it can't find libuuid.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 16:43:40 +00:00
Russell Bryant fad2637297 Remove compile time check HAVE_DEV_URANDOM.
The code was doing a runtime check, anyway.  The compile time check isn't
always valid (cross-compiling, packages).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 16:18:52 +00:00
David M. Lee 251cbe3c51 Fixed configure.ac to look for proper uuid.h file
Introduced in r377846, the configure script was looking for uuid.h instead
of uuid/uuid.h.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 15:24:22 +00:00
Mark Michelson 8cb156bfc1 Add UUID support to Asterisk.
This provides a common API for dealing with unique identifiers.
The API provides methods to create, parse, copy, and stringify UUIDs.

An accompanying unit test is provided that tests all operations.

(closes issue ASTERISK-20726)
reported by Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11 21:04:45 +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
Joshua Colp e8380afc8a Add support for DTLS-SRTP to res_rtp_asterisk and chan_sip.
As mentioned on the review for this, WebRTC has moved towards choosing
DTLS-SRTP as the mechanism for key exchange for SRTP. This commit adds
support for this but makes it available for normal SIP clients as well.

Testing has been done to ensure that this introduces no regressions with
existing behavior and also that it functions as expected.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-20 18:27:28 +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
Richard Mudgett 18d5041981 Use better libss7 detection test and move libpri compile test.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-09 19:22:35 +00:00
Kevin P. Fleming 7d4ccea736 Enable usage of system-provided NetBSD editline library if available.
This patch changes the Asterisk configure script and build system to detect
the presence of the NetBSD editline library (libedit) on the system. If it is
found, it will be used in preference to the version included in the Asterisk
source tree.

(closes issue ASTERISK-18725)
Reported by: Jeffrey C. Ollie
Review: https://reviewboard.asterisk.org/r/1528/
Patches:
  0001-Allow-linking-building-against-an-external-editline.patch uploaded by jcollie (license #5373) (heavily modified by kpfleming)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-25 12:21:54 +00:00
Kevin P. Fleming b5193428a7 Enable usage of system-provided iLBC library.
The WebRTC version of the iLBC codec is now package as a library and is
available on some platforms. This patch allows codec_ilbc to be built against
that library if it is present.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-23 21:27:56 +00:00
Russell Bryant eebdf35159 res_corosync: Fix build against corosync 2.0.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 01:20:57 +00:00
Russell Bryant 4585000039 Remove chan_usbradio and app_rpt.
These modules are being maintained outside of the tree and have been for a long
time now, so it doesn't make sense to keep them here.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 23:42:24 +00:00
Richard Mudgett 7093cf278c Fix compile problem when old version of libvorbisfile v1.1.2 is used.
The principle difference between libvorbisfile v1.1.2 and newer (at least
v1.2.0) is the addition of the predefined callbacks OV_CALLBACKS_xxx in
vorbis/vorbisfile.h used for ov_open_callbacks().

* Updated the configure script to detect if libvorbisfile.h declares
OV_CALLBACKS_NOCLOSE.

* Copied the declaration of OV_CALLBACKS_NOCLOSE from v1.2.0 to allow
v1.1.2 to compile.

(closes issue ASTERISK-19370)
Reported by: Jonn Taylor
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16 19:51:15 +00:00
Tilghman Lesher a78b0af5ea Re-commit the verbose branch.
This change permits each verbose destination (consoles, logger) to have its
own concept of what the verbosity level is.  The big feature here is that
the logger will now be able to capture a particular verbosity level without
condemning each console to need to suffer that level of verbosity.
Additionally, a stray 'core set verbose' will no longer change what will go
to the log.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 20:27:16 +00:00
Richard Mudgett 51b32041d5 Fix voicemail problems when using ogg/vorbis.
Ogg/vorbis was fairly useless as a voicemail file format because it did
not implement the seek and tell format callbacks among other problems.

Since we were already using the libvorbis and libvorbisenc libraries we
can use libvorbisfile as it is also part of the vorbis library package.

* Made use the libvorbisfile to handle the ogg/vorbis file stream.  The
format_ogg_vorbis.c is now mostly a wrapper around libvorbisfile.

(closes issue ASTERISK-16926)
Reported by: sque
Patches:
      ogg_vorbis_use_libvorbisfile.patch (license #6108) patch uploaded by sque
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 19:29:24 +00:00
Russell Bryant 055a19e128 Replace res_ais with a new module, res_corosync.
This patch removes res_ais and introduces a new module, res_corosync.
The OpenAIS project is deprecated and is now just a wrapper around
Corosync.  This module provides the same functionality using the same
core infrastructure, but without the use of the deprecated components.

Technically res_ais could have been used with an AIS implementation other
than OpenAIS, but that is the only one I know of that was ever used.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-05 10:58:37 +00:00
Kinsey Moore d05a7d45cd Run bootstrap.sh for the for the ASTERISK-18929 fix
configure and autoconfig.h.in were not regenerated when the fix was committed.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 22:17:13 +00:00
Richard Mudgett 6e5f97df77 Merged revisions 339720 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r339720 | rmudgett | 2011-10-06 17:58:40 -0500 (Thu, 06 Oct 2011) | 27 lines
  
  Merged revisions 339719 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r339719 | rmudgett | 2011-10-06 17:47:50 -0500 (Thu, 06 Oct 2011) | 20 lines
    
    Fix regression in configure script for libpri capability checks.
    
    JIRA AST-598 added the PRI_L2_PERSISTENCE option to fix BRI PTMP TE layer
    2 persistence issues with some telcos.  ASTERISK-18535 attempted to fix
    the unexpected requirement that libpri *must* have that feature to work
    with Asterisk.  The AST_EXT_LIB_SETUP_DEPENDENT lines made the PRI
    optional features required.  Unfortunately, I thought
    AST_EXT_LIB_SETUP_DEPENDENT didn't do anything useful for libpri and
    deleted those lines for libpri.  The result was the HAVE_PRI_xxx defines
    that control the ability to use optional libpri features were also
    deleted.
    
    * Created AST_EXT_LIB_SETUP_OPTIONAL configuration macro to allow optional
    features in a library that the source code could take advantage of if the
    code supports the feature.
    
    (closes issue ASTERISK-18687)
    Reported by: Norbert
    Tested by: rmudgett
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-06 23:06:43 +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
Richard Mudgett ae4c13f4f3 Merged revisions 335912 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r335912 | rmudgett | 2011-09-14 13:31:15 -0500 (Wed, 14 Sep 2011) | 20 lines
  
  Merged revisions 335911 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r335911 | rmudgett | 2011-09-14 13:21:35 -0500 (Wed, 14 Sep 2011) | 13 lines
    
    Remove unnecessary libpri dependency checks in the configure script.
    
    Using the --with-pri option with the configure script generated an error
    about not having PRI_L2_PERSISTENCE if you did not have the absolute
    latest libpri SVN checkout installed.
    
    The AST_EXT_LIB_SETUP_DEPENDENT macro in the configure.ac script seems to
    be for libraries that are dependent upon other libraries and not
    necessarily for optional/added features within a library.
    
    (closes issue ASTERISK-18535)
    Reported by: Michael Keuter
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-14 18:38:43 +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
Richard Mudgett 265102faf8 Merged revisions 332265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332265 | rmudgett | 2011-08-17 11:01:29 -0500 (Wed, 17 Aug 2011) | 33 lines
  
  Merged revisions 332264 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332264 | rmudgett | 2011-08-17 10:51:08 -0500 (Wed, 17 Aug 2011) | 26 lines
    
    Outgoing BRI calls fail when using Asterisk 1.8 with HA8, HB8, and B410P cards.
    
    France Telecom brings layer 2 and layer 1 down on BRI lines when the line
    is idle.  When layer 1 goes down Asterisk cannot make outgoing calls and
    the HA8 and HB8 cards also get IRQ misses.
    
    The inability to make outgoing calls is because the line is in red alarm
    and Asterisk will not make calls over a line it considers unavailable.
    The IRQ misses for the HA8 and HB8 card are because the hardware is
    switching clock sources from the line which just brought layer 1 down to
    internal timing.
    
    There is a DAHDI option for the B410P card to not tell Asterisk that layer
    1 went down so Asterisk will allow outgoing calls: "modprobe wcb4xxp
    teignored=1".  There is a similar DAHDI option for the HA8 and HB8 cards:
    "modprobe wctdm24xxp bri_teignored=1".  Unfortunately that will not clear
    up the IRQ misses when the telco brings layer 1 down.
    
    * Add layer 2 persistence option to customize the layer 2 behavior on BRI
    PTMP lines.  The new option has three settings: 1) Use libpri default
    layer 2 setting.  2) Keep layer 2 up.  Bring layer 2 back up when the peer
    brings it down.  3) Leave layer 2 down when the peer brings it down.
    Layer 2 will be brought up as needed for outgoing calls.
    
    JIRA AST-598
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-17 16:18:27 +00:00
Kevin P. Fleming 1e5ba585d9 Merged revisions 320560 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320560 | kpfleming | 2011-05-23 10:47:14 -0500 (Mon, 23 May 2011) | 4 lines
  
  Don't generate spurious "No: command not found" messages when running the
  configure script on a system that has neither gmime-config nor pkg-config.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-23 15:48:37 +00:00
Richard Mudgett 5257a915a8 Option needed for Q931_IE_TIME_DATE to be optional in CONNECT message.
The NEC SV8300 rejects the Q931_IE_TIME_DATE for Q.SIG.

Add option to specify if and how much of the current time is put in
Q931_IE_TIME_DATE.
* Send date/time ie never.
* Send date/time ie date only.
* Send date/time ie date and hour.
* Send date/time ie date, hour, and minute.
* Send date/time ie date, hour, minute, and second.
* Send date/time ie default: Libpri will send date and hhmm only when in
NT PTMP mode to support ISDN phones.

(closes issue #19221)
Reported by: kenner

JIRA SWP-3396


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-17 20:13:27 +00:00
Paul Belanger 938290cf0d Merged revisions 319085 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319085 | pabelanger | 2011-05-16 10:35:21 -0400 (Mon, 16 May 2011) | 10 lines
  
  Support gmime-2.4
  
  (closes issue #18863)
  Reported by: tzafrir
  Patches:
        gmime-2.4-18.diff uploaded by tzafrir (license 46)
        Tested by: tzafrir
  
  Review: https://reviewboard.asterisk.org/r/1213/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 14:38:16 +00:00
Richard Mudgett 37274c73ee Problems with ISDN MWI to phones.
The "controlling user number" is always the number of the voice mail box
which is identical with the subscriber number itself.  This number which
is listed in the ISDN phone MWI menu cannot be called back to contact the
voice mail box.  The controlling user number should be made configurable.

JIRA ABE-2738
JIRA SWP-2846


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18 19:48:00 +00:00
Leif Madsen 945ceb9ac7 Merged revisions 313279 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r313279 | lmadsen | 2011-04-11 14:36:40 -0500 (Mon, 11 Apr 2011) | 21 lines
  
  Merged revisions 313278 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r313278 | lmadsen | 2011-04-11 14:33:03 -0500 (Mon, 11 Apr 2011) | 14 lines
    
    Merged revisions 313277 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r313277 | lmadsen | 2011-04-11 14:30:20 -0500 (Mon, 11 Apr 2011) | 6 lines
      
      Fix detection of OpenSSL 1.0
      
      (closes issue #19093)
      Reported by: tzafrir
      Patches: 
            detect_openssl_10.diff uploaded by tzafrir (license 46)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-11 19:39:26 +00:00
Tilghman Lesher 6de1332214 Merged revisions 309808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309808 | tilghman | 2011-03-06 18:54:42 -0600 (Sun, 06 Mar 2011) | 14 lines
  
  Merged revisions 309251 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309251 | tilghman | 2011-03-01 19:06:02 -0600 (Tue, 01 Mar 2011) | 7 lines
    
    Revert previous 2 commits, and instead conditionally redefine the same macro used in flex 2.5.35 that clashed with our workaround.
    
    Not surprisingly, the workaround was exactly the same code as was provided by
    the Flex maintainers, albeit in two different places, in different macros.
    
    This should fix the FreeBSD builds, which have an older version of Flex.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-07 01:01:08 +00:00
Tilghman Lesher e5dc4c2d8e Merged revisions 309035 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309035 | tilghman | 2011-02-28 05:10:28 -0600 (Mon, 28 Feb 2011) | 15 lines
  
  Merged revisions 309033-309034 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309033 | tilghman | 2011-02-28 04:43:12 -0600 (Mon, 28 Feb 2011) | 4 lines
    
    A later version of flex already includes the fwrite workaround code, which if used twice causes a compilation error.
    
    Detect whether Flex will compile without the workaround; if so, suppress our workaround code.
  ........
    r309034 | tilghman | 2011-02-28 05:07:52 -0600 (Mon, 28 Feb 2011) | 2 lines
    
    Clarify meaning, removing double negative (stupid!)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-28 11:16:06 +00:00
Richard Mudgett a8aeb04a9f Add ISDN display ie text handling options to chan_dahdi.conf.
The display ie handling can be controlled independently in the send and
receive directions with the following options:

* Block display text data.

* Use display text in SETUP/CONNECT messages for name.

* Use display text for COLP name updates (FACILITY/NOTIFY as appropriate).

* Pass arbitrary display text during a call.  Sent in INFORMATION
messages.  Received from any message that the display text was not used as
a name.

If the display options are not set then the options default to legacy
behavior.

The arbitrary display text is exchanged between bridged channels using the
AST_FRAME_TEXT frame type.

To send display text from the dialplan use the SendText() application when
the arbitrary display text option is enabled.

JIRA SWP-2688
JIRA ABE-2693


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 20:30:48 +00:00
Tilghman Lesher b98e47d119 Merged revisions 298960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r298960 | tilghman | 2010-12-17 17:52:04 -0600 (Fri, 17 Dec 2010) | 20 lines
  
  Merged revisions 298957 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r298957 | tilghman | 2010-12-17 17:30:55 -0600 (Fri, 17 Dec 2010) | 13 lines
    
    Merged revisions 298905 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r298905 | tilghman | 2010-12-17 15:40:56 -0600 (Fri, 17 Dec 2010) | 6 lines
      
      Let Asterisk find better backtrace information with libbfd.
      
      The menuselect option BETTER_BACKTRACES, if enabled, will use libbfd to search
      for better symbol information within both the Asterisk binary, as well as
      loaded modules, to assist when using inline backtraces to track down problems.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-18 00:08:13 +00:00
Jeff Peeler 78bd0de1a9 Add support for several platforms to obtain the real thread ID.
Already had the pthread ID which is not the same.  The most obvious enhancement
is in the "core show threads" output. As stated in the utils header, if the
platform isn't supported -1 is reported (instead of the process ID previously).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-12 03:58:33 +00:00
Tilghman Lesher 1b0df8c30f Merged revisions 298051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r298051 | tilghman | 2010-12-10 10:26:46 -0600 (Fri, 10 Dec 2010) | 18 lines
  
  Merged revisions 298050 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r298050 | tilghman | 2010-12-10 10:24:13 -0600 (Fri, 10 Dec 2010) | 11 lines
    
    Portability issue on OpenSolaris.
    
    Also detect the required structure element, because OpenSolaris defines
    SIOCGIFHWADDR, but without support for IP sockets.
    
    (closes issue #18442)
     Reported by: ranjtech
     Patches: 
           20101209__issue18442.diff.txt uploaded by tilghman (license 14)
     Tested by: ranjtech
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-10 16:28:14 +00:00
Tilghman Lesher 22cca55597 Merged revisions 296534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r296534 | tilghman | 2010-11-29 01:28:44 -0600 (Mon, 29 Nov 2010) | 20 lines
  
  Merged revisions 296533 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r296533 | tilghman | 2010-11-29 01:27:09 -0600 (Mon, 29 Nov 2010) | 13 lines
    
    I love standards.  There are so many to choose from.  Except when there isn't one.
    
    Linux and *BSD disagree on the elements within the ucred structure.  Detect
    which one is in use on the system.
    
    (closes issue #18384)
     Reported by: bjm
     Patches: 
           cred-diffs uploaded by bjm (license 473)
           20101127__issue18384__1.6.2.diff.txt uploaded by tilghman (license 14)
           20101127__issue18384__1.8.diff.txt uploaded by tilghman (license 14)
     Tested by: tilghman, bjm
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@296535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-29 07:30:09 +00:00
Tilghman Lesher 105a5c146e Merged revisions 294430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r294430 | tilghman | 2010-11-09 14:33:05 -0600 (Tue, 09 Nov 2010) | 15 lines
  
  Merged revisions 294429 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r294429 | tilghman | 2010-11-09 14:27:23 -0600 (Tue, 09 Nov 2010) | 8 lines
    
    Detect GMime properly on systems where gmime flags and libs are configured with pkg-config.
    
    (closes issue #16155)
     Reported by: jcollie
     Patches: 
           20100917__issue16155.diff.txt uploaded by tilghman (license 14)
     Tested by: tilghman
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-09 20:35:05 +00:00
Richard Mudgett b6c5dde767 Merged revisions 293046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r293046 | rmudgett | 2010-10-26 10:53:58 -0500 (Tue, 26 Oct 2010) | 4 lines
  
  Allow the DAHDI driver to compile, even with a sufficiently older version of libpri.
  
  Fixes our Bamboo builds.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-26 16:01:08 +00:00
Tilghman Lesher 7bc278bd06 Merged revisions 292906 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292906 | tilghman | 2010-10-25 14:28:35 -0500 (Mon, 25 Oct 2010) | 4 lines
  
  Allow the DAHDI driver to compile, even with a sufficiently older version of libpri.
  
  Fixes our Bamboo builds.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-25 19:30:39 +00:00
Jason Parker e9344fb853 Merged revisions 290752 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r290752 | qwell | 2010-10-07 15:58:47 -0500 (Thu, 07 Oct 2010) | 23 lines
  
  Merged revisions 290751 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r290751 | qwell | 2010-10-07 15:57:14 -0500 (Thu, 07 Oct 2010) | 16 lines
    
    Merged revisions 290750 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r290750 | qwell | 2010-10-07 15:56:04 -0500 (Thu, 07 Oct 2010) | 9 lines
      
      Allow PRI to build properly when using --with-pri.
      
      Use the directories found for the parent when using lib dependencies.
      
      (closes issue #17314)
      Reported by: tzafrir
      Patches: 
            17314-withdeps.diff uploaded by qwell (license 4)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-07 20:59:37 +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
Tilghman Lesher f8180257e0 Merged revisions 288638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r288638 | tilghman | 2010-09-23 22:39:29 -0500 (Thu, 23 Sep 2010) | 16 lines
  
  Merged revisions 288637 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r288637 | tilghman | 2010-09-23 22:36:01 -0500 (Thu, 23 Sep 2010) | 9 lines
    
    Merged revisions 288636 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r288636 | tilghman | 2010-09-23 22:20:24 -0500 (Thu, 23 Sep 2010) | 2 lines
      
      Solaris compatibility fixes
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-24 03:41:02 +00:00
Tilghman Lesher 336d2a1abd Merged revisions 285931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285931 | tilghman | 2010-09-09 20:25:50 -0500 (Thu, 09 Sep 2010) | 21 lines
  
  Merged revisions 285930 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r285930 | tilghman | 2010-09-09 20:16:32 -0500 (Thu, 09 Sep 2010) | 14 lines
    
    Merged revisions 285889 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r285889 | tilghman | 2010-09-09 19:13:45 -0500 (Thu, 09 Sep 2010) | 7 lines
      
      Fix Mac OS X build.
      
      This also fixes a rather grievous calculation error for the offset of
      ast_fdset, which was masked on Linux and FreeBSD, because these platforms
      check the first 256 FDs regardless of the bitmask setting (due to backwards
      compatibility).
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-10 01:27:44 +00:00
Russell Bryant 7f2a98a087 Merged revisions 285161-285162 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r285161 | russell | 2010-09-06 15:10:03 -0500 (Mon, 06 Sep 2010) | 4 lines
  
  Fix libsrtp -fPIC check for when non-standard prefix is used.
  
  Thanks to loompek in #asterisk for reporting the issue and testing this patch.
........
  r285162 | russell | 2010-09-06 15:10:24 -0500 (Mon, 06 Sep 2010) | 1 line
  
  regenerate configure script.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-06 20:10:58 +00:00
Tilghman Lesher 5eae9f44f7 Merged revisions 284597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r284597 | tilghman | 2010-09-02 00:00:34 -0500 (Thu, 02 Sep 2010) | 29 lines
  
  Merged revisions 284593,284595 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r284593 | tilghman | 2010-09-01 17:59:50 -0500 (Wed, 01 Sep 2010) | 18 lines
    
    Merged revisions 284478 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r284478 | tilghman | 2010-09-01 13:49:11 -0500 (Wed, 01 Sep 2010) | 11 lines
      
      Ensure that all areas that previously used select(2) now use poll(2), with implementations that need poll(2) implemented with select(2) safe against 1024-bit overflows.
      
      This is a followup to the fix for the pthread timer in 1.6.2 and beyond, fixing
      a potential crash bug in all supported releases.
      
      (closes issue #17678)
       Reported by: russell
      Branch: https://origsvn.digium.com/svn/asterisk/team/tilghman/ast_select 
      
      Review: https://reviewboard.asterisk.org/r/824/
    ........
  ................
    r284595 | tilghman | 2010-09-01 22:57:43 -0500 (Wed, 01 Sep 2010) | 2 lines
    
    Failed to rerun bootstrap.sh after last commit
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02 05:02:54 +00:00
Jason Parker 189839c307 Merged revisions 279658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r279658 | qwell | 2010-07-26 18:03:38 -0500 (Mon, 26 Jul 2010) | 12 lines
  
  Merged revisions 279657 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r279657 | qwell | 2010-07-26 17:59:52 -0500 (Mon, 26 Jul 2010) | 5 lines
    
    Really fix sounds Makefile (and make it readableish).
    
    There was a rather large syntax error that should have caused ALL versions of GNU make to fail.
    I don't know how it worked.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-26 23:06:47 +00:00
Tilghman Lesher c3a1e55de2 Merged revisions 279562 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r279562 | tilghman | 2010-07-26 14:18:26 -0500 (Mon, 26 Jul 2010) | 9 lines
  
  Merged revisions 279561 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r279561 | tilghman | 2010-07-26 14:15:59 -0500 (Mon, 26 Jul 2010) | 2 lines
    
    Use a special Makefile for noobs who still have GNU Make 3.80.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-26 19:20:23 +00:00
Mark Michelson dd9428666d Merged revisions 279504 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r279504 | mmichelson | 2010-07-26 11:04:09 -0500 (Mon, 26 Jul 2010) | 14 lines
  
  Allow for systems without locale support to be usable.
  
  A recent change to SIP URI comparison code added a locale-specific
  string comparison to the mix, and certain systems do not support
  such functions. This fix allows for those systems to still use
  Asterisk 1.8
  
  (closes issue #17697)
  Reported by: pprindeville
  Patches: 
        asterisk-trunk-bugid17697.patch uploaded by pprindeville (license 347)
  Tested by: mmichelson
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-26 16:44:25 +00:00
Tilghman Lesher 76d4bbacd1 Merged revisions 277738 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277738 | tilghman | 2010-07-17 11:59:11 -0500 (Sat, 17 Jul 2010) | 5 lines
  
  Remove uclibc cross-compile triplet, as uclibc has a working fork()... it's only uclinux that does not.
  
  (closes issue #17616)
   Reported by: pprindeville
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-17 17:42:32 +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
Tilghman Lesher 753fa3b278 Define LLONG_MAX on systems that do not have it.
(closes issue #17644)
 Reported by: pprindeville


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-15 19:46:57 +00:00
Tilghman Lesher 0f9e53b6ef Exclude libical for insufficient versions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-29 22:40:00 +00:00
Terry Wilson 9328d05d90 Update configure when changing autconf m4 files...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-23 20:59:17 +00:00
Paul Belanger 41821558c7 Reverting patch and reopening issue #16155, as patch breaks
FreeBSD / OSX builds.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-13 01:53:54 +00:00
Paul Belanger f19405516d Use pkg-config to find gmime libraries
This way the libraries can be found even if they are in
non-standard locations. 

(closes issue #16155)
Reported by: jcollie
Patches:
      0008-change-configure.ac-to-look-for-pkg-config-gmime-2.0.patch uploaded by jcollie (license 412)
Tested by: jsmith, tilghman, pabelanger


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-11 20:14:13 +00:00
Tilghman Lesher 3c26b511e0 Fix build on Mac OS X (and maybe FreeBSD, too)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 22:45:16 +00:00
Terry Wilson 857814f435 Add SRTP support for Asterisk
After 5 years in mantis and over a year on reviewboard, SRTP support is finally
being comitted. This includes generic CHANNEL dialplan functions that work for
getting the status of whether a call has secure media or signaling as defined
by the underlying channel technology and for setting whether or not a new
channel being bridged to a calling channel should have secure signaling or
media. See doc/tex/secure-calls.tex for examples.

Original patch by mikma, updated for trunk and revised by me.

(closes issue #5413)
Reported by: mikma
Tested by: twilson, notthematrix, hemanshurpatel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 05:29:08 +00:00
Tilghman Lesher 3c3d054ef2 Merged revisions 267759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r267759 | tilghman | 2010-06-03 20:16:26 -0500 (Thu, 03 Jun 2010) | 7 lines
  
  Make the default install path appear to be /usr on Linux, instead of /usr/local.
  
  Also, reorganize the options, so that they're more alphabetical.
  
  (closes issue #17013)
   Reported by: klaus3000
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-04 01:20:17 +00:00
Richard Mudgett 1c67f208a7 Add ETSI Message Waiting Indication (MWI) support.
Add the ability to report waiting messages to ISDN endpoints (phones).

Relevant specification: EN 300 650 and EN 300 745

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-03 00:02:14 +00:00
Richard Mudgett 0760f4e70a Add ETSI Malicious Call ID support.
Add the ability to report malicious callers as an AMI event in the call
event class.

Relevant specification: EN 300 180

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 22:28:58 +00:00
Richard Mudgett afcbc93dae Add ETSI Call Waiting support.
Add the ability to announce a call to an endpoint when there are no B
channels available.  A call waiting call is a SETUP message with no B
channel selected.

Relevant specification: EN 300 056, EN 300 057, EN 300 058

For DAHDI/ISDN channels, the CHANNEL() dialplan function now supports the
"no_media_path" option.
* Returns "0" if there is a B channel associated with the call.
* Returns "1" if no B channel is associated with the call.  The call is
either on hold or is a call waiting call.

If you are going to allow incoming call waiting calls then you need to use
CHANNEL(no_media_path) do determine if you must drop a call to accept the
new call.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 21:05:32 +00:00
Richard Mudgett 28264c52b9 Add ETSI Advice Of Charge (AOC) event reporting.
This feature generates AMI events in the new aoc event class from the
events passed up by libpri.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 17:13:53 +00:00
Richard Mudgett 48dd4d1249 Add ETSI Explicit Call Transfer (ECT) support.
Added ability to send and receive ETSI Explicit Call Transfer (ECT)
messages to eliminate tromboned calls.

Note: Asterisk already supported initiating the transfer of calls to
eliminate tromboned calls to libpri so there was nothing to do for the
asterisk portion.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 16:14:12 +00:00
Tilghman Lesher b0357dcc3e Support setting locale per-mailbox (changes date/time languages for email, pager messages).
(closes issue #14333)
 Reported by: klaus3000
 Patches: 
       20090515__issue14333.diff.txt uploaded by tilghman (license 14)
       app_voicemail.c-svn-trunk-rev211675-patch.txt uploaded by klaus3000 (license 65)
 Tested by: klaus3000


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-01 21:28:19 +00:00
Terry Wilson f1503b9e1d Ensure that libneon > 0.29.0 is installed for res_calendar_ews
This uses a modified version of pabelanger's patch that checks for NTLM support
instead, which was added in 0.29.0 which is what is required for
res_calendar_ews.

(closes issue #17391)
Reported by: loloski
Patches: 
      issue17391.patch.v2 uploaded by pabelanger (license 224)
Tested by: twilson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 05:33:11 +00:00
Tilghman Lesher a7498ae02e Use configure to determine the prefixes and include directories properly.
This ensures cross-platform compatibility, even among Linux distributions,
which don't always put headers in the same place.

(closes issue #17391)
 Reported by: loloski


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 00:29:40 +00:00
Tilghman Lesher b5a629624a Merged revisions 264248 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r264248 | tilghman | 2010-05-19 12:41:29 -0500 (Wed, 19 May 2010) | 17 lines
  
  Internal timing is now on by default, if you're using DAHDI 2.3 or above.
  
  The reason for ensuring DAHDI 2.3 or above is that this version ensures that
  a timer is always available, whereas in previous versions, it was possible
  for DAHDI to be loaded, but have no drivers to actually generate timing.  If
  internal_timing was turned on in this circumstance, a complete lack of audio
  would result.  This is the reason why internal_timing was not on by default.
  However, now that DAHDI ensures the availability of a timer, there is no
  reason for this setting to be off (and in fact, it solves a great many initial
  user problems).
  
  (closes issue #15932)
   Reported by: dimas
   Patches: 
         20100519__issue15932.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@264249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19 17:48:31 +00:00
Tilghman Lesher 4c034c1f72 Cache sound tarfiles in a common directory, such that a clean reinstall does not force a re-download of the tarballs.
(closes issue #15370)
 Reported by: pprindeville
 Patches: 
       asterisk-trunk-bugid15370.patch uploaded by pprindeville (license 347)
 Tested by: pprindeville, tilghman, seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-17 23:49:15 +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
Richard Mudgett 9534f72cb0 Dialing an invalid extension causes incomplete hangup sequence.
Revision -r1489 of the libpri 1.4 branch corrected a deviation from Q.931
Section 5.3.2.  However, this resulted in an unexpected behaviour change
to the upper layer (Asterisk).

This change uses pri_hangup_fix_enable() to follow Q.931 Section 5.3.2
call hangup better if the version of libpri supports it.

(issue #17104)
Reported by: shawkris
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-11 23:18:53 +00:00
Tilghman Lesher 92a8650677 Cleanup a bit more by getting rid of useless version defines. Also make library detection use passed CFLAGS.
(closes issue #17309)
 Reported by: stuarth


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-09 02:14:04 +00:00
Tilghman Lesher 13f15cae67 Use the detected pthread building flags in every place, instead of hardcoding -lpthread.
We nicely detect the right flags on each system for building Asterisk with
pthreads, then ignore it for every other build option that requires us to
build with pthreads.  This caused some items to return a false negative.
Also cleanup some minor naming issues that caused "library library" redundancy
in the output.

(closes issue #17303)
 Reported by: stuarth
 Patches: 
       20100507__issue17303.diff.txt uploaded by tilghman (license 14)
 Tested by: stuarth


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@261913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-07 20:35:17 +00:00
Leif Madsen 8b11ae2e4f Add ability to generate ASCII documentation from the TeX files.
These changes add the ability to run 'make asterisk.txt' just like the existing
'make asterisk.pdf' commands to generate a text document from the TeX files we
have in the doc/tex/ directory. I've also updated a few of the .tex files because
they weren't properly escaping certain characters so they would show up as Unicode
characters (like [U+021C]). Made changes to the configure scripts so it would
detect the catdvi program which is required to convert the .dvi file generated
by latex.

I've also added a few lines to the build_tools/prep_tarball script so that the
text documentation gets generated and added to future tarballs of Asterisk
releases.

(closes issue #17220)
Reported by: lmadsen
Patches: 
      asterisk.txt.patch uploaded by lmadsen (license 10)
      asterisk.txt.patch-v4 uploaded by pabelanger (license 224)
Tested by: lmadsen, pabelanger

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-21 19:18:35 +00:00
Richard Mudgett 537edff10f Remove PRI CCSS BUGBUG message and update configure script.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09 16:43:30 +00:00
Tilghman Lesher bcbafc800e Mac OS X does not support comparing a mutex to its initializer. Create a test for this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-06 19:28:42 +00:00
Tilghman Lesher 374e4e9d72 Fix bamboo compile error by calculating an integer with the same size as a pointer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-17 00:14:29 +00:00
Tilghman Lesher da6ba8e60e Remove portions that weren't meant to be committed for the OS X compat fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-08 05:15:01 +00:00
Tilghman Lesher e58fc610ae Change needed to make Mac OS X 10.6 happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-08 05:12:55 +00:00
Russell Bryant 925aad8944 Remove pbx_gtkconsole and related gtk1 checks.
Review: https://reviewboard.asterisk.org/r/541/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-05 19:32:19 +00:00
Tilghman Lesher c8abb42e6a Solaris doesn't like outputting a NULL to a %s in format strings.
Detect all platforms that don't like that, either, and ensure that when documentation is
missing, we pass a non-NULL pointer when outputting the corresponding documentation.

(closes issue #16689)
 Reported by: bklang
 Patches: 
       20100209__issue16689__with_tests.diff.txt uploaded by tilghman (license 14)
 
Review: https://reviewboard.asterisk.org/r/497/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-10 16:01:28 +00:00
Tilghman Lesher bc9f02a60d Merged revisions 242520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r242520 | tilghman | 2010-01-24 00:33:01 -0600 (Sun, 24 Jan 2010) | 8 lines
  
  Only rebuild bison and flex source files on demand, if bison and flex are detected by the configure script.
  
  Changed after discussion on the -dev list about possible unnecessary build
  failures, due to checkouts/untars causing these special source files to
  possibly be newer than their resulting C files.  This should additionally
  ensure that nobody need learn about extra Makefile arguments to ensure the
  proper files get rebuilt when changes are made to these special source files.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-24 06:40:31 +00:00
Sean Bright 2706de850a Merged revisions 236585 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r236585 | seanbright | 2009-12-28 10:12:08 -0500 (Mon, 28 Dec 2009) | 7 lines
  
  Try a test compile to see if PTHREAD_ONCE_INIT requires extra braces.
  
  There was conditional code (based on build platform) to optioinally wrap
  PTHREAD_ONCE_INIT in braces that was removed since it is fixed in newer versions
  of Solaris/OpenSolaris, but I am still running into it on Solaris 10 x86 so add
  a configure-time check for it.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-28 15:22:54 +00:00
Tilghman Lesher aa9ec67f97 OS X does not define MSG_NOSIGNAL, but it does have a socket option SO_NOSIGPIPE.
(closes issue #16178)
 Reported by: oej


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-04 04:52:24 +00:00
Tilghman Lesher f46840c107 So apparently, some platforms don't have ffsll(3).
The manpage lies; it says that the function is in POSIX, but that's only for
ffs(3), not ffsll(3).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-02 03:26:16 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Tilghman Lesher 6a50e7a031 chan_misdn will fail to compile if the redirect_dn member is missing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 13:57:09 +00:00
Richard Mudgett cff6d02b53 Add to chan_dahdi ISDN HOLD, Call deflection, and keypad facility support.
* Added handling of received HOLD/RETRIEVE messages and the optional ability
  to transfer a held call on disconnect similar to an analog phone.
* Added CallRerouting/CallDeflection support for Q.SIG, ETSI PTP, ETSI PTMP.
  Will reroute/deflect an outgoing call when receive the message.
  Can use the DAHDISendCallreroutingFacility to send the message for the
  supported switches.
* Added ability to send/receive keypad digits in the SETUP message.
  Send keypad digits in SETUP message: Dial(DAHDI/g1[/K<keypad_digits>][/extension])
  Access any received keypad digits in SETUP message by: ${CHANNEL(keypad_digits)}
* Added support for BRI PTMP NT mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-23 16:57:33 +00:00
Richard Mudgett 1174a61612 Add support for calling and called subaddress. Partial support for COLP subaddress.
The Telecom Specs in NZ suggests that SUB ADDRESS is always on, so doing
"desk to desk" between offices each with an asterisk box over the ISDN
should then be possible, without a whole load of DDI numbers required.

(closes issue #15604)
Reported by: alecdavis
Patches:
      asterisk_subaddr_trunk.diff11.txt uploaded by alecdavis (license 585)
      Some minor modificatons were made.
Tested by: alecdavis, rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 16:33:22 +00:00
Tilghman Lesher d8457eb18c Detect whether we actually have the long double type, before looking for those functions.
(closes issue #15017)
 Reported by: tzafrir
 Patches: 
       20090916__issue15017.diff.txt uploaded by tilghman (license 14)
 Tested by: tzafrir


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-16 23:15:43 +00:00
Tilghman Lesher c9dd40c1f6 Verify support for wide ODBC character types before using them.
(closes issue #15870)
 Reported by: nic_bellamy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 18:17:14 +00:00
Kevin P. Fleming 5d0790027a Ensure that the default autoconf CFLAGS are not used.
A recent change to the configure script that allows the user to specify
CFLAGS and/or LDFLAGS to the script had the unfortunate side effect of
letting autoconf's default CFLAGS (-g -O2) feed in to the rest of the build
system, thereby overriding the DONT_OPTIMIZE setting in menuselect. That
problem is now corrected.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 16:37:28 +00:00
Tilghman Lesher 01fd08d5b9 If lua is detected with the lua5.1 prefix (or not), adjust the include path accordingly.
Based upon feedback to a release announcement on the -users list.  See
http://lists.digium.com/pipermail/asterisk-users/2009-August/236954.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-30 06:43:04 +00:00
Kevin P. Fleming 802b79e3ca Ensure that CFLAGS and/or LDFLAGS provided to configure script are preserved.
Cross-compilation environments want to provide 'defaults' for compiler and
linker options, and frequently do this by specifying CFLAGS and LDFLAGS in the
environment or as command-line arguments to the configure script. This patch
modifies the configure script and Makefile to preserve these settings and
ensure they are used in the build process.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-28 20:01:21 +00:00
Tilghman Lesher faa0b8efae Merged revisions 214517 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r214517 | tilghman | 2009-08-27 16:45:34 -0500 (Thu, 27 Aug 2009) | 7 lines
  
  Use autoconf to detect libcurl, as this enables cross-compilation checks, something we didn't allow before.
  (closes issue #15714)
   Reported by: pprindeville
   Patches: 
         20090813__issue15714.diff.txt uploaded by tilghman (license 14)
   Tested by: pprindeville
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-27 21:46:46 +00:00
Tilghman Lesher 74d7f7f788 Merged revisions 214436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r214436 | tilghman | 2009-08-27 11:53:58 -0500 (Thu, 27 Aug 2009) | 2 lines
  
  One more build system change, to make the descriptions look better, if we have better information.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-27 17:28:01 +00:00
Tilghman Lesher f2e9a73c81 Merged revisions 214357 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r214357 | tilghman | 2009-08-27 11:03:50 -0500 (Thu, 27 Aug 2009) | 3 lines
  
  Make autoheader descriptions render correctly in our autoconfig.h file.
  (Figured out while working with issue #14906)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-27 16:12:03 +00:00
Tilghman Lesher ddf5a08d83 Not all versions of gnu-linux use glibc, which contains iconv. Some (especially embedded systems) don't have iconv at all.
(closes issue #15169)
 Reported by: pprindeville


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-25 22:39:51 +00:00
Kevin P. Fleming eb449d514e Minor improvements to app_fax.
This patch makes some small changes to handle watchdog timeouts in a better way,
and also uses a 'cleaner' method of including the spandsp header files.

(closes issue #14769)
Reported by: andrew
Patches:
      app_fax-20090406.diff uploaded by andrew (license 240)
      v1-14769.patch uploaded by dimas (license 88)
Tested by: freh, deti, caspy, dimas, sgimeno, Dovid


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06 16:07:15 +00:00
Sean Bright e75ae63ac2 Fix a few compilation problems found when building Asterisk against uClibc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08 16:43:12 +00:00
Sean Bright ee0cd5a32c Add a configure check for Reverse Charging Indication support in LibPRI.
Also go back and wrap all of the places that use the specific reverse charge
APIs with preprocessor conditionals.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-03 15:44:01 +00:00
Russell Bryant c511a26749 Move Asterisk-addons modules into the main Asterisk source tree.
Someone asked yesterday, "is there a good reason why we can't just put these
modules in Asterisk?".  After a brief discussion, as long as the modules are
clearly set aside in their own directory and not enabled by default, it is
perfectly fine.

For more information about why a module goes in addons, see README-addons.txt.

chan_ooh323 does not currently compile as it is behind some trunk API updates.
However, it will not build by default, so it should be okay for now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-30 16:40:38 +00:00
Sean Bright 2f88262abb Add checks in configure for non-POSIX syslog facilities.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 03:06:06 +00:00
Kevin P. Fleming 6c5987811c Redesigned 'optional API' support.
This patch provides a new implementation of the optional API support defined
in asterisk/optional_api.h; this new version provides solves compatibility
issues with the use of linker version scripts for suppressing global symbols.
In addition, there is now a functional (and tested!) implementation for Mac OS/X,
so module writers no longer need to use special tests before calling optional
API functions. All future implementations must provide these same semantics,
so that module writers can rely on them.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 16:07:23 +00:00
Terry Wilson 71a3a2ebf6 Add Calendaring support for Asterisk
This commit add Calendaring support to Asterisk for iCalendar, CalDAV, and MS
Exchange calendars. Exchange support has only been tested on Exchange Server 2k3
and does not support forms-based authentication at this time (patches *very*
welcome). Exchange support is also currently missing the ability to return a
list of a meting's attendees (again, patches are very, very welcome).

Features include:
  Querying a calendar for events over a specific time range
  Checking a calendar's busy status via the dialplan
  Writing calendar events via the dialplan (CalDAV and Exchange only)
  Handling calendar event notifications through the dialplan

(closes issue #14771)
Tested by: lmadsen, twilson, Shivaprakash

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 19:57:18 +00:00
Russell Bryant 0e62eddb93 Update configure script to check for OSP toolkit 3.5.0.
(closes issue #14988)
Reported by: tzafrir
Patches:
      configure.ac.diff uploaded by homesick (license 91)
      new_ast_check_osptk.m4 uploaded by homesick (license 91)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 22:40:34 +00:00
Tilghman Lesher e0aba74fa9 Restore 'asyncagi break' command to 1.6.1 and higher.
(closes issue #14985)
 Reported by: nikkk
 Patches: 
       20090428__bug14985.diff.txt uploaded by tilghman (license 14)
       20090429__bug14985__1.6.1.diff.txt uploaded by tilghman (license 14)
 Tested by: nikkk


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-04 19:29:13 +00:00
Kevin P. Fleming d9d2779008 Add buffer and echo canceller control to CHANNEL() dialplan function for DAHDI channels
Adds ability for CHANNEL() dialplan function, when used on DAHDI channels,
to temporarily change the number of buffers and/or the buffer policy, and also
to enable, disable, or switch the echo canceller between FAX/data and voice
modes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 21:42:35 +00:00
Tilghman Lesher 91dde03ba8 Detect eaccess (or euidaccess) before using it.
Reported by Andrew Lindh via the -dev list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 17:40:58 +00:00
Tilghman Lesher a866a75900 Merge str_substitution branch.
This branch adds additional methods to dialplan functions, whereby the result
buffers are now dynamic buffers, which can be expanded to the size of any
result.  No longer are variable substitutions limited to 4095 bytes of data.
In addition, the common case of needing buffers much smaller than that will
enable substitution to only take up the amount of memory actually needed.
The existing variable substitution routines are still available, but users
of those API calls should transition to using the dynamic-buffer APIs.
Reviewboard: http://reviewboard.digium.com/r/174/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 18:53:01 +00:00
Kevin P. Fleming a9657a86bf Merged revisions 190721 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r190721 | kpfleming | 2009-04-27 14:29:46 -0500 (Mon, 27 Apr 2009) | 7 lines
  
  Fix 'inconsistent line endings' when autoconf 2.63 is used
  
  Attempt to make configure script regeneration 'safe' using autoconf 2.63, which embeds a bare CR into the script, thus making Subversion complain about inconsistent line endings
  
  This commit changes the MIME type of the configure script to be 'binary' thus making Subversion no longer inspect line endings, and as a bonus 'svn diff' will no longer try to generate diff output for it, which is not generally useful anyway.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27 19:30:54 +00:00
Tilghman Lesher 25cea89d90 Merged revisions 190092 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r190092 | tilghman | 2009-04-22 16:35:03 -0500 (Wed, 22 Apr 2009) | 7 lines
  
  Detect availability of pthread_rwlock_timedwrlock() before using it.
  (closes issue #14930)
   Reported by: tilghman
   Patches: 
         20090420__bug14930.diff.txt uploaded by tilghman (license 14)
   Tested by: mvanbaak, tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-22 21:38:15 +00:00
Doug Bailey f431c867dd Merged revisions 189601 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189601 | dbailey | 2009-04-21 09:00:55 -0500 (Tue, 21 Apr 2009) | 3 lines
  
  Add check in configure script to check for GLOB_NOMAGIC and GLOB_BRACE in glob.h 
  This allows config.c to compile when linked against uclibc that does not support these parameters
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-21 14:28:04 +00:00
Jeff Peeler 1172c38647 Add service maintenance message support
This is the companion commit to libpri r732. Service messages are now supported
for switch types 4ess/5ess. A new option service_message_support has been added
to chan_dahdi.conf and is noted in the sample config file. The service message
support is turned off by default. The current implementation relies on AstDB
to keep track of channel state, which allows the statuses to be preserved
across Asterisk restarts. Below is a description of the storage format.

The state and reason for the service state are in the form <state>:<reason>,
where:
<state> ::= { 'O' }  // 'O' – Out Of Service
<reason> ::= { '0' | '1' | '2' | '3' }, where:
'0' – No reason (backwards compatibility)
'1' – NEAR END
'2' – FAR END
'3' – both NEAR and FAR END

The new CLI commands to handle channel service state are:
pri service disable channel <chan>
pri service enable channel <chan>

Many people contributed to the development of this functionality. Because I
entered at the very end I do not know the exact history. Special thanks to 
all who moved the bug forward one way or another:
cmaj, PCadach, markster, mattf, drmac, MikeJ, serge-v, murf, kanelbullar, Seb7,
tilghman, lmadsen, and especially dhubbard (he answered lots of my questions
and did a large portion of the work)

(closes issue #3450)
Reported by: cmaj



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-14 15:54:16 +00:00
Russell Bryant 4210f17abb Merged revisions 183241 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183241 | russell | 2009-03-19 12:52:52 -0500 (Thu, 19 Mar 2009) | 2 lines

Remove the use of RTLD_NOLOAD, as it is not behaving like expected.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 18:00:15 +00:00
Russell Bryant 0bdd99ad64 Merged revisions 182810 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines

Fix cases where the internal poll() was not being used when it needed to be.

We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:28:55 +00:00
Russell Bryant 77a6840fd3 Add MFC/R2 support for chan_dahdi.
This commit introduces official support for R2 signaling in chan_dahdi.  The
modifications to chan_dahdi, and the supporting library, LibOpenR2, were both
written by Moises Silva.

Many users are using this code, or a variant of it, in Asterisk 1.2, 1.4 and 1.6
in Brazil, México and Argentina. An unknown number of users (but at least 1) 
are using it in each of the following countries: Colombia, Nepal, Thailand, 
Venezuela, Perú, and probably others.

To use this code, LibOpenR2 must be installed from http://www.libopenr2.org/.
Information about configuration can be found in configs/chan_dahdi.conf.sample.

The code committed is the most up to date version, which was being maintained
in svn/asterisk/team/moy/mfcr2/.

I would also like to include a Thank You to the many others that tested this
code beyond those listed in this commit message.  These are the names that I
could find in the mantis issue.

(closes issue #12509)
Reported by: moy
Patches:
      chan_zap-mfr2.patch uploaded by moy (license 222)
Tested by: moy, korihor, viniciusfontes, Skarmeth, loloski, asbestoshead, titogarrido, heliocoelhojr, konsultex, ncorrare, ecarruda, rtorresduque, PTorres, ychen

Review: http://reviewboard.digium.com/r/40/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-16 20:35:58 +00:00
Tilghman Lesher 4ac2fd4cde Use notification when timezone files change and re-scan then.
(closes issue #14300)
 Reported by: jamessan
 Patches: 
       20090127__bug14300.diff.txt uploaded by tilghman (license 14)
       20090224__bug14300.diff uploaded by jamessan (license 246)
 Tested by: jamessan
 Review: http://reviewboard.digium.com/r/136/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-25 19:24:44 +00:00
Tilghman Lesher e179e613f7 1. Make OS X compile cleanly with app_stack.
2. Use curl to download sound files, as curl is installed natively on OS X,
whereas wget and fetch are not.
(closes issue #14332)
 Reported by: oej
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-03 00:29:49 +00:00
Doug Bailey 9a28a07739 change VMWI to use new DAHDI_VMWI ioctl call.
Change configure script to detect the new ioctl call data structure.    
(issue #14104)
Reported by: alecdavis
Patches:
      mwiioctl_structure_asterisk.diff4.txt uploaded by dbailey (license )
Tested by: alecdavis, dbailey


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 15:49:24 +00:00
Tilghman Lesher fd3cb90841 Some platforms (notably, the BSDs) have a more efficient implementation called
closefrom(3).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 23:06:12 +00:00
Matthew Fredrickson 775033301a Add configuration support for half_full DAHDI buffer policy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 21:44:18 +00:00
Michiel van Baak d2d96b10ac introduce 'core show sysinfo' for systems that dont have the Linux-ish sysinfo stuff but do have sysctl.
(closes issue #13433)
Reported by: mvanbaak
Patches:
      2008121300_sysinfosysctl.diff.txt uploaded by mvanbaak (license 7)
	  with two free calls replaced with ast_free based on feedback on reviewboard
Review:
      http://reviewboard.digium.com/r/91/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:08:34 +00:00
Joshua Colp 8be6bc5f67 Make app_fax compatible with newer versions of spandsp. This remains backwards compatible with earlier versions though so do not fret.
(closes issue #14073)
Reported by: seandarcy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 15:41:22 +00:00
Eliel C. Sardanons 033bffd32f Introduce CLI permissions.
Based on cli_permissions.conf configuration file, we are able to permit or deny
cli commands based on some patterns and the local user and group running rasterisk.

(Sorry if I missed some of the testers).

Reviewboard: http://reviewboard.digium.com/r/11/

(closes issue #11123)
Reported by: eliel
Tested by: eliel, IgorG, Laureano, otherwiseguy, mvanbaak



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 18:52:14 +00:00
Kevin P. Fleming e14dfcbedc improve handling of API calls provided by loaded modules through use of some GCC features; this makes app_stack's usage of AGI APIs even cleaner, and will allow it to work 'as expected' either with or without res_agi being loaded
reviewed at http://reviewboard.digium.com/r/62



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-26 21:20:50 +00:00
Tilghman Lesher ac296a4ad3 Merged revisions 159025 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r159025 | tilghman | 2008-11-24 22:50:00 -0600 (Mon, 24 Nov 2008) | 3 lines
  
  System call ioperm is non-portable, so check for its existence in autoconf.
  (Closes issue #13863)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 05:02:11 +00:00
Mark Michelson 0e5367f7eb Merge the changes from the res_timing_timerfd branch.
This provides a new timing interface. In order to use it,
you must be running a Linux with a kernel version of
2.6.25 or newer and glibc 2.8 or newer.

This timing interface is a good alternative if a timing
source is necessary (e.g. for IAX trunking) but DAHDI is
otherwise unnecessary for the system.

For now, this commit contains the actual work done in the
res_timing_timerfd branch. There are no notices in the README
or CHANGES files yet, but they will be added in my next commit.

The timing API of Asterisk also needs to have a bit of work done
with regards to choosing which timing interface to use. This commit
makes the choice a build-time decision, by only allowing one of
the timer interfaces to be chosen in menuselect. It would be preferable
if the choice could be made at run-time, however. The preferred timing
interface could be loaded and tested, and if it does not work, choice
number two may be used instead. That sort of thing. That is beyond
the scope of work in this branch though.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 19:37:32 +00:00
Matthew Fredrickson 5250201d8b Make compilation of chan_dahdi so that it does not require the new pri_progress_with_cause function to have libpri support work.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 20:45:03 +00:00
Kevin P. Fleming a67790c6f5 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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 23:34:39 +00:00