asterisk/asterisk.git
6 years agoapp_meetme: Refactor manager events to use stasis
Jonathan Rose [Fri, 7 Jun 2013 15:54:26 +0000 (15:54 +0000)]
app_meetme: Refactor manager events to use stasis

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

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

6 years agoRework stasis cache clear events
Kinsey Moore [Fri, 7 Jun 2013 12:56:56 +0000 (12:56 +0000)]
Rework stasis cache clear events

Stasis cache clear message payloads now consist of a stasis_message
representative of the message to be cleared from the cache. This allows
multiple parallel caches to coexist and be cleared properly by the same
cache clear message even when keyed on different fields.

This change fixes a bug where multiple cache clears could be posted for
channels. The cache clear is now produced in the destructor instead of
ast_hangup.

Additionally, dummy channels are no longer capable of producing channel
snapshots.

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

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

6 years agoRefactor chan_dahdi/sig_analog/sig_pri and chan_misdn to use the common transfer...
Richard Mudgett [Fri, 7 Jun 2013 01:06:49 +0000 (01:06 +0000)]
Refactor chan_dahdi/sig_analog/sig_pri and chan_misdn to use the common transfer functions.

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

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

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

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

6 years agoTweak applicationmap and featuregroup config containers.
Richard Mudgett [Fri, 7 Jun 2013 00:33:20 +0000 (00:33 +0000)]
Tweak applicationmap and featuregroup config containers.

* Change applicationmap and featuregroup to replace duplicate config items
rather than reject them.

* Remove some unneeded warning messages when getting the applicationmap
allows duplicates from DYNAMIC_FEATURES.

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

6 years agoConditionally reject duplicate entries in applicationmap containers.
Mark Michelson [Thu, 6 Jun 2013 23:32:13 +0000 (23:32 +0000)]
Conditionally reject duplicate entries in applicationmap containers.

When reading from a config file, it's important to reject duplicates. Otherwise,
featuregroups will have ambiguity when pointing to applicationmap items. However,
when constructing the channel's current applicationmap, we don't care about duplicate
names since it's the DTMF that identifies a feature, not the name.

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

6 years agoReimplement bridging and DTMF features related channel variables in the bridging...
Richard Mudgett [Thu, 6 Jun 2013 22:46:54 +0000 (22:46 +0000)]
Reimplement bridging and DTMF features related channel variables in the bridging core.

* The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND is no longer
channel driver specific.  If the channel variable is set on the
transferrer channel, the sound will be played to the target of an attended
transfer.

* The channel variable BRIDGEPEER becomes a comma separated list of peers
in a multi-party bridge.  The BRIDGEPEER value can have a maximum of 10
peers listed.  Any more peers in the bridge will not be included in the
list.  BRIDGEPEER is not valid in holding bridges like parking since those
channels do not talk to each other even though they are in a bridge.

* The channel variable BRIDGEPVTCALLID is only valid for two party bridges
and will contain a value if the BRIDGEPEER's channel driver supports it.

* The channel variable DYNAMIC_PEERNAME is redundant with BRIDGEPEER and
is removed.  The more useful DYNAMIC_WHO_ACTIVATED gives the channel name
that activated the dynamic feature.

* The channel variables DYNAMIC_FEATURENAME and DYNAMIC_WHO_ACTIVATED are
set only on the channel executing the dynamic feature.  Executing a
dynamic feature on the bridge peer in a multi-party bridge will execute it
on all peers of the activating channel.

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

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

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

6 years agoRefactor the features configuration scheme.
Mark Michelson [Thu, 6 Jun 2013 21:40:35 +0000 (21:40 +0000)]
Refactor the features configuration scheme.

Features configuration is handled in its own API in
features_config.h and features_config.c. This way, features
configuration is accessible to anything that needs it.

In addition, features configuration has been altered to
be more channel-oriented. Most callers of features API
code will be supplying a channel so that the individual
channel's settings will be acquired rather than the global
setting.

Missing from this commit is XML documentation for the
features configuration. That will be handled in a separate
commit.

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

(issue ASTERISK-21542)

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

6 years agoFix compiler warning.
Richard Mudgett [Thu, 6 Jun 2013 20:50:25 +0000 (20:50 +0000)]
Fix compiler warning.

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

6 years ago* Fix a couple missed hook installs that need AST_BRIDGE_HOOK_REMOVE_ON_PULL.
Richard Mudgett [Thu, 6 Jun 2013 20:47:10 +0000 (20:47 +0000)]
* Fix a couple missed hook installs that need AST_BRIDGE_HOOK_REMOVE_ON_PULL.

* Rename some hook flag parameters to remove_flags.

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

6 years agoFix documentation generation
Kinsey Moore [Thu, 6 Jun 2013 20:37:48 +0000 (20:37 +0000)]
Fix documentation generation

Regression from r390701

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

6 years agoRemove props that people will yell at me for.
Jason Parker [Thu, 6 Jun 2013 20:32:15 +0000 (20:32 +0000)]
Remove props that people will yell at me for.

I'm sorry I broke automerge. :(

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

6 years agoFix documentation that was in review during the great suffix/prefix swap
Kinsey Moore [Thu, 6 Jun 2013 20:30:56 +0000 (20:30 +0000)]
Fix documentation that was in review during the great suffix/prefix swap

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

6 years agoSplit AGI manager events, to remove SubEvent field.
Jason Parker [Thu, 6 Jun 2013 19:51:12 +0000 (19:51 +0000)]
Split AGI manager events, to remove SubEvent field.

This moves them to stasis, in the process.

(closes issue ASTERISK-21470)
Review: https://reviewboard.asterisk.org/r/2587/

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

6 years agoConvert message_router routes to ao2. Add support for removal.
Jason Parker [Thu, 6 Jun 2013 19:44:45 +0000 (19:44 +0000)]
Convert message_router routes to ao2.  Add support for removal.

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

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

6 years agoParking: Enable code responsible for intercepting park exten transfers
Jonathan Rose [Thu, 6 Jun 2013 18:21:18 +0000 (18:21 +0000)]
Parking: Enable code responsible for intercepting park exten transfers

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

6 years agoAdd a BUGBUG note.
Richard Mudgett [Thu, 6 Jun 2013 01:52:05 +0000 (01:52 +0000)]
Add a BUGBUG note.

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

6 years agoMisc core external attended transfer fixes.
Richard Mudgett [Thu, 6 Jun 2013 00:16:23 +0000 (00:16 +0000)]
Misc core external attended transfer fixes.

* Fix external attended transfer bridge move/swap method.  One of the
transferrer channels was not kicked out of the bridge.

* Fix several off-nominal extended attended transfer paths.  Mainly the
channels involved needed to be hung up or kicked out of the bridge.

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

6 years agoMake local channels use ast_channel_move() instead of the inlined version.
Richard Mudgett [Wed, 5 Jun 2013 23:29:43 +0000 (23:29 +0000)]
Make local channels use ast_channel_move() instead of the inlined version.

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

6 years agoCorrected comment on stasis_cache_get
David M. Lee [Wed, 5 Jun 2013 21:14:46 +0000 (21:14 +0000)]
Corrected comment on stasis_cache_get

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

6 years agoFixed refcounting problems with chanspy AMI support.
David M. Lee [Wed, 5 Jun 2013 21:14:03 +0000 (21:14 +0000)]
Fixed refcounting problems with chanspy AMI support.

The ast_multi_channel_blob_get_channel function does not bump the refcount on
the channel snapshot that it returns. This is typical for Stasis message
payloads, since being immutable means that the object won't get unreffed out
from underneath you.

The manager code for chanspy was unreffing the snapshots it got out of the
multi-channel blob, which was one unref too many.

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

6 years agoRemove remaining traces of remove_on_pull from hooks and hook APIs.
Mark Michelson [Wed, 5 Jun 2013 19:19:48 +0000 (19:19 +0000)]
Remove remaining traces of remove_on_pull from hooks and hook APIs.

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

6 years agoGive the AST_BRIDGE_HOOK_REMOVE_ON_PULL a legitimate value.
Mark Michelson [Wed, 5 Jun 2013 18:21:19 +0000 (18:21 +0000)]
Give the AST_BRIDGE_HOOK_REMOVE_ON_PULL a legitimate value.

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

6 years agoChange the remove_on_pull flag on ast_bridge_hook to be a set of flags.
Mark Michelson [Wed, 5 Jun 2013 18:07:23 +0000 (18:07 +0000)]
Change the remove_on_pull flag on ast_bridge_hook to be a set of flags.

This change is used to make bridge hook removal more generic. This way,
depending on the circumstance, the appropriate bridge hooks may be
removed.

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

6 years agoPublish the channel state snapshot *before* calling device state so a device state...
Joshua Colp [Wed, 5 Jun 2013 14:50:46 +0000 (14:50 +0000)]
Publish the channel state snapshot *before* calling device state so a device state producer can use
an up to date snapshot.

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

6 years agoFixed a consistency problem with channel snapshot and endpoint state.
David M. Lee [Wed, 5 Jun 2013 14:47:30 +0000 (14:47 +0000)]
Fixed a consistency problem with channel snapshot and endpoint state.

When channels are added to an endpoint, the code originally posted a channel
snapshot to the endoint's topic directly. Turns out, this is a bad idea.

This causes the endpoint to see an inconsistent view of the channel, since it
will later receive in-flight messages with old channel snapshots.

This patch instead just publishes channel state immediately after setting up
the forward to the endpoint's topic. This gives the endpoints a consistent
view of the channel's state.

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

6 years agoAdd BUGBUG comment.
Richard Mudgett [Tue, 4 Jun 2013 22:55:46 +0000 (22:55 +0000)]
Add BUGBUG comment.

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

6 years agoSimple lock, assignment, unlock sandwich optimization.
Richard Mudgett [Tue, 4 Jun 2013 22:51:04 +0000 (22:51 +0000)]
Simple lock, assignment, unlock sandwich optimization.

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

6 years agoCorrected the docs on ast_manager_event_blob_create
David M. Lee [Tue, 4 Jun 2013 15:55:19 +0000 (15:55 +0000)]
Corrected the docs on ast_manager_event_blob_create

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

6 years agoCorrect autoconf script for finding UUID support.
David M. Lee [Mon, 3 Jun 2013 15:57:42 +0000 (15:57 +0000)]
Correct autoconf script for finding UUID support.

The library that provides UUID support varies greatly from system to
system. On most Linux distros, it's in libuuid. On OpenBSD, it's in
libe2fs-uuid. On OS X, it is in libsystem.

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

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

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

6 years agoRefactor code and fix a reference leak
Kinsey Moore [Fri, 31 May 2013 19:00:51 +0000 (19:00 +0000)]
Refactor code and fix a reference leak

Refactor some channel blob publishing code to use
ast_channel_publish_blob now that it is available and fix a JSON
reference leak that was occurring during varset publishing.

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

6 years agoRemove ast_channel_bridge() and associated code called only by it.
Richard Mudgett [Fri, 31 May 2013 16:15:32 +0000 (16:15 +0000)]
Remove ast_channel_bridge() and associated code called only by it.

* Added some more BUGBUG notes.

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

6 years agoFixup hold/unhold with attended and blind transfers.
Richard Mudgett [Fri, 31 May 2013 15:34:20 +0000 (15:34 +0000)]
Fixup hold/unhold with attended and blind transfers.

* DTMF attended and blind transfers have hold/unhold behavior restored.

* External attended and blind transfers unhold the transfered party when
the transfer is initiated.

* Made prohibit blind transferring a bridge marked as masquerade only.
(ConfBridge bridges)

* Made running an application or playing a file inside a bridge post the
hold/unhold messages if MOH is requested.

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

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

6 years agoReplace ast_manager_publish_message() with a more useful version.
Jason Parker [Fri, 31 May 2013 14:36:08 +0000 (14:36 +0000)]
Replace ast_manager_publish_message() with a more useful version.

It's much easier to just create a blob of the message.  Convert some AMI events
to use it.

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

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

6 years agoRemove remnant of snapshot blob JSON types
Kinsey Moore [Fri, 31 May 2013 12:41:10 +0000 (12:41 +0000)]
Remove remnant of snapshot blob JSON types

Remove usage of the once-mandatory snapshot blob type field, refactor
confbridge stasis messages accordingly, and remove
ast_bridge_blob_json_type().

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

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

6 years agoAdd snapshot cache that indexes by channel name
Kinsey Moore [Fri, 31 May 2013 12:27:29 +0000 (12:27 +0000)]
Add snapshot cache that indexes by channel name

This adds a new channel snapshot cache in parallel to the existing
cache; the difference being that it indexes the channel snapshots by
channel name instead of channel uniqueid.

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

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

6 years agoMultiple revisions 390228-390229
Alexandr Anikin [Fri, 31 May 2013 10:42:19 +0000 (10:42 +0000)]
Multiple revisions 390228-390229

........
  r390228 | may | 2013-05-31 14:19:52 +0400 (Fri, 31 May 2013) | 14 lines

  reject call attempts when gatekeeper is configured but not registered

  (closes issue ASTERISK-21800)
  Reported by: Dmitry Melekhov
  Patches:
          ASTERISK-21800-1.patch
  Tested by: Dmitry Melekhov
  ........

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

  Merged revisions 390223 from http://svn.asterisk.org/svn/asterisk/branches/10
........
  r390229 | may | 2013-05-31 14:34:20 +0400 (Fri, 31 May 2013) | 4 lines

  remove unnecessary declarations
  (issue ASTERISK-21800)
........

Merged revisions 390228-390229 from http://svn.asterisk.org/svn/asterisk/branches/11

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

6 years agoLet find do its own globbing.
Walter Doekes [Fri, 31 May 2013 07:57:28 +0000 (07:57 +0000)]
Let find do its own globbing.

Previously a stray .c file would cause xmldocs to not get built.

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

6 years agoMissed a line from a bad merge in r390122
David M. Lee [Thu, 30 May 2013 19:23:53 +0000 (19:23 +0000)]
Missed a line from a bad merge in r390122

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

6 years agoAvoid unnecessary cleanups during immediate shutdown
David M. Lee [Thu, 30 May 2013 17:05:53 +0000 (17:05 +0000)]
Avoid unnecessary cleanups during immediate shutdown

This patch addresses issues during immediate shutdowns, where modules
are not unloaded, but Asterisk atexit handlers are run.

In the typical case, this usually isn't a big deal. But the
introduction of the Stasis message bus makes it much more likely for
asynchronous activity to be happening off in some thread during
shutdown.

During an immediate shutdown, Asterisk skips unloading modules. But
while it is processing the atexit handlers, there is a window of time
where some of the core message types have been cleaned up, but the
message bus is still running. Specifically, it's still running
module subscriptions that might be using the core message types. If a
message is received by that subscription in that window, it will
attempt to use a message type that has been cleaned up.

To solve this problem, this patch introduces ast_register_cleanup().
This function operates identically to ast_register_atexit(), except
that cleanup calls are not invoked on an immediate shutdown. All of
the core message type and topic cleanup was moved from atexit handlers
to cleanup handlers.

This ensures that core type and topic cleanup only happens if the
modules that used them are first unloaded.

This patch also changes the ast_assert() when accessing a cleaned up
or uninitialized message type to an error log message. Message type
functions are actually NULL safe across the board, so the assert was a
bit heavy handed. Especially for anyone with DO_CRASH enabled.

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

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

6 years agoFix segfault when dealing with chan_agent channels.
Richard Mudgett [Wed, 29 May 2013 20:24:18 +0000 (20:24 +0000)]
Fix segfault when dealing with chan_agent channels.

Check the returned bridged pointer for NULL to avoid a crash.  It looks
like chan_agent is returning a NULL pointer when it probably should be
returning a pointer to the channel the Agent channel is pretending to be.

(closes issue ASTERISK-21793)
Reported by: Rodrigo P. Telles
Patches:
      jira_asterisk_21793_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Rodrigo P. Telles
........

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

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

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

6 years agoRemove unused RAII vars.
Jason Parker [Wed, 29 May 2013 19:54:01 +0000 (19:54 +0000)]
Remove unused RAII vars.

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

6 years agoPack the right number of items into the status and receive fax blobs
Matthew Jordan [Wed, 29 May 2013 03:22:04 +0000 (03:22 +0000)]
Pack the right number of items into the status and receive fax blobs

The code was still attempting to pack an additional item into the blobs
that didn't exist. Crashes ensued. This patch modifies the publishing of
these messages so that the correct number of items are packed in the JSON.

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

6 years agoResolve a merge conflict
Kinsey Moore [Wed, 29 May 2013 02:26:17 +0000 (02:26 +0000)]
Resolve a merge conflict

When ast_channel_cached_blob_create was merged,
ast_channel_blob_create_from_cache was partially removed in an
unresolved merge conflict. This restores ast_channel_blob_create_from_cache
and refactors usage of ast_channel_cached_blob_create (requires an
ast_channel) to use ast_channel_blob_create_from_cache (requires a
channel uniqueid) instead.

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

6 years agoFix a memory copying bug in slinfactory which was causing mixmonitor issues.
Jonathan Rose [Tue, 28 May 2013 17:47:29 +0000 (17:47 +0000)]
Fix a memory copying bug in slinfactory which was causing mixmonitor issues.

Reported by: Michael Walton
Tested by: Jonathan Rose
Patches:
    slinfactory.c.ASTERISK-21799.patch uploaded by Michael Walton (license 6502)
(closes issue ASTERISK-21799)
........

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

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

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

6 years agoAdd missing NULL check to acquire_bridge() function.
Mark Michelson [Tue, 28 May 2013 15:54:53 +0000 (15:54 +0000)]
Add missing NULL check to acquire_bridge() function.

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

6 years agoAdd attended transfer support for chan_sip.c
Mark Michelson [Tue, 28 May 2013 15:26:15 +0000 (15:26 +0000)]
Add attended transfer support for chan_sip.c

This now uses the core API for performing attended transfers.

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

(Closes issue ASTERISK-21520)
reported by Matt Jordan

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

6 years agoAdds support for a core attended transfer function plus adds some hiding of masquerades.
Mark Michelson [Tue, 28 May 2013 14:45:31 +0000 (14:45 +0000)]
Adds support for a core attended transfer function plus adds some hiding of masquerades.

The attended transfer API call can complete the attended transfer in a number of ways
depending on the current bridged states of the channels involved.

The hiding of masquerades is done in some bridging-related functions, such as the manager
Bridge action and the Bridge dialplan application. In addition, call pickup was edited
to "move" a channel rather than masquerade it.

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

(closes issue ASTERISK-21334)
Reported by Matt Jordan

(closes issue Asterisk-21336)
Reported by Matt Jordan

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

6 years agoFix some more fax test errors due to needing the peer in a bridge
Matthew Jordan [Mon, 27 May 2013 01:33:12 +0000 (01:33 +0000)]
Fix some more fax test errors due to needing the peer in a bridge

In r389799, a number of fax errors in gateway mode were fixed by using the
appropriate function to get a channel's peer while in a bridge. This patch
does two things:
(1) It uses the same function in res_fax_spandsp while starting the fax
    gateway. Without this, the fax gateway will not actually start up, as
    res_fax_spandsp also must inspect the channel's peer in a two-party
    bridge
(2) It refactors some ao2 objects in sendfax_exec to use RAII_VAR. This was
    reverted in r389799 as some off nominal paths were getting hit without
    the fix in (1) that indicated an ao2 object issue; this turned out to
    be a red herring (which is an odd phrase)

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

6 years agoInitialize the message type before the topic
Matthew Jordan [Mon, 27 May 2013 00:06:40 +0000 (00:06 +0000)]
Initialize the message type before the topic

Caching topics will during initialization attempt to reference
their message type. The message type therefore has to be
initialized prior to the topic to prevent the dreaded assertion.

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

6 years agoFix a few fax gateway failures
Matthew Jordan [Sun, 26 May 2013 16:49:28 +0000 (16:49 +0000)]
Fix a few fax gateway failures

Fax gateway requires knowledge of a channel's peer in a bridge. This patch
now uses the supported mechanisms to get this information.

This is acceptable for a few reasons:
* Fax gateway can only ever work in a 2-party bridge
* Fax gateway cannot work when not in a bridge
* Fax gateway cannot work without knowledge of the capabilities of both
  channels in the fax operation (it is, after all, a gateway)

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

6 years agoFix a variety of memory corruption/assertion errors
Matthew Jordan [Sun, 26 May 2013 04:47:17 +0000 (04:47 +0000)]
Fix a variety of memory corruption/assertion errors

* Initialize a Stasis-Core message type prior to initializing a caching topic.
  The caching topic will attempt to use the message type.
* Don't attempt to publish Stasis-Core messages from remote console connections.
  They aren't the main process; they shouldn't attempt to behave as it (they also
  don't have the infrastructure to do so)
* Don't treat a JSON object as an ao2 object (whoops)
* In asterisk.c, ref bump the JSON even package that is distributed with the
  event meta data. The callers assume that they own the reference, and the packing
  routine steals references.

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

6 years agoRestore initialization of security topics
Matthew Jordan [Sat, 25 May 2013 17:41:25 +0000 (17:41 +0000)]
Restore initialization of security topics

During a merge the security topic initialization got blown away.
This patch restores it.

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

6 years agogrr, props.
Jason Parker [Fri, 24 May 2013 21:23:19 +0000 (21:23 +0000)]
grr, props.

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

6 years agoSplit Hold event into Hold/Unhold, and move it into core.
Jason Parker [Fri, 24 May 2013 21:21:25 +0000 (21:21 +0000)]
Split Hold event into Hold/Unhold, and move it into core.

(closes issue ASTERISK-21487)
Review: https://reviewboard.asterisk.org/r/2565/

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

6 years agoRemove a junk define
Kinsey Moore [Fri, 24 May 2013 21:01:30 +0000 (21:01 +0000)]
Remove a junk define

BLOB_HANDLER_BUCKETS is a remnant of using "type" fields in
JSON/snapshot blobs and is no longer used.

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

6 years agoMigrate a large number of AMI events over to Stasis-Core
Matthew Jordan [Fri, 24 May 2013 20:44:07 +0000 (20:44 +0000)]
Migrate a large number of AMI events over to Stasis-Core

This patch moves a number of AMI events over to the Stasis-Core message bus.
This includes:
 * ChanSpyStart/Stop
 * MonitorStart/Stop
 * MusicOnHoldStart/Stop
 * FullyBooted/Reload
 * All Voicemail/MWI related events

In addition, it adds some Stasis-Core and AMI support for generic AMI messages,
refactors the message router in AMI to use a single router with topic
forwarding for the topics that AMI cares about, and refactors MWI message
types and topics to be more name compliant.

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

(closes issue ASTERISK-21462)

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

6 years agoPrint all logger messages on shutdown
Matthew Jordan [Fri, 24 May 2013 11:57:48 +0000 (11:57 +0000)]
Print all logger messages on shutdown

When Asterisk shuts down and shuts down the loggin gsubsystem, any
messages currently in flight will not get logged. This patch prevents the
loop writing messages from breaking out prematurely, such that all of the
messages are logged.

(closes issue ASTERISK-21716)
Reported by: Corey Farrell
patches:
  logger-process-all-messages.patch uploaded by Corey Farrell (license 5909)
........

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

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

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

6 years agoFix several problems caused by multiple line usage with i2004 phones.
Igor Goncharovskiy [Fri, 24 May 2013 10:23:48 +0000 (10:23 +0000)]
Fix several problems caused by multiple line usage with i2004 phones.
Reported by: Daniel Bohling, MihaiMircea

(closes issue ASTERISK-21061)
(closes issue ASTERISK-21120)
........

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

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

6 years agostasis-http: Provide a response body for 201 created responses
David M. Lee [Thu, 23 May 2013 21:46:38 +0000 (21:46 +0000)]
stasis-http: Provide a response body for 201 created responses

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

6 years agores_parking: Add a verbose message when a channel is parked
Jonathan Rose [Thu, 23 May 2013 21:11:18 +0000 (21:11 +0000)]
res_parking: Add a verbose message when a channel is parked

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

6 years agores_parking: Fix some simple bugs
Jonathan Rose [Thu, 23 May 2013 20:48:41 +0000 (20:48 +0000)]
res_parking: Fix some simple bugs

Both of them are covered in the dynamic parking review on
https://reviewboard.asterisk.org/r/2550 - Remove unref against
parking lot that the bridge did on dissolve since the reference
wasn't taken in the first place. On a swap, reapply bridge roles
in order to get music on hold and such playing on the channel that
swaps into the bridge.

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

6 years agoFix a crash due to the INVITE session being destroyed before the session.
Joshua Colp [Thu, 23 May 2013 20:25:48 +0000 (20:25 +0000)]
Fix a crash due to the INVITE session being destroyed before the session.

This change ensures that the INVITE session remains valid for the lifetime
of the session object itself by increasing the session count on the dialog that
the INVITE session is allocated from. Once this reaches zero (normally as a result
of decrementing it within the session destructor) the dialog, and INVITE session,
are destroyed.

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

6 years agoThis patch adds support for controlling a playback operation from the
David M. Lee [Thu, 23 May 2013 20:21:16 +0000 (20:21 +0000)]
This patch adds support for controlling a playback operation from the
Asterisk REST interface.

This adds the /playback/{playbackId}/control resource, which may be
POSTed to to pause, unpause, reverse, forward or restart the media
playback.

Attempts to control a playback that is not currently playing will
either return a 404 Not Found (because the playback object no longer
exists) or a 409 Conflict (because the playback object is still in the
queue to be played).

This patch also adds skipms and offsetms parameters to the
/channels/{channelId}/play resource.

(closes issue ASTERISK-21587)
Review: https://reviewboard.asterisk.org/r/2559

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

6 years agoThis patch implements the REST API's for POST /channels/{channelId}/play
David M. Lee [Thu, 23 May 2013 20:11:35 +0000 (20:11 +0000)]
This patch implements the REST API's for POST /channels/{channelId}/play
and GET /playback/{playbackId}.

This allows an external application to initiate playback of a sound on a
channel while the channel is in the Stasis application.

/play commands are issued asynchronously, and return immediately with
the URL of the associated /playback resource. Playback commands queue up,
playing in succession. The /playback resource shows the state of a
playback operation as enqueued, playing or complete. (Although the
operation will only be in the 'complete' state for a very short time,
since it is almost immediately freed up).

(closes issue ASTERISK-21283)
(closes issue ASTERISK-21586)
Review: https://reviewboard.asterisk.org/r/2531/

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

6 years agoFix inverted test preventing DTMF disconnect from working.
Richard Mudgett [Thu, 23 May 2013 18:40:50 +0000 (18:40 +0000)]
Fix inverted test preventing DTMF disconnect from working.

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

6 years agoFix a bug where the DTMF mode was not set on newly created RTP instances in the res_s...
Joshua Colp [Thu, 23 May 2013 18:39:05 +0000 (18:39 +0000)]
Fix a bug where the DTMF mode was not set on newly created RTP instances in the res_sip_sdp_rtp module.

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

6 years agoFix a bug with applying the end result of the codec negotiation to the Asterisk channel.
Joshua Colp [Thu, 23 May 2013 18:19:27 +0000 (18:19 +0000)]
Fix a bug with applying the end result of the codec negotiation to the Asterisk channel.

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

6 years agoFix a bug where the codec order as configured was not being obeyed.
Joshua Colp [Thu, 23 May 2013 15:51:05 +0000 (15:51 +0000)]
Fix a bug where the codec order as configured was not being obeyed.

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

6 years agoFixed startup race condition which caused occasional stasis_mwi_state_type assertions.
David M. Lee [Wed, 22 May 2013 19:15:16 +0000 (19:15 +0000)]
Fixed startup race condition which caused occasional stasis_mwi_state_type assertions.

The caching topic (which refers to the message type) was created before the
message type. If the initial subscription message gets processed before
the type can be initialized, the assertion about using an uninitialized type
fires.

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

6 years agoRemove bad props, before anybody notices.
Jason Parker [Wed, 22 May 2013 18:20:53 +0000 (18:20 +0000)]
Remove bad props, before anybody notices.

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

6 years agoAdd dial events to app_queue and app_followme.
Jason Parker [Wed, 22 May 2013 18:11:57 +0000 (18:11 +0000)]
Add dial events to app_queue and app_followme.

Also fixes an issue in app_dial, where the channels were swapped on dial events.

(closes issue ASTERISK-21551)
(closes issue ASTERISK-21550)

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

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

6 years agoFix destruction order assert for stasis_bridging
David M. Lee [Tue, 21 May 2013 22:49:23 +0000 (22:49 +0000)]
Fix destruction order assert for stasis_bridging

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

6 years agoConditional out more app_queue logging that needs to be reworked.
Richard Mudgett [Tue, 21 May 2013 21:08:19 +0000 (21:08 +0000)]
Conditional out more app_queue logging that needs to be reworked.

Fixes crash because app_queue was unconditionally freeing a datastore that
was still on a channel.

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

6 years agoRaise the ConfBridgeMute/Unmute events when a CLI or AMI action triggers the change
Matthew Jordan [Tue, 21 May 2013 18:45:57 +0000 (18:45 +0000)]
Raise the ConfBridgeMute/Unmute events when a CLI or AMI action triggers the change

New in 12 are the ConfBridgeMute/Unmute events, which are triggered when a user
changes their mute/unmute state. This was typically triggered when a user hit a
DTMF key that triggered the mute/unmute menu handler. Forgotten in this is when an
AMI action or CLI command triggers the mute/unmute. This patch now raises the
events in those situations as well.

(closes issue ASTERISK-21802)
Reported by: Birger "WIMPy" Harzenetter

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

6 years agoMerge in the bridge_construction branch to make the system use the Bridging API.
Richard Mudgett [Tue, 21 May 2013 18:00:22 +0000 (18:00 +0000)]
Merge in the bridge_construction branch to make the system use the Bridging API.

Breaks many things until they can be reworked.  A partial list:
chan_agent
chan_dahdi, chan_misdn, chan_iax2 native bridging
app_queue
COLP updates
DTMF attended transfers
Protocol attended transfers

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

6 years agoFixed some extra field assertion when the event WebSocket is connected
David M. Lee [Tue, 21 May 2013 14:17:24 +0000 (14:17 +0000)]
Fixed some extra field assertion when the event WebSocket is connected

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

6 years agoSet the AST_CDR_FLAG_ORIGINATED flag on originated channel's CDRs
Matthew Jordan [Mon, 20 May 2013 19:24:16 +0000 (19:24 +0000)]
Set the AST_CDR_FLAG_ORIGINATED flag on originated channel's CDRs

This may alleviate some of the CDR woes with originated channels, as CDRs
do like to know when a channel was originated. Eventually this will get
converted to be a channel flag, so its location is still good to know
post the great CDR shakeup of 2013.

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

6 years agoFixup svn:keywords in all *.c and *.h files.
Richard Mudgett [Mon, 20 May 2013 18:03:22 +0000 (18:03 +0000)]
Fixup svn:keywords in all *.c and *.h files.

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

6 years agoFixup svn:keywords in all *.c and *.h files.
Richard Mudgett [Mon, 20 May 2013 17:53:24 +0000 (17:53 +0000)]
Fixup svn:keywords in all *.c and *.h files.

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

6 years agoAdd doxygen.log to svn:ignore property.
Jason Parker [Mon, 20 May 2013 17:44:41 +0000 (17:44 +0000)]
Add doxygen.log to svn:ignore property.
........

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

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

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

6 years agoAdd missing exports file
Kinsey Moore [Mon, 20 May 2013 14:21:39 +0000 (14:21 +0000)]
Add missing exports file

This exposes stasis_app_control_answer and allows
res_stasis_http_channels to load properly.

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

6 years agoIn Sorcery pass the name of the object being allocated to the allocator.
Joshua Colp [Mon, 20 May 2013 14:02:37 +0000 (14:02 +0000)]
In Sorcery pass the name of the object being allocated to the allocator.

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

6 years agoAdd documentation for record_file_append
Kinsey Moore [Mon, 20 May 2013 13:45:50 +0000 (13:45 +0000)]
Add documentation for record_file_append

When this option was added, it was noted in CHANGES, but was missing
the XML documentation that this patch adds.

(closes issue ASTERISK-21780)
Patch-by: Brad Latus (snuffy)

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

6 years agoadd ast_publish_channel_state according new event framework
Alexandr Anikin [Sun, 19 May 2013 20:52:34 +0000 (20:52 +0000)]
add ast_publish_channel_state according new event framework

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

6 years agoAdd transfer softkey to ringout state to enable blond transfers.
Damien Wedhorn [Sun, 19 May 2013 19:45:14 +0000 (19:45 +0000)]
Add transfer softkey to ringout state to enable blond transfers.

(closes issue ASTERISK-21327)
Reported by: wedhorn
Tested by: myself
Patches:
    skinny-blindxfer01.diff uploaded by wedhorn (license 5019)

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

6 years agoAdd base XML documentation for res_sip
Kinsey Moore [Sun, 19 May 2013 17:45:42 +0000 (17:45 +0000)]
Add base XML documentation for res_sip

Thanks to Brad Latus, this patch adds a significant amount much-needed
documentation to res_sip. It should cover all existing configuration
options currently in Asterisk trunk.

Patch-by: Brad Latus (snuffy)
Review: https://reviewboard.asterisk.org/r/2471/

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

6 years agoDon't hold the outgoing lock for a prolonged period of time as it may block the origi...
Joshua Colp [Sun, 19 May 2013 02:21:44 +0000 (02:21 +0000)]
Don't hold the outgoing lock for a prolonged period of time as it may block the originator.

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

6 years agoIf the caller of the originate API calls wants the channel ensure it has been request...
Joshua Colp [Sun, 19 May 2013 00:49:15 +0000 (00:49 +0000)]
If the caller of the originate API calls wants the channel ensure it has been requested and dialed.

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

6 years agoAdd call forward no answer to skinny and cleanup general callfwd handling.
Damien Wedhorn [Sat, 18 May 2013 23:20:53 +0000 (23:20 +0000)]
Add call forward no answer to skinny and cleanup general callfwd handling.

CallforwardNoAnswer uses a sched to determine when to forward the call.
Defaults to 20secs but configurable in skinny.conf.

Adds dialType to each subchannel structure to be used to differentiate
between normal dials that result in a call being placed (default) and
other uses for the skinny_dialer (such as cfwd digit collection).
Restructured all cfwd handling to use this new arrangement.

(closes issue ASTERISK-21292)
Reported by: wedhorn
Tested by: myself
Patches:
    skinny-callfwdnoans03.diff uploaded by wedhorn (license 5019)

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

6 years agoFix a bug where synchronous origination (oddly enough triggered by doing an async...
Joshua Colp [Sat, 18 May 2013 22:49:14 +0000 (22:49 +0000)]
Fix a bug where synchronous origination (oddly enough triggered by doing an async manager Originate) would not work properly.

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

6 years agoMove origination to use the dialing API and send Stasis messages on dial begin and...
Joshua Colp [Sat, 18 May 2013 19:47:24 +0000 (19:47 +0000)]
Move origination to use the dialing API and send Stasis messages on dial begin and end.

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

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

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

6 years agoFix shutdown assertions in stasis-core
David M. Lee [Fri, 17 May 2013 21:10:32 +0000 (21:10 +0000)]
Fix shutdown assertions in stasis-core

In r388005, macros were introduced to consistently define message
types. This added an assert if a message type was used either before
it was initialized or after it had been cleaned up. It turns out that
this assertion fires during shutdown.

This actually exposed a hidden shutdown ordering problem. Since
unsubscribing is asynchronous, it's possible that the message types
used by the subscription could be freed before the final message of
the subscription was processed.

This patch adds stasis_subscription_join(), which blocks until the
last message has been processed by the subscription. Since joining was
most commonly done right after an unsubscribe, a
stasis_unsubscribe_and_join() convenience function was also added.

Similar functions were also added to the stasis_caching_topic and
stasis_message_router, since they wrap subscriptions and have similar
problems.

Other code in trunk was refactored to join() where appropriate, or at
least verify that the subscription was complete before being
destroyed.

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

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

6 years agoRemove Character Limit On "inkeys" For IAX2
Michael L. Young [Fri, 17 May 2013 20:24:56 +0000 (20:24 +0000)]
Remove Character Limit On "inkeys" For IAX2

Currently, the buffer for processing "inkeys" is limited to 256 characters.  If
the user has many keys and the names of those key files are long, the 256
character limit is not enough.

* Change inkeys buffer to be dynamic

(closes issue ASTERISK-21398)
Reported by: Pavel Kopchyk
Tested by: Pavel Kopchyk, Michael L. Young
Patches:
    asterisk-21398-iax2-inkeys-dynamic-buffer_v3.diff
by Michael L. Young (license 5026)

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

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

6 years agoPublish the outbound channel's application/data when dialing
Matthew Jordan [Fri, 17 May 2013 17:43:58 +0000 (17:43 +0000)]
Publish the outbound channel's application/data when dialing

This patch does two things:
* It fixes a bug where the outbound channel's application/data set by the
  dialing API/app_dial is not communicated until the channel is hung up.
  If that happens, AMI would incorrectly send a NewExten event immediately
  after a Hangup. This isn't really AMI's fault, as the dialing APIs never
  communicated the 'helpful' app/data on the outbound channel until it was
  hungup.
* It makes public sending a stasis message about a change in channel state.
  This is useful enough that - for now at least - it should be public. If
  operations on a channel go to being more coarse-grained, this function
  could be made private again.

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

Note that this problem was found and reported by Matt DiMeo.

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

6 years agoStasis: Update security events to use Stasis
Jonathan Rose [Fri, 17 May 2013 17:36:10 +0000 (17:36 +0000)]
Stasis: Update security events to use Stasis

Also moves ACL messages to the security topic and gets rid of the
ACL topic

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

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

6 years agoFixed inverted logic in app_add_channel().
David M. Lee [Wed, 15 May 2013 21:13:29 +0000 (21:13 +0000)]
Fixed inverted logic in app_add_channel().

Also added some missing doc comments for stasis/app.h.

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

6 years agoFix for segfault in __ast_rwlock_destroy with DEBUG_THREADS
Kevin Harwell [Wed, 15 May 2013 15:58:56 +0000 (15:58 +0000)]
Fix for segfault in __ast_rwlock_destroy with DEBUG_THREADS

If DEBUG_THREADS is enabled __ast_rwlock_destroy causes a segfault while trying
to access a possible NULL t->track object.  A NULL check has been added before
trying to access the memory.

(closes issue ASTERISK-21724)
Reported by: Corey Farrell
Fixed by: Corey Farrell
Patches:
ast_rwlock_destroy-segv.patch uploaded by Corey Farrell (license 5909)
........

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

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

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

6 years agoFix VM snapshot handling for combined INBOX.
Jason Parker [Wed, 15 May 2013 15:03:40 +0000 (15:03 +0000)]
Fix VM snapshot handling for combined INBOX.

The snapshot API contains an option that allow for combining of new
and old messages within a single snapshot. New messages, however,
include options beyond just 'INBOX' - it also includes the Urgent
folder. A previous patch that combined INBOX and Urgent accidentally
impacted snapshots that attempted to gain messages from just the Old
folder. This patch fixes the snapshot gathering such that the API
returns the appropriate messages for the folder selected, with and
without the combine option.

This should make it more clear about what's happening.

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

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

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

6 years agoUse srtp_shutdown when available
Kinsey Moore [Wed, 15 May 2013 12:42:04 +0000 (12:42 +0000)]
Use srtp_shutdown when available

This allows the SRTP library to be shut down properly when the
functionality is offered by libsrtp.

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

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

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

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

6 years agoRefactored the rest of the message types to use the STASIS_MESSAGE_TYPE_*
David M. Lee [Wed, 15 May 2013 02:37:22 +0000 (02:37 +0000)]
Refactored the rest of the message types to use the STASIS_MESSAGE_TYPE_*
macros.

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