summaryrefslogtreecommitdiff
path: root/res/res_monitor.c
AgeCommit message (Collapse)Author
2018-03-08Complete deprecating legacy modules.Richard Mudgett
The menuselect comment was updated to deprecate these modules but the AST_MODULE_INFO block at the end of file was missed. ASTERISK-27671 Change-Id: I63070b5c4d4f08af010c6034acd4793c1bcef839
2018-02-13Deprecate legacy modules.Corey Farrell
* app_fax (replaced by res_fax). * res_config_sqlite (replaced by res_config_sqlite3). * res_monitor (replaced by app_mixmonitor). This is related to ASTERISK~23657 but does not resolve that ticket. Resolving that ticket would require complete removal of res_monitor. ASTERISK-27671 #close Change-Id: I16a3edd61fc1abd4a7b2e9357693ed663f62dd49
2018-01-29Merge "Remove redundant module checks and references."Jenkins2
2018-01-24Remove redundant module checks and references.Corey Farrell
This removes references that are no longer needed due to automatic references created by module dependencies. In addition this removes most calls to ast_module_check as they were checking modules which are listed as dependencies. Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
2018-01-22Add missing OPTIONAL_API and ARI dependences.Corey Farrell
I've audited all modules that include any header which includes asterisk/optional_api.h. All modules which use OPTIONAL_API now declare those dependencies in AST_MODULE_INFO using requires or optional_modules as appropriate. In addition ARI dependency declarations have been reworked. Instead of declaring additional required modules in res/ari/resource_*.c we now add them to an optional array "requiresModules" in api-docs for each module. This allows the AST_MODULE_INFO dependencies to include those missing modules. Change-Id: Ia0c70571f5566784f63605e78e1ceccb4f79c606
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-11-06Merge "Prevent unload of modules which implement an Optional API."Joshua Colp
2017-11-02Add missing menuselect dependencies.Corey Farrell
This adds menuselect dependencies for modules that use symbols of other modules. ASTERISK-27390 Change-Id: Ia2d2849f5b87a72af7324a82edc3f283eafb5385
2017-11-01Prevent unload of modules which implement an Optional API.Corey Farrell
Once an Optional API module is loaded it should stay loaded. Unloading an optional API module runs the risk of a crash if something else is using it. This patch causes all optional API providers to tell the module loader not to unload except at shutdown. ASTERISK-27389 Change-Id: Ia07786fe655681aec49cc8d3d96e06483b11f5e6
2017-08-30AST-2017-006: Fix app_minivm application MinivmNotify command injectionCorey Farrell
An admin can configure app_minivm with an externnotify program to be run when a voicemail is received. The app_minivm application MinivmNotify uses ast_safe_system() for this purpose which is vulnerable to command injection since the Caller-ID name and number values given to externnotify can come from an external untrusted source. * Add ast_safe_execvp() function. This gives modules the ability to run external commands with greater safety compared to ast_safe_system(). Specifically when some parameters are filled by untrusted sources the new function does not allow malicious input to break argument encoding. This may be of particular concern where CALLERID(name) or CALLERID(num) may be used as a parameter to a script run by ast_safe_system() which could potentially allow arbitrary command execution. * Changed app_minivm.c:run_externnotify() to use the new ast_safe_execvp() instead of ast_safe_system() to avoid command injection. * Document code injection potential from untrusted data sources for other shell commands that are under user control. ASTERISK-27103 Change-Id: I7552472247a84cde24e1358aaf64af160107aef1
2017-08-01Fix compiler warnings on Fedora 26 / GCC 7.Corey Farrell
GCC 7 has added capability to produce warnings, this fixes most of those warnings. The specific warnings are disabled in a few places: * app_voicemail.c: truncation of paths more than 4096 chars in many places. * chan_mgcp.c: callid truncated to 80 chars. * cdr.c: two userfields are combined to cdr copy, fix would break ABI. * tcptls.c: ignore use of deprecated method SSLv3_client_method(). ASTERISK-27156 #close Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes all traces of it. Previously exported symbols removed: * __ast_register_file * __ast_unregister_file * ast_complete_source_filename This also removes the mtx_prof static variable that was declared when MTX_PROFILE was enabled. This variable was only used in lock.c so it is now initialized in that file only. ASTERISK-26480 #close Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2015-05-13AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.Rodrigo Ramírez Norambuena
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt 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: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2014-12-06res/res_monitor: Reset in/out sample counts on Monitor startMatthew Jordan
When repeatedly starting/stopping a Monitor on a channel, the accumulated in/out sample counts are never reset to 0. This can cause inadvertent jumps in the recordings, as the code in the channel core will determine incorrectly that a jump in the recorded file position should occur. Setting the sample counts to 0 simply reflects the initial state a Monitor should be in when it is started, as this is the initial count that would be on the channels at that time. ASTERISK-24573 #close Reported by: Nuno Borges patches: 24573.patch uploaded by Nuno Borges (License 6116) ........ Merged revisions 429031 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 429032 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 429033 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25Add module support level to ast_module_info structure. Print it in CLI ↵Mark Michelson
"module show" . ASTERISK-23919 #close Reported by Malcolm Davenport Review: https://reviewboard.asterisk.org/r/3802 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09Allow Asterisk to compile under GCC 4.10Kinsey Moore
This resolves a large number of compiler warnings from GCC 4.10 which cause the build to fail under dev mode. The vast majority are signed/unsigned mismatches in printf-style format strings. ........ Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-23Fix error loading res_monitor.Russell Bryant
For some odd reason, loading app_mixmonitor was fine, but res_monitor was not. This patch fixes a set of issues related to func_periodic_hook exporting the beep functions that gets res_monitor working again. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15(mix)monitor: Add options to enable a periodic beepRussell Bryant
Add an option to enable a periodic beep to be played into a call if it is being recorded. If enabled, it uses the PERIODIC_HOOK() function internally to play the 'beep' prompt into the call at a specified interval. This option is provided for both Monitor() and MixMonitor(). Review: https://reviewboard.asterisk.org/r/3424/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11monitor: use app options parsing helper codeRussell Bryant
This app is pretty ancient, so it was never converted to use the option parsing helper code. I'd like to add an option to this app that takes an argument, and that's a pain to do when not using this helper, so start by doing this conversion. Review: https://reviewboard.asterisk.org/r/3429/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412102 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-05-29Resolve a merge conflictKinsey Moore
When ast_channel_cached_blob_create was merged, ast_channel_blob_create_from_cache was partially removed in an unresolved merge conflict. This restores ast_channel_blob_create_from_cache and refactors usage of ast_channel_cached_blob_create (requires an ast_channel) to use ast_channel_blob_create_from_cache (requires a channel uniqueid) instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389974 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
2012-05-10Resolve FORWARD_NULL static analysis warningsKinsey Moore
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20, 22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111, and 115. Finding numbers 26, 33, and 29 were already resolved. Those skipped were either extended/deprecated or in areas of code that shouldn't be disturbed. (Closes issue ASTERISK-19650) ........ Merged revisions 366167 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366168 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-21Fix some opaquification-related compiler warningsTerry Wilson
(closes issue ASTERISK-19419) PseudoReview - seanbright on IRC git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20ast_channel opaquification of pointers and integral typesTerry Wilson
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-16Fix AMI Monitor action without File header converting channel name into ↵Richard Mudgett
filename. * Fix potential Solaris crash if Monitor application has a urlbase and no fname_base option. ........ Merged revisions 355574 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355575 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27Make failed PauseMonitor and UnpauseMonitor with no valid channel not close ↵Jonathan Rose
AMI session. I also went ahead and took a little time to make sure that the manager value AMI_SUCCESS was used instead of just return 0 being thrown around everywhere since that's how we handle this stuff these days. (closes issue ASTERISK-19249) Reporter: Jamuel Starkey Patches: res_monitor.c-ASTERISK-19249.diff uploaded by Jamuel Starkey (license 5766) ........ Merged revisions 352959 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352965 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24Opaquify channel stringfieldsTerry Wilson
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Replace direct access to channel name with accessor functionsTerry Wilson
There are many benefits to making the ast_channel an opaque handle, from increasing maintainability to presenting ways to kill masquerades. This patch kicks things off by taking things a field at a time, renaming the field to '__do_not_use_${fieldname}' and then writing setters/getters and converting the existing code to using them. When all fields are done, we can move ast_channel to a C file from channel.h and lop off the '__do_not_use_'. This patch sets up main/channel_interal_api.c to be the only file that actually accesses the ast_channel's fields directly. The intent would be for any API functions in channel.c to use the accessor functions. No more monkeying around with channel internals. We should use our own APIs. The interesting changes in this patch are the addition of channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to use accessor functions when ast_channel is really opaque), and some re-working of the way channel iterators/callbacks are handled so as to avoid creating fake ast_channels on the stack to pass in matching data by directly accessing fields (since "name" is a stringfield and the fake channel doesn't init the stringfields, you can't use the ast_channel_name_set() function). I went with ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a setter. The majority of the grunt-work for this change was done by writing a semantic patch using Coccinelle ( http://coccinelle.lip6.fr/ ). Review: https://reviewboard.asterisk.org/r/1655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16Fix crash during CDR update.Richard Mudgett
The ast_cdr_setcid() and ast_cdr_update() were shown in ASTERISK-18836 to be called by different threads for the same channel. The channel driver thread and the PBX thread running dialplan. * Add lock protection around CDR API calls that access an ast_channel pointer. (closes issue ASTERISK-18836) Reported by: gpluser Review: https://reviewboard.asterisk.org/r/1628/ ........ Merged revisions 348362 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348363 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328207 via svnmerge from Jonathan Rose
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328207 | jrose | 2011-07-14 14:45:18 -0500 (Thu, 14 Jul 2011) | 13 lines Merged revisions 328205 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328205 | jrose | 2011-07-14 14:21:02 -0500 (Thu, 14 Jul 2011) | 6 lines Monitor application arguments requirements fixed. Monitor was requiring options in spite of no individual option on Monitor being required. Review: https://reviewboard.asterisk.org/r/1320/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20Add load priority order, such that preload becomes unnecessary in most casesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-25Merged revisions 258775 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r258775 | tilghman | 2010-04-25 13:09:05 -0500 (Sun, 25 Apr 2010) | 6 lines When StopMonitor is called, ensure that it will not be restarted by a channel event. (closes issue #16590) Reported by: kkm Patches: resmonitor-16590-trunk.239289.diff uploaded by kkm (license 888) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-24Merged revisions 254235 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r254235 | jpeeler | 2010-03-23 19:37:23 -0500 (Tue, 23 Mar 2010) | 72 lines Ensure that monitor recordings are written to the correct location (again) This is an extension to 248860. As such the dialplan test has been extended: ; non absolute path, not combined exten => 5040, 1, monitor(wav,tmp/jeff/monitor_test) exten => 5040, n, dial(sip/5001) ; absolute path, not combined exten => 5041, 1, monitor(wav,/tmp/jeff/monitor_test2) exten => 5041, n, dial(sip/5001) ; no path, not combined exten => 5042, 1, monitor(wav,monitor_test3) exten => 5042, n, dial(sip/5001) ; combined: changemonitor from non absolute to no path (leaves tmp/jeff) exten => 5043, 1, monitor(wav,tmp/jeff/monitor_test4,m) exten => 5043, n, changemonitor(monitor_test5) exten => 5043, n, dial(sip/5001) ; combined: changemonitor from no path to non absolute path exten => 5044, 1, monitor(wav,monitor_test6,m) exten => 5044, n, changemonitor(tmp/jeff/monitor_test7) ; this wasn't possible before exten => 5044, n, dial(sip/5001) ; non absolute path, combined exten => 5045, 1, monitor(wav,tmp/jeff/monitor_test8,m) exten => 5045, n, dial(sip/5001) ; absolute path, combined exten => 5046, 1, monitor(wav,/tmp/jeff/monitor_test9,m) exten => 5046, n, dial(sip/5001) ; no path, combined exten => 5047, 1, monitor(wav,monitor_test10,m) exten => 5047, n, dial(sip/5001) ; combined: changemonitor from non absolute to absolute (leaves tmp/jeff) exten => 5048, 1, monitor(wav,tmp/jeff/monitor_test11,m) exten => 5048, n, changemonitor(/tmp/jeff/monitor_test12) exten => 5048, n, dial(sip/5001) ; combined: changemonitor from absolute to non absolute (leaves /tmp/jeff) exten => 5049, 1, monitor(wav,/tmp/jeff/monitor_test13,m) exten => 5049, n, changemonitor(tmp/jeff/monitor_test14) exten => 5049, n, dial(sip/5001) ; combined: changemonitor from no path to absolute exten => 5050, 1, monitor(wav,monitor_test15,m) exten => 5050, n, changemonitor(/tmp/jeff/monitor_test16) exten => 5050, n, dial(sip/5001) ; combined: changemonitor from absolute to no path (leaves /tmp/jeff) exten => 5051, 1, monitor(wav,/tmp/jeff/monitor_test17,m) exten => 5051, n, changemonitor(monitor_test18) exten => 5051, n, dial(sip/5001) ; not combined: changemonitor from non absolute to no path (leaves tmp/jeff) exten => 5052, 1, monitor(wav,tmp/jeff/monitor_test19) exten => 5052, n, changemonitor(monitor_test20) exten => 5052, n, dial(sip/5001) ; not combined: changemonitor from no path to non absolute exten => 5053, 1, monitor(wav,monitor_test21) exten => 5053, n, changemonitor(tmp/jeff/monitor_test22) exten => 5053, n, dial(sip/5001) ; not combined: changemonitor from non absolute to absolute (leaves tmp/jeff) exten => 5054, 1, monitor(wav,tmp/jeff/monitor_test23) exten => 5054, n, changemonitor(/tmp/jeff/monitor_test24) exten => 5054, n, dial(sip/5001) ; not combined: changemonitor from absolute to non absolute (leaves /tmp/jeff) exten => 5055, 1, monitor(wav,/tmp/jeff/monitor_test24) exten => 5055, n, changemonitor(tmp/jeff/monitor_test25) exten => 5055, n, dial(sip/5001) ; not combined: changemonitor from no path to absolute exten => 5056, 1, monitor(wav,monitor_test26) exten => 5056, n, changemonitor(/tmp/jeff/monitor_test27) exten => 5056, n, dial(sip/5001) ; not combined: changemonitor from absolute to no path (leaves /tmp/jeff) exten => 5057, 1, monitor(wav,/tmp/jeff/monitor_test28) exten => 5057, n, changemonitor(monitor_test29) exten => 5057, n, dial(sip/5001) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-25Merged revisions 248860 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r248860 | jpeeler | 2010-02-25 15:22:06 -0600 (Thu, 25 Feb 2010) | 18 lines Ensure that monitor recordings are written to the correct location (again) This is an extension to 248757. As such the dialplan test has been extended: exten => 5040, 1, monitor(wav,tmp/jeff/monitor_test,b) exten => 5040, n, dial(sip/5001) exten => 5041, 1, monitor(wav,/tmp/jeff/monitor_test2,b) exten => 5041, n, dial(sip/5001) exten => 5042, 1, monitor(wav,monitor_test3,b) exten => 5042, n, dial(sip/5001) exten => 5043, 1, monitor(wav,tmp/jeff/monitor_test3,m) exten => 5043, n, changemonitor(monitor_test4) exten => 5043, n, dial(sip/5001) exten => 5044, 1, monitor(wav,monitor_test4,m) exten => 5044, n, changemonitor(tmp/jeff/monitor_test5) ; this looks to fail by design and emits a warning exten => 5044, n, dial(sip/5001) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@248952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-25Merged revisions 248757 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r248757 | jpeeler | 2010-02-25 12:06:54 -0600 (Thu, 25 Feb 2010) | 15 lines Ensure that monitor recordings are written to the correct location. Recordings should be placed in the monitor directory when a non-absolute path is used. Exact dialplan used for testing: exten => 5040, 1, monitor(wav,tmp/jeff/monitor_test,b) exten => 5040, n, dial(sip/5001) exten => 5041, 1, monitor(wav,/tmp/jeff/monitor_test2,b) exten => 5041, n, dial(sip/5001) exten => 5042, 1, monitor(wav,monitor_test3,b) exten => 5042, n, dial(sip/5001) ABE-2101 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@248793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-21Merged revisions 235940 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r235940 | jpeeler | 2009-12-21 13:43:41 -0600 (Mon, 21 Dec 2009) | 13 lines Change Monitor to not assume file to write to does not contain pathing. 227944 changed the fname_base argument to always append the configured monitor path. This change was necessary to properly compare files for uniqueness. If a full path is given though, nothing needs to be appended and that is handled correctly now. (closes issue #16377) (closes issue #16376) Reported by: bcnit Patches: res_monitor.c-issue16376-1.patch uploaded by dant (license 670) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-13Display a list of channel variables in each channel-oriented event.Tilghman Lesher
(Closes AST-33) Reviewboard: https://reviewboard.asterisk.org/r/368/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04Merged revisions 227944 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r227944 | jpeeler | 2009-11-04 17:47:08 -0600 (Wed, 04 Nov 2009) | 14 lines Fix incorrect filename comparsion after monitor file change The logic to detect if a requested file is indeed a different file from the current file was incorrect. The main issue being confusion of the use of filename_base which was previously set without pathing information and then compared to another full path. Robust file comparison logic has been added to properly check if two files are the same even if symlinks are used. (closes issue #15313) Reported by: caspy Patches: 20091103__issue15313__1.4.diff.txt uploaded by jpeeler (license 325) but mostly tilghman's work ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15Redesigned 'optional API' support.Kevin P. Fleming
This patch provides a new implementation of the optional API support defined in asterisk/optional_api.h; this new version provides solves compatibility issues with the use of linker version scripts for suppressing global symbols. In addition, there is now a functional (and tested!) implementation for Mac OS/X, so module writers no longer need to use special tests before calling optional API functions. All future implementations must provide these same semantics, so that module writers can rely on them. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01Moved more static documentation to the new AstXML form.Eliel C. Sardanons
Moved more static docs to XML (pplications and manager actions): Monitor, StopMonitor, ChangeMonitor, PauseMonitor, UnpauseMonitor. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22Fix build under dev mode and remove some casts that are no longer necessary asSean Bright
a result of the const-ify the world patch. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18Recorded merge of revisions 195366 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r195366 | tilghman | 2009-05-18 15:24:13 -0500 (Mon, 18 May 2009) | 8 lines Add a similar dependency on SMDI for voicemail as already exists for ADSI. (closes issue #14846) Reported by: pj Patches: 20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14) 20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14) 20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24Convert the ast_channel data structure over to the astobj2 framework.Russell Bryant
There is a lot that could be said about this, but the patch is a big improvement for performance, stability, code maintainability, and ease of future code development. The channel list is no longer an unsorted linked list. The main container for channels is an astobj2 hash table. All of the code related to searching for channels or iterating active channels has been rewritten. Let n be the number of active channels. Iterating the channel list has gone from O(n^2) to O(n). Searching for a channel by name went from O(n) to O(1). Searching for a channel by extension is still O(n), but uses a new method for doing so, which is more efficient. The ast_channel object is now a reference counted object. The benefits here are plentiful. Some benefits directly related to issues in the previous code include: 1) When threads other than the channel thread owning a channel wanted access to a channel, it had to hold the lock on it to ensure that it didn't go away. This is no longer a requirement. Holding a reference is sufficient. 2) There are places that now require less dealing with channel locks. 3) There are places where channel locks are held for much shorter periods of time. 4) There are places where dealing with more than one channel at a time becomes _MUCH_ easier. ChanSpy is a great example of this. Writing code in the future that deals with multiple channels will be much easier. Some additional information regarding channel locking and reference count handling can be found in channel.h, where a new section has been added that discusses some of the rules associated with it. Mark Michelson also assisted with the development of this patch. He did the conversion of ChanSpy and introduced a new API, ast_autochan, which makes it much easier to deal with holding on to a channel pointer for an extended period of time and having it get automatically updated if the channel gets masqueraded. Mark was also a huge help in the code review process. Thanks to David Vossel for his assistance with this branch, as well. David did the conversion of the DAHDIScan application by making it become a wrapper for ChanSpy internally. The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch. Review: http://reviewboard.digium.com/r/203/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-23Merged revisions 183700 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183700 | mmichelson | 2009-03-23 12:59:28 -0500 (Mon, 23 Mar 2009) | 7 lines Fix a memory leak in res_monitor.c The only way that this leak would occur is if Monitor were started using the Manager interface and no File: header were given. Discovered while reviewing the ast_channel_ao2 review request. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12Document default Monitor file location.Michiel van Baak
(closes issue #14065) Reported by: kshumard Patches: res_monitor.documentation.patch.txt uploaded by kshumard (license 92) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09Reverting format addition for nowTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148071 65c4cc65-6c06-0410-ace0-fbb531ad65f3