Commit Graph

3866 Commits

Author SHA1 Message Date
Kinsey Moore 99aa02d17f Transition MWI to Stasis-core
Remove MWI's dependency on the event system by moving it to
Stasis-core. This also introduces forwarding topic pools in Stasis-core
which aggregate many dynamically allocated topics into a single primary
topic.

Review: https://reviewboard.asterisk.org/r/2368/
(closes issue ASTERISK-21097)
Patch-by: Kinsey Moore


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16 15:45:58 +00:00
David M. Lee 49e3489cac A simplistic router for stasis_message's.
Often times, when subscribing to a topic, one wants to handle
different message types differently. While one could cascade if/else
statements through the subscription handler, it is much cleaner to
specify a different callback for each message type. The
stasis_message_router is here to help!

A stasis_message_router is constructed for a particular stasis_topic,
which is subscribes to. Call stasis_message_router_unsubscribe() to
cancel that subscription.

Once constructed, routes can be added using
stasis_message_router_add() (or stasis_message_router_set_default()
for any messages not handled by other routes). There may be only one
route per stasis_message_type. The route's callback is invoked just as
if it were a callback for a subscription; but it only gets called for
messages of the specified type.

(issue ASTERISK-20887)
Review: https://reviewboard.asterisk.org/r/2390/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 17:35:16 +00:00
Kinsey Moore ccb5526508 Take advantage of the fact that stasis_unsubscribe now returns NULL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 13:04:52 +00:00
Kinsey Moore 8c444f823b Make stasis unsubscription functions return NULL
Unsubscribing things in Asterisk seems to very commonly follow with
NULLing out the variable that was unsubscribed. This change makes that
a bit simpler.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 12:58:23 +00:00
Kinsey Moore ad5f3a5759 tcptls: Prevent unsupported options from being set
AMI, HTTP, and chan_sip all support TLS in some way, but none of them
support all the options that Asterisk's TLS core is capable of
interpreting. This prevents consumers of the TLS/SSL layer from setting
TLS/SSL options that they do not support.

This also gets tlsverifyclient closer to a working state by requesting
the client certificate when tlsverifyclient is set. Currently, there is
no consumer of main/tcptls.c in Asterisk that supports this feature and
so it can not be properly tested.

Review: https://reviewboard.asterisk.org/r/2370/
Reported-by: John Bigelow
Patch-by: Kinsey Moore
(closes issue AST-1093)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15 12:53:03 +00:00
David M. Lee 91eba7dc13 Stasis documentation updates.
(issue ASTERISK-20887)
(issue ASTERISK-20959)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-08 16:59:02 +00:00
David M. Lee c0e2ed1fe9 Ensure dummy channels get a stasis topic.
Fixes test failure introduced in r382685.

(issue ASTERISK-20887)
(issue ASTERISK-20959)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-08 16:25:58 +00:00
Kinsey Moore c6b06e40dc Add message dump capability to stasis cache layer
The cache dump mechanism allows the developer to retreive multiple
items of a given type (or of all types) from the cache residing in a
stasis caching topic in addition to the existing single-item cache
retreival mechanism.  This also adds to the caching unit tests to
ensure that the new cache dump mechanism is functioning properly.

Review: https://reviewboard.asterisk.org/r/2367/
(issue ASTERISK-21097)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-08 16:00:14 +00:00
David M. Lee 4edd8be35c This patch adds a new message bus API to Asterisk.
For the initial use of this bus, I took some work kmoore did creating
channel snapshots. So rather than create AMI events directly in the
channel code, this patch generates Stasis events, which manager.c uses
to then publish the AMI event.

This message bus provides a generic publish/subscribe mechanism within
Asterisk. This message bus is:

 - Loosely coupled; new message types can be added in seperate modules.
 - Easy to use; publishing and subscribing are straightforward
   operations.

In addition to basic publish/subscribe, the patch also provides
mechanisms for message forwarding, and for message caching.

(issue ASTERISK-20887)
(closes issue ASTERISK-20959)
Review: https://reviewboard.asterisk.org/r/2339/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-08 15:15:13 +00:00
David M. Lee 3f0ea90ce6 Changing log level of "Not changing threadpool size" from notice to debug.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 21:55:28 +00:00
Kinsey Moore dd867daac9 Fix a memory leak in xmldoc
Another instance of attribute retrieval not being freed properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 16:48:19 +00:00
Kinsey Moore 675f43f24f Resolve more memory leaks in xmldoc
Many places that allocated to pull out an attribute are now freed
properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 16:21:52 +00:00
Matthew Jordan 80b8c2349c Add a 'secret' probation strictrtp mode to handle delayed changes in RTP source
Often, Asterisk may realize that a change in the source of an RTP stream is
about to occur and ask that the RTP engine reset it's lock on the current RTP
source. In certain scenarios, it may take awhile for the new remote system to
send RTP packets, while the old remote system may continue providing RTP during
that time period. This causes Asterisk to re-lock onto the old source, thereby
rejecting the new source when the old source stops sending RTP and the new
source begins.

This patch prevents that by having a constant secondary, 'secret' probation
mode enabled when an RTP source has been chosen. RTP packets from other sources
are always considered, but never chosen unless the current RTP source stops
sending RTP.

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

(closes issue AST-1124)
Reported by: John Bigelow
Tested by: John Bigelow

(closes issue AST-1125)
Reported by: John Bigelow
Tested by: John Bigelow
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 15:48:06 +00:00
Kinsey Moore a3a2b99519 Fix minor memory leak in xmldoc
Strings retrieved via ast_xml_get_text() must be freed with
ast_xml_free_text().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 15:36:52 +00:00
Kinsey Moore e6b5e3a62a Ensure that logmsgs are freed properly
Messages sent while the logger thread is shutting down will now have
their associated callid freed properly.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 15:09:01 +00:00
Kinsey Moore 0366f7ca77 Fix ref leak in threadpool.c
If ast_threadpool_set_size with a size equal to the current size, a
reference to a set_size_data structure would be leaked.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07 00:05:16 +00:00
Kinsey Moore d182115fcb Resolve a ref leak in threadpool.c
Ownership of the listener reference is not transferred because the
listener is reffed when placed into the taskprocessor. Ensure that the
listener is dereffed properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-06 15:21:42 +00:00
Richard Mudgett 736f4e9420 Fixup some bridge and format capabilities comments and whitespace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-04 21:15:36 +00:00
Jason Parker 22d58fbea8 Fix comparison of presence state in event subsystem.
Several new IEs were not given types (or names), causing the comparison
function to improperly succeed.  This adds those.

(closes issue AST-1128)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-04 21:14:30 +00:00
Joshua Colp a4f45a2c95 Add support for registering a sorcery handler which supports multiple fields using a regex.
Review: https://reviewboard.asterisk.org/r/2332/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-01 18:01:56 +00:00
Richard Mudgett 855bb334c8 threadpool: Make ast_threadpool_push() return -1 if shutting_down
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 21:31:14 +00:00
Richard Mudgett e2832f18bc threadpool: Whitespace and comment corrections.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28 21:29:57 +00:00
Tzafrir Cohen 4951ab9ed1 Remove unneeded linux-gnueabi*
As of r380522 the configure scripts converts the value of linux-gnueabi*
of OSARCH to "linux-gnu". So no point in testing for those values.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26 19:29:14 +00:00
Matthew Jordan 182098ba96 Don't display the AMI ALL class authorization for users if they don't have it
When converting AMI class authorizations to a string representation, the
method always appends the ALL class authorization. This is especially
important for events, as they should always communicate that class
authorization - even if the event itself does not specify ALL as a class
authorization for itself. (Events have always assumed that the ALL class
authorization is implied when they are raised)

Unfortunately, this did mean that specifying a user with restricted class
authorizations would show up in the 'manager show user' CLI command as
having the ALL class authorization.

Rather then modifying the existing string manipulation function, this patch
adds a function that will only return a string if the field being compared
explicitly matches class authorization field it is being compared against.
This prevents ALL from being returned unless it is actually specified for
the user.

(closes issue ASTERISK-20397)
Reported by: Johan Wilfer
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24 16:27:47 +00:00
Kevin Harwell 5e9994ed9c Write the correct callid to the data1 field in queue_log for transfer events.
The incorrect callid was being written to the "data1" field in queue_log table
for transfer events.  The callid of the queue was being written instead of the
transfer target's callid.  This now gets the correct "transfer to" number and
places that in the "data1" field of the queue_log table when a transfer event
is triggered.

(closes issue ASTERISK-19960)
Reported by: vladimir shmagin
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19 19:47:42 +00:00
Michael L. Young d1f8e338b0 Add The Status Of A Module To The Output Of "CLI> module show"
When a module's configuration is not loadable, we still load the module but it
is not in a running state.  When trying to troubleshoot, let's say, why
chan_motif is ignoring inbound XMPP traffic, there is no way to indicate that a
loaded module is not currently running.

(closes issue ASTERISK-21108)
Reported by: Rusty Newton
Tested by: Michael L. Young
Patches:
  asterisk-21108_add_status-v2.diff Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19 17:17:10 +00:00
Joshua Colp cce1c9547f Add support for retrieving multiple objects from sorcery using a regex on their id.
Review: https://reviewboard.asterisk.org/r/2329/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-16 16:24:21 +00:00
Matthew Jordan c209e85ad3 Fix crash in PresenceState AMI action when specifying an invalid provider
This patch fixes a crash in Asterisk that could be caused by using the
PresenceState AMI action while providing an invalid provider. This patch
also adds some additional warnings when a user attempts to provide the
PresenceState action with invalid data, and removes some NOTICE statements
that were still lurking in the code from testing.

(closes issue AST-1084)
Reported by: John Bigelow
Tested by: John Bigelow
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 23:29:28 +00:00
Matthew Jordan e123ee2d77 Disable strict XML documentation config checking; fix crash caused by sorcery
This patch does two things:
 1. It disables (temporarily) strict XML documentation checking for module
    configurations. We should re-enable it before making any release from
    trunk.
 2. Pass the module flag AST_MODULE through sorcery. This means several of the
    API calls are now macros and will do this automatically for you. The config
    framework needs the module that objects are registering to so it can
    properly construct the documentation. (This was already a required field,
    but sorcery was getting by without it)




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 18:44:24 +00:00
Kevin Harwell 71bce17720 Stopped spamming of debug messages during attended transfer.
While autoservice is running and servicing a channel the callid is being stored
and removed in the thread's local storage for each iteration of the thread loop.
If debug was set to a sufficient level the log file would be spammed with callid
thread local storage debug messages.

Added a new function that checks to see if the callid to be stored is different
than what is already contained (if anything).  If it is different then
store/replace and log, otherwise just leave as is.  Also made it so all logging
of debug messages pertaining to the callid thread storage outputs only when
TEST_FRAMEWORK is defined.

(issue ASTERISK-21014)
(closes issue ASTERISK-21014)
Report by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2324/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 17:38:22 +00:00
Matthew Jordan d04ab3c645 Add CLI configuration documentation
This patch allows a module to define its configuration in XML in source, such
that it can be parsed by the XML documentation engine. Documentation is
generated in a two-pass approach:

1. The documentation is first generated from the XML pulled from the source
2. The documentation is then enhanced by the registration of configuration
   options that use the configuration framework

This patch include configuration documentation for the following modules:
 * chan_motif
 * res_xmpp
 * app_confbridge
 * app_skel
 * udptl

Two new CLI commands have been added:
 * config show help - show configuration help by module, category, and item
 * xmldoc dump - dump the in-memory representation of the XML documentation to
   a new XML file.

Review: https://reviewboard.asterisk.org/r/2278
Review: https://reviewboard.asterisk.org/r/2058

patches:
  on review 2058 uploaded by twilson



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15 13:38:12 +00:00
Richard Mudgett d3811a2352 End stuck DTMF if AST_SOFTHANGUP_ASYNCGOTO because it isn't a real hangup.
It doesn't hurt to check AST_SOFTHANGUP_UNBRIDGE either, but it should not
be set outside of a bridge.

(issue ASTERISK-20492)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14 19:52:14 +00:00
Kinsey Moore 2e1e0735fe Revamp of terminal color codes
The core module related to coloring terminal output was old and needed
some love.  The main thing here was an attempt to get rid of the
obscene number of stack-local buffers that were allocated for no other
reason than to colorize some output.  Instead, this uses a simple trick
to allocate several buffers within threadlocal storage, then
automatically rotates between them, so that you can make multiple calls
to the colorization routine within one function and not need to
allocate multiple buffers.

Review: https://reviewboard.asterisk.org/r/2241/
Patches:
    bug.patch uploaded by Tilghman Lesher


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14 18:47:56 +00:00
David M. Lee 222e8a3afb Add a serializer interface to the threadpool
This patch adds the ability to create a serializer from a thread pool. A
serializer is a ast_taskprocessor with the same contract as a default
taskprocessor (tasks execute serially) except instead of executing out
of a dedicated thread, execution occurs in a thread from a
ast_threadpool. Think of it as a lightweight thread.

While it guarantees that each task will complete before executing the
next, there is no guarantee as to which thread from the pool individual
tasks will execute. This normally only matters if your code relys on
thread specific information, such as thread locals.

This patch also fixes a bug in how the 'was_empty' parameter is computed
for the push callback, and gets rid of the unused 'shutting_down' field.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-12 21:45:59 +00:00
Mark Michelson e9ff351f06 Do not allow native RTP bridging if packetization of media streams differs.
The RTP engine will no longer allow for local and remote native RTP bridges
if packetization of streams differs. Allowing native bridging in this scenario
has been known to cause FAX failures.

(closes ASTERISK-20650)
Reported by: Maciej Krajewski
Patches:
	ASTERISK-20659.patch uploaded by Mark Michelson (License #5049)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-12 20:57:31 +00:00
Richard Mudgett 3d91f97cf9 features: Don't cache a struct ast_app pointer.
Caching a struct ast_app pointer is not a good idea because someone could
unload the application.  After the applicaiton unload the cached ast_app
pointer is no longer valid.  Only pbx.c can cache the pointer because it
knows when the application is unloaded and removes the pointer.

* Fixed one-touch Monitor and MixMonitor to not cache the ast_app pointer
and not use the silly monitor_ok/mixmonitor_ok/stopmixmonitor_ok flags.

* Extracted bridge_check_monitor() from ast_bridge_call() and use propper
locking.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11 18:00:05 +00:00
Joshua Colp 27882b8599 Add additional functionality to the Sorcery API.
This commit adds native implementation support for copying and diffing objects,
as well as the ability to load or reload on a per-object type level.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-10 14:58:37 +00:00
Richard Mudgett 0e442112ad pbx: Fix regression caused by taking advantage of the function name sort.
Taking advantage of the sorted order of the registered functions container
requires that they are actually inserted in the expected sort order.

* Insert the registered functions into the container in case sensitive
position.  As a result, only the complete_functions() routine needs to
search the entire container because it does a case insensitive search for
convenience.

Caught by the unit tests.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-09 20:58:53 +00:00
Richard Mudgett 1e65035d17 pbx: Make function and application containers take advantage of being sorted.
* Fixed "core show function" tab completion and token count checking.

* Refactored function and application container handling code to reduce
redundancy.

* Made __ast_pbx_run() return using the defines the caller should expect.
Doesn't change the returned values.  Just made use the defines.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-09 03:51:32 +00:00
Richard Mudgett 5b236ee647 Make ast_do_masquerade() a void function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-09 01:31:55 +00:00
Jonathan Rose 1a70d513f1 Call Parking: Set PARKINGLOT and PARKINGSLOT variables on all parked calls
These two variables were previously not being set when comebacktoorigin=yes
and the example configs seemed to imply that they should be. Since there
is no harm in this and since calls that are sent back to origin are capable
of continuing in the dialplan, this seemed like a no-brainer. Also it
supports some bridging tests I've been working on.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-08 17:36:23 +00:00
Richard Mudgett 657aa491f0 Separate option_types[] from the struct definition.
Updated the option_types[] doxygen comment.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05 18:13:09 +00:00
Richard Mudgett 32ac38ea37 Improve func FRAME_TRACE DTMF digit format.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 18:15:49 +00:00
Richard Mudgett b7ecff2e4b Eliminate a use of a C++ keyword as a variable. new to new_frame
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-31 18:14:05 +00:00
Joshua Colp ffaf79b1eb Fix an issue where building with DEBUG_FD_LEAKS enabled would not work due to sorcery using calls called "open" and "close".
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29 20:19:28 +00:00
Jonathan Rose 80021f220c call_parking: Make sure fallbacks are used when lacking a flat channel exten
A regression was introduced which removed automatic fallback behavior from
the PBX. This behavior was used by call parking (or at least documented as
how the feature works) in order to select an extension when the flat channel
extension wasn't available from the comebackcontext. Parking now handles
the fallbacks internally in order to keep behavior matching with how it is
documented.

(closes issue ASTERISK-20716)
Reported by: Chris Gentle
Review: https://reviewboard.asterisk.org/r/2296/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-29 17:06:17 +00:00
Russell Bryant 5d41d31621 Change cleanup ordering in filestream destructor.
This patch came about due to a problem observed where wav files had an
empty header.  The header is supposed to be updated in wav_close().  It
turns out that this was broken when the cache_record_files option from
asterisk.conf was enabled.  The cleanup code was moving the file to its
final destination *before* running the close() method of the file
destructor, so the header didn't get updated.

Another problem here is that the move was being done before actually
closing the FILE *.

Finally, the last bug fixed here is that I noticed that wav_close()
checks for stream->filename to be non-NULL.  In the previous cleanup
order, it's checking a pointer to freed memory.  This doesn't actually
cause anything to break, but it's treading on dangerous waters.  Now the
free() of stream->filename is happening after the format module's
close() method gets called, so it's safer.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-28 01:58:41 +00:00
Russell Bryant dfdf3d9909 Add queue_log_realtime_use_gmt option to logger.conf
Add an option that lets you specify that the timestamps going into the realtime
queue log should be in GMT instead of local time.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-28 01:50:54 +00:00
Joshua Colp 44ce06682b Fix a bug where the apply function was not getting called.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-27 17:13:22 +00:00
Richard Mudgett 97dcd1d935 Misc bridge code improvements
* Made multiplexed_bridge_destroy() check if anything to destroy and
cleared bridge_pvt pointer after destruction.

* Made multiplexed_add_or_remove() handling of the chans array simpler.

* Extracted bridge_channel_poke().

* Simplified bridge_array_remove() handling of the bridge->array[].  The
array does not have a NULL sentinel pointer.

* Made ast_bridge_new() not create a temporary bridge just to see if it
can be done.  Only need to check if there is an appropriate bridge tech
available.

* Made ast_bridge_new() clean up on allocation failures.

* Made destroy_bridge() free resources in the opposite order of creation.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25 20:00:21 +00:00