Commit Graph

24362 Commits

Author SHA1 Message Date
Matthew Jordan 8f90378b34 Pipe test output through test object not stdout
Otherwise, it doesn't show up in the automated test failures


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-10 20:29:56 +00:00
Matthew Jordan d759158f22 Add some debugging when test_hashtab_thrash fails
Disabling DEBUG_THREADS caused this test to fail on the 32-bit build agent.
Adding some debugging to see why it thinks the test is timing out.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-10 19:45:31 +00:00
Matthew Jordan fba429409e Unlock the dial operation lock on a failed dial
If a dial operation fails, the pbx_outgoing_attempt routine will exit without
first having unlocked the outgoing dial lock. This would be a "bad thing".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-10 04:18:33 +00:00
Richard Mudgett 20bf856ba4 bridge_native_rtp: Remove some unnecessary NULL checks on c1.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-09 21:50:08 +00:00
Walter Doekes e744fa5f5b Don't leak frames when memory is full in autoservice_run.
Review: https://reviewboard.asterisk.org/r/2566/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-09 20:29:09 +00:00
Jonathan Rose b3813c8bc5 pbx: Make originate threads indicate dial status when synchronous
This makes it so that we can detect failures to originate as with
earlier versions of Asterisk, which restores the Asterisk 11 behavior
for the originate manager action. This was causing the ACL tests for
SIP and IAX2 to fail since those tests expected originate failures
when ACLs would cause rejections. Also, this patch fixes crashes in
chan_sip when ACLs rejected peers during registration verification.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-09 17:28:15 +00:00
Jonathan Rose 6fe21ef48e bridge_channel: Support the lonely flag and make ARI use it.
The lonely flag is an optional flag for bridge channels that will
make them leave a bridge when a channel leaves if only lonely
channels are in the bridge at that point. This is useful for things
like ending recording and playback channels when they cease to be
interacting with other channels in the bridge.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-09 17:22:28 +00:00
Matthew Jordan 6eec8a44e7 Update documentation for ConfBridge with some additional markup
Add some additional markup for items that needed it, e.g.,
replaceable tags, literal tags, etc.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-09 13:58:02 +00:00
Richard Mudgett 1d57078837 Fix stasis/core unit test. Should have had the CR/LF.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 22:57:06 +00:00
Tzafrir Cohen 39af081784 chan_dahdi: create channels at run-time
This code adds chan_dahdi the command 'dahdi create channels <range>'
(where <range> is a single <n>-<m> or 'new') and updates 'dahdi destroy
channel' with a similar 'dahdi destroy channels'. It allows DAHDI
channels and spans to be added after the initial channel load
(without destroying all other channels as in 'dahdi restart').

It also includes some fixes to the D-Channel / span destruction code
(r394552).

This change is intended to provide a hook for a script running from
udev once a span has been assigned ("registered") / unassigned
("unregistered") for its channels. The udev hook configures the span's
channels with dahdi_cfg -S, and can then ask Asterisk to create ethe
channels. See the scripts added to DAHDI-tools in 2.7.0.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 22:09:07 +00:00
Richard Mudgett 154f45dd02 Add missing CR/LF to FakeMI stasis test AMI event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 20:52:49 +00:00
Richard Mudgett 0b9ab0c61a Remove extra CR/LF from AMI event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 20:51:38 +00:00
Walter Doekes 809589ae6a Blocked revisions 396441
........
Consistent memory allocation by ast_bt_get_symbols.

Always use ast_alloc/ast_free. This is handled differently in trunk (r391012).

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 20:23:26 +00:00
Richard Mudgett 3f724fa493 Make bridge snapshots use prefixes.
* Changed ast_manager_build_bridge_state_string() to assume an empty
prefix string just like ast_manager_build_channel_state_string().

* Created ast_manager_build_bridge_state_string_prefix() to work just like
ast_manager_build_channel_state_string_prefix().

* Made BridgeMerge AMI event use To/From prefixes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 19:16:33 +00:00
Matthew Jordan 16fd65bb73 Improve disk writes for wav49 format
Writing to a file in the wav49 format performs rather inefficiently. The
procedure is approximately:
 (1) Write GSM frame to the end of the file
 (2) Seek to the end of the file
 (3) Seek to the header
 (4) Update the file size
 (5) Seek (again) to the end of the file
 (6) Repeat

This pattern negates any attempt to use the stdio buffering setup in
ast_writefile. It also results in many small writes that require a seek going
to the disk each second which translates to poor disk performance on certain
file systems, particularly when there are multiple wav49 files being written
simultaneously.

(closes issue ASTERISK-19595)
Reported by: Byron Clark
Tested by: Byron Clark
patches:
  gsm_wav_only_update_header_on_close.patch uploaded by byronclark (License 6157)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 18:40:15 +00:00
Richard Mudgett 73b3c70a5f Remove some resolved or obsolete BUGBUG comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 17:51:26 +00:00
Matthew Jordan 33e7b76d1d Hide the Surrogate channels from external consumers; kill Masquerade events
This patch does three things:
1. It provides a Surrogate channel technology with a consolidated
   "implementation detail flag" on the channel technology. This tells
   consumers of Stasis that the creation of this channel is an implementation
   detail in Asterisk and can be ignored (if they so choose). This
   consolidates the conference recorder/announcer flags as well - these flags
   had no additional meaning beyond "ignore this channel please".

2. It modifies allocation of a channel in two ways:
   (a) If a channel technology can be determined from the name, we set it
       directly in the allocation routine. This prevents the initial
       publication of the message from going out with a NULL channel technology
       where possible. This lets Stasis consumers get the right channel
       technology on the first publication.
   (b) It reorganizes allocation to make use of the 'finalized' property on the
       channel. This was already used to know that a channel had completely
       finished its construction in the masquerade routine; now we also use it
       to know whether or not the setting of certain channel properties is
       occurring during or post construction. The various set routines were
       modified accordingly as well.

3. The masquerade event is now dead, Jim. It no longer served any purpose
   whatsoever - if you perform a call pickup you'll get a Pickup event;
   if you perform an attended transfer you will still get those events; if you
   steal a channel to put it elsewhere you'll get the corresponding NewExten or
   BridgeEnter events.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 14:13:05 +00:00
Matthew Jordan 2a8219b64a Prevent spurious memory error when appending backtrace with MALLOC_DEBUG
Backtraces are allocated outside of the usual memory tracking performed by
MALLOC_DEBUG. This allows them to be used by the memory tracking enabled
by that build option; however, it also means that when backtraces are
disposed of they have to be done so outside of the re-defined free.

This patch undef's free prior to disposing of the allocated backtrace when
a backtrace is appended as a result of 'core show locks'.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 13:54:46 +00:00
Kinsey Moore 88bef0b3dd Prevent unreal channels from optimizing during DTMF emulation
This prevents unreal channel optimization during the prequalification
phase when either channel is involved in DTMF emulation. This prevents
a situation where an emulated digit would be missed because the
emulation was never completed.

Review: https://reviewboard.asterisk.org/r/2747/
(closes issue ASTERISK-22214)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 12:38:06 +00:00
Igor Goncharovskiy 70309f24c2 - Fix different issues with call transfer cancel. In case 3rd party busy or congestion call was not returned.
- Fix displaying soft button 'Redial' in case of no redial number exists
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 07:05:54 +00:00
Matthew Jordan 8b75a68f13 Handle Surrogate channels in Dial message processing
Depending on when a Surrogate channel replaces an existing channel, it is
possible to get a Dial message for the Surrogate channel. When this occurs, no
CDR will exist for the channel as Surrogate channels are ignored. Safely handle
the case when a CDR doesn't exist for a Dial message.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-08 02:58:01 +00:00
Matthew Jordan 200ed6a405 Perform Ring-No-Answer checks before processing Hangup logic
The rna() routine will raise a Stasis message involving both the caller and the
agent. This doesn't work so well if we already hung up the agent channel, as
the channel doesn't quite exist. Not surprisingly, this will crash. This patch
properly runs the rna subroutine (performing all of the Ring-No-Answer logic)
prior to hanging up the agent channel.

(closes issue ASTERISK-22258)
Reported by: Kiril Valchev
Tested by: Kiril Valchev



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-07 21:38:17 +00:00
David M. Lee 860ab29dab Fixed app_meetme for cache split changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 21:20:58 +00:00
David M. Lee c790848794 ARI: Add recording controls
This patch implements the controls from ARI recordings. The controls
are:

 * DELETE /recordings/live/{recordingName} - stop recording and
   discard it
 * POST /recordings/live/{recordingName}/stop - stop recording
 * POST /recordings/live/{recordingName}/pause - pause recording
 * POST /recordings/live/{recordingName}/unpause - resume recording
 * POST /recordings/live/{recordingName}/mute - mute recording (record
   silence to the file)
 * POST /recordings/live/{recordingName}/unmute - unmute recording.

Since this underlying functionality did not already exist, is was
added to app.c by a set of control frames, similar to how playback
control works. The pause/mute control frames are toggles, even though
the ARI controls are idempotent, to be consistent with the playback
control frames.

(closes issue ASTERISK-22181)
Review: https://reviewboard.asterisk.org/r/2697/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 14:44:45 +00:00
David M. Lee b97d318b7b Tweak caching topics to fix CEL tests
The Stasis changes in r395954 had an unanticipated side effect: messages
published directly to an _all topic does not get forwarded to the
corresponding caching topic.

This patch fixes that by changing how caching topics forward messages,
and how the caching pattern forwards are setup.

For the caching pattern, the all_topic is forwarded to the
all_topic_cached. This forwards messages published directly to the
all_topic to all_topic_cached.

In order to avoid duplicate messages on all_topic_cached, caching topics
were changed to no longer forward uncached messages. Subscribers to an
individual caching topic should only expect to receive cache updates,
and subscription change messages. Since individual caching topics are
new, this shouldn't be a problem.

There are a few minor changes to the pre-cache split behavior.

 * For topics changed to use the caching pattern, the all_topic_cached
   will forward snapshots in addition to cache updates. Since
   subscribers by design ignore unexpected messages, this should be
   fine.

 * Caching topics that don't use the caching pattern no longer forward
   non-cache updates. This makes no difference for the current caching
   topics.

   * mwi_topic_cached, channel_by_name_topic and
     presence_state_topic_cached have no subscribers

   * device_state_topic_cached's only subscriber only processes cache
     udpates

(issue ASTERISK-22243)
Review: https://reviewboard.asterisk.org/r/2738


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 14:28:23 +00:00
Kinsey Moore dfa5be76d4 Expose res_pjsip threadpool options
Expose initial size, automatic increment, maximum size, and idle
timeout as configurable parameters for the res_pjsip thread pool.

Review: https://reviewboard.asterisk.org/r/2704/
(closes issue ASTERISK-22143)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 13:08:13 +00:00
Kinsey Moore 2e23bec461 Fix memory leaks in the CDR engine
Fix refcount bugs and a possible locking problem in the CDR engine
relating to use of ao2_iterators.

Review: https://reviewboard.asterisk.org/r/2724/
(closes issue ASTERISK-22126)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 12:45:39 +00:00
Joshua Colp 5b3441ae55 Fix crash in res_pjsip_outbound_registration when the remote server can not be resolved.
This crash was caused by decrementing the reference count of a newly created message when
it should not be. This change fixes that but also fixes all other cases where this was
incorrectly done.

(closes issue ASTERISK-22188)
Reported by: Kinsey Moore


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 12:39:27 +00:00
Walter Doekes 07d3705b42 Check result of ast_var_assign() calls for memory allocation failure (2).
Missed a spot in the previous commit.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 08:43:22 +00:00
Walter Doekes ccdfe67bf2 Check result of ast_var_assign() calls for memory allocation failure.
We try to keep the system running even when all available memory is
spent.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-06 08:36:15 +00:00
Michael L. Young c0f302e1e1 Fix Registration Failure When A Peer And TLS Are Used
If a peer is used in a register line and TLS is defined as the transport, the
registration fails since the transport on the dialog is never set properly
resulting in UDP being used instead of TLS.

This patch sets the dialog's transport based on the transport that was defined
in the register line.  If the register line does not specify a transport, the
parsing function for the register line always defaults back to UDP.

(closes issue ASTERISK-21964)
Reported by: Doug Bailey
Tested by: Doug Bailey
Patches:
    asterisk-21964-set-reg-dialog-transport.diff
					by Michael L. Young (license 5026)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 20:20:41 +00:00
Jonathan Rose 3797639e84 bridge features: Dial and Queue add features instead of replace them.
Dial and Queue would previously apply a new set of features whenever
bridging. These options would be based purely on the options supplied
to the dial/queue applications. This patch changes the function those
applications use to bridge calls so that the features will be added
to the set of existing features for each channel rather than having
them override the existing features.

(closes issue ASTERISK-22209)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2713/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 20:18:54 +00:00
Matthew Jordan 80c9ad102e Add AMI registration events for PJSIP outbound registration attempts
This patch adds AMI events whenever an outbound registration attempt succeeds
or fails from res_pjsip_outbound_registration. This brings it inline with
the existing SIP channel driver and IAX channel driver.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 19:01:45 +00:00
Michael L. Young 8f290b02a8 Change "from" to "From".
(related to issue ASTERISK-21903)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 18:52:22 +00:00
Michael L. Young a14753929f Adding a note to UPGRADE.txt about a change made to res_agi in order to
indicate when streaming an audio file fails like it is done in other parts
of the code to indicate an error.

Note was requested by Paul Belanger: 
http://lists.digium.com/pipermail/asterisk-dev/2013-July/061420.html

(related to issue ASTERISK-21903)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 18:46:57 +00:00
Jonathan Rose 2d87fc773b bridge_holding: Add suspsend/unsuspend callbacks
Suspend and unsuspend callbacks are added to the holding bridge so
that entertainment can be disabled and re-enabled when operations
would suspend a channel on the bridge (such as playback operations).
This fixes entertainment so that when those operations end, the
entertainment can pick back up and it also serves as an optimization.
Also, this patch fixes a bug caused by triggering ringing frames
immediately instead of pushing them to the queue which created a race
condition where sometimes parking with ringing during attended
transfers would cause the ringing to be interrupted by an unhold
frame.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 17:48:03 +00:00
Jonathan Rose e47794ead1 ARI: bridges/{bridgeID}/addChannel: add roles parameter
Roles are now cleared with each entry into a bridge with addChannel.
If the roles parameter is present, the role specified will be applied
to all channels being added with the addChannel command.

(closes issue ASTERISK-21973)
Reported by: Matt Jordan
https://reviewboard.asterisk.org/r/2691/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 16:59:13 +00:00
Jonathan Rose 98b02d98f3 res_parking: Unit tests
Adds the following unit tests:
* create_lot: tests adding and removal of a new parking lot (baseline)
* park_extensions: creates a parking lot that registers extensions and
      then confirms that all of the expected extensions exist
* extensions_conflicts: creates numerous parking lots to test that
      extension conflicts in parking lots result in parking lot
      creation failing
* dynamic_parking_variables: Tests that the creation of dynamic
      parking lots respects the related channel variables set on the
      channel that requests them.
* park_call: Tests adding a channel to a parking lot's holding bridge
      by standard parking functions.
* retrieve_call: Tests pulling a channel out of a parking lot's
      holding bridge via parked call retrieval functions.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 16:00:01 +00:00
David M. Lee 357b275239 Fix res_ari_asterisk load issue
The new res_ari_asterisk.so module presents several config options
from asterisk main. Unfortunately, they aren't exported, so the module
won't load on Linux.

This patch renames the variables, adding the ast_ prefix so they will
be exported.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-05 14:35:00 +00:00
Matthew Jordan 2977846f0a Don't unsubscribe from the AMI message router from manager_bridges
The AMI message router is owned wholly by manager.c. Previously, each of the
manager_{item} source files had their own message router and they unsubscribed
from each; once they moved over to using a single message router only a single
unsubscribe became necessary.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-03 03:53:46 +00:00
Mark Michelson ab6fc47d95 And get rid of another ast_bridged_channel()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 17:50:40 +00:00
David M. Lee 309d7e08f0 Clean up ast_json with ast_json_unref
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 17:29:52 +00:00
David M. Lee 85fb0e61bf Removed svnmerge-integrated from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 16:59:15 +00:00
Mark Michelson 11d2993426 Get the SNMP code to compile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 15:01:37 +00:00
David M. Lee 5114e4fc0b ARI - GET /ari/asterisk/info
This patch adds basic system information access to ARI.

The results are roughly what you get from 'core show settings', with a
few minor differences.

 * Data is structured, with 'build', 'system', 'config' and 'status'
   sub-objects.
 * Each sub-object is selectable, using the ?only= parameter. A comma
   separated list can be provided to select multiple sections.
 * A few config options are numeric, for which 0 means 'unlimited'.
   Instead of having a special interpretation of those fields, they
   are simply omitted if they're 0.
 * The information is limited to what might be useful to building
   external applications.

(closes issue ASTERISK-21575)
Review: https://reviewboard.asterisk.org/r/2702/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 14:46:21 +00:00
David M. Lee 537ecebd2d ARI - implement allowMultiple for parameters
Swagger allows parameters to be specified as 'allowMultiple', meaning
that the parameter may be specified as a comma separated list of
values.

I had written some of the API docs using that, but promptly forgot
about implementing it. This patch finally fills in that gap.

The codegen template was updated to represent 'allowMultiple' fields
as array/size fields in the _args structs. It also parses the comma
separated list using ast_app_separate_args(), so quoted strings in the
argument will be handled properly.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 14:36:32 +00:00
David M. Lee 10c91bc96e Address JSON thread safety issues.
In tracking down some unit tests failures, I ended up reading the fine
print[1] regarding Jansson's thread safety.

In short:
 1. Ref-counting is non-atomic.
 2. json_dumps() and friends are not thread safe.

This patch adds locking where necessary to our ast_json_* wrapper API,
with documentation in json.h describing the thread safety limitations of
the API.

 [1]: http://www.digip.org/jansson/doc/2.4/portability.html#thread-safety

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 14:27:35 +00:00
Mark Michelson 328e99f41d Make a couple of changes to help AMI events to be more clear in what is occurring.
* BridgeEnter now contains the unique ID of the channel that is to be swapped out, if applicable.
* There is a ParkedCallSwap event that is sent when a parked channel has a new channel take its place.

(closes issue ASTERISK-22193)
reported by Mark Michelson

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 14:13:04 +00:00
Kinsey Moore 41d6be2432 Move ast_str_container_alloc and friends
This moves ast_str_container_alloc, ast_str_container_add,
ast_str_container_remove, and related private functions into
strings.c/h since they really don't belong in astobj2.c/h.

As a result of this move, utils also had to be updated.

Review: https://reviewboard.asterisk.org/r/2719/
(closes issue ASTERISK-22041)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 14:08:34 +00:00
Mark Michelson f8622e7c5c Get rid of ast_bridged_channel() and the bridged_channel field on ast_channels.
This commit is smaller than the initial review placed on review board. This is because
a change to allow for channel drivers to access parking functionality externally was
committed and invalidated quite a few of the changes initially made.

(closes issue ASTERISK-22039)
reported by Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 14:05:07 +00:00