summaryrefslogtreecommitdiff
path: root/main/manager.c
AgeCommit message (Collapse)Author
2013-07-02Add a SystemName field to all AMI events.Jason Parker
This only gets sent out if configured in asterisk.conf (closes issue ASTERISK-21494) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-02Stasis - Refactor AOC EventsKevin Harwell
Refactored the AMI events in AOC onto Stasis-Core. The ast_aoc_manager_event function now publishes a channel snapshot, along with a JSON blob describing the advice of charge. A "to_ami" handler has also been added that converts the channel snapshot and AOC event data back into the appropriate data structure for use with AMI. (closes issue ASTERISK-21472) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2643/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-01Prevent crash during synchronous AMI origination by ref bumping returned channelMatthew Jordan
The originate APIs allow callers to provide a pointer to a channel that will point to the originated channel if the function call succeeds. This is used by AMI to provide channel information when the originate is performed synchronously. Unfortunately, if the originate fails in certain ways, the outbound channel is already disposed of during the dialing itself. This results in the channel being improperly dereferenced by the internal originate function in pbx.c. This patch ref bumps the channel to prevent this from occurring. Callers must now unlock and unref the channel (which is more in line with general channel management guidelines anyway). This only affects manager, as it is the only consumer of this API function that actually passes in a channel pointer. Review: https://reviewboard.asterisk.org/r/2617/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28Add stasis publications for blind and attended transfers.Mark Michelson
This creates stasis messages that are sent during a blind or attended transfer. The stasis messages also are converted to AMI events. Review: https://reviewboard.asterisk.org/r/2619 (closes issue ASTERISK-21337) Reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24Fix a variety of memory leaksMatthew Jordan
This patch addresses the following memory/ref counting leaks: * main/devicestate.c - unsubscribe and join our devicestate message subscription * main/cel.c - clean up the datastore and config objects on exist * main/parking.c - cleanup memory leak of retriever snapshot on message payload destruction * res/parking/parking_bridge.c - cleanup memory leak of retrieve snapshot on message payload destruction * main/presencestate.c - unsubscribe and join the caching topic on exit * manager.c - properly unregister the manager action "BlindTransfer" * sorcery.c - shutdown the threadpool on exit and dispose of any wizards (issue ASTERISK-21906) Reported by: John Hardin patches: cel.patch uploaded by jhardin (license #6512) devicestate.patch uploaded by jhardin (license #6512) manager.patch uploaded by jardin (license #6512) presencestate.patch uploaded by jhardin (license #6512) retriever-channel-snapshot.patch uploaded by jhardin (license #6512) sorcery.patch uploaded by jhardin (license #6512) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22Migrate PeerStatus events to stasis, add stasis endpoints, and add ↵Joshua Colp
chan_pjsip device state. (closes issue ASTERISK-21489) (closes issue ASTERISK-21503) Review: https://reviewboard.asterisk.org/r/2601/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17Update Asterisk's CDRs for the new bridging frameworkMatthew Jordan
This patch is the initial push to update Asterisk's CDR engine for the new bridging framework. This patch guts the existing CDR engine and builds the new on top of messages coming across Stasis. As changes in channel state and bridge state are detected, CDRs are built and dispatched accordingly. This fundamentally changes CDRs in a few ways. (1) CDRs are now *very* reflective of the actual state of channels and bridges. This means CDRs track well with what an actual channel is doing - which is useful in transfer scenarios (which were previously difficult to pin down). It does, however, mean that CDRs cannot be 'fooled'. Previous behavior in Asterisk allowed for CDR applications, channels, and other properties to be spoofed in parts of the code - this no longer works. (2) CDRs have defined behavior in multi-party scenarios. This behavior will not be what everyone wants, but it is a defined behavior and as such, it is predictable. (3) The CDR manipulation functions and applications have been overhauled. Major changes have been made to ResetCDR and ForkCDR in particular. Many of the options for these two applications no longer made any sense with the new framework and the (slightly) more immutable nature of CDRs. There are a plethora of other changes. For a full description of CDR behavior, see the CDR specification on the Asterisk wiki. (closes issue ASTERISK-21196) Review: https://reviewboard.asterisk.org/r/2486/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13Blow away usage of libjansson's foreach macroMatthew Jordan
While very handy, this macro didn't occur until a later version of libjansson. We'd prefer to be compatible with older versions still - as such, iteration over key/value pairs in a JSON object have to be done with a little bit more manual work. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-11Add vtable and methods for to_json and to_ami for Stasis messagesDavid M. Lee
When a Stasis message type is defined in a loadable module, handling those messages for AMI and res_stasis events can be cumbersome. This patch adds a vtable to stasis_message_type, with to_ami and to_json virtual functions. These allow messages to be handled abstractly without putting module-specific code in core. As an example, the VarSet AMI event was refactored to use the to_ami virtual function. (closes issue ASTERISK-21817) Review: https://reviewboard.asterisk.org/r/2579/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08Only initialize manager_bridging during startupMatthew Jordan
This moves the initialization call behind the protection against reloads. We don't want to re-add message router routes during reloads. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07Make app_queue AMI events more consistent. Give Join/Leave more useful names.Jason Parker
This also removes the eventwhencalled and eventmemberstatus configuration options. These events can just be filtered via manager.conf blacklists. (closes issue ASTERISK-21469) Review: https://reviewboard.asterisk.org/r/2586/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07app_meetme: Refactor manager events to use stasisJonathan Rose
(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
2013-06-06Refactor the features configuration scheme.Mark Michelson
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
2013-05-31Remove ast_channel_bridge() and associated code called only by it.Richard Mudgett
* Added some more BUGBUG notes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31Replace ast_manager_publish_message() with a more useful version.Jason Parker
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
2013-05-24Migrate a large number of AMI events over to Stasis-CoreMatthew Jordan
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
2013-05-21Merge in the bridge_construction branch to make the system use the Bridging API.Richard Mudgett
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
2013-05-17Fix shutdown assertions in stasis-coreDavid M. Lee
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
2013-05-17Stasis: Update security events to use StasisJonathan Rose
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
2013-05-13Fix SendText AMI action to never return non-zero.Richard Mudgett
AMI actions must never return non-zero unless they intend to close the AMI connection. (Which is almost never.) (closes issue ASTERISK-21779) Reported by: Paul Goldbaum ........ Merged revisions 388477 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 388478 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-07Minor fixups to Doxygen comments.David M. Lee
The \example tags marks an entire file as an example, not a code snippet. ........ Merged revisions 387823 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30Stasis Core: Refactor ACL Change events to go out over the stasis core msg busJonathan Rose
(issue ASTERISK-21103) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2481/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-10* Fix unlocked accesses to feature_list. The feature_list is now alsoRichard Mudgett
protected by the features_lock. * Made all calls to ast_find_call_feature() have the features_lock held. * Fixed set_config_flags() to actually use find_group() to look for feature groups in DYNAMIC_FEATURES. The code originally assumed all feature groups were listed in DYNAMIC_FEATURES. * Make everyone use ast_rdlock_call_features(), ast_unlock_call_features(), and new ast_wrlock_call_features() instead of directly calling the rwlock API on features_lock. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-30Properly format an intmax_t valueMatthew Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-30Convert TestEvent AMI events over to Stasis CoreMatthew Jordan
This patch migrates the TestEvent AMI events to first be dispatched over the Stasis-Core message bus. This helps to preserve the ordering of the events with other events in the AMI system, such as the various channel related events. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-25Move NewCallerid, HangupRequest and SoftHangupRequest to StasisDavid M. Lee
HangupRequest and SoftHangupRequest are now ast_channel_blob Stasis messages, with the cause code as an optional field in the blob. NewCallerid now simply watches for changes in the callerid information in channel snapshots, and creates the AMI event appropriately. Since the original NewCallerid event honored the channelvars setting in manager.conf, the channel variables configured there had to become a part of the channel snapshot. These are now a part of every snapshot based event, making the configuration description "every time a channel-oriented event is emitted" less of a lie. There a a few other changes wrapped up in here as well. * When ast_channel_topic() is given NULL for a channel, it returns the ast_channel_topic_all() topic instead of NULL. This can clean up a lot of NULL checking we're doing currently. * The fields Cause and Cause-txt were removed from the base channel information and put only on the Hangup events, since those fields are meaningless outside of a Hangup event. * Removed the pipe-delimiter processing of the channelvars field, since that's been deprecated forever. (closes issue ASTERISK-21096) Review: https://reviewboard.asterisk.org/r/2405/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22Move more channel events to Stasis; move res_json.c to main/json.c.David M. Lee
This patch started out simply as fixing the bouncing tests introduced in r382685, but required some other changes to give it a decent implementation. To fix the bouncing tests, the UserEvent and Newexten AMI events needed to be refactored to dispatch via Stasis. Dispatching directly to AMI resulted in those events sometimes getting ahead of the associated Newchannel events, which would understandably confuse anyone. I found that instead of creating a zillion different message types and structures associated with them, it would be preferable to define a message type that has a channel snapshot and a blob of structured data with a small bit of additional information. The JSON object model provides a very nice way of representing structured data, so I went with that. * Move JSON support from res_json.c to main/json.c * Made libjansson-dev a required dependency * Added an ast_channel_blob message type, which has a channel snapshot and JSON blob of data. * Changed UserEvent and Newexten events so that they are dispatched via ast_channel_blob messages on the channel's topic. * Got rid of the ast_channel_varset message; used ast_channel_blob instead. * Extracted the manager functions converting Stasis channel events to AMI events into manager_channel.c. (issue ASTERISK-21096) Review: https://reviewboard.asterisk.org/r/2381/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15Take advantage of the fact that stasis_unsubscribe now returns NULLKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15tcptls: Prevent unsupported options from being setKinsey Moore
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-08This patch adds a new message bus API to Asterisk.David M. Lee
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-02-24Don't display the AMI ALL class authorization for users if they don't have itMatthew Jordan
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-15Fix crash in PresenceState AMI action when specifying an invalid providerMatthew Jordan
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-14Revamp of terminal color codesKinsey Moore
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-01-16Further fix misinformation in the description of manager MailboxStatus command.Mark Michelson
The description still claimed that it returned the number of messages rather than whether there were messages waiting. ........ Merged revisions 379310 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379311 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02Fix AMI redirect action with two channels failing to redirect both channels.Richard Mudgett
The AMI redirect action can fail to redirect two channels that are bridged together. There is a race between the AMI thread redirecting the two channels and the bridge thread noticing that a channel is hungup from the redirects. * Made the bridge wait for both channels to be redirected before exiting. * Made the AMI redirect check that all required headers are present before proceeding with the redirection. * Made the AMI redirect require that any supplied ExtraChannel exist before proceeding. Previously the code fell back to a single channel redirect operation. (closes issue ASTERISK-18975) Reported by: Ben Klang (closes issue ASTERISK-19948) Reported by: Brent Dalgleish Patches: jira_asterisk_19948_v11.patch (license #5621) patch uploaded by rmudgett Tested by: rmudgett, Thomas Sevestre, Deepak Lohani, Kayode Review: https://reviewboard.asterisk.org/r/2243/ ........ Merged revisions 378356 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 378358 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-06Fix memory leak in 'manager show event' when command entered incorrectlyMatthew Jordan
When the CLI command 'manager show event' was run incorrectly and its usage instructions returned, a reference to the event container was leaked. This would prevent the container from being reclaimed when Asterisk exits. We now properly decrement the count on the ao2 object using the nifty RAII_VAR macro. Thanks to Russell for helping me stumble on this, and Terry for writing that ridiculously helpful macro. ........ Merged revisions 377319 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-28manager: Make challenge work with allowmultiplelogin=noJonathan Rose
Prior to this patch, challenge would yield a multiple logins error if used without providing the username (which isn't really supposed to be an argument to challenge) if allowmultiplelogin was set to no because allowmultiplelogin finds a user with a zero length login name. This check is simply disabled for the challenge action when the username is empty by this patch. (closes issue ASTERISK-20677) Reported by: Vladimir Patches: challenge_action_nomultiplelogin.diff uploaded by Jonathan Rose (license 6182) ........ Merged revisions 376725 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376726 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376727 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-04Don't attempt to purge sessions when no sessions existMatthew Jordan
Manager's tcp/tls objects have a periodic function that purge old manager sessions periodically. During shutdown, the underlying container holding those sessions can be disposed of and set to NULL before the tcp/tls periodic function is stopped. If the periodic function fires, it will attempt to iterate over a NULL container. This patch checks for whether or not the sessions container exists before attempting to purge sessions out of it. If the sessions container is NULL, we simply return. Note that this error was also caught by the Asterisk Test Suite. ........ Merged revisions 375800 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375801 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375802 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-04Properly clean up manager resources on exitMatthew Jordan
This patch does two things: 1) It properly unregisters the manager CLI commands 2) It cleans up AMI users on exit. Prior to this patch, the AMI users were not being disposed of properly, resulting in a memory leak. (closes issue ASTERISK-20646) Reported by: Corey Farrell patches: manager_shutdown.patch uploaded by Corey Farrell (license 5909) ........ Merged revisions 375793 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 375794 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 375795 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-18Doxygen Updates - Title updateAndrew Latham
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing. Update title that was left behind many years ago. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-17manager: remove curses dependent stuff from r375103Jonathan Rose
Upon further examination, this code was causing compliation problems on CentOS at the least (possibly on any machine without curses) and also the local value of COLS is used even with a remote console, so it is less than ideal. (issue ASTERISK-20396) Reported by: Johan Wilfer git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-16manager: Change display of 'manager show commands' and 'manager show command'Jonathan Rose
manager show commands now shows the full name of the command being displayed regardless of size. The privilege column has also been removed from this display. It will also now use the full length of the terminal if curses is available. Manager show command will now always display the privilege of the manager command within the CLI. (closes ASTERISK-20396) Reported by: Johan Wilfer Review: https://reviewboard.asterisk.org/r/2143/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-11Continue to group config filesAndrew Latham
(issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-10Fix segfault regression from r370681Kinsey Moore
Due to usage of ast_hook_send_action, AMI action handling code should be able to handle a NULL mansession->session. This would cause a crash on NULL dereference if action_originate was called from ast_hook_send_action. (closes issue ASTERISK-20544) ........ Merged revisions 374792 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-05Multiple revisions 374570,374581David M. Lee
........ r374570 | dlee | 2012-10-05 15:14:41 -0500 (Fri, 05 Oct 2012) | 22 lines Improve AMI long line error handling In AMI's parser, when it receives a long line (> 1024 characters), it discards that line, but continues to process the message normally. Typically, this is not a problem because a) who has lines that long and b) usually a discarded line results in an invalid message. But if that line is specifying an optional field, then the message will be processed, you get a 'Response: Success', but things don't work the way you expected them to. This patch changes the behavior when a line-too-long parse error occurs. * Changes the log message to avoid way-too-long (and truncated anyways) log messages * Adds a 'parsing' status flag to Response: Success * Sets parsing = MESSAGE_LINE_TOO_LONG if, well, a line is too long * Responds with an appropriate error if parsing != MESSAGE_OKAY (closes issue AST-961) Reported by: John Bigelow Review: https://reviewboard.asterisk.org/r/2142/ ........ r374581 | dlee | 2012-10-05 15:20:28 -0500 (Fri, 05 Oct 2012) | 1 line I've committed too much. Reverting part of r374570. ........ Merged revisions 374570,374581 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374586 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374587 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02Fix a variety of ref counting issuesMatthew Jordan
This patch resolves a number of ref leaks that occur primarily on Asterisk shutdown. It adds a variety of shutdown routines to core portions of Asterisk such that they can reclaim resources allocate duringd initialization. Review: https://reviewboard.asterisk.org/r/2137 ........ Merged revisions 374177 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374178 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374196 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-22Doxygen Updates Janitor WorkAndrew Latham
* Whitespace, doc-blocks, spelling, case, missing and incorrect tags. * Add cleanup to Makefile for the Doxygen configuration update * Start updating Doxygen configuration for cleaner output * Enable inclusion of configuration files into documentation * remove mantisworkflow... * update documentation README * Add markup to Tilghman's email and talk with him about updating his email, he knows... * no code changes on this commit other than the mentioned Makefile change (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-21Doxygen Updates - janitor workAndrew Latham
Doxygen updates including mistakes, misspellings, missing parameters, updates for Doxygen style. Some missing txt file links are removed but their content or essense will be included in some later updates. A majority of the txt files were removed in the 1.6 era but never noted. The HR and EXTREF are simple changes that make the documentation more compatable with more versions of Doxygen. Further updates coming. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-18Don't crash when passing a NULL message to __astman_get_header.Sean Bright
Before this commit, __astman_get_header would blindly dereference the passed in 'struct message *' to traverse the header list. There are cases, however, such as '*CLI> sip qualify peer foo' where the message pointer is NULL, so we need to check for that. ........ Merged revisions 373131 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373132 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 373133 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-05Correct documentation for ModuleLoad AMI actionKinsey Moore
The documentation incorrectly listed 'rtp' as a reloadable subsystem and left out many other reloadable subsystems. It is now also documented that subsystems may only be reloaded, not loaded or unloaded. (closes issue AST-977) Reported-by: John Bigelow ........ Merged revisions 372354 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372358 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372365 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372371 65c4cc65-6c06-0410-ace0-fbb531ad65f3