Commit Graph

24237 Commits

Author SHA1 Message Date
Joshua Colp 2598219adb Drop the reference count on the correct object.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 18:41:29 +00:00
Richard Mudgett e26d4ec83a Reinclude sys/stat.h in chan_dahdi.c and remove redundant include in utils.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 18:41:18 +00:00
Richard Mudgett b4dd4ffbc4 Some chan_dahdi protected function renaming.
analog_lib_handles --> dahdi_analog_lib_handles
enable_dtmf_detect --> dahdi_dtmf_detect_enable
disable_dtmf_detect --> dahdi_dtmf_detect_disable
dahdi_enable_ec --> dahdi_ec_enable
dahdi_disable_ec --> dahdi_ec_disable
update_conf --> dahdi_conf_update
dahdi_link --> dahdi_master_slave_link
dahdi_unlink --> dahdi_master_slave_unlink

(closes issue ASTERISK-22129)
Reported by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 16:26:36 +00:00
Richard Mudgett 83a871ea35 Restore chan_dahdi native bridging and PRI tromboned call elimination.
Created a native_dahdi bridging technology for use with the new bridging
API.

The new bridging technology is part of the chan_dahdi channel driver
because it is very specific to that driver.  Rather than include the new
code directly into chan_dahdi.c the new bridge technology is in its own
file and linked into chan_dahdi.so.  A large part of this change is the
mechanical process of moving declarations around so chan_dahdi.c can be
split up into more files later.

* Changed the bridging core to pass NULL frames into the channel
technologies instead of discarding them.  The channel technologies may
need the proding to determine if their configuration is still valid.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 15:59:32 +00:00
Mark Michelson bf22391b8d Make DTMF attended transfer support feature-complete.
This greatly modifies the operation of DTMF attended transfers so that
the full range of options from features.conf applies.

In addition, a new option has been added that allows for a transferer
to switch between bridges during a transfer before completing the
transfer.

(closes issue ASTERISK-21543)
reported by Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 15:28:11 +00:00
David M. Lee e148c6e867 No more teapots.
Now that the ARI implementation is nearing some definition of
completeness, we should properly respond with 501's for unimplemented
functionality, instead of the almost humorous 418.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 14:57:03 +00:00
Matthew Jordan ff2f5eaa23 Kill the zombies
In previous versions of Asterisk, the zombies roamed freely,
unchecked and uncontrolled. They ravaged Asterisk systems with
their biting and their nashing and their pointy teeth.

Sometimes, you couldn't even hang them up.

Now, zombies are rare. They still *technically* exist in certain
places, but they are controlled. Kind of like a zombie zoo: you can
see them, but you can't touch them, and they can't touch you.
Bring your kids!

Because zombies are now population controlled with a very short lifespan,
there's no reason to rename the channels to '%s<ZOMBIE>'. The channels
are guaranteed to die off quickly; the rename really is just confusing
at this point.

This patch finally removes the renaming. On the plus side: this made
my life easier in CDRs during call pickup and attended transfers to
an Asterisk application. It will make other folks lives easier as well!

Review: https://reviewboard.astierks.org/r/2690/

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 14:49:53 +00:00
Kinsey Moore 98504fec8e Add DTLS-SRTP support to chan_pjsip
This patch introduces DTLS-SRTP support to chan_pjsip and the options
necessary to configure it including an option to allow choosing between
32 and 80 byte SRTP tag lengths.

During the implementation and testing of this patch, three other bugs
were found and their fixes are included with this patch. The two in
chan_sip were a segfault relating to DTLS setup and mistaken call
rejection. The third bug fix prevents chan_pjsip from attempting to
perform bridge optimization between two endpoints if either of them is
running any form of SRTP.

Review: https://reviewboard.asterisk.org/r/2683/
(closes issue ASTERISK-21419)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 13:52:06 +00:00
David M. Lee f6a227a451 Continue events when ARI WebSocket reconnects
This patch addresses a bug in the /ari/events WebSocket in handling
reconnects.

When a Stasis application's associated WebSocket was disconnected and
reconnected, it would not receive events for any channels or bridges
it was subscribed to.

The fix was to lazily clean up Stasis application registrations,
instead of removing them as soon as the WebSocket goes away.

When an application is unregistered at the WebSocket level, the
underlying application is simply deactivated. If the application
WebSocket is reconnected, the application is reactivated for the new
connection.

To avoid memory leaks from lingering, unused application, the
application list is cleaned up whenever new applications are
registered/unregistered.

(closes issue ASTERISK-21970)
Review: https://reviewboard.asterisk.org/r/2678/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 13:42:46 +00:00
David M. Lee fec667646f Fix bridge/channel AMI event ordering issues
The stasis_cache_update messages are somewhat cumbersome to handle
with the stasis_message_router. Since all updates have the same
message type, they are normally handled with the same route.

Since caching itself is a first class component of stasis-core, it
makes sense for the router to handle the cache update messages itself.
This patch adds stasis_message_router_add_cache_update() and
stasis_message_router_remove_cache_update() to handle the routing of
stasis_cache_update messages.

This patch also corrects an issue with manager_{bridging,channels}.c,
where events might be reordered. The reordering occurs because the
components use different message routers, which they needed because
they both needed to route cache update messages. They now both use
manager's router, and add cache routes for just the cache updates they
are interested in.

(closes issue ASTERISK-22038)
Review: https://reviewboard.asterisk.org/r/2677/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 13:39:50 +00:00
Kinsey Moore 5f56004b1d Add missing newline
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 12:56:19 +00:00
Joshua Colp 16885ffda5 Expose the chan_pjsip implementation pvt and session in a defined manner.
This allows modules outside of chan_pjsip itself to get the session given
only an Asterisk channel.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 12:27:03 +00:00
Matthew Jordan b4c2eecca6 Fix unbalanced lock when serializing CDR variables
I'm only surprised that this didn't cause larger problems.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 00:16:59 +00:00
Richard Mudgett 0ac2c093e2 Remove some BUGBUG notes that have been handled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-23 00:02:04 +00:00
Kinsey Moore 8aac17a3ee Make the CEL blind transfer test pass consistently
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-22 20:42:28 +00:00
Matthew Jordan 715d894d48 Update copyright year to 2013 in asterisk.c; some whitespace fixes
(closes issue ASTERISK-22179)
Reported by: Malcolm Davenport
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-22 13:52:10 +00:00
Matthew Jordan e6fb7c9764 Blocked revisions 395020
........
Add an upgrade note for libuuid dependency; remove note in CHANGES

This patch notes that libuuid is now a dependency for res_rtp_asterisk; this
was introduced in between 11.4.0 and 11.5.0 to resolve a dependency for
pjproject, which res_rtp_asterisk uses for ICE/STUN/TURN support.

It also removes a conflicting note from CHANGES. While support for playing
prompts to the first participant was added for app_queue, it was disabled
by default and an option added to enable it. That was properly noted in the
UPGRADE.txt file.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 23:13:29 +00:00
Matthew Jordan 88e344d2df Clean up documentation
This patch cleans up documentation in func_channel for the following items:
* rtpsource
* secure_signaling
* secure_media
* various OOH323 parameters

(closes issue ASTERISK-20969)
Reported by: snuffy
patches:
  func_chan-update.diff uploaded by snuffy (License 5024)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 22:09:23 +00:00
Matthew Jordan bb955e37fb Provide proper ring tone in indications.conf for Malaysia
The ring tone provided in the sample indications.conf was incorrect. This patch
modifies the sample ring tone to be what it should:
  ring = 425/400,0/200,425/400,0/2000

This brings it in line with the tone definition in DAHDI 2.7.0. (zonedata.c)

(closes issue ASTERISK-21997)
Reported by: Filip Jenicek
patches:
  malaysia_ring.patch uploaded by phill (License 6277)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 18:17:17 +00:00
Matthew Jordan 54803338b4 Always install safe_asterisk; add configuration file support
This patch modifies the behavior of safe_asterisk in two ways:
(1) It modifies the Asterisk Makefile such that safe_asterisk is always
    installed on a 'make install'. This was done as bugfixes in the
    safe_asterisk script were not applied in previous version of Asterisk
    without first removing the old version of the script.
(2) In order to keep a newly installed version of safe_asterisk from impacting
    local modifications, a new config file - safe_asterisk.conf.sample - has
    been provided. Settings that were previously modified in safe_asterisk can
    be set there instead.

(closes issue ASTERISK-21965)
Reported by: Jeremy Kister
patches:
  safe_asterisk.patch uploaded by jkister (License 6232)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 18:12:00 +00:00
Matthew Jordan bdb1c6bfb0 Tolerate presence of RFC2965 Cookie2 header by ignoring it
This patch modifies parsing of cookies in Asterisk's http server by doing an
explicit comparison of the "Cookie" header instead of looking at the first
6 characters to determine if the header is a cookie header. This avoids
parsing "Cookie2" headers and overwriting the previously parsed "Cookie"
header.

Note that we probably should be appending the cookies in each "Cookie"
header to the parsed results; however, while clients can send multiple
cookie headers they never really do. While this patch doesn't improve
Asterisk's behavior in that regard, it shouldn't make it any worse either.

Note that the solution in this patch was pointed out on the issue by the
issue reporter, Stuart Henderson.

(closes issue ASTERISK-21789)
Reported by: Stuart Henderson
Tested by: mjordan, Stuart Henderson
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 03:10:41 +00:00
Matthew Jordan 44fe8fcb91 Update PostgreSQL realtime scripts with schema for queue_log table
This patch updates the realtime SQL scripts with an entry that will create the
queue_log table. This brings the PostgreSQL scripts inline with the MySQL
scripts, with respect to what tables they will create.

(closes issue ASTERISK-21021)
Reported by: Eugene
patches:
  queue_log.sql uploaded by varnav (license 6360)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 02:39:37 +00:00
Matthew Jordan e502d0095b Add additional control frame types to the IAX2 parser for debug messages
This patch adds some of the more recent control frame types to the IAX2
parser. When IAX2 debugging is enabled, it will now show more of the control
frame types.

(closes issue ASTERISK-22120)
Reported by: Birger "WIMPy" Harzenetter
patches:
  iaxcmds.diff uploaded by wimpy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 02:30:58 +00:00
Matthew Jordan 75e83bdbab Document connectedline parameter for chan_iax2
The connectedline parameter for a chan_iax2 peer was undocumented. This patch
documents the options in the sample configuration file.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 02:26:31 +00:00
Matthew Jordan 3a5b68f07c Allow setting allowmultiplelogin on an account basis
This patch modifies manager to allow the allowmultiplelogin setting to be set
on an account by account basis. When set in the general context, it will act
as the default for the defined accounts. Setting it in the account will
override the general setting.

(closes issue ASTERISK-21324)
Reported by: vldmr
patches:
  asterisk-manager-per-user-allowmultiplelogin.patch uploaded by vldmr (License 6487)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-21 02:11:49 +00:00
Kinsey Moore c3b8939be8 Add CEL local optimization record type
This adds a new CEL event type, AST_CEL_LOCAL_OPTIMIZE, to represent
local channel optimizations. Local channel optimizations were one of
several things conveyed by the now defunct BRIDGE_UPDATE event type.
This also adds a unit test to test generation of this new CEL event.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-20 13:25:05 +00:00
Kinsey Moore 684c83b29b Add transfer support to CEL
This adds CEL support for blind and attended transfers and call pickup.
During the course of adding this functionality I noticed that
CONF_ENTER, CONF_EXIT, and BRIDGE_TO_CONF events are particularly
useless without a bridge identifier, so I added that as well.

This adds tests for blind transfers, several types of attended
transfers, and call pickup.

The extra field in CEL records now consists of a JSON blob whose fields
are defined on a per-event basis.

Review: https://reviewboard.asterisk.org/r/2658/
(closes issue ASTERISK-21565)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-20 13:10:22 +00:00
Richard Mudgett 4e15046cf6 Regroup the ao2 search_flags.
Moved the OBJ_POINTER, OBJ_KEY, and OBJ_PARTIAL_KEY flags together into a
field and renamed them to OBJ_SEARCH_OBJECT, OBJ_SEARCH_KEY, and
OBJ_SEARCH_PARTIAL_KEY respectively.  The values were selected to keep
existing code compiling and working until the codebase can be changed to
stop using these values as bit flags and use them as an enum field.

The old names are defined to the new names for backward compatibility.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-20 01:11:38 +00:00
Richard Mudgett 643fb1ed14 Minor optimizations.
* Made ast_audiohook_detach_list() and ast_audiohook_write_list_empty()
NULL tolerant.

* Made ast_audiohook_detach_list() return void since it is a destructor.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 23:30:10 +00:00
Richard Mudgett 2838683742 Extract a repeated test into ast_channel_has_audio_frame_or_monitor().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 22:47:10 +00:00
Jonathan Rose a6329a3acf ARI: MOH start and stop for a channel
(issue ASTERISK-21974)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2680/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 19:40:27 +00:00
Jonathan Rose 17c546173f ARI: Bridge Playback, Bridge Record
Adds a new channel driver for creating channels for specific purposes
in bridges, primarily to act as either recorders or announcers. Adds
ARI commands for playing announcements to ever participant in a bridge
as well as for recording a bridge. This patch also includes some
documentation/reponse fixes to related ARI models such as playback
controls.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 19:35:21 +00:00
Kinsey Moore 5a8f32703c Filter channels used as internal mechanisms
This adds new flags to the channel tech properties that flag it as
different types of implementation detail used exclusively to provide a
feature. Examples of channels that would have these flags include the
announcement and recording channels used by confbridge which are the
only two marked as such by this patch.

Review: https://reviewboard.asterisk.org/r/2633/
(closes issue ASTERISK-21873)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 19:23:39 +00:00
Kinsey Moore 0b83761f9a Fix crash when using temporary peers
Temporary peers do not have an associated Stasis endpoint and quite a
bit of code in chan_sip assumes that all peers have a Stasis endpoint.
All endpoint accesses in chan_sip are now wrapped in an endpoint
NULL-check.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 18:09:43 +00:00
Jason Parker 900714beb9 Convert CCSS manager events to stasis.
(closes issue ASTERISK-21473)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 18:00:35 +00:00
Richard Mudgett 345f033a19 Made audiohooks, framehooks, and monitor prevent local channel optimization.
Audiohooks, framehooks, and monitor represent state on a local channel
that will go away if it is optimized out.

(closes issue ASTERISK-21954)
Reported by: rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-19 17:55:49 +00:00
Richard Mudgett e5d3deb299 Fixup doxygen on ast_hangup().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 22:01:42 +00:00
Mark Michelson c47787feab Add a bunch of options from sip.conf to res_sip.conf
For a complete list of the options added, see the review linked
at the bottom of this commit message.

(closes issue ASTERISK-21506)
reported by Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 19:25:51 +00:00
David M. Lee 3c86832f9f Fixed null dereference when WebSocket subprotocol isn't specified
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 18:05:07 +00:00
Jonathan Rose 81f36bee0f bridge_holding/app_bridgewait: Add new entertainment options
This patch adds more entertainment options to holding bridges and the
bridge_wait application. Also, holding bridges will now use music on
hold as the default entertainment option instead of none. The
parameters for app_bridgewait have changed to (role, options) from
the previous (options) and the options themselves have changed as
well (entertainment options are now contained in an enumerator, role
specification is handled by the role parameter, etc)

(closes issue ASTERISK-21923)
Reported by: Matthew Jordan
Review: https://reviewboard.asterisk.org/r/2679/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 16:49:44 +00:00
Jason Parker c1a7567d24 ARI: Add support for suppressing media streams.
Also convert res_mutestream to use the core feature behind this.

(closes issue ASTERISK-21618)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 16:03:12 +00:00
Matthew Jordan 3a2a12ca1a Tweak debug statements
This patch does two things:
1. It moves the debug statement that shows the HTTP sub-protocols being
   compared after the string length calculation such that it shows the correct
   string length in the output
2. It adds some additional debug that displays when it matches on a
   sub-protocol and when it fails



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 14:50:56 +00:00
David M. Lee de68dabb97 Fix caching topic shutdown assertions
The recent changes to update stasis_cache_topics directly from the
publisher thread uncovered a race condition, which was causing asserts
in the /stasis/core tests.

If the caching topic's subscription is the last reference to the
caching topic, it will destroy the caching topic after the final
message has been processed. When dispatching to a different thread,
this usually gave the unsubscribe enough time to finish before
destruction happened. Now, however, it consistently destroys before
unsubscription is complete.

This patch adds an extra reference to the caching topic, to hold it
for the duration of the unsubscription.

This patch also removes an extra unref that was happening when the
final message was received by the caching topic. It was put there
because of an extra ref that was put into the caching topic's
constructor. Both have been removed, which makes the destructor a bit
less confusing.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 14:08:21 +00:00
Michael L. Young 6d9909887e Properly indicate failure to open an audio stream in res_agi
If there is an error streaming an audio file, the current return status makes it
difficult for an AGI script to determine that there was an error with the audio
file.

This patches changes the result to return -1 and the function returns
RESULT_FAILURE instead of RESULT_SUCCESS.  From looking at other parts of
res_agi, this would appear to be the proper way to handle an error.

(closes issue ASTERISK-21903)
Reported by: Ariel Wainer
Tested by: Ariel Wainer
Patches:
	asterisk-21903-return-stream-res_1.8.diff
					by Michael L. Young (license 5026)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-18 12:54:50 +00:00
Richard Mudgett 40ce5e0d18 Change ast_hangup() to return void and be NULL safe.
Since ast_hangup() is effectively a channel destructor, it should be a
void function.

* Make the few silly callers checking the return value no longer do so.
Only the CDR and CEL unit tests checked the return value.

* Make all callers take advantage of the NULL safe change and remove the
NULL check before the call.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 22:30:28 +00:00
Richard Mudgett da1902cdc0 Remove some completed and no longer relevant BUGBUG notes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 19:27:26 +00:00
Jonathan Rose 4f29b97020 app_confbridge: Eliminate a reference leak for confbridge announcer channels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 18:26:19 +00:00
Tzafrir Cohen 109f527eb9 Left over spacing issues of review 726.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 17:49:54 +00:00
Tzafrir Cohen b10bb8fa7b handle DAHDI_EVENT_REMOVED on a pri D-Channel
When a DAHDI device is removed at run-time it sends the event
DAHDI_EVENT_REMOVED on each channel. This is intended to signal the
userspace program to close the respective file handle, as the driver of
the device will need all of them closed to properly clean-up.

This event has long since been handled in chan_dahdi (chan_zap at the
time). However the event that is sent on a D-Channel of a "PRI" (ISDN)
span simply gets ignored.

This commit adds handling for closing the file descriptor (and shutting
down the span, while we're at it).

It also adds a CLI command 'pri destroy span <N>' to destroy the span
and its DAHDI channels.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-17 16:56:14 +00:00
Matthew Jordan 19d8f8c8e4 Add 'kick all' capability to ConfBridge CLI command
This patch adds the ability to kick all users out of a conference from the
ConfBridge kick CLI command. It is invoked by passing 'all' as the channel
parameter to the CLI command, i.e., "confbridge kick <conf> all".

Note that this patch was modified slightly to conform to trunk.

(closes issue ASTERISK-21827)
Reported by: dorianlogan
patches:
  kickall-patch_v2.diff uploaded by dorianlogan (License 6504)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-16 22:33:27 +00:00