Commit Graph

130 Commits

Author SHA1 Message Date
Terry Wilson 786f5898d1 Finalize ast_channel opaquification
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-13 18:20:34 +00:00
Terry Wilson 0e5c761c28 Opaquify ast_channel typedefs, fd arrays, and softhangup flag
Review: https://reviewboard.asterisk.org/r/1784/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01 22:09:18 +00:00
Terry Wilson a9d607a357 Opaquify ast_channel structs and lists
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-29 16:52:47 +00:00
Terry Wilson ebaf59a656 Opaquification for ast_format structs in struct ast_channel
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-24 00:32:20 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
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-20 23:43:27 +00:00
Terry Wilson 34c55e8e7c Opaquify char * and char[] in ast_channel
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-13 17:27:06 +00:00
Terry Wilson 99cae5b750 Opaquify channel stringfields
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-24 20:12:09 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
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-09 22:15:50 +00:00
Kinsey Moore 6fa808447b Allow playback of formats that don't support seeking
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
2012-01-05 22:11:41 +00:00
Matthew Jordan cf0c9830bf Add Asterisk TestSuite event hooks to support ConfBridge testing
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-12-22 20:44:53 +00:00
Matthew Jordan 60f51c002a Video format was treated as audio when removed from the file playback scheduler
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-11-11 21:57:46 +00:00
Terry Wilson 2644af39b4 Merged revisions 339088 via svnmerge from
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-10-03 18:58:33 +00:00
Matthew Jordan 3b53a9cdb3 Merged revisions 332817 via svnmerge from
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-08-22 19:19:44 +00:00
Matthew Jordan 67945ce627 Merged revisions 326209 via svnmerge from
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-07-05 13:38:37 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
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-05-03 20:45:32 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
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-02-03 16:22:10 +00:00
Sean Bright 50a023add5 Merged revisions 304097 via svnmerge from
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-26 01:27:39 +00:00
David Vossel 2a618dc998 Merged revisions 301446 via svnmerge from
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-12 16:05:58 +00:00
Tilghman Lesher fad87eea35 Merged revisions 301402 via svnmerge from
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
2011-01-12 00:27:30 +00:00
Tilghman Lesher 1d48790cc2 Merged revisions 299989 via svnmerge from
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-12-29 22:03:50 +00:00
Tilghman Lesher 45432d77b0 Merged revisions 290576 via svnmerge from
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-10-06 13:50:33 +00:00
Olle Johansson e85f6a3d48 Merged revisions 286270 via svnmerge from
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-09-11 17:12:58 +00:00
Olle Johansson 5f7c0c349f Small doxygen fix and doc addition
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-30 09:32:17 +00:00
Richard Mudgett ec37ffbdaf ast_callerid restructuring
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-07-14 15:48:36 +00:00
David Vossel 3f9c6bb3bc file.c was truncating audio file formats to the lower 32bits.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-18 18:59:05 +00:00
Richard Mudgett a8b0a415fc Suppress warning in waitstream_core().
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-06-07 15:51:39 +00:00
Terry Wilson 408ba24fad Merged revisions 254451 via svnmerge from
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-03-25 16:03:51 +00:00
Tilghman Lesher cf6592e58e Merge tests that verify the same thing. (Oops.)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-05 19:07:18 +00:00
Tilghman Lesher 962b1a22fd Try to make ast_format_str_reduce fail...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-04 22:43:33 +00:00
Matthew Nicholson 98b69d84e1 Merged revisions 238629 via svnmerge from
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
2010-01-08 19:32:11 +00:00
Russell Bryant 507e579dc9 Merged revisions 232007 via svnmerge from
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-01 23:27:53 +00:00
Matthew Nicholson 65c9bfbead Merged revisions 231740 via svnmerge from
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-12-01 15:47:36 +00:00
Matthew Nicholson 31848bcdd1 Merged revisions 231614 via svnmerge from
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-30 21:31:55 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Russell Bryant dd50b9e8b5 Merged revisions 222878 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222878 | russell | 2009-10-08 14:45:47 -0500 (Thu, 08 Oct 2009) | 44 lines
  
  Make filestream frame handling safer by isolating frames before returning them.
  
  This patch is related to a number of issues on the bug tracker that show
  crashes related to freeing frames that came from a filestream.  A number of
  fixes have been made over time while trying to figure out these problems, but
  there re still people seeing the crash.  (Note that some of these bug reports
  include information about other problems.  I am specifically addressing
  the filestream frame crash here.)
  
  I'm still not clear on what the exact problem is.  However, what is _very_
  clear is that we have seen quite a few problems over time related to unexpected
  behavior when we try to use embedded frames as an optimization.  In some cases,
  this optimization doesn't really provide much due to improvements made in other
  areas.
  
  In this case, the patch modifies filestream handling such that the embedded frame
  will not be returned.  ast_frisolate() is used to ensure that we end up with a
  completely mallocd frame.  In reality, though, we will not actually have to malloc
  every time.  For filestreams, the frame will almost always be allocated and freed
  in the same thread.  That means that the thread local frame cache will be used.
  So, going this route doesn't hurt.
  
  With this patch in place, some people have reported success in not seeing the
  crash anymore.
  
  (SWP-150)
  (AST-208)
  (ABE-1834)
  
  (issue #15609)
  Reported by: aragon
  Patches:
        filestream_frisolate-1.4.diff2.txt uploaded by russell (license 2)
  Tested by: aragon, russell
  
  (closes issue #15817)
  Reported by: zerohalo
  Tested by: zerohalo
  
  (closes issue #15845)
  Reported by: marhbere
  
  Review: https://reviewboard.asterisk.org/r/386/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-08 19:52:03 +00:00
Tilghman Lesher 07f9778f5b Merged revisions 219653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219653 | tilghman | 2009-09-20 12:52:05 -0500 (Sun, 20 Sep 2009) | 8 lines
  
  Really stop the stream, when ast_closestream() is called.
  (closes issue #15129)
   Reported by: bmh
   Patches: 
         20090918__issue15129.diff.txt uploaded by tilghman (license 14)
   Review:
         https://reviewboard.asterisk.org/r/372/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-20 17:55:49 +00:00
Kevin P. Fleming 7f745ecd73 Document language prompt submission process.
This patch adds a document describing the language prompt submission process,
licensing terms and other issues related to that process. In addition, it
modifies the sound file searching process to support language codes with
any number of suffices (not limited to just "xx" or "xx_YY"), so that prompts
can be named with gender, customer/company, etc. suffices as well.

(closes issue #15771)
Reported by: jtodd
Patches:
      language-criteria.txt uploaded by jtodd



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-03 18:42:38 +00:00
Russell Bryant 3b91d3b5ab Revert some silly code that snuck into trunk from my working copy. Sorry!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-05 14:09:24 +00:00
Russell Bryant c511a26749 Move Asterisk-addons modules into the main Asterisk source tree.
Someone asked yesterday, "is there a good reason why we can't just put these
modules in Asterisk?".  After a brief discussion, as long as the modules are
clearly set aside in their own directory and not enabled by default, it is
perfectly fine.

For more information about why a module goes in addons, see README-addons.txt.

chan_ooh323 does not currently compile as it is behind some trunk API updates.
However, it will not build by default, so it should be okay for now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-30 16:40:38 +00:00
Russell Bryant 4021f7d71b Merged revisions 203785 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r203785 | russell | 2009-06-26 16:16:39 -0500 (Fri, 26 Jun 2009) | 15 lines
  
  Don't fast forward past the end of a message.
  
  This is nice change for users of the voicemail application.  If someone gets a
  little carried away with fast forwarding through a message, they can easily
  get to the end and accidentally exit the voicemail application by hitting the
  fast forward key during the following prompt.
  
  This adds some safety by not allowing a fast forward past the end of a message.
  
  (closes issue #14554)
  Reported by: lacoursj
  Patches:
        21761.patch uploaded by lacoursj (license 707)
  Tested by: lacoursj
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 21:21:48 +00:00
Kevin P. Fleming 4c0265664e Merged revisions 200991 via svnmerge from
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-16 18:54:30 +00:00
Kevin P. Fleming 82fb56886e More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:34:30 +00:00
Joshua Colp c35e305c82 Fix a memory leak of the write buffer when writing a file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 18:39:04 +00:00
Mark Michelson 76a73083a4 Merged revisions 188582 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r188582 | mmichelson | 2009-04-15 15:04:20 -0500 (Wed, 15 Apr 2009) | 7 lines
  
  Update ast_readvideo_callback to match ast_readaudio_callback.
  
  This fixes potential refcount errors that may occur on ast_filestreams.
  
  AST-208
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-15 20:17:33 +00:00
Tilghman Lesher 8f28bfc63e Merged revisions 187300-187301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r187300 | tilghman | 2009-04-08 23:31:38 -0500 (Wed, 08 Apr 2009) | 3 lines
  
  Add debugging mode for diagnosing file descriptor leaks.
  (Related to issue #14625)
........
  r187301 | tilghman | 2009-04-08 23:32:40 -0500 (Wed, 08 Apr 2009) | 2 lines
  
  Oops, missed this file in the last commit.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 04:59:05 +00:00
Russell Bryant b043f8ab1b Don't act surprised if we get a -1 indication.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 01:40:28 +00:00
Joshua Colp 5f7f4a0c84 Fix an issue where the timer for file playback would not be stopped if DAHDI was not installed.
(closes issue #14541)
Reported by: grant


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-26 16:42:36 +00:00
Mark Michelson bd244342e2 Fix a problem where file playback would cause fds to remain open forever
The problem came from the fact that a frame read from a format interpreter
was not freed. Adding a call to ast_frfree fixed this. The explanation for
why this caused the problem is a bit complex, but here goes:

There was a problem in all versions of Asterisk where the embedded frame
of a filestream structure was referenced after the filestream was freed. This
was fixed by adding reference counting to the filestream structure. The refcount
would increase every time that a filestream's frame pointer was pointing to an
actual frame of data. When the frame was freed, the refcount would decrease. Once
the refcount reached 0, the filestream was freed, and as part of the operation,
the open files were closed as well.

Thus it becomes more clear why a missing ast_frfree would cause a reference leak
and cause the files to not be closed. You may ask then if there was a frame leak
before this patch. The answer to that is actually no! The filestream code was
"smart" enough to know that since the frame we received came from a format interpreter,
the frame had no malloced data and thus didn't need to be freed. Now, however, there
is cleanup that needs to be done when we finish with the frame, so we do need to
call ast_frfree on the frame to be sure that the refcount for the filestream is
decremented appropriately.

(closes issue #14384)
Reported by: fiddur
Patches:
      14384.patch uploaded by putnopvut (license 60)
Tested by: fiddur, putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 15:30:12 +00:00
Russell Bryant b0a8b26ac2 Merged revisions 167566 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r167566 | russell | 2009-01-07 16:35:36 -0600 (Wed, 07 Jan 2009) | 2 lines

Fix the last couple of places where free() was improperly used directly.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:36:34 +00:00
Russell Bryant 90431add27 Merged revisions 167554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r167554 | russell | 2009-01-07 16:26:42 -0600 (Wed, 07 Jan 2009) | 2 lines

Don't fclose() the file early, the filestream destructor will handle it.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:27:23 +00:00