Commit Graph

24253 Commits

Author SHA1 Message Date
Joshua Colp ea948c69d3 Move where the sorcery observer is added for qualify to guarantee the sched_qualifies container exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 19:10:14 +00:00
Kinsey Moore a1e219ef51 CEL refactoring cleanup
This change removes AST_CEL_BRIDGE_UPDATE since it should no longer be
used because masquerade situations are now accounted for in other ways.

This also refactors usage of AST_CEL_FORWARD to be produced by a Dial
message which has been extended with a "forward" field.

(closes issue ASTERISK-21566)
Review: https://reviewboard.asterisk.org/r/2635/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 13:03:17 +00:00
Matthew Jordan 13b470d704 Fix memory/ref counting leaks in a variety of locations
This patch fixes the following memory leaks:
 * http.c: The structure containing the addresses to bind to was not being
   deallocated when no longer used
 * named_acl.c: The global configuration information was not disposed of
 * config_options.c: An invalid read was occurring for certain option types.
 * res_calendar.c: The loaded calendars on module unload were not being
   properly disposed of.
 * chan_motif.c: The format capabilities needed to be disposed of on module
   unload. In addition, this now specifies the default options for the
   maxpayloads and maxicecandidates in such a way that it doesn't cause the
   invalid read in config_options.c to occur.

(issue ASTERISK-21906)
Reported by: John Hardin
patches:
  http.patch uploaded by jhardin (license 6512)
  named_acl.patch uploaded by jhardin (license 6512)
  config_options.patch uploaded by jhardin (license 6512)
  res_calendar.patch uploaded by jhardin (license 6512)
  chan_motif.patch uploaded by jhardin (license 6512)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25 01:12:58 +00:00
Matthew Jordan 91217ac3c1 Fix a variety of memory leaks
This patch addresses the following memory/ref counting leaks:

 * main/devicestate.c - unsubscribe and join our devicestate message
   subscription
 * main/cel.c - clean up the datastore and config objects on exist
 * main/parking.c - cleanup memory leak of retriever snapshot on message
   payload destruction
 * res/parking/parking_bridge.c - cleanup memory leak of retrieve snapshot
   on message payload destruction
 * main/presencestate.c - unsubscribe and join the caching topic on exit
 * manager.c - properly unregister the manager action "BlindTransfer"
 * sorcery.c - shutdown the threadpool on exit and dispose of any wizards

(issue ASTERISK-21906)
Reported by: John Hardin
patches:
  cel.patch uploaded by jhardin (license #6512)
  devicestate.patch uploaded by jhardin (license #6512)
  manager.patch uploaded by jardin (license #6512)
  presencestate.patch uploaded by jhardin (license #6512)
  retriever-channel-snapshot.patch uploaded by jhardin (license #6512)
  sorcery.patch uploaded by jhardin (license #6512)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 23:56:54 +00:00
David M. Lee f33d074d1a Few more menuselect fixes missed in r392777
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 22:05:28 +00:00
David M. Lee d56cbf43a0 Fixed templates so that the changes from r392777 won't be overwritten the next
time we run the generators.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 21:48:39 +00:00
Richard Mudgett b5f18d1677 Fix menuselect display for stasis modules.
The menuselect parser is very simple.  It looks for AST_MODULE_INFO and
uses any quoted string on that line as the module summary display.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 21:40:52 +00:00
Mark Michelson 463470bb6e Remove stray properties from merge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 19:28:51 +00:00
Mark Michelson 4710869133 Add documentation for features configuration.
Review: https://reviewboard.asterisk.org/r/2616

(closes issue ASTERISK-21542)
Reported by Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 18:33:13 +00:00
Kinsey Moore a0b7a49a4a Index installed sounds and implement ARI sounds queries
This adds support for stasis/sounds and stasis/sounds/{ID} queries via
the Asterisk RESTful Interface (ARI, formerly Stasis-HTTP).

The following changes have been made to accomplish this:
* A modular indexer was created for local media.
* A new function to get an ast_format associated with a file extension
  was added.  
* Modifications were made to the built-in HTTP server so that URI
  decoding could be deferred to the URI handler when necessary.
* The Stasis-HTTP sounds JSON documentation was modified to handle
  cases where multiple languages are installed in different formats.
* Register and Unregister events for formats were added to the system
  topic.

(closes issue ASTERISK-21584)
(closes issue ASTERISK-21585)
Review: https://reviewboard.asterisk.org/r/2507/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24 13:49:20 +00:00
Matthew Jordan cc29957a6f Properly pack the parameters into ast_json_pack when sending a send fax message
This patch properly packs the parameters into the send fax message so that it
actually work.

Missing a ',' between two string fields can be difficult to debug, particularly
when the actual packing succeeds. Interestingly enough, this didn't actually
crash until the JSON blob we deref'd and disposed of. Since that happened in
a different thread, it was pretty tough to track down.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-23 19:19:30 +00:00
Joshua Colp 477e207f28 Add some more missing ast_sorcery_generic_alloc conversions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-23 18:59:36 +00:00
Joshua Colp c3f9ddc9ad Add missing ast_sorcery_generic_alloc conversions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-23 13:24:18 +00:00
Joshua Colp 1403d1f173 Fix a bug where messages were getting duplicated on AMI.
This was caused by forwarding all endpoint messages to manager which includes
channel messages that are related to the endpoint. This change causes only
the PeerStatus messages to be forwarded to manager thus eliminating the
duplicate channel messages.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-23 00:02:01 +00:00
Matthew Jordan 175b9831f2 Properly extract channel variables for the SendFAX/ReceiveFAX Stasis messages
By the time something extracts the pointers from ast_json_pack, the channels
will already be disposed of. This patch properly pulls the information out of
the variables and packs them into the JSON blob.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 22:42:34 +00:00
Joshua Colp a330d0867e Make sorcery details opaque and add extended fields.
Sorcery specific object information is now opaque and allocated with the object.
This means that modules do not need to be recompiled if the sorcery specific part
is changed. It also means that sorcery can store additional information on objects
and ensure it is freed or the reference count decreased when the object goes away.

To facilitate the above a generic sorcery allocator function has been added which
also ensures that allocated objects do not have a lock.

Extended fields have been added thanks to all of the above which allows specific fields
to be marked as extended, and thus simply stored as-is within the object. Type safety
is *NOT* enforced on these fields. A consumer of them has to query and ultimately perform
their own safety check. What does this mean? Extra modules can extend already defined
structures without having to modify them.

Tests have also been included to verify extended field functionality.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 14:26:25 +00:00
Joshua Colp 77002bc377 Merge in current pimp_my_sip work, including:
1. Security events
2. Websocket support
3. Diversion header + redirecting support
4. An anonymous endpoint identifier
5. Inbound extension state subscription support
6. PIDF notify generation
7. One touch recording support (special thanks Sean Bright!)
8. Blind and attended transfer support
9. Automatic inbound registration expiration
10. SRTP support
11. Media offer control dialplan function
12. Connected line support
13. SendText() support
14. Qualify support
15. Inband DTMF detection
16. Call and pickup groups
17. Messaging support

Thanks everyone!

Side note: I'm reminded of the song "How Far We've Come" by Matchbox Twenty.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 14:03:22 +00:00
Matthew Jordan ea03516cb5 Fix a deadlock and possible crash in res_fax
This patch fixes two bugs.
(1) It unlocks the channel in the framehook handlers before attempting to grab
    the peer from the bridge. The locking order for the bridging framework is
    bridge first, then channel - having the channel locked while attempting to
    obtain the bridge lock causes a locking inversion and a deadlock. This
    patch bumps the channel ref count prior to releasing the lock in the
    framehook to avoid lifetime issues.

    Note that this does expose a subtle problem in framehooks; that is,
    something could modify the framehook list while we are executing, causing
    issues in the framehook list traversal that the callback executes in.
    Fixing this is a much larger problem that is beyond the scope of this
    patch - (a) we already unlock the channel in this particular framehook
    and we haven't run into a problem yet (as modifying the framehook list
    when a channel is about to perform a fax gateway would be a very odd
    operation) and (b) migrating to an ao2 container of framehooks would be
    more invasive at this point. See the referenced ASTERISK issue for more
    information.
(2) Directly packing channel variables into a JSON object turned out to be
    unsafe. A condition existed where the strings in the JSON blob were no
    longer safe to be accessed if the channel object itself was disposed of.

(issue ASTERISK-21951)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 13:58:07 +00:00
Joshua Colp 94ec267888 Migrate PeerStatus events to stasis, add stasis endpoints, and add chan_pjsip device state.
(closes issue ASTERISK-21489)
(closes issue ASTERISK-21503)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22 12:40:16 +00:00
Richard Mudgett 1267c91315 Extract a useful routine from the softmix bridge technology.
* Extract a useful routine from the softmix bridge technology for other
technologies.  Make other technologies use it if they can.

* Made native and 1-1 bridges write to all parties if the bridge channel
writing the frame into the bridge is NULL.  Softmix will also do the same
for frame types that make sense.

* Tweak the bridge write routine return value meaning and adjust the
bridge technologies to match.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21 22:39:27 +00:00
Matthew Jordan c14cdede12 Add BUGBUG for broken direct media in chan_gulp
(issue ASTERISK-21947)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21 21:22:07 +00:00
Jason Parker 3a493017c4 Fix typo.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21 18:54:49 +00:00
Richard Mudgett 797f712845 Add channel optimization interaction with frame hooks BUGBUG comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21 18:10:28 +00:00
Mark Michelson e3a89a0a18 Change chan_unistim to use core transfer API.
Review: https://reviewboard.asterisk.org/r/2553

(closes issue ASTERISK-21527)
Reported by Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21 18:05:56 +00:00
Richard Mudgett cd6e2538f2 Change several bridge functions to return error status.
The bridge frame queue functions need to return an error status if the
frame failed to be queued because of an error condition.  The main calls
that needed to return the status are:
ast_bridge_channel_queue_action_data() and
ast_bridge_channel_write_action_data().  The other return changes are
ripple effects.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21 17:48:14 +00:00
Matthew Jordan f3bfece4c3 Update autosupport script
This patch updates the autosupport script to collect all information available
to the Asterisk CLI command "digium_phones". It also makes minor improvements
in options handling.

(closes issue AST-1163)
Reported by: Trey Blancher
patches:
  390347_autosupport.diff uploaded by tblancher (License 5821)
  390348_autosupport.diff uploaded by tblancher (License 5821)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-21 14:21:16 +00:00
Joshua Colp ffab4d52f1 Add a log message for when an incoming session is rejected due to the extension not being found.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-20 21:13:17 +00:00
Richard Mudgett cd40e179a9 Fix potential bridge hook resource leak if the hook install fails.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-20 17:21:40 +00:00
Mark Michelson 33eb15a242 Fix threadpool rapid growth problem.
When a threadpool is set to autoincrement its threadcount, an issue
may arise when multiple tasks are queued at once into the threadpool. Since
threads start active, each new task would result in autoincrementing the
thread count. So if all threads were active, and a thread's autoincrement
value were 5, then 3 new tasks would result in 15 threads being created even
though the initial autoincrement was sufficient to handle the number of tasks.

This change introduces three behavior changes:

1) New threads in the threadpool start idle instead of active.
2) When a threadpool autoincrements, one thread is activated after the growth.
3) When a threadpool's size is incremented manually, all added threads are activated.

For a more detailed explanation about the changes, please see the Review Board link
at the bottom of this commit.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-20 16:29:35 +00:00
David M. Lee 6e6652518d Fix build problem on OS X Mountain Lion (10.8)
For about forever, our build flags for OS X have been slightly off, but
good enough to build and run. Apparently they aren't good enough any more.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-19 22:52:23 +00:00
Kinsey Moore 954166ed24 Pull CEL linkedid manipulation into cel.c
This finishes moving all CEL linkedid tracking entirely within cel.c
since that is now possible with channel snapshots.

This also removes another CEL linkedid manipulation function from cel.h
that has already been internalized and is neither called nor available
to link against.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-19 12:55:34 +00:00
Matthew Jordan 68103abba3 Handle variable substitution in dummy variables
When func_cdr is used for variable substitution, there is no channel name
and hence no run-time information available for CDR variable substitution.
In that case, the correct thing to do is to use the CDR object on the channel
passed to the function. This patch checks to see if the channel passed in
has a name - if not, it uses ast_cdr_format_var instead of ast_cdr_get_var.

This allows CDR backends to continue to use variable substitution in order to
resolve ast_cdr object properties.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-19 01:28:40 +00:00
Matthew Jordan da1f4f0c3d Fix the test_substitution test
In r391947, the CDR function was modified such that it will return a
value for the start,answer, and end times if asked. That time will just
be 0 if it hasn't happened yet.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-18 22:37:09 +00:00
Richard Mudgett a5b32ca253 Bridging: Fix crash on destruction of a partially constructed bridge.
* Promoted some bridge construction debug messages to warnings.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-18 19:31:31 +00:00
Richard Mudgett e943dc8de3 Add some safety cleanup for a failed push into a bridge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-18 16:09:15 +00:00
Richard Mudgett 73854ebb2b Remove stub comment on function that is not a stub.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-18 16:05:24 +00:00
Kinsey Moore 3c34b725cb Fix bridge snapshot conversion to JSON
This makes ast_bridge_snapshot_to_json conform to the swagger Bridge
model by adding the two fields it required.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-18 14:30:06 +00:00
David M. Lee 4aa47d6893 Fix build warnings related to printf/scanf of tv_usec.
The type of tv_usec is suseconds_t. On Linux, this is usually a long int, but
the specification is actually pretty lax on what it might actually be. And,
sadly, there's no printf/scanf width specifier for suseconds_t. So it could
bit an int or a long, but there's not a great way to tell which it is.

This patch fixes scanf by reading into a long temporary variable that's then
stored into the tv_usec. It fixes printf by casting the tv_usec to a long
first.

This patch also adds some missing width specifiers for some debug statements,
which would cause ".000001" to be displayed at ".1".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 18:58:56 +00:00
Richard Mudgett 291711f85f chan_vpb: Fix compile error and __ast_channel_alloc() prototype const inconsistency.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 18:37:27 +00:00
Richard Mudgett c9e04e70ca chan_misdn: Fix compile error after CDR merge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 18:16:23 +00:00
Jason Parker adda9661c2 Fix a build warning with stasis messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 16:59:46 +00:00
Matthew Jordan 50d81a58e8 Prevent sending a NewExten event after a Hangup during a stack restore
When a channel is originated, its application is typically set to AppDial2,
indicating that it was a dialed channel through the Dial API. Asterisk during
an originate will perform a stack execute to direct the outgoing channel to
a particular place in the dialplan or application. When the stack returns, the
previous application (AppDial2) is restored.

Unfortunately, in the case of an originated channel, the stack restore happens
after hangup. A stasis message is sent notifying everyone that the application
was restored, and this causes a NewExten event to go out after the Hangup event,
violating the basic contract consumers have of the channel lifetime. While we
could preclude the message from going out, restoring the channel's state before
it executed the next higher frame in the stack has to occur, and other places
in the code depend on this behavior.

Since we know that channel hung up (it's a ZOMBIE!), this patch simply checks
to see if the channel has been zombified before sending a NewExten event.

Note that this will fix a number of bouncing tests in the Test Suite. Go tests.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 14:40:23 +00:00
Matthew Jordan 0afb1949c9 Restore bad merge on CHANGES
The patch for CDRs moved around a lot of content in CHANGES to try and
organize the areas that were affected. This missed some changes that went
in with a merge and removed some updates - this patch adds them back in.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 14:31:51 +00:00
Joshua Colp 2e541ec265 Fix build warning (which is transmogrified into an error) with my compiler due to uninitialized variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 12:28:34 +00:00
Matthew Jordan 2b992bc74d Make cdr_mysql compile again by not directly setting the run-time CDR object
A stray ast_cdr_setvar was missed in cdr_mysql (silly addons). This has now
been refactored to not set the property, as the property would have been set
on a run-time object that was already dispatched to the backend. The module
simply remembers the value it wanted to set and writes it to MySQL later
in the processing.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 03:31:19 +00:00
Matthew Jordan 6258bbe7bd Update Asterisk's CDRs for the new bridging framework
This patch is the initial push to update Asterisk's CDR engine for the new
bridging framework. This patch guts the existing CDR engine and builds the new
on top of messages coming across Stasis. As changes in channel state and bridge
state are detected, CDRs are built and dispatched accordingly. This
fundamentally changes CDRs in a few ways.
(1) CDRs are now *very* reflective of the actual state of channels and bridges.
    This means CDRs track well with what an actual channel is doing - which
    is useful in transfer scenarios (which were previously difficult to pin
    down). It does, however, mean that CDRs cannot be 'fooled'. Previous
    behavior in Asterisk allowed for CDR applications, channels, and other
    properties to be spoofed in parts of the code - this no longer works.
(2) CDRs have defined behavior in multi-party scenarios. This behavior will not
    be what everyone wants, but it is a defined behavior and as such, it is
    predictable.
(3) The CDR manipulation functions and applications have been overhauled. Major
    changes have been made to ResetCDR and ForkCDR in particular. Many of the
    options for these two applications no longer made any sense with the new
    framework and the (slightly) more immutable nature of CDRs.

There are a plethora of other changes. For a full description of CDR behavior,
see the CDR specification on the Asterisk wiki.

(closes issue ASTERISK-21196)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17 03:00:38 +00:00
Mark Michelson 67e35c7b47 Fix regression in MWI stasis handling.
In revision 389733, mwi state allocation was placed into its
own function instead of performing the allocation in-line when
required. The issue was that in ast_publish_mwi_state_full(),
the local variable "uniqueid" was no longer being set, but it was
still being used as the topic for MWI. This meant that all MWI
publications ended up being published to the "" (empty string)
mailbox topic. Thus MWI subscriptions for specific mailboxes were
never notified of mailbox state changes.

This change fixes the issue by removing the local uniqueid variable
from ast_publish_mwi_state_full() and instead referencing the
mwi_state->uniqueid field since it has been properly set.

(closes issue ASTERISK-21913)
Reported by Malcolm Davenport



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-14 23:26:50 +00:00
Joshua Colp 671d7e62c7 Ensure that the number of added contacts never goes below 0.
This can happen when a REGISTER request is removing a contact.

(closes issue ASTERISK-21911)
Reported by: mdavenport


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-14 21:57:31 +00:00
Kinsey Moore b5a10ad972 Revert parts of r391855 that were not ready to go in to trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-14 18:50:21 +00:00
Kinsey Moore 9a43a7e575 Fix two more possible crashes in CEL
These are locations that should return valid snapshots, but need to be
handled if not.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-14 18:46:00 +00:00