asterisk/asterisk.git
9 years agopbx: Make originate threads indicate dial status when synchronous
Jonathan Rose [Fri, 9 Aug 2013 17:28:15 +0000 (17:28 +0000)]
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

9 years agobridge_channel: Support the lonely flag and make ARI use it.
Jonathan Rose [Fri, 9 Aug 2013 17:22:28 +0000 (17:22 +0000)]
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

9 years agoUpdate documentation for ConfBridge with some additional markup
Matthew Jordan [Fri, 9 Aug 2013 13:58:02 +0000 (13:58 +0000)]
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

9 years agoFix stasis/core unit test. Should have had the CR/LF.
Richard Mudgett [Thu, 8 Aug 2013 22:57:06 +0000 (22:57 +0000)]
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

9 years agochan_dahdi: create channels at run-time
Tzafrir Cohen [Thu, 8 Aug 2013 22:09:07 +0000 (22:09 +0000)]
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

9 years agoAdd missing CR/LF to FakeMI stasis test AMI event.
Richard Mudgett [Thu, 8 Aug 2013 20:52:49 +0000 (20:52 +0000)]
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

9 years agoRemove extra CR/LF from AMI event.
Richard Mudgett [Thu, 8 Aug 2013 20:51:38 +0000 (20:51 +0000)]
Remove extra CR/LF from AMI event.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396462 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoBlocked revisions 396441
Walter Doekes [Thu, 8 Aug 2013 20:23:26 +0000 (20:23 +0000)]
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

9 years agoMake bridge snapshots use prefixes.
Richard Mudgett [Thu, 8 Aug 2013 19:16:33 +0000 (19:16 +0000)]
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

9 years agoImprove disk writes for wav49 format
Matthew Jordan [Thu, 8 Aug 2013 18:40:15 +0000 (18:40 +0000)]
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

9 years agoRemove some resolved or obsolete BUGBUG comments.
Richard Mudgett [Thu, 8 Aug 2013 17:51:26 +0000 (17:51 +0000)]
Remove some resolved or obsolete BUGBUG comments.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396401 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoHide the Surrogate channels from external consumers; kill Masquerade events
Matthew Jordan [Thu, 8 Aug 2013 14:13:05 +0000 (14:13 +0000)]
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

9 years agoPrevent spurious memory error when appending backtrace with MALLOC_DEBUG
Matthew Jordan [Thu, 8 Aug 2013 13:54:46 +0000 (13:54 +0000)]
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

9 years agoPrevent unreal channels from optimizing during DTMF emulation
Kinsey Moore [Thu, 8 Aug 2013 12:38:06 +0000 (12:38 +0000)]
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

9 years ago - Fix different issues with call transfer cancel. In case 3rd party busy or congesti...
Igor Goncharovskiy [Thu, 8 Aug 2013 07:05:54 +0000 (07:05 +0000)]
 - 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

9 years agoHandle Surrogate channels in Dial message processing
Matthew Jordan [Thu, 8 Aug 2013 02:58:01 +0000 (02:58 +0000)]
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

9 years agoPerform Ring-No-Answer checks before processing Hangup logic
Matthew Jordan [Wed, 7 Aug 2013 21:38:17 +0000 (21:38 +0000)]
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

9 years agoFixed app_meetme for cache split changes
David M. Lee [Tue, 6 Aug 2013 21:20:58 +0000 (21:20 +0000)]
Fixed app_meetme for cache split changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396347 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoARI: Add recording controls
David M. Lee [Tue, 6 Aug 2013 14:44:45 +0000 (14:44 +0000)]
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

9 years agoTweak caching topics to fix CEL tests
David M. Lee [Tue, 6 Aug 2013 14:28:23 +0000 (14:28 +0000)]
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

9 years agoExpose res_pjsip threadpool options
Kinsey Moore [Tue, 6 Aug 2013 13:08:13 +0000 (13:08 +0000)]
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

9 years agoFix memory leaks in the CDR engine
Kinsey Moore [Tue, 6 Aug 2013 12:45:39 +0000 (12:45 +0000)]
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

9 years agoFix crash in res_pjsip_outbound_registration when the remote server can not be resolved.
Joshua Colp [Tue, 6 Aug 2013 12:39:27 +0000 (12:39 +0000)]
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

9 years agoCheck result of ast_var_assign() calls for memory allocation failure (2).
Walter Doekes [Tue, 6 Aug 2013 08:43:22 +0000 (08:43 +0000)]
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

9 years agoCheck result of ast_var_assign() calls for memory allocation failure.
Walter Doekes [Tue, 6 Aug 2013 08:36:15 +0000 (08:36 +0000)]
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

9 years agoFix Registration Failure When A Peer And TLS Are Used
Michael L. Young [Mon, 5 Aug 2013 20:20:41 +0000 (20:20 +0000)]
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

9 years agobridge features: Dial and Queue add features instead of replace them.
Jonathan Rose [Mon, 5 Aug 2013 20:18:54 +0000 (20:18 +0000)]
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

9 years agoAdd AMI registration events for PJSIP outbound registration attempts
Matthew Jordan [Mon, 5 Aug 2013 19:01:45 +0000 (19:01 +0000)]
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

9 years agoChange "from" to "From".
Michael L. Young [Mon, 5 Aug 2013 18:52:22 +0000 (18:52 +0000)]
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

9 years agoAdding a note to UPGRADE.txt about a change made to res_agi in order to
Michael L. Young [Mon, 5 Aug 2013 18:46:57 +0000 (18:46 +0000)]
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

9 years agobridge_holding: Add suspsend/unsuspend callbacks
Jonathan Rose [Mon, 5 Aug 2013 17:48:03 +0000 (17:48 +0000)]
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

9 years agoARI: bridges/{bridgeID}/addChannel: add roles parameter
Jonathan Rose [Mon, 5 Aug 2013 16:59:13 +0000 (16:59 +0000)]
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

9 years agores_parking: Unit tests
Jonathan Rose [Mon, 5 Aug 2013 16:00:01 +0000 (16:00 +0000)]
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

9 years agoFix res_ari_asterisk load issue
David M. Lee [Mon, 5 Aug 2013 14:35:00 +0000 (14:35 +0000)]
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

9 years agoDon't unsubscribe from the AMI message router from manager_bridges
Matthew Jordan [Sat, 3 Aug 2013 03:53:46 +0000 (03:53 +0000)]
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

9 years agoAnd get rid of another ast_bridged_channel()
Mark Michelson [Fri, 2 Aug 2013 17:50:40 +0000 (17:50 +0000)]
And get rid of another ast_bridged_channel()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396145 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoClean up ast_json with ast_json_unref
David M. Lee [Fri, 2 Aug 2013 17:29:52 +0000 (17:29 +0000)]
Clean up ast_json with ast_json_unref

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396143 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemoved svnmerge-integrated from trunk
David M. Lee [Fri, 2 Aug 2013 16:59:15 +0000 (16:59 +0000)]
Removed svnmerge-integrated from trunk

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396136 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoGet the SNMP code to compile.
Mark Michelson [Fri, 2 Aug 2013 15:01:37 +0000 (15:01 +0000)]
Get the SNMP code to compile.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396126 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoARI - GET /ari/asterisk/info
David M. Lee [Fri, 2 Aug 2013 14:46:21 +0000 (14:46 +0000)]
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

9 years agoARI - implement allowMultiple for parameters
David M. Lee [Fri, 2 Aug 2013 14:36:32 +0000 (14:36 +0000)]
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

9 years agoAddress JSON thread safety issues.
David M. Lee [Fri, 2 Aug 2013 14:27:35 +0000 (14:27 +0000)]
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

9 years agoMake a couple of changes to help AMI events to be more clear in what is occurring.
Mark Michelson [Fri, 2 Aug 2013 14:13:04 +0000 (14:13 +0000)]
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

9 years agoMove ast_str_container_alloc and friends
Kinsey Moore [Fri, 2 Aug 2013 14:08:34 +0000 (14:08 +0000)]
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

9 years agoGet rid of ast_bridged_channel() and the bridged_channel field on ast_channels.
Mark Michelson [Fri, 2 Aug 2013 14:05:07 +0000 (14:05 +0000)]
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

9 years agoMake sure that pickup.h does not use an include guard name used elsewhere.
Mark Michelson [Fri, 2 Aug 2013 13:54:31 +0000 (13:54 +0000)]
Make sure that pickup.h does not use an include guard name used elsewhere.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396102 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoCorrect the last of the Newchannel xi:includes
Kinsey Moore [Fri, 2 Aug 2013 13:29:01 +0000 (13:29 +0000)]
Correct the last of the Newchannel xi:includes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396099 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoAdd CLI/AMI commands to force chan_pjsip actions
Kinsey Moore [Fri, 2 Aug 2013 12:40:03 +0000 (12:40 +0000)]
Add CLI/AMI commands to force chan_pjsip actions

For chan_pjsip, this introduces CLI/AMI remote unregistration commands,
reworks CLI syntax for sending NOTIFYs, adds AMI qualification support,
and adds documentation for PJSIPNotify.

This also fixes two refcounting bugs in the outbound registration code.

Review: https://reviewboard.asterisk.org/r/2695/
(closes issue ASTERISK-21939)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396087 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFixed chan_dahdi compilation failure
David M. Lee [Fri, 2 Aug 2013 04:48:12 +0000 (04:48 +0000)]
Fixed chan_dahdi compilation failure

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396075 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix test modules
Matthew Jordan [Fri, 2 Aug 2013 03:12:38 +0000 (03:12 +0000)]
Fix test modules

More missing include files. :-\

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396062 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoAdd pickup.h include lines for chan_dahdi and chan_mgcp
Matthew Jordan [Fri, 2 Aug 2013 02:51:33 +0000 (02:51 +0000)]
Add pickup.h include lines for chan_dahdi and chan_mgcp

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396061 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemove dead code from features.c; refactor pickup code into pickup.c
Matthew Jordan [Fri, 2 Aug 2013 02:32:44 +0000 (02:32 +0000)]
Remove dead code from features.c; refactor pickup code into pickup.c

This patch does the following:
 * It moves the pickup code out of features.c and into pickup.c
 * It removes the vast majority of dead code out of features.c. In particular,
   this includes the parking code.

(issue ASTERISK-22134)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396060 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix a crash due to performing full URI validation on a contact which only contains...
Joshua Colp [Thu, 1 Aug 2013 23:38:00 +0000 (23:38 +0000)]
Fix a crash due to performing full URI validation on a contact which only contains '*'.

(closes issue AST-1198)
Reported by: John Bigelow

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396048 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix sorcery for some rather picky regex implementations.
David M. Lee [Thu, 1 Aug 2013 21:19:27 +0000 (21:19 +0000)]
Fix sorcery for some rather picky regex implementations.

Some regex implementations won't compile an empty string. Assuming that
it's equivalent of a regex that will match anything, use ".?" instead.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396035 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoSupport externally initiated parking requests; remove some dead code
Matthew Jordan [Thu, 1 Aug 2013 20:55:17 +0000 (20:55 +0000)]
Support externally initiated parking requests; remove some dead code

This patch does the following:
 * It adds support for externally initiated parking requests. In particular,
   chan_skinny has a protocol level message that initiates a call park.
   This patch now supports that option, as well as the protocol specific
   mechanisms in chan_dahdi/sig_analog and chan_mgcp.
 * A parking bridge features virtual table has been added that provides
   access to the parking functionality that the Bridging API needs. This
   includes requests to park an entire 'call' (with little or no additional
   information, thank you chan_skinny), perform a blind transfer to a parking
   extension, determine if an extension is a parking extension, as well as the
   actual "do the parking" request from the Bridging API.
 * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new
   functions
 * The removal of some - but not all - dead parking code from features.c

This also fixed blind transferring a multi-party bridge to a parking lot (which
was implemented, but had at least one code path where using the parking features
kK might not have worked)

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

(closes issue ASTERISK-22134)
Reported by: Matt Jordan

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoAdd queue member paused hints
Matthew Jordan [Thu, 1 Aug 2013 19:11:46 +0000 (19:11 +0000)]
Add queue member paused hints

This patch adds the ability in Queue to raise a hint when a member's paused
state changes. The hint uses the form 'Queue:{queue_name}_pause_{member_name}',
where {queue_name} and {member_name} are the name of the queue and the name
of the member to subscribe to, respectively.

For example: exten => 8501,hint,Queue:sales_pause_mark.

Members will show as In Use when paused.

Note that the format of the queue pause hint was changed slightly from what
is on the issue to accomodate suggestion on the code review.

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

(closes issue ASTERISK-20842)
Reported by: Philippe Lindheimer
patches:
  qpause-10-378206.diff uploaded by Philippe Lindheimer (license 5519)
  qpause-11-378206.diff uploaded by Philippe Lindheimer (license 5519)
  qpause-trunk-378206.diff uploaded by Philippe Lindheimer (license 5519)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396010 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRegenerate configure for configure.ac changes
Kinsey Moore [Thu, 1 Aug 2013 17:23:10 +0000 (17:23 +0000)]
Regenerate configure for configure.ac changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395998 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix documentation replication issues
Kinsey Moore [Thu, 1 Aug 2013 17:07:52 +0000 (17:07 +0000)]
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

9 years agoFixed warning in astman for gcc-4.8.
David M. Lee [Thu, 1 Aug 2013 16:56:51 +0000 (16:56 +0000)]
Fixed warning in astman for gcc-4.8.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395984 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFixed compile errors introduced in r395954.
David M. Lee [Thu, 1 Aug 2013 15:31:03 +0000 (15:31 +0000)]
Fixed compile errors introduced in r395954.

Just a merge error due to a file rename. Grrr...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395971 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoSplit caching out from the stasis_caching_topic.
David M. Lee [Thu, 1 Aug 2013 13:49:34 +0000 (13:49 +0000)]
Split caching out from the stasis_caching_topic.

In working with res_stasis, I discovered a significant limitation to
the current structure of stasis_caching_topics: you cannot subscribe
to cache updates for a single channel/bridge/endpoint/etc.

To address this, this patch splits the cache away from the
stasis_caching_topic, making it a first class object. The stasis_cache
object is shared amongst individual stasis_caching_topics that are
created per channel/endpoint/etc. These are still forwarded to global
whatever_all_cached topics, so their use from most of the code does
not change.

In making these changes, I noticed that we frequently used a similar
pattern for bridges, endpoints and channels:

     single_topic  ---------------->  all_topic
           ^
           |
     single_topic_cached  ----+---->  all_topic_cached
                              |
                              +---->  cache

This pattern was extracted as the 'Stasis Caching Pattern', defined in
stasis_caching_pattern.h. This avoids a lot of duplicate code between
the different domain objects.

Since the cache is now disassociated from its upstream caching topics,
this also necessitated a change to how the 'guaranteed' flag worked
for retrieving from a cache. The code for handling the caching
guarantee was extracted into a 'stasis_topic_wait' function, which
works for any stasis_topic.

(closes issue ASTERISK-22002)
Review: https://reviewboard.asterisk.org/r/2672/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395954 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoAnswer with multiple codecs if the underlying pjproject supports it.
Joshua Colp [Thu, 1 Aug 2013 11:21:28 +0000 (11:21 +0000)]
Answer with multiple codecs if the underlying pjproject supports it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395938 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRaise Registry AMI events on registration failures
Matthew Jordan [Thu, 1 Aug 2013 00:07:59 +0000 (00:07 +0000)]
Raise Registry AMI events on registration failures

This patch makes it so that all registration attempts that fail that
also permanently modify the registration state will raise an appropriate
AMI event.

Note that this patch was forward ported to trunk and the Stasis Core
message bus by mjordan.

(closes issue ASTERISK-21368)
Reported by: Dmitriy Serov
patches:
  chan_sip.c.diff uploaded by Demon (license 6479)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395907 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoUpdate CONTROL STREAM FILE to accept an 'offsetms' parameter
Matthew Jordan [Wed, 31 Jul 2013 23:48:35 +0000 (23:48 +0000)]
Update CONTROL STREAM FILE to accept an 'offsetms' parameter

This patch allows starting playback of audio through the CONTROL STREAM FILE
AGI command to start at a particular offset. It will also return the final
position of the file in the 'endpos' attribute.

(closes issue ASTERISK-17803)
Reported by: Murray Melvin
patches:
  res_agi.c.r316293.diff uploaded by murraytm (license 6221)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395906 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFound another missed "sip" -> "pjsip" CLI command.
Mark Michelson [Wed, 31 Jul 2013 15:43:43 +0000 (15:43 +0000)]
Found another missed "sip" -> "pjsip" CLI command.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395884 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoDisable CEL tests that need rearchitecting to operate properly
Kinsey Moore [Wed, 31 Jul 2013 15:27:29 +0000 (15:27 +0000)]
Disable CEL tests that need rearchitecting to operate properly

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395881 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemove "constant" endpoint identifier.
Mark Michelson [Wed, 31 Jul 2013 14:45:58 +0000 (14:45 +0000)]
Remove "constant" endpoint identifier.

This was created as a debugging tool before proper endpoint identifiers
were created. Using it now can actually lead to harmful results.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395868 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix hold/unhold in bridge_native_rtp, use tech_pvt instead of bridge_pvt, reduce...
Joshua Colp [Wed, 31 Jul 2013 14:29:11 +0000 (14:29 +0000)]
Fix hold/unhold in bridge_native_rtp, use tech_pvt instead of bridge_pvt, reduce bridging attempts, and fix breaking native RTP bridges.

(closes issue ASTERISK-22128)

(closes issue ASTERISK-22104)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395866 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix remnants of the pjsip renaming
Kinsey Moore [Wed, 31 Jul 2013 13:31:55 +0000 (13:31 +0000)]
Fix remnants of the pjsip renaming

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395851 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoEnforce conference exit order for CEL tests
Kinsey Moore [Wed, 31 Jul 2013 03:49:44 +0000 (03:49 +0000)]
Enforce conference exit order for CEL tests

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395837 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoMissed a conversion to pjsip.conf in documentation and sorcery.
Mark Michelson [Tue, 30 Jul 2013 22:41:05 +0000 (22:41 +0000)]
Missed a conversion to pjsip.conf in documentation and sorcery.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395824 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemove ast_bridged_channel call from abstract_jb.c
Mark Michelson [Tue, 30 Jul 2013 21:43:29 +0000 (21:43 +0000)]
Remove ast_bridged_channel call from abstract_jb.c

Interestingly, this only happens in dead code.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395810 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoSetting svn:ignore for res/res_pjsip
David M. Lee [Tue, 30 Jul 2013 20:44:10 +0000 (20:44 +0000)]
Setting svn:ignore for res/res_pjsip

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395793 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoUpdate res_pjsip_endpoint_identifier_constant.c to use reorganized endpoint structure.
Mark Michelson [Tue, 30 Jul 2013 19:10:30 +0000 (19:10 +0000)]
Update res_pjsip_endpoint_identifier_constant.c to use reorganized endpoint structure.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395779 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoThe large GULP->PJSIP renaming effort.
Mark Michelson [Tue, 30 Jul 2013 18:14:50 +0000 (18:14 +0000)]
The large GULP->PJSIP renaming effort.

The general gist is to have a clear boundary between old SIP stuff
and new SIP stuff by having the word "SIP" for old stuff and "PJSIP"
for new stuff. Here's a brief rundown of the changes:

* The word "Gulp" in dialstrings, functions, and CLI commands is now
  "PJSIP"
* chan_gulp.c is now chan_pjsip.c
* Function names in chan_gulp.c that were "gulp_*" are now "chan_pjsip_*"
* All files that were "res_sip*" are now "res_pjsip*"
* The "res_sip" directory is now "res_pjsip"
* Files in the "res_pjsip" directory that began with "sip_*" are now "pjsip_*"
* The configuration file is now "pjsip.conf" instead of "res_sip.conf"
* The module info for all PJSIP-related files now uses "PJSIP" instead of "SIP"
* CLI and AMI commands created by Asterisk's PJSIP modules now have "pjsip" as
the starting word instead of "sip"

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395764 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoReorganize the ast_sip_endpoint structure into substructures.
Mark Michelson [Tue, 30 Jul 2013 15:17:56 +0000 (15:17 +0000)]
Reorganize the ast_sip_endpoint structure into substructures.

(closes issue ASTERISK-22135)
reported by Matt Jordan

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395748 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoAdd support for T.38 fax to chan_pjsip.
Joshua Colp [Tue, 30 Jul 2013 14:16:41 +0000 (14:16 +0000)]
Add support for T.38 fax to chan_pjsip.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395731 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix compilation on gcc 4.8.1
Kinsey Moore [Tue, 30 Jul 2013 13:46:16 +0000 (13:46 +0000)]
Fix compilation on gcc 4.8.1

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395728 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemoved quotes from svn:keywords props on a few files.
David M. Lee [Mon, 29 Jul 2013 17:51:25 +0000 (17:51 +0000)]
Removed quotes from svn:keywords props on a few files.

Subversion doesn't do quote processing, so it actually thinks that the
closing quote in 'Revision"' is a part of the keyword.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395686 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoClarify documentation for trust of identification.
Mark Michelson [Mon, 29 Jul 2013 16:16:33 +0000 (16:16 +0000)]
Clarify documentation for trust of identification.

(closes issue ASTERISK-22023)
Reported by Rusty Newton

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395674 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoPut the include in there
Matthew Jordan [Mon, 29 Jul 2013 15:58:52 +0000 (15:58 +0000)]
Put the include in there

Mea culpa...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395673 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoWhen performing a reload, reload the new features_config and not the old
Matthew Jordan [Mon, 29 Jul 2013 15:57:44 +0000 (15:57 +0000)]
When performing a reload, reload the new features_config and not the old

Performing a module reload of core components causes specific functions
compiled into the Asterisk binary to be reloaded. The table of said functions
was still pointing to the old features reload mechanism, and not the new one.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395672 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoClean up and improve test_cel
Kinsey Moore [Mon, 29 Jul 2013 14:51:00 +0000 (14:51 +0000)]
Clean up and improve test_cel

Improve reliability of attended transfer merge and link tests.
Stop using ast_log(LOG_ERROR, ...); in favor of ast_test_status_update
Remove fred and eve channel helpers since they are not necessary

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395653 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoSet svn:ignore in res/ari directory
David M. Lee [Mon, 29 Jul 2013 14:08:42 +0000 (14:08 +0000)]
Set svn:ignore in res/ari directory

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395636 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemove comment that no longer applies
Kinsey Moore [Mon, 29 Jul 2013 12:10:10 +0000 (12:10 +0000)]
Remove comment that no longer applies

The monitor thread is already properly torn down on unload and load
failure.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395619 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRename everything Stasis-HTTP to ARI
Kinsey Moore [Sat, 27 Jul 2013 23:11:02 +0000 (23:11 +0000)]
Rename everything Stasis-HTTP to ARI

This renames all files and API calls from several variants of
Stasis-HTTP to ARI including:
* Stasis-HTTP -> ARI
* STASIS_HTTP -> ARI
* stasis_http -> ari (ast_ari for global symbols, file names as well)
* stasis http -> ARI

Review: https://reviewboard.asterisk.org/r/2706/
(closes issue ASTERISK-22136)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395603 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoImprove reliability of bridge merge CEL test
Kinsey Moore [Sat, 27 Jul 2013 04:05:03 +0000 (04:05 +0000)]
Improve reliability of bridge merge CEL test

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395588 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemove the unsafe bridge parameter from ast_bridge_hook_callback's.
Richard Mudgett [Fri, 26 Jul 2013 21:34:23 +0000 (21:34 +0000)]
Remove the unsafe bridge parameter from ast_bridge_hook_callback's.

Most hook callbacks did not need the bridge parameter.  The pointer value
could become invalid if the channel is moved to another bridge while it is
executing.

* Fixed some issues in feature_attended_transfer() as a result.

* Reduce the bridge inhibit count in
attended_transfer_properties_shutdown() after it has restored the bridge
channel hooks.

* Removed basic bridge requirement on feature_blind_transfer().  It does
not require the basic bridge like feature_attended_transfer().

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395574 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoImproved feature limits interval hook implementaion.
Richard Mudgett [Fri, 26 Jul 2013 21:10:24 +0000 (21:10 +0000)]
Improved feature limits interval hook implementaion.

* Fixed feature limits to not use special members of struct
ast_bridge_features.

* Fixed memory leak in off nominal paths of bridge_builtin_set_limits().

* Fixed off nominal path in ast_bridge_features_limits_construct() freeing
unallocated memory if it was not called by bridge_builtin_set_limits().

* Made bridge_builtin_interval_features.so unloadable.

* Simplified parking's use of its duration interval hook.

* Made BridgeWait S option not depend upon another module being loaded.

(closes issue ASTERISK-22107)
Reported by: Matt Jordan

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395559 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix /stasis/res/app_replaced unit test.
David M. Lee [Fri, 26 Jul 2013 17:42:08 +0000 (17:42 +0000)]
Fix /stasis/res/app_replaced unit test.

A typo in recent changes caused the JSON ApplicationReplaced message to
fail to build, so the message wasn't being sent out the WebSocket.

Related, the replaced application would also unregister itself when it
disconnected, which would actually unregister the new application. This
was also fixed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395527 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoAdd name argument to BridgeWait() so multiple holding bridges may be used
Jonathan Rose [Fri, 26 Jul 2013 16:34:56 +0000 (16:34 +0000)]
Add name argument to BridgeWait() so multiple holding bridges may be used

Changes arguments for BridgeWait from BridgeWait(role, options) to
BridgeWait(bridge_name, role, options). Now multiple holding bridges may
be created and referenced by this application.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395509 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemove some unnecessary parentheses.
Richard Mudgett [Fri, 26 Jul 2013 00:03:13 +0000 (00:03 +0000)]
Remove some unnecessary parentheses.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395477 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRevision
Richard Mudgett [Thu, 25 Jul 2013 21:39:49 +0000 (21:39 +0000)]
Revision

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395466 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix crash due to trying to send a re-invite while in the incorrect state.
Joshua Colp [Thu, 25 Jul 2013 20:54:17 +0000 (20:54 +0000)]
Fix crash due to trying to send a re-invite while in the incorrect state.

This crash would occur if a re-invite was queued while the initial INVITE
transaction was still occurring and the response to the INVITE was not ACKed.
This lack of ACK would cause the INVITE session state to never reach confirmed.
Once the transaction terminated, however, the queued re-invite would occur and
cause a crash due to this lack of state change.

This fix checks the INVITE session state before performing the re-invite to
ensure it is in the required confirmed state.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395455 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoChange the default value for "allowsubscribe" to yes to match chan_sip.
Joshua Colp [Thu, 25 Jul 2013 19:18:42 +0000 (19:18 +0000)]
Change the default value for "allowsubscribe" to yes to match chan_sip.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395439 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRestore bridging files history.
Richard Mudgett [Thu, 25 Jul 2013 18:27:10 +0000 (18:27 +0000)]
Restore bridging files history.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemove some dead parking call
Matthew Jordan [Thu, 25 Jul 2013 15:29:55 +0000 (15:29 +0000)]
Remove some dead parking call

Since nothing is using these global parking functions, remove them!

The first of many.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395410 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoRemove dead bridging code from features
Matthew Jordan [Thu, 25 Jul 2013 14:34:09 +0000 (14:34 +0000)]
Remove dead bridging code from features

This removes the previously #if 0'd code. The functionality removed has either
been subsumed by the Bridging API or is no longer applicable.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395400 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoFix incorrect reference to stasis/bridging.h
Matthew Jordan [Thu, 25 Jul 2013 04:18:05 +0000 (04:18 +0000)]
Fix incorrect reference to stasis/bridging.h

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395381 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 years agoA great big renaming patch
Matthew Jordan [Thu, 25 Jul 2013 04:06:32 +0000 (04:06 +0000)]
A great big renaming patch

This patch renames the bridging* files to bridge*. This may seem pedantic
and silly, but it fits better in line with current Asterisk naming conventions:
* channel is not "channeling"
* monitor is not "monitoring"
etc.

A bridge is an object. It is a first class citizen in Asterisk. "Bridging" is
the act of using a bridge on a set of channels - and the API that fulfills that
role is more than just the action.

(closes issue ASTERISK-22130)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395378 65c4cc65-6c06-0410-ace0-fbb531ad65f3