dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

106 Commits

Author SHA1 Message Date
dvossel 4aca3187a3 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: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03 16:22:10 +00:00
tilghman 26afee4968 Informational message, not an error.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@243943 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-28 20:00:09 +00:00
tilghman e09b7ddb85 Don't try to convert a 64-bit integer, where only a 32-bit integer is stored.
(closes issue #16194)
 Reported by: habile


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228979 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-09 17:17:29 +00:00
tilghman 3bacd4082e Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-04 14:05:12 +00:00
dvossel 39acf19959 Merge code associated with AST-2009-006
(closes issue #12912)
Reported by: rathaus
Tested by: tilghman, russell, dvossel, dbrooks


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@215955 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-03 16:31:54 +00:00
russell 8e7ba6f043 Tell the IAX2 parser about more control frame types.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198729 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-01 21:03:18 +00:00
kpfleming 230a66da7d Const-ify the world (or at least a good part of it)
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: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21 21:13:09 +00:00
dvossel 9925f010f9 Merged revisions 194557,194685 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194557 | dvossel | 2009-05-14 17:59:43 -0500 (Thu, 14 May 2009) | 10 lines
  
  IAX2 "Ghost" Channels
  
  There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output.  The confusion is caused by channels being listed as "(NONE)" with format "unknown".  These are not channels of coarse.  They are usually just pending registration or poke requests, but it is confusing output.  To help make sense of this I have added two columns to 'iax2 show channels'.  One shows the first message which started the transaction, and the second shows the last message sent by either side of the call.  This helps diagnose why the entry exists and why it may not go away.
  
  (closes issue #14207)
  Reported by: clive18
  
  Review: https://reviewboard.asterisk.org/r/246/
........
  r194685 | dvossel | 2009-05-15 10:40:37 -0500 (Fri, 15 May 2009) | 6 lines
  
  Update to previous IAX2 "Ghost" Channels patch.
  
  Fixed some comments made on reviewboard for the previous patch.
  
  (issue #14207)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194833 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-15 20:52:12 +00:00
tilghman a41b34a63c Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13 08:36:35 +00:00
file 4e8098d130 Finish conversion to using ARRAY_LEN and remove it as a janitor project.
(closes issue #14032)
Reported by: bkruse
Patches:
      14032.patch uploaded by bkruse (license 132)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162542 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-10 01:09:06 +00:00
tilghman 5d19839a33 Repair IAXVAR implementation so that it works again (regression?)
(closes issue #13354)
 Reported by: adomjan
 Patches: 
       20080828__bug13354.diff.txt uploaded by Corydon76 (license 14)
       20080829__bug13354__1.6.0.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, adomjan


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@143031 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-13 13:54:15 +00:00
seanbright 3d55cb9df3 More RSW merges. This should do it for the channels/ dir.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136917 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-09 14:12:34 +00:00
russell 6c97118405 Merge changes from team/bbryant/keyrotation
This set of changes enhances IAX2 encryption support by adding key rotation
to provide enhanced security.  The key used for encryption is rotated right 
after the call gets set up, and then again every few minutes.  This was
discussed at the last AstriDevCon.  For interoperability with older versions
of Asterisk, there is an option that disables key rotation.

(closes issue #13018)
Reported by: bbryant
Patches:
      07072008__iax2_key_rotation.diff uploaded by bbryant (license 36)
Tested by: russell, bbryant


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135158 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-01 18:16:24 +00:00
russell 295533fd85 fix the potential use of an uninitialized variable
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134916 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31 19:39:25 +00:00
tilghman c8ccc483f8 Optimize frame cache by realloc'ing the smallest frame when the cache is full.
This ensures that we don't just keep a cache of tiny frames, continually doing
an alloc/free for each data frame, thus negating the point of having a cache.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134867 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31 19:03:41 +00:00
russell 38884ff944 Merged revisions 134814 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r134814 | russell | 2008-07-31 11:45:31 -0500 (Thu, 31 Jul 2008) | 7 lines

In case we have some processing threads that free more frames than they allocate,
do not let the frame cache grow forever.

(closes issue #13160)
Reported by: tavius
Tested by: tavius, russell

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134815 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31 16:50:10 +00:00
bbryant 6c54bd1411 Fix one more file that got changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127934 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-03 22:47:48 +00:00
bbryant 5ca399c2cd Update these files with transfer code.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127931 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-03 22:36:02 +00:00
mvanbaak c1210321e7 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22 16:29:54 +00:00
rizzo 883346d64a Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
kpfleming a45a413db3 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 05:28:47 +00:00
russell dac373f539 Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it.  It replaces a bunch of simple calls to snprintf with ast_copy_string

(closes issue #10843)
Reported by: Corydon76
Patches: 
      2007092900_10843.diff uploaded by mvanbaak (license 7)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84173 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01 15:23:19 +00:00
file 253840e363 Initialize iax_frames variable to NULL, keeps valgrind happy.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81814 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-06 21:01:10 +00:00
murf 88e10708c5 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29 20:55:40 +00:00
tilghman 74c2948c22 Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18 19:47:20 +00:00
russell 94cdda3f04 Merged revisions 75445 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r75445 | russell | 2007-07-17 15:48:21 -0500 (Tue, 17 Jul 2007) | 13 lines

Merged revisions 75444 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75444 | russell | 2007-07-17 15:45:27 -0500 (Tue, 17 Jul 2007) | 5 lines

Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75446 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17 20:49:09 +00:00
file 6865b88ba3 Merged revisions 69184 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69184 | file | 2007-06-13 15:58:59 -0400 (Wed, 13 Jun 2007) | 2 lines

Add TXMEDIA to list so that it is properly displayed during iax2 packet output.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69185 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-13 20:00:56 +00:00
tilghman eb5d461ed4 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06 21:20:11 +00:00
russell 8d14d22558 Merge changes from team/russell/iax2_osp
This set of changes adds OSP support to chan_iax2.  However, I have modified
the patch a bit from what was submitted.  You now use the CHANNEL() function
to get and set the OSP token for IAX2.

(issue #8531, reported by and original patch by homesick, patch updated by me)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61702 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-20 21:12:53 +00:00
file 814b796e90 Merged revisions 59076 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59076 | file | 2007-03-20 16:42:46 -0400 (Tue, 20 Mar 2007) | 2 lines

Copy len variable as well, should fix remaining IAX2 DTMF issues.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59077 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-20 20:44:58 +00:00
tilghman 4373b2af13 IAX2 remote variables - Bug 7619
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51123 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-16 08:38:59 +00:00
kpfleming 779a16372f Merged revisions 49536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49536 | kpfleming | 2007-01-04 15:58:42 -0600 (Thu, 04 Jan 2007) | 2 lines

don't mark these allocations as 'cache' allocations when caching has been disabled

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49538 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04 21:59:06 +00:00
kpfleming ea6c02b74f Merged revisions 49523 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49523 | kpfleming | 2007-01-04 15:06:02 -0600 (Thu, 04 Jan 2007) | 2 lines

if we're going to decrement the frame count when we free a frame, we should inrement it when we create one :-)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49524 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04 21:06:35 +00:00
kpfleming 7457dc351c Merged revisions 49465 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49465 | kpfleming | 2007-01-04 12:31:55 -0600 (Thu, 04 Jan 2007) | 2 lines

only do IAX2 frame caching for voice and video frames

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04 18:32:23 +00:00
kpfleming f409b5bba7 Merged revisions 49457,49460-49461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49457 | kpfleming | 2007-01-04 12:05:47 -0600 (Thu, 04 Jan 2007) | 2 lines

make building of codec_gsm against the system GSM library actually work

........
r49460 | kpfleming | 2007-01-04 12:16:40 -0600 (Thu, 04 Jan 2007) | 2 lines

don't define this type either if LOW_MEMORY is enabled

........
r49461 | kpfleming | 2007-01-04 12:17:01 -0600 (Thu, 04 Jan 2007) | 2 lines

don't do frame header caching in the core if LOW_MEMORY is defined

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49463 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04 18:19:55 +00:00
mogorman d8c8b23c1a Merged revisions 49458 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.4

........
r49458 | kpfleming | 2007-01-04 12:06:51 -0600 (Thu, 04 Jan 2007) | 2 lines

don't do frame caching in LOW_MEMORY mode

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49462 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-04 18:17:24 +00:00
kpfleming c66dcd0bc5 Merged revisions 48987 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48987 | kpfleming | 2006-12-27 12:29:13 -0600 (Wed, 27 Dec 2006) | 2 lines

allow 'show memory' and 'show memory summary' to distinguish memory allocations that were done for caching purposes, so they don't look like memory leaks

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48989 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-27 18:33:44 +00:00
russell 21cbb8bb68 Extend the thread storage API such that a custom initialization function can
be called for each thread specific object after they are allocated.  Note that
there was already the ability to define a custom cleanup function.  Also, if
the custom cleanup function is used, it *MUST* call free on the thread
specific object at the end.  There is no way to have this magically done that
I can think of because the cleanup function registered with the pthread
implementation will only call the function back with a pointer to the
thread specific object, not the parent ast_threadstorage object.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45623 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-19 01:00:57 +00:00
russell e713821850 there is no need for __iax_frame_free ...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41650 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31 21:50:07 +00:00
russell 405acc2368 there is no need to use iax_frame_free here, as it will actually just end up
having a bunch of erroneous messages about attempting to double free frames
spammed to the console.  Problem reported to me by file ...


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41629 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31 20:39:12 +00:00
file 3f22aa53af Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41507 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31 01:59:02 +00:00
russell 53f8d43e29 Merge team/russell/frame_caching
There are some situations in Asterisk where ast_frame and/or iax_frame
structures are rapidly allocatted and freed (at least 50 times per second
for one call).

This code significantly improves the performance of ast_frame_header_new(), 
ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping
a thread-local cache of these structures and using frames from the cache 
whenever possible instead of calling malloc/free every time.

This commit also converts the ast_frame and iax_frame structures to use the
linked list macros.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41278 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29 20:50:36 +00:00
russell 9101f1b8e7 make the counting of ingress, outgress, and total frames thread-safe
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38587 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-31 17:27:42 +00:00
russell f395a52a02 Merge a new implementation of ast_inet_ntoa, our thread safe replacement for
inet_ntoa, which uses thread specific data (aka thread local storage) instead
of stack allocatted buffers to store the result.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38042 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-21 17:31:28 +00:00
markster a82143962a Support hold/unhold in Zap, update IAX2 parser to know about modern commands, forward hold/unhold in dial, add hold device state
and implement holding in the SLA.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37318 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-08 02:24:07 +00:00
kpfleming 73c525e6e2 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07 18:54:56 +00:00
kpfleming 21d21f89c0 use string fields for some stuff in ast_channel
const-ify some more APIs
remove 'type' field from ast_channel, in favor of the one in the channel's tech structure
allow string field module users to specify the 'chunk size' for pool allocations
update chan_alsa to be compatible with recent const-ification patches


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9060 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-01 23:05:28 +00:00
russell ab6566173e update doxygen docs to specify authors
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7682 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-30 21:18:06 +00:00
kpfleming 24c1e3c222 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 f38db490-d61c-443f-a65b-d21fe96a405b 2005-11-29 18:24:39 +00:00
kpfleming 615fc64a77 issue #5693
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7058 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-10 23:42:45 +00:00