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
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
........
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
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
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
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
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
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
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
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
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
* 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
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
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
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
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
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
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
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
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
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
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
When a channel is hungup, both an APP_END event and a HANGUP event can be
fired. To ensure that HANGUP events occur after APP_END events, the method
callbacks for the APP_END event should be processed prior to the callbacks
for the HANGUP event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This ensures that code that was only meant to be run on a reinvite failure
only runs on a reinvite failure.
(closes issue ASTERISK-22061)
reported by Rusty Newton
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch attempts to fix some possible race conditions in shutdown of the
CDR engine. It:
* Adds a cleanup handler to only unsubscribe and join on stasis messages during
graceful shutdown. The cleanup handler should execute before the regular atexit
handler, as we want to unsubscribe for any further messages before dispatching
the CDRs.
* The CDRs are now locked when we dispatch them on shutdown.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394469 65c4cc65-6c06-0410-ace0-fbb531ad65f3