summaryrefslogtreecommitdiff
path: root/main/manager.c
AgeCommit message (Collapse)Author
2017-03-20thread safety: Don't use getprotobyname()Sean Bright
POSIX does not require getprotobyname() to be thread safe and some implementations use static memory which causes issues when multiple threads are used. Further, our usage of it today is just to ultimately get IPPROTO_TCP for calls to setsockopt(). So instead we just use IPPROTO_TCP directly. Change-Id: I2e14e58674808f7ce99b2f5e900d0f90d0d8da48
2017-03-02core: Cleanup ast_get_hint() usage.Richard Mudgett
* manager.c:manager_state_cb() Fix potential use of uninitialized hint[] if a hint does not exist for the requested extension. Ran into this when developing a testsuite test. The AMI event ExtensionStatus came out with the hint header value containing garbage. The AMI event PresenceStatus also had the same issue. * manager.c:action_extensionstate() no need to completely initialize the hint[]. Only initialize the first element. * pbx.c:ast_add_hint() Remove unnecessary assignment. * chan_sip.c: Eliminate an unneeded hint[] local variable. We only care about the return value of ast_get_hint() there. Change-Id: Ia9a8786f01f93f1f917200f0a50bead0319af97b
2017-02-10manager: Restore Originate failure behavior from Asterisk 11Sean Bright
In Asterisk 11, if the 'Originate' AMI command failed to connect the provided Channel while in extension mode, a 'failed' extension would be looked up and run. This was, I believe, unintentionally removed in 51b6c49. This patch restores that behavior. This also adds an enum for the various 'synchronous' modes in an attempt to make them meaningful. ASTERISK-26115 #close Reported by: Nasir Iqbal Change-Id: I8afbd06725e99610e02adb529137d4800c05345d
2017-01-27debug_utilities: Add ast_logescalatorGeorge Joseph
The escalator works by creating a set of startup commands in cli.conf that set up logger channels and issue the debug commands for the subsystems specified. If asterisk is running when it is executed, the same commands will be issued to the running instance. The original cli.conf is saved before any changes are made and can be restored by executing '$prog --reset'. The log output will be stored in... $astlogdir/message.$uniqueid $astlogdir/debug.$uniqueid $astlogdir/dtmf.$uniqueid $astlogdir/fax.$uniqueid $astlogdir/security.$uniqueid $astlogdir/pjsip_history.$uniqueid $astlogdir/sip_history.$uniqueid Some minor tweaks were made to chan_sip, and res_pjsip_history so their history output could be send to a log channel as packets are captured. A minor tweak was also made to manager so events are output to verbose when "manager set debug on" is issued. Change-Id: I799f8e5013b86dc5282961b27383d134bf09e543
2016-08-13manager: Add <see-also> tags to relate interrelated events/actions togetherMatt Jordan
Change-Id: Idbac539205aa732bf786c4f765577d8e9ff28ba4
2016-08-13manager: Add <see-also> tags to relate AoC events and actionsMatt Jordan
Change-Id: Iea89a36222712148c1775c05ed0ad1049d67a70e
2016-08-13manager: Add <see-also> tags to relate UserEvent actions/apps/eventsMatt Jordan
Change-Id: I80f8a981f62f50e74609c69c49edcaca6c95efa4
2016-06-07stasis: Add setting subscription congestion levels.Richard Mudgett
Stasis subscriptions and message routers create taskprocessors to process the event messages. API calls are needed to be able to set the congestion levels of these taskprocessors for selected subscriptions and message routers. * Updated CDR, CEL, and manager's stasis subscription congestion levels based upon stress testing. Increased the congestion levels to reduce the potential for bursty call setup/teardown activity from triggering the taskprocessor overload alert. CDRs in particular need an extra high congestion level because they can take awhile to process the stasis messages. ASTERISK-26088 Reported by: Richard Mudgett Change-Id: Id0a716394b4eee746dd158acc63d703902450244
2016-04-22Manager: Short circuit AMI message processing.Richard Mudgett
Improve AMI message processing performance if there are no consumers listening for the messages. We now skip creating the AMI event message text strings. Change-Id: I7b22fc5ec4e500d00635c1a467aa8ea68a1bb2b3
2016-04-22manager.c: Eliminate most RAII_VAR usage.Richard Mudgett
* Made ast_manager_event_blob_create() not allocate the ao2 event object with a lock as it is not needed. Change-Id: I8e11bfedd22c21316012e0b9dd79f5918f644b7c
2016-03-24Restrict CLI/AMI commands on shutdown.Mark Michelson
During stress testing, we have frequently seen crashes occur because a CLI or AMI command attempts to access information that is in the process of being destroyed. When addressing how to fix this issue, we initially considered fixing individual crashes we observed. However, the changes required to fix those problems would introduce considerable overhead to the nominal case. This is not reasonable in order to prevent a crash from occurring while Asterisk is already shutting down. Instead, this change makes it so AMI and CLI commands cannot be executed if Asterisk is being shut down. For AMI, this is absolute. For CLI, though, certain commands can be registered so that they may be run during Asterisk shutdown. ASTERISK-25825 #close Change-Id: I8887e215ac352fadf7f4c1e082da9089b1421990
2016-02-01build_system: Fix some warnings highlighted by clangGeorge Joseph
Fix some warnings found with clang. Change-Id: I5195b6189b148c2ee3ed4a19d015a6d4ef3e77bd
2016-01-10manager: Cleanup manager_channelvars during shutdown.Corey Farrell
ASTERISK-25680 #close Change-Id: I3251d781cbc3f48a6a7e1b969ac4983f552b2446
2015-12-10AMI: Fixed OriginateResponse messagepchero
When the asterisk sending OriginateResponse message, it doesn't set the "Uniqueid". And it didn't support correct response message for Application originate. ASTERISK-25624 #close Change-Id: I26f54f677ccfb0b7cfd4967a844a1657fd69b74d
2015-11-09ast_format_cap_get_names: To display all formats, the buffer was increased.Alexander Traud
ASTERISK-25533 #close Change-Id: Ie1a9d1a6511b3f1a56b93d04475fbf8a4e40010a
2015-10-21Add missing failure checks to ast_str_set_va() callers.Richard Mudgett
Change-Id: I0c2cdcd53727bdc6634095c61294807255bd278f
2015-10-03manager: Fix GetConfigJSON returning invalid JSONIvan Poddubny
When GetConfigJSON was introduced back in 1.6, it returned each section as an array of strings: ["key=value", "key2=value2"]. Afterwards, it was changed a few times and became ["key": "value", "key2": "value2"], which is not a correct JSON. This patch fixes that by constructing a JSON object {} instead of an array []. Also, the keys "istemplate" and "tempates" that are used to indicate templates and their inherited categories are now wrapped in quotes. ASTERISK-25391 #close Reported by: Bojan Nemčić Change-Id: Ibbe93c6a227dff14d4a54b0d152341857bcf6ad8
2015-05-13main/manager.c: Bugfix sort action_manager by alphabeticallyRodrigo Ramírez Norambuena
Fix the alphabetic order added on ast_manager_register_struct. The order for struct manager_action added is not working, this change fixes the problem. Change-Id: I149da0cd06c3c4445d7516cc303358e9f26f8b4b
2015-04-13git migration: Remove support for file versionsMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Alter the "core show file version" CLI command such that it always reports the version of Asterisk. The file version is no longer available. * main/manager: The Version key now always reports the Asterisk version. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action. - Modification of the "core show file version" CLI command. Change-Id: Ia932d3c64cd18a14a3c894109baa657ec0a85d28
2015-04-06build: Fixes for gcc 5 compilationGeorge Joseph
These are fixes for compilation under gcc 5.0... chan_sip.c: In parse_request needed to make 'lim' unsigned. inline_api.h: Needed to add a check for '__GNUC_STDC_INLINE__' to detect C99 inline semantics (same as clang). ccss.c: In ast_cc_set_parm, needed to fix weird comparison. dsp.c: Needed to work around a possible compiler bug. It was throwing an array-bounds error but neither sgriepentrog, rmudgett nor I could figure out why. manager.c: In action_atxfer, needed to correct an array allocation. This patch will go to 11, 13, trunk. Review: https://reviewboard.asterisk.org/r/4581/ Reported-by: Jeffrey Ollie Tested-by: George Joseph ASTERISK-24932 #close ........ Merged revisions 434113 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-26Replace most uses of ast_register_atexit with ast_register_cleanup.Corey Farrell
Since 'core stop now' and 'core restart now' do not stop modules, it is unsafe for most of the core to run cleanups. Originally all cleanups used ast_register_atexit, and were only changed when it was shown to be unsafe. ast_register_atexit is now used only when absolutely required to prevent corruption and close child processes. Exceptions that need to use ast_register_atexit: * CDR: Flush records. * res_musiconhold: Kill external applications. * AstDB: Close the DB. * canary_exit: Kill canary process. ASTERISK-24142 #close Reported by: David Brillert ASTERISK-24683 #close Reported by: Peter Katzmann ASTERISK-24805 #close Reported by: Badalian Vyacheslav ASTERISK-24881 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4500/ Review: https://reviewboard.asterisk.org/r/4501/ ........ Merged revisions 433495 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-22Fix compilations errors on 64-bit OpenBSD systemsMatthew Jordan
In versiong 5.5, OpenBSD went to 64-bit time values. This requires a cast to (long) when printing members of certain time structs. Review: https://reviewboard.asterisk.org/r/4507 ASTERISK-24879 #close Reported by: snuffy Tested by: snuffy patches: openbsd-time64.diff uploaded by snuffy (License 5024) ........ Merged revisions 433268 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-17Various: bugfixes found via chaosScott Griepentrog
Using DEBUG_CHAOS several instances of a null pointer crash, and one uninitialized variable were uncovered and fixed. Also added details on why Asterisk failed to initialize. Review: https://reviewboard.asterisk.org/r/4468/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-30Fix some memory leaks.Mark Michelson
These memory leaks were found and fixed by John Hardin. I'm just committing them for him. ASTERISK-24736 #close Reported by Mark Michelson Review: https://reviewboard.asterisk.org/r/4389 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-27Manager: Fix Manager Action ModuleLoad to give correct response when reloadingJonathan Rose
Prior to this patch, ModuleLoad would respond with an error indicating that the requested module wasn't found in spite of finding and reloading the module. Review: https://reviewboard.asterisk.org/r/4373/ ASTERISK-24721 #close git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-12AMI: Revert non-backwards compatible changes from earlier commit.Richard Mudgett
* Reverted the change to astman_send_listack() to not use the listflag parameter and always set the value to "Start" so the start capitalization is consistent. Unfortunately changing the case of a returned value is not a backward compatible change so for now FAXSessions is going to have to remain inconsistent with all of the other AMI list actions. * Reverted the minor protocol error fix in action_getconfig() when no requested categories are found. Each line needs to be formatted as "Header: text". Caught by the testsuite. ASTERISK-24049 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-09AMI: Make AMI actions that generate event lists consistent.Richard Mudgett
* Made the following AMI actions use list API calls for consistency: Agents BridgeInfo BridgeList BridgeTechnologyList ConfbridgeLIst ConfbridgeLIstRooms CoreShowChannels DAHDIShowChannels DBGet DeviceStateList ExtensionStateList FAXSessions Hangup IAXpeerlist IAXpeers IAXregistry MeetmeList MeetmeListRooms MWIGet ParkedCalls Parkinglots PJSIPShowEndpoint PJSIPShowEndpoints PJSIPShowRegistrationsInbound PJSIPShowRegistrationsOutbound PJSIPShowResourceLists PJSIPShowSubscriptionsInbound PJSIPShowSubscriptionsOutbound PresenceStateList PRIShowSpans QueueStatus QueueSummary ShowDialPlan SIPpeers SIPpeerstatus SIPshowregistry SKINNYdevices SKINNYlines Status VoicemailUsersList * Incremented the AMI version to 2.7.0. * Changed astman_send_listack() to not use the listflag parameter and always set the value to "Start" so the start capitalization is consistent. i.e., The FAXSessions used "Start" while the rest of the system used "start". The corresponding complete event always used "Complete". * Fixed ami_show_resource_lists() "PJSIPShowResourceLists" to output the AMI ActionID for all of its list events. * Fixed off-nominal AMI protocol error in manager_bridge_info(), manager_parking_status_single_lot(), and manager_parking_status_all_lots(). Use of astman_send_error() after responding to the original AMI action request violates the action response pattern by sending two responses. * Fixed minor protocol error in action_getconfig() when no requested categories are found. Each line needs to be formatted as "Header: text". * Fixed off-nominal memory leak in manager_build_parked_call_string(). * Eliminated unnecessary use of RAII_VAR() in ami_subscription_detail(). ASTERISK-24049 #close Reported by: Jonathan Rose Review: https://reviewboard.asterisk.org/r/4315/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-07config: Add option to NOT preserve effective context when changing a templateGeorge Joseph
Let's say you have a template T with variable VAR1 = ON and you have a context C(T) that doesn't specify VAR1. If you read C, the effective value of VAR1 is ON. Now you change T VAR1 to OFF and call ast_config_text_file_save. The current behavior is that the file gets re-written with T/VAR1=OFF but C/VAR1=ON is added. Personally, I think this is a bug. It's preserving the effective state of C even though I didn't specify C/VAR1 in th first place. I believe the behavior should be that if I didn't specify C/VAR1 originally, then the effective value of C/VAR1 should continue to follow the inherited state. Now, if I DID explicitly specify C/VAR1, the it should be preserved even if the template changes. Even though I think the existing behavior is a bug, it's been that way forever so I'm not changing it. Instead, I've created ast_config_text_file_save2() that takes a bitmask of flags, one of which is to preserve the effective context (the current behavior). The original ast_config_text_file_save calls *2 with the preserve flag. If you want the new behavior, call *2 directly without a flag. I've also updated Manager UpdateConfig with a new parameter 'PreserveEffectiveContext' whose default is 'yes'. If you want the new behavior with UpdateConfig, set 'PreserveEffectiveContext: no'. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4297/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-18Prevent possible race condition on dual redirect of channels in the same bridge.Mark Michelson
The AST_FLAG_BRIDGE_DUAL_REDIRECT_WAIT flag was created to prevent bridges from prematurely acting on orphaned channels in bridges. The problem with the AMI redirect action was that it was setting this flag on channels based on the presence of a PBX, not whether the channel was in a bridge. Whether a channel has a PBX is irrelevant, so the condition has been altered to check if the channel is in a bridge. ASTERISK-24536 #close Reported by Niklas Larsson Review: https://reviewboard.asterisk.org/r/4268 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-17Fix printf problems with high ascii characters after r413586 (1.8).Walter Doekes
In r413586 (1.8) various casts were added to silence gcc 4.10 warnings. Those fixes included things like: -out += sprintf(out, "%%%02X", (unsigned char) *ptr); +out += sprintf(out, "%%%02X", (unsigned) *ptr); That works for low ascii characters, but for the high range that yields e.g. FFFFFFC3 when C3 is expected. This changeset: - fixes those casts to use the 'hh' unsigned char modifier instead - consistently uses %02x instead of %2.2x (or other non-standard usage) - adds a few 'h' modifiers in various places - fixes a 'replcaes' typo - dev/urandon typo (in 13+ patch) Review: https://reviewboard.asterisk.org/r/4263/ ASTERISK-24619 #close Reported by: Stefan27 (on IRC) ........ Merged revisions 429673 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429674 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-12loader: Move definition of ast_module_reload from _private.h to module.hGeorge Joseph
No functionality change. Just move the definition of ast_module_reload from _private.h to module.h so it can be public. Also removed the include of _private.h from manager.c since ast_module_load was the only reason for including it. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4251/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-04main/test: Fix race condition between AMI topic and Test Suite topicMatthew Jordan
This patch fixes a race condition between the raising of test AMI events (which drive many tests in the Asterisk Test Suite) and other AMI events. Prior to this patch, the Stasis messages published to the test topic were not forwarded to the AMI topic. Instead, the code in manager had a dedicated handler for test messages that was independent of the topics forwarded to the AMI topic. This results in no synchronization between the test messages and the rest of the Stasis messages published out over AMI. In some test with very tight timing constraints, this can result in out of order messages and spurious test failures. Properly forwarding the Test Suite topic to the AMI topic ensures that the messages are synchronized properly. This patch does that, and moves the message handling to the Stasis definition of the Test Suite message in test.c as well. Review: https://reviewboard.asterisk.org/r/4221/ ........ Merged revisions 428945 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-21manager: Fix could not extend string messages.Richard Mudgett
When shutting down Asterisk that has an active AMI connection, you get several "failed to extend from %d to %d" messages because use of the EVENT_FLAG_SHUTDOWN attempts to add all AMI permission strings to the event. * Created MAX_AUTH_PERM_STRING to use when creating stack based struct ast_str variables used with the authority_to_str() and user_authority_to_str() functions instead of a variety of magic numbers that could be too small. * Added a special check for EVENT_FLAG_SHUTDOWN to authority_to_str() so it will not attempt to add all permission level strings. Review: https://reviewboard.asterisk.org/r/4200/ ........ Merged revisions 428570 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428571 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-19ast_str: Fix improper member access to struct ast_str members.Richard Mudgett
Accessing members of struct ast_str outside of the string manipulation API routines is invalid since struct ast_str is supposed to be treated as opaque. Review: https://reviewboard.asterisk.org/r/4194/ ........ Merged revisions 428244 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428245 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-09manager: Fix HTTP connection reference leaks.Corey Farrell
Fix reference leak that happens if (session && !blastaway). ASTERISK-24505 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4153/ ........ Merged revisions 427641 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 427642 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@427643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-28manager: Unsubscribe from acl_change_sub at shutdown.Corey Farrell
ASTERISK-24453 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4110/ ........ Merged revisions 426524 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@426525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-28main/manager: Fix typo in AMI event documentation of "OriginateResponse"Matthew Jordan
The parameter name is "Response", not "Resonse". ASTERISK-24430 #close Reported by: Dafi Ni ........ Merged revisions 426366 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 426367 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@426368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-24Documentation: Improve documentation for ExtensionStatus AMI eventsJonathan Rose
Review: https://reviewboard.asterisk.org/r/4085/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@426120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-13manager/config: Support templates and non-unique category names via AMIGeorge Joseph
This patch provides the capability to manipulate templates and categories with non-unique names via AMI. Summary of changes: GetConfig and GetConfigJSON: Added "Filter" parameter: A comma separated list of name_regex=value_regex expressions which will cause only categories whose variables match all expressions to be considered. The special variable name TEMPLATES can be used to control whether templates are included. Passing 'include' as the value will include templates along with normal categories. Passing 'restrict' as the value will restrict the operation to ONLY templates. Not specifying a TEMPLATES expression results in the current default behavior which is to not include templates. UpdateConfig: NewCat now includes options for allowing duplicate category names, indicating if the category should be created as a template, and specifying templates the category should inherit from. The rest of the actions now accept a filter string as defined above. If there are non-unique category names, you can now update specific ones based on variable values. To facilitate the new capabilities in manager, corresponding changes had to be made to config, most notably the addition of filter criteria to many of the APIs. In some cases it was easy to change the references to use the new prototype but others would have required touching too many files for this patch so a wrapper with the original prototype was created. Macros couldn't be used in this case because it would break binary compatibility with modules such as res_digium_phone that are linked to real symbols. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4033/ ........ Merged revisions 425383 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@425384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-05Release AMI connections on shutdown.Corey Farrell
ASTERISK-24378 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4037/ ........ Merged revisions 424578 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424579 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03Manager: Add missing fields and documentation for CoreShowChannelsKinsey Moore
This corrects some issues introduced in the responses to the CoreShowChannels AMI command as well as adding documentation for the responses. The command in Asterisk 12 was missing the following fields: Duration, Application, ApplicationData, and BridgedChannel and BridgedUniqueID (replaced with BridgeId). ASTERISK-24262 #close Reported by: Mitch Claborn Review: https://reviewboard.asterisk.org/r/4040/ ........ Merged revisions 424423 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18config: bug: Fix SEGV in ast_category_insert when matching category isn't foundGeorge Joseph
If you call ast_category_insert with a match category that doesn't exist, the list traverse runs out of 'next' categories and you get a SEGV. This patch adds check for the end-of-list condition and changes the signature to return an int for success/failure indication instead of a void. The only consumer of this function is manager and it was also changed to use the return value. Tested by: George Joseph Review: https://reviewboard.asterisk.org/r/3993/ ........ Merged revisions 423276 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423277 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423278 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-04Manager: Require read permission for SYSTEM in order to send FullyBootedJonathan Rose
Review: https://reviewboard.asterisk.org/r/3969/ ........ Merged revisions 422584 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 422625 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 422626 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@422631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-30manager: Make WaitEvent action respect eventfiltersGeorge Joseph
A WaitEvent issued via an http session isn't respecting eventfilters defined for the user. I just added a match_filter to the predicate that controls astman_append. Tested by: George Joseph Review: https://reviewboard.asterisk.org/r/3958/ ........ Merged revisions 422439 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 422440 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 422441 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@422442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-19AMI Docs: Fix Status channel parameter optionalityKinsey Moore
........ Merged revisions 421442 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 421443 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 421444 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@421445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-13AMI: Improve documentation for Status actionKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@420919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06Stasis: Allow message types to be blockedKinsey Moore
This introduces stasis.conf and a mechanism to prevent certain message types from being published. Internally, this works by preventing the chosen message types from being created which ensures that those message types can never be published. This patch also adjusts message publishers such that message payloads are not created if the related message type is not available. ASTERISK-23943 #close Review: https://reviewboard.asterisk.org/r/3823/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-04Manager - Improve documentation for manager commands Getvar and Setvar.Rusty Newton
The documentation for these commands did not make it clear that they could accept expressions and functions. Modified to make this clear, but tried not to be overly explicit. ASTERISK-21178 #close Reported by: Rusty Newton Tested by: Rusty Newton Review: https://reviewboard.asterisk.org/r/3854 ........ Merged revisions 419942 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 419943 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 419944 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-30manager: Add state list commandsKinsey Moore
This patch adds three new AMI commands: * ExtensionStateList (pbx.c) - list all known extension state hints and their current statuses. Events emitted by the list action are equivalent to the ExtensionStatus events. * PresenceStateList (res_manager_presencestate) - list all known presence state values. Events emitted are generated by the stasis message type, and hence are PresenceStateChange events. * DeviceStateList (res_manager_devicestate) - list all known device state values. Events emitted are generated by the stasis message type, and hence are DeviceStateChange events. Patch-by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3799/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-29Do not omit the first header of a UserEvent AMI action from the ↵Mark Michelson
corresponding emitted UserEvent. ASTERISK-24124 #close Reported by Matt Jordan AFS-131 #close Reported by Matt Jordan Patches: userevent.patch uploaded by Matt Jordan (License #6283) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419789 65c4cc65-6c06-0410-ace0-fbb531ad65f3