summaryrefslogtreecommitdiff
path: root/apps/app_chanspy.c
AgeCommit message (Collapse)Author
2014-06-20voicemail API callbacks: Extract the sayname API call to its own registerd ↵Richard Mudgett
callback. * Extract the sayname API call to its own registerd callback. This allows the app_directory and app_chanspy applications to say a mailbox owner's name using an alternate provider when app_voicemail is not available because you are using res_mwi_external. app_directory still uses the voicemail.conf file. AFS-64 #close Reported by: Mark Michelson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-12app_chanspy: Fix a test that was failing on account of r413551Jonathan Rose
ASTERISK-23381 #close ASTERISK-23381 #comment Reported by: Robert Moss Review: https://reviewboard.asterisk.org/r/3505/ ........ Merged revisions 413710 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413712 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09app_chanspy: Fix a bug where Barge mode could failJonathan Rose
If the barge audiohook was attached prior to the spyee and its peer actually being bridged, the audiohook would not be applied and the connected peer would not be able to hear audio from the spy when the spy is in barge mode. (closes issue ASTERISK-23381) Reported by: Robert Moss Review: https://reviewboard.asterisk.org/r/3505/ ........ Merged revisions 413551 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413556 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21app_chanspy: Documentation Update To Clarify "x" OptionMichael L. Young
When using the "x" option (specify a DTMF digit to exit the application), it is not obvious in the documentation that this only works when spying on a channel. If a channel being used to spy on other channels is waiting to connect to a channel or is no longer attached to a channel, the DTMF is ignored. As noted on the issue tracker, since there are workarounds available and this is a rarely used option we are opting for a documentation change here. (closes issue ASTERISK-22661) Reported by: Chris Hillman Patches: asterisk-22661-doc-clarify-chan_spy.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2990/ ........ Merged revisions 408536 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 408537 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 408538 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31ChanSpy: Add ability to specify channel uniqueids as well as channel names.Richard Mudgett
* Made ChanSpy accept a channel uniqueid or a fully specified channel name as the chanprefix parameter if the 'u' option is specified. (closes issue AFS-42) Review: https://reviewboard.asterisk.org/r/3160/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17Several components: fixing Typos in comments and code, "avaliable" instead ↵Rusty Newton
of "available" (issue ASTERISK-23021) (closes issue ASTERISK-23021) Reported by: Jeremy Lainé Tested by: Rusty Newton Patches: available.patch uploaded by Jeremy Lainé (license 6561) ........ Merged revisions 404046 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22Add SayAlphaCase and similar functionality for AGIKinsey Moore
This adds a new dialplan application, SayAlphaCase, that performs much the same function as SayAlpha except that it takes additional options which allow the user to specify whether the case of each letter should be announced for uppercase, lowercase, or all letters. Similar functionality has been added to the SAY ALPHA AGI command via an optional parameter. Original Patch by: Kevin Scott Adams Reported by: Kevin Scott Adams Review: https://reviewboard.asterisk.org/r/2725/ (closes issue ASTERISK-20782) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Get rid of ast_bridged_channel() and the bridged_channel field on ast_channels.Mark Michelson
This commit is smaller than the initial review placed on review board. This is because a change to allow for channel drivers to access parking functionality externally was committed and invalidated quite a few of the changes initially made. (closes issue ASTERISK-22039) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2717 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396103 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
2012-08-08Fix Not Unreferencing A Spied ChannelMichael L. Young
When a channel hangs up while being spied upon and the option to exit the ChanSpy application when the spied on channel hangs up is set, ast_autochan_destroy is not being called and therefore a reference to the spied upon channel is not removed. The symptom being reported was that when using func_group in the dialplan and calling "group show channels" at the cli, the spied upon channel was still being shown while "core show channels" showed that the channel was not up. This patch calls ast_autochan_destroy when a spied upon channel hangs up and the option to exit the ChanSpy application is set, removing the reference to the channel allowing the count for the group that the spied channel was part of to be decremented. (closes issue ASTERISK-17515) Reported by: Arkadiusz Malka Tested by: Alexandr Gordeev, Michael L. Young Patches: asterisk-17515-destroy-autochan.diff uploaded by Michael L. Young (license 5026) ........ Merged revisions 370952 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370954 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-25Add AMI event documentationMatthew Jordan
This patch adds the core changes necessary to support AMI event documentation in the source files of Asterisk, and adds documentation to those AMI events defined in the core application modules. Event documentation is built from the source by two new python scripts, located in build_tools: get_documentation.py and post_process_documentation.py. The get_documentation.py script mirrors the actions of the existing AWK get_documentation scripts, except that it will scan the entirety of a source file for Asterisk documentation. Upon encountering it, if the documentation happens to be an AMI event, it will attempt to extract information about the event directly from the manager event macro calls that raise the event. The post_process_documentation.py script combines manager event instances that are the same event but documented in multiple source files. It generates the final core-[lang].xml file. As this process can take longer to complete than a typical 'make all', it is only performed if a new make target, 'full', is chosen. Review: https://reviewboard.asterisk.org/r/1967/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Coverity Report: Fix issues for error type UNINIT in Core supported modulesJonathan Rose
(issue ASTERISK-19652) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1909/ ........ Merged revisions 366048 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366049 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-04Fix many issues from the NULL_RETURNS Coverity reportKinsey Moore
Most of the changes here are trivial NULL checks. There are a couple optimizations to remove the need to check for NULL and outboundproxy parsing in chan_sip.c was rewritten to avoid use of strtok. Additionally, a bug was found and fixed with the parsing of outboundproxy when "outboundproxy=," was set. (Closes issue ASTERISK-19654) ........ Merged revisions 365398 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 365399 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-06Add missing newlines to CLI loggingKinsey Moore
........ Merged revisions 361471 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 361472 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-16Prevent chanspy from binding to zombie channelsJonathan Rose
This patch addresses a bug with chanspy on local channels which roughly 50% of the time would create a situation where chanspy can latch onto a zombie channel, keeping the zombie alive forever and causing the channel doing the spying to never be able to hang up. (closes issue ASTERISK-19493) Reported by: lvl Review: https://reviewboard.asterisk.org/r/1819/ ........ Merged revisions 359892 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 359898 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13Finalize ast_channel opaquificationTerry Wilson
Review: https://reviewboard.asterisk.org/r/1786/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Remove bad usage of goto in ChanSpy next_channel().Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02Fix channel reference leak in ChanSpy.Richard Mudgett
* Fix next_channel() channel reference leak in ChanSpy. (closes issue ASTERISK-19461) Reported by: Irontec Patches: app_chanspy_iteartor_next_unref.patch (license #6213) patch uploaded by Irontec (issue ASTERISK-17515) ........ Merged revisions 357809 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 357810 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24Opaquification for ast_format structs in struct ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1770/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 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-13Opaquify char * and char[] in ast_channelTerry Wilson
Review: https://reviewboard.asterisk.org/r/1733/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08Avoid cppcheck warnings; removing unused vars and a bit of cleanup.Walter Doekes
Patch by: Clod Patry Review: https://reviewboard.asterisk.org/r/1651 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27Audit of ao2_iterator_init() usage for v1.8.Richard Mudgett
Fixes numerous reference leaks and missing ao2_iterator_destroy() calls as a result. Review: https://reviewboard.asterisk.org/r/1697/ ........ Merged revisions 352955 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352956 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352957 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-23Merged revisions 349045 via svnmerge from Sean Bright
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r349045 | seanbright | 2011-12-23 12:32:33 -0500 (Fri, 23 Dec 2011) | 25 lines Merged revisions 349044 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r349044 | seanbright | 2011-12-23 12:25:01 -0500 (Fri, 23 Dec 2011) | 18 lines In ChanSpy, don't create audiohooks that will never be used. When ChanSpy is initialized it creates and attaches 3 audiohooks: 1) Read audio off of the channel that we are spying on 2) Write audio to the channel that we are spying on 3) Write audio to the channel that is bridged to the channel that we are spying on. The first is always necessary, but the others are used only when specific options are passed to the ChanSpy application (B, d, w, and W to be specific). When those flags are not passed, neither of those audiohooks are ever sent frames, but we still try to process the hooks for each voice frame that we recieve on the channel. So in short - only create and attach audiohooks that we actually need. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349046 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-05-04Merged revisions 316650 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r316650 | dvossel | 2011-05-04 09:25:03 -0500 (Wed, 04 May 2011) | 15 lines Merged revisions 316644 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r316644 | dvossel | 2011-05-04 09:23:39 -0500 (Wed, 04 May 2011) | 9 lines Fixes one-way-audio when chanspy activated with the 'o' option (closes issue #18382) Reported by: jkister Patches: 0001-Bugfix-18382-one-way-audio-when-chanspy-activated.patch.txt uploaded by malin (license ) Tested by: firstsip, Greenlightcrm, malin, wdoekes, boroda, dvossel ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-17Merged revisions 311197 via svnmerge from Jonathan Rose
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r311197 | jrose | 2011-03-17 14:03:34 -0500 (Thu, 17 Mar 2011) | 11 lines This fixes a nasty chanspy bug which was causing a channel leak every time a spied on channel made a call. In addition to the above, it makes certain channel destruction occurs so that applications don't get stuck waiting for datastore destruction while monitored by chanspy. (closes issue #18742) Reported by: jkister Tested by: jkister, jcovert, jrose Review: http://reviewboard.digium.internal/r/106/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd ↵David Vossel
audio ConfBridge, and other stuff -Functional changes 1. Dynamic global format list build by codecs defined in codecs.conf 2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf 3. Negotiation of SILK attributes in chan_sip. 4. SPEEX 32khz with translation 5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation using codec_resample.c 6. Various changes to RTP code required to properly handle the dynamic format list and formats with attributes. 7. ConfBridge now dynamically jumps to the best possible sample rate. This allows for conferences to take advantage of HD audio (Which sounds awesome) 8. Audiohooks are no longer limited to 8khz audio, and most effects have been updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT. 9. codec_resample now uses its own code rather than depending on libresample. -Organizational changes Global format list is moved from frame.c to format.c Various format specific functions moved from frame.c to format.c Review: https://reviewboard.asterisk.org/r/1104/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Asterisk media architecture conversion - no more format bitfieldsDavid Vossel
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-28Merged revisions 299865 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r299865 | pabelanger | 2010-12-28 13:53:37 -0500 (Tue, 28 Dec 2010) | 9 lines Merged revisions 299864 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r299864 | pabelanger | 2010-12-28 13:51:13 -0500 (Tue, 28 Dec 2010) | 2 lines Documentation typo ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-03Merged revisions 284921 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r284921 | twilson | 2010-09-03 11:28:18 -0500 (Fri, 03 Sep 2010) | 19 lines Merged revisions 284897 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r284897 | twilson | 2010-09-03 11:20:45 -0500 (Fri, 03 Sep 2010) | 12 lines Merged revisions 284881 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r284881 | twilson | 2010-09-03 11:10:23 -0500 (Fri, 03 Sep 2010) | 5 lines Properly detect when a sound file doesn't exist ast_fileexists returns -1 for error and 0 for a non-existant file. The existing code treated missing files as though they existed. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284922 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-05Fix the fix for chanspy option o Jeff Peeler
In 224178, I assumed the uploaded patch was correct as it had received positive feedback. The flags were being checked in the incorrect location. Upon testing the fix this time it was also found that the flags from the dialplan weren't being copied to the chanspy_translation_helper. (closes issue #16167) Reported by: marhbere git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04Expand codec bitfield from 32 bits to 64 bits.Tilghman Lesher
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21Finish implementaton of astobj2 OBJ_MULTIPLE, and convert ↵Kevin P. Fleming
ast_channel_iterator to use it. This patch finishes the implementation of OBJ_MULTIPLE in astobj2 (the case where multiple results need to be returned; OBJ_NODATA mode already was supported). In addition, it converts ast_channel_iterators (only the targeted versions, not the ones that iterate over all channels) to use this method. During this work, I removed the 'ao2_flags' arguments to the ast_channel_iterator constructor functions; there were no uses of that argument yet, there is only one possible flag to pass, and it made the iterators less 'opaque'. If at some point in the future someone really needs an ast_channel_iterator that does not lock the container, we can provide constructor(s) for that purpose. Review: https://reviewboard.asterisk.org/r/379/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-15Readd removed ability to allow listening to one side of the call in app_chanspyJeff Peeler
(Option o) (closes issue #15675) Reported by: john8675309 Patches: issue15675patchtrunk.txt uploaded by dbrooks (license 790) Tested by: jgutierrez on users list: http://lists.digium.com/pipermail/asterisk-users/2009-October/239155.html git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-17Get this compiling under dev-mode.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-17Add the 'E' option to exit ChanSpy, once the single channel it spied upon ↵Tilghman Lesher
hangs up. In addition, there's a bit of cleanup to the arguments and documentation, in which I discovered that the last feature added to this application duplicated an option (oops!) and changed that option so that it now works. (closes issue #14909) Reported by: junky Patches: __20090901-spy_hangup_trunk.diff uploaded by lmadsen (license 10) Tested by: amilcar, junky, flujan, lmadsen git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10AST-2009-005Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26Add 's' option to ChanSpy, which makes the app exit when no channels are ↵Russell Bryant
left to spy on. (closes issue #14594) Reported by: JimDickenson Patches: chanspy.diff uploaded by JimDickenson (license 710) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-16Merged revisions 200991 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r200991 | kpfleming | 2009-06-16 12:05:38 -0500 (Tue, 16 Jun 2009) | 11 lines Improve support for media paths that can generate multiple frames at once. There are various media paths in Asterisk (codec translators and UDPTL, primarily) that can generate more than one frame to be generated when the application calling them expects only a single frame. This patch addresses a number of those cases, at least the primary ones to solve the known problems. In addition it removes the broken TRACE_FRAMES support, fixes a number of bugs in various frame-related API functions, and cleans up various code paths affected by these changes. https://reviewboard.asterisk.org/r/175/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-07Global var cleanup - constification and removing unused vars.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28Merged revisions 197537 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r197537 | mmichelson | 2009-05-28 09:49:13 -0500 (Thu, 28 May 2009) | 21 lines Add flags to chanspy audiohook so that audio stays in sync. There are two flags being added to the chanspy audiohook here. One is the pre-existing AST_AUDIOHOOK_TRIGGER_SYNC flag. With this set, we ensure that the read and write slinfactories on the audiohook do not skew beyond a certain tolerance. In addition, there is a new audiohook flag added here, AST_AUDIOHOOK_SMALL_QUEUE. With this flag set, we do not allow for a slinfactory to build up a substantial amount of audio before flushing it. For this particular issue, this means that the person spying on the call will hear the conversations in real time with very little delay in the audio. (closes issue #13745) Reported by: geoffs Patches: 13745.patch uploaded by mmichelson (license 60) Tested by: snblitz ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197543 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-12add 'const' qualifiers in various places where they should have beenKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 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-02-13Add manager events for chanspy starting or stoppingMark Michelson
(closes issue #14469) Reported by: caio1982 Patches: chanspy_events2.diff uploaded by caio1982 (license 22) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175655 65c4cc65-6c06-0410-ace0-fbb531ad65f3