summaryrefslogtreecommitdiff
path: root/main/file.c
AgeCommit message (Collapse)Author
2013-10-03Cache string values of formats on ast_format_cap() to save processing.Mark Michelson
Channel snapshots have string representations of the channel's native formats. Prior to this change, the format strings were re-created on ever channel snapshot creation. Since channel native formats rarely change, this was very wasteful. Now, string representations of formats may optionally be stored on the ast_format_cap for cases where string representations may be requested frequently. When formats are altered, the string cache is marked as invalid. When strings are requested, the cache validity is checked. If the cache is valid, then the cached strings are copied. If the cache is invalid, then the string cache is rebuilt and copied, and the cache is marked as being valid again. Review: https://reviewboard.asterisk.org/r/2879 ........ Merged revisions 400356 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29Memory leaks fixKevin Harwell
(closes ASTERISK-22376) Reported by: John Hardin Patches: memleak.patch uploaded by jhardin (license 6512) memleak2.patch uploaded by jhardin (license 6512) ........ Merged revisions 397946 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-16Doxygen comment tweaks.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-08Move channel driver Registry manager events to core.Jason Parker
This also shuffles the stasis system topic and related handling. (closes issue ASTERISK-21488) Review: https://reviewboard.asterisk.org/r/2631/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03ARI - channel recording supportDavid M. Lee
This patch is the first step in adding recording support to the Asterisk REST Interface. Recordings are stored in /var/spool/recording. Since recordings may be destructive (overwriting existing files), the API rejects attempts to escape the recording directory (avoiding issues if someone attempts to record to ../../lib/sounds/greeting, for example). (closes issue ASTERISK-21594) (closes issue ASTERISK-21581) Review: https://reviewboard.asterisk.org/r/2612/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-24Index installed sounds and implement ARI sounds queriesKinsey Moore
This adds support for stasis/sounds and stasis/sounds/{ID} queries via the Asterisk RESTful Interface (ARI, formerly Stasis-HTTP). The following changes have been made to accomplish this: * A modular indexer was created for local media. * A new function to get an ast_format associated with a file extension was added. * Modifications were made to the built-in HTTP server so that URI decoding could be deferred to the URI handler when necessary. * The Stasis-HTTP sounds JSON documentation was modified to handle cases where multiple languages are installed in different formats. * Register and Unregister events for formats were added to the system topic. (closes issue ASTERISK-21584) (closes issue ASTERISK-21585) Review: https://reviewboard.asterisk.org/r/2507/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-28Change cleanup ordering in filestream destructor.Russell Bryant
This patch came about due to a problem observed where wav files had an empty header. The header is supposed to be updated in wav_close(). It turns out that this was broken when the cache_record_files option from asterisk.conf was enabled. The cleanup code was moving the file to its final destination *before* running the close() method of the file destructor, so the header didn't get updated. Another problem here is that the move was being done before actually closing the FILE *. Finally, the last bug fixed here is that I noticed that wav_close() checks for stream->filename to be non-NULL. In the previous cleanup order, it's checking a pointer to freed memory. This doesn't actually cause anything to break, but it's treading on dangerous waters. Now the free() of stream->filename is happening after the format module's close() method gets called, so it's safer. Review: https://reviewboard.asterisk.org/r/2286/ ........ Merged revisions 380210 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 380211 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-22Add ControlPlayback manager actionMatthew Jordan
This patch adds the capability for asynchronous manipulation of audio being played back to a channel though a new AMI action "ControlPlayback". The ControlPlayback action supports a number of operations, the availability of which depend on the application being used to send audio to the channel. When the audio playback was initiated using the ControlPlayback application or CONTROL STREAM FILE AGI command, the audio can be paused, stopped, restarted, reversed, or skipped forward. When initiated by other mechanisms (such as the Playback application), the audio can be stopped, reversed, or skipped forward. Review: https://reviewboard.asterisk.org/r/2265/ (closes issue ASTERISK-20882) Reported by: mjordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-11Cleanup CLI commands on exit for several files.Richard Mudgett
(issue ASTERISK-20649) Reported by: Corey Farrell Patches: unregister-cli-multiple-all.patch (license #5909) patch uploaded by Corey Farrell ........ Merged revisions 377881 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377882 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377883 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30Clean up doxygen warningsMatthew Jordan
This patch fixes numerous doxygen warnings across Asterisk. It also updates the makefile to regenerate the doxygen configuration on the local system before running doxygen to help prevent warnings/errors on the local system. Much thanks to Andrew for tackling one of the Asterisk janitor projects! (issue ASTERISK-20259) Reported by: Andrew Latham Patches: doxygen_partial.diff uploaded by Andrew Latham (license 5985) make_progdocs.diff uploaded by Andrew Latham (license 5985) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-21Fix misuses of asprintf throughout the code.Mark Michelson
This fixes three main issues * Change asprintf() uses to ast_asprintf() so that it pairs properly with ast_free() and no longer causes MALLOC_DEBUG to freak out. * When ast_asprintf() fails, set the pointer NULL if it will be referenced later. * Fix some memory leaks that were spotted while taking care of the first two points. (Closes issue ASTERISK-20135) reported by Richard Mudgett Review: https://reviewboard.asterisk.org/r/2071 ........ Merged revisions 371590 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 371591 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 371592 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04Merge changes dealing with support for Digium phones.Mark Michelson
Presence support has been added. This is accomplished by allowing for presence hints in addition to device state hints. A dialplan function called PRESENCE_STATE has been added to allow for setting and reading presence. Presence can be transmitted to Digium phones using custom XML elements in a PIDF presence document. Voicemail has new APIs that allow for moving, removing, forwarding, and playing messages. Messages have had a new unique message ID added to them so that the APIs will work reliably. The state of a voicemail mailbox can be obtained using an API that allows one to get a snapshot of the mailbox. A voicemail Dialplan App called VoiceMailPlayMsg has been added to be able to play back a specific message. Configuration hooks have been added. Configuration hooks allow for a piece of code to be executed when a specific configuration file is loaded by a specific module. This is useful for modules that are dependent on the configuration of other modules. chan_sip now has a public method that allows for a custom SIP INFO request to be sent mid-dialog. Digium phones use this in order to display progress bars when files are played. Messaging support has been expanded a bit. The main visible difference is the addition of an AMI action MessageSend. Finally, a ParkingLots manager action has been added in order to get a list of parking lots. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-14Commit framework for HANGUPCAUSE (replacement for SIP_CAUSE)Kinsey Moore
This is the starting point for the Asterisk 11: Who Hung Up work and provides a framework which will allow channel drivers to report the types of hangup cause information available in SIP_CAUSE without incurring the overhead of the MASTER_CHANNEL dialplan function. The initial implementation only includes cause generation for chan_sip and does not include cause code translation utilities. This change deprecates SIP_CAUSE and replaces its method of reporting cause codes with the new framework. This change also deprecates the 'storesipcause' option in sip.conf. Review: https://reviewboard.asterisk.org/r/1822/ (Closes issue SWP-4221) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22Kill off red blobs in most of main/*Kinsey Moore
Everything still compiled after making these changes, so I assume these whitespace-only changes didn't break anything (and shouldn't have). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360190 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-01Opaquify ast_channel typedefs, fd arrays, and softhangup flagTerry Wilson
Review: https://reviewboard.asterisk.org/r/1784/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 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-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
2012-01-05Allow playback of formats that don't support seekingKinsey Moore
ast_streamfile previously did unconditional seeking on files that broke playback of formats that don't support that functionality. This patch avoids the seek that was causing the problem. This regression was introduced in r158062. (closes issue ASTERISK-18994) Patch-by: Timo Teras ........ Merged revisions 349731 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 349732 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-22Add Asterisk TestSuite event hooks to support ConfBridge testingMatthew Jordan
This patch adds initial testsuite event hooks so that ConfBridge tests can be executed in the Asterisk TestSuite. (issue ASTERISK-19059) ........ Merged revisions 348846 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-11Video format was treated as audio when removed from the file playback schedulerMatthew Jordan
This patch fixes the format type check in ast_closestream and filestream_destructor. Previously a comparison operator was used, but since audio formats are no longer contiguous (and AST_FORMAT_AUDIO_MASK includes formats that have a value greater than the video formats), a bitwise AND operation is used instead. Duplicated code was also moved to filestream_close. (closes issue ASTERISK-18682) Reported by: Aldo Bedrij Tested by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1580/ ........ Merged revisions 344823 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344842 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-03Merged revisions 339088 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r339088 | twilson | 2011-10-03 11:44:27 -0700 (Mon, 03 Oct 2011) | 17 lines Merged revisions 339086 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r339086 | twilson | 2011-10-03 11:40:52 -0700 (Mon, 03 Oct 2011) | 10 lines Properly ignore AST_CONTROL_UPDATE_RTP_PEER in more places After the change in r336294, the new AST_CONTROL_UPDATE_RTP_PEER frame is sent when a re-invite happens. If we receive a re-invite from a device the waitstream_core was not aware of the new control frame and would drop the call. (closes issue ASTERISK-18610) Reported by: Kristijan_Vrban ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22Merged revisions 332817 via svnmerge from Matthew Jordan
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r332817 | mjordan | 2011-08-22 13:15:51 -0500 (Mon, 22 Aug 2011) | 4 lines Review: https://reviewboard.asterisk.org/r/1364/ This update adds a new AMI event, TestEvent, which is enabled when the TEST_FRAMEWORK compiler flag is defined. It also adds initial usage of this event to app_voicemail. The TestEvent AMI event is used extensively by the voicemail tests in the Asterisk Test Suite. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05Merged revisions 326209 via svnmerge from Matthew Jordan
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r326209 | mjordan | 2011-07-05 08:23:57 -0500 (Tue, 05 Jul 2011) | 7 lines Updated filestream destructor to block until move is complete when cache is used When a cache directory is used, the process is forked and a mv command is executed to move the temporary file to the permanent location. This caused issues with voicemail, where a race condition occurred when the parent expected the file to be in the permanent location prior to the mv command completing. The parent process is now blocked until the mv command completes. (closes issue ASTERISK-17724) Reported by: Adiren P. Tested by: mjordan ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03Merged revisions 316265 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines Fix a bunch of compiler warnings generated by gcc 4.6.0. Most of these are -Wunused-but-set-variable, but there were a few others mixed in here, as well. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 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
2011-01-26Merged revisions 304097 via svnmerge from Sean Bright
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r304097 | seanbright | 2011-01-25 20:26:26 -0500 (Tue, 25 Jan 2011) | 19 lines Merged revisions 304096 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r304096 | seanbright | 2011-01-25 20:24:58 -0500 (Tue, 25 Jan 2011) | 12 lines Per the man page, setvbuf() must be called before any other operation on an open file. We use setvbuf() to associate a buffer with a stream, but we have already written to the open file. This works (by chance) on Linux, but fails on other platforms, such as OpenSolaris. (closes issue #16610) Reported by: bklang Patches: setvbuf.patch uploaded by crjw (license 963) Tested by: bklang, asgaroth, efutch ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-12Merged revisions 301446 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r301446 | dvossel | 2011-01-12 10:05:12 -0600 (Wed, 12 Jan 2011) | 2 lines Removal of unused variables so Asterisk will compile. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-12Merged revisions 301402 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r301402 | tilghman | 2011-01-11 18:26:39 -0600 (Tue, 11 Jan 2011) | 7 lines Call execl() directly for a better solution for paths with spaces. (closes issue #18600) Reported by: ebroad Patches: 20110111__issue18600__2.diff.txt uploaded by tilghman (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-29Merged revisions 299989 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r299989 | tilghman | 2010-12-29 16:02:59 -0600 (Wed, 29 Dec 2010) | 4 lines Quote arguments, just in case there's a space in a pathname. (Diagnosed by pabelanger on #asterisk-dev, fixed by me.) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-06Merged revisions 290576 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r290576 | tilghman | 2010-10-06 08:49:19 -0500 (Wed, 06 Oct 2010) | 15 lines Merged revisions 290575 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r290575 | tilghman | 2010-10-06 08:48:27 -0500 (Wed, 06 Oct 2010) | 8 lines Allow streaming audio from a pipe. (closes issue #18001) Reported by: jamicque Patches: 20100926__issue18001.diff.txt uploaded by tilghman (license 14) Tested by: jamicque ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-11Merged revisions 286270 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r286270 | oej | 2010-09-11 19:09:22 +0200 (Lör, 11 Sep 2010) | 18 lines Merged revisions 286268 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r286268 | oej | 2010-09-11 19:05:16 +0200 (Lör, 11 Sep 2010) | 11 lines Merged revisions 286267 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r286267 | oej | 2010-09-11 18:59:20 +0200 (Lör, 11 Sep 2010) | 4 lines Handle error response when we can't make file compatible Review: https://reviewboard.asterisk.org/r/911/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-30Small doxygen fix and doc additionOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14ast_callerid restructuringRichard Mudgett
The purpose of this patch is to eliminate struct ast_callerid since it has turned into a miscellaneous collection of various party information. Eliminate struct ast_callerid and replace it with the following struct organization: struct ast_party_name { char *str; int char_set; int presentation; unsigned char valid; }; struct ast_party_number { char *str; int plan; int presentation; unsigned char valid; }; struct ast_party_subaddress { char *str; int type; unsigned char odd_even_indicator; unsigned char valid; }; struct ast_party_id { struct ast_party_name name; struct ast_party_number number; struct ast_party_subaddress subaddress; char *tag; }; struct ast_party_dialed { struct { char *str; int plan; } number; struct ast_party_subaddress subaddress; int transit_network_select; }; struct ast_party_caller { struct ast_party_id id; char *ani; int ani2; }; The new organization adds some new information as well. * The party name and number now have their own presentation value that can be manipulated independently. ISDN supplies the presentation value for the name and number at different times with the possibility that they could be different. * The party name and number now have a valid flag. Before this change the name or number string could be empty if the presentation were restricted. Most channel drivers assume that the name or number is then simply not available instead of indicating that the name or number was restricted. * The party name now has a character set value. SIP and Q.SIG have the ability to indicate what character set a name string is using so it could be presented properly. * The dialed party now has a numbering plan value that could be useful to have available. The various channel drivers will need to be updated to support the new core features as needed. They have simply been converted to supply current functionality at this time. The following items of note were either corrected or enhanced: * The CONNECTEDLINE() and REDIRECTING() dialplan functions were consolidated into func_callerid.c to share party id handling code. * CALLERPRES() is now deprecated because the name and number have their own presentation values. * Fixed app_alarmreceiver.c write_metadata(). The workstring[] could contain garbage. It also can only contain the caller id number so using ast_callerid_parse() on it is silly. There was also a typo in the CALLERNAME if test. * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id number string. ast_callerid_parse() alters the given buffer which in this case is the channel's caller id number string. Then using ast_shrink_phone_number() could alter it even more. * Fixed caller ID name and number memory leak in chan_usbradio.c. * Fixed uninitialized char arrays cid_num[] and cid_name[] in sig_analog.c. * Protected access to a caller channel with lock in chan_sip.c. * Clarified intent of code in app_meetme.c sla_ring_station() and dial_trunk(). Also made save all caller ID data instead of just the name and number strings. * Simplified cdr.c set_one_cid(). It hand coded the ast_callerid_merge() function. * Corrected some weirdness with app_privacy.c's use of caller presentation. Review: https://reviewboard.asterisk.org/r/702/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-18file.c was truncating audio file formats to the lower 32bits.David Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-07Suppress warning in waitstream_core().Richard Mudgett
Suppress the warning about unexpected control subclass frames for AST_CONTROL_CONNECTED_LINE, AST_CONTROL_REDIRECTING, and AST_CONTROL_AOC in file.c:waitstream_core(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-25Merged revisions 254451 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r254451 | twilson | 2010-03-25 10:57:29 -0500 (Thu, 25 Mar 2010) | 2 lines Handle new SRCCHANGE control message here too ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-05Merge tests that verify the same thing. (Oops.)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-04Try to make ast_format_str_reduce fail...Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-08Merged revisions 238629 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r238629 | mnicholson | 2010-01-08 13:20:44 -0600 (Fri, 08 Jan 2010) | 5 lines Properly calculate the remaining space in the output string when reducing format strings. (closes issue #16560) Reported by: goldwein ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@238630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-01Merged revisions 232007 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r232007 | russell | 2009-12-01 17:25:36 -0600 (Tue, 01 Dec 2009) | 2 lines Fix a warning pointed out by buildbot. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-01Merged revisions 231740 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r231740 | mnicholson | 2009-12-01 09:34:57 -0600 (Tue, 01 Dec 2009) | 2 lines Ignore unknown formats in ast_format_str_reduce() and return an error if no know formats are found. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-30Merged revisions 231614 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r231614 | mnicholson | 2009-11-30 15:11:44 -0600 (Mon, 30 Nov 2009) | 8 lines Remove duplicate entries from voicemail format lists. This prevents app_voicemail from entering an infinite loop when the same format is specified twice in the format list. (closes issue #15625) Reported by: Shagg63 Tested by: mnicholson Review: https://reviewboard.asterisk.org/r/429/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231688 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