dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

27 Commits

Author SHA1 Message Date
dvossel c9a36282b5 Introduction of the JITTERBUFFER dialplan function.
Review: https://reviewboard.asterisk.org/r/1157/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@314509 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-20 20:52:15 +00:00
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
twilson 604460d842 Merged revisions 297312 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r297312 | twilson | 2010-12-02 12:13:49 -0600 (Thu, 02 Dec 2010) | 28 lines
  
  Merged revisions 297311 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r297311 | twilson | 2010-12-02 12:07:39 -0600 (Thu, 02 Dec 2010) | 21 lines
    
    Merged revisions 297310 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r297310 | twilson | 2010-12-02 12:00:27 -0600 (Thu, 02 Dec 2010) | 12 lines
      
      Initialize offset for adaptive jitter buffer
      
      When the adaptive jitter buffer is enabled in sip.conf, the first frame placed
      in the jitter buffer fails with something like:
      
      jb_warning_output: Resyncing the jb. last_delay 0, this delay -215886466,
      threshold 1000, new offset 215886466
      
      This happens because the offset is not initialized before calling jb_put(). This
      patch modifies jb_put_first_adaptive() to set the offset to the frame's
      timestamp.
    
      Review: https://reviewboard.asterisk.org/r/1041/
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@297356 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-02 18:28:50 +00:00
jpeeler d17a1065fa Fix jitterbuffer logging not creating logfiles.
Three changes made here:
1) Do not fail if a previous log does not exist (in fact, this is probably
expected).
2) Ensure that the file descriptor to write to gets assigned properly. I am at
a loss as to why assigning safe_fd outside the if fixes this, but it makes
the if statement slightly less complicated anyway.
3) Move up the failure message so that the errno of the failure is not
overwritten by fclose.

(closes issue #16917)
Reported by: Artem


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@251631 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10 18:25:18 +00:00
dvossel 3b12e80473 fixes adaptive jitterbuffer configuration
When configuring the adaptive jitterbuffer, the target_extra
value not only could not be set from the configuration, but was
not even being set to its proper default.  This value is required
in order for the adaptive jitterbuffer to work correctly.  To resolve
this a config option has been added to expose this value to the conf
files, and a default value is provided when no config specific value
is present.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249893 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02 19:08:38 +00:00
file 4286b8c9d8 Merged revisions 228409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r228409 | file | 2009-11-06 12:41:20 -0400 (Fri, 06 Nov 2009) | 7 lines
  
  Fix a bug caused by a partially invalid frame (from the jitterbuffer) passing through the Asterisk core.
  
  (closes issue #15560)
  Reported by: jvandal
  (closes issue #15709)
  Reported by: covici
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@228410 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06 16:42:23 +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
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
tilghman e2aa86b3e0 Spacing changes only
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180259 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-04 20:48:42 +00:00
tilghman 5bb40c4b51 Create logfile safely.
(closes issue #14160)
 Reported by: tzafrir
 Patches: 
       20090104__bug14160.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170307 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22 21:25:46 +00:00
seanbright 8cb986b936 Another big chunk of changes from the RSW branch. Bunch of stuff from main/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137082 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10 19:35:50 +00:00
mmichelson 18d060ec8d Merged revisions 135841,135847,135850 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135841 | mmichelson | 2008-08-05 19:25:10 -0500 (Tue, 05 Aug 2008) | 27 lines

Merging the issue11259 branch.

The purpose of this branch was to take into account
"burps" which could cause jitterbuffers to misbehave.
One such example is if the L option to Dial() were used
to inject audio into a bridged conversation at regular
intervals. Since the audio here was not passed through
the jitterbuffer, it would cause a gap in the jitterbuffer's
timestamps which would cause a frames to be dropped for a 
brief period.

Now ast_generic_bridge will empty and reset the jitterbuffer
each time it is called. This causes injected audio to be handled
properly.

ast_generic_bridge also will empty and reset the jitterbuffer
if it receives an AST_CONTROL_SRCUPDATE frame since the change
in audio source could negatively affect the jitterbuffer.

All of this was made possible by adding a new public API call
to the abstract_jb called ast_jb_empty_and_reset.

(closes issue #11259)
Reported by: plack
Tested by: putnopvut


........
r135847 | mmichelson | 2008-08-05 19:27:54 -0500 (Tue, 05 Aug 2008) | 4 lines

Revert inadvertent changes to app_skel that occurred when
I was testing for a memory leak


........
r135850 | mmichelson | 2008-08-05 19:29:54 -0500 (Tue, 05 Aug 2008) | 3 lines

Remove properties that should not be here


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135851 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-06 00:30:53 +00:00
bbryant 8e222897e6 Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054)
Reported by: pabelanger
Patches:
      ARRAY_LEN.patch2 uploaded by pabelanger (license 224)
Tested by: seanbright


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130129 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-11 18:09:35 +00:00
tilghman ba5ec156c0 Merged revisions 121861 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121861 | tilghman | 2008-06-11 13:18:16 -0500 (Wed, 11 Jun 2008) | 3 lines

Make calls to ast_assert() actually test something, so that the error message
printed is not nonsensical (reported by mvanbaak via #asterisk-bugs).

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121867 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-11 18:19:24 +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
russell cb7fdf2ae2 Merged revisions 116463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines

Add ast_assert(), which can be used to handle fatal errors.  It is only compiled
in if dev-mode is enabled, and only aborts if DO_CRASH is defined.
(inspired by issue #12650)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@116469 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14 21:40:43 +00:00
oej 21363e1a63 Doxygen updates
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99464 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-22 08:58:46 +00:00
russell b61a98675c Merged revisions 98943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98943 | russell | 2008-01-15 17:26:52 -0600 (Tue, 15 Jan 2008) | 25 lines

Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.

The issue here is that it is possible for an instance of a translator to get
destroyed while the frame allocated as a part of the translator is still being
processed.  Specifically, this is possible anywhere between a call to ast_read()
and ast_frame_free(), which is _a lot_ of places in the code.  The reason this
happens is that the channel might get masqueraded during this time.  During a
masquerade, existing translation paths get destroyed.

So, this patch fixes the issue in an API and ABI compatible way.  (This one is
 for you, paravoid!)

It changes an int in ast_frame to be used as flag bits.  The 1 bit is still used
to indicate that the frame contains timing information.  Also, a second flag has
been added to indicate that the frame came from a translator.  When a frame with
this flag gets released and has this flag, a function is called in translate.c to
let it know that this frame is doing being processed.  At this point, the flag gets
cleared.  Also, if the translator was requested to be destroyed while its internal
frame still had this flag set, its destruction has been deffered until it finds out
that the frame is no longer being processed.

Admittedly, this feels like a hack.  But, it does fix the issue, and I was not able 
to think of a better solution ...

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98944 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15 23:31:53 +00:00
file 71d61e3829 Fix a few log messages.
(closes issue #11396)
Reported by: IgorG
Patches:
      spell.v1.diff uploaded by IgorG (license 20)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89981 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 15:38:03 +00:00
rizzo de2db05332 remove a bunch of useless #include "options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:09:02 +00:00
rizzo 0cc47e4221 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 19:09:03 +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
rizzo ea0d4674a6 make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, 
and catched a few instances where this was actually done.

Given the differences between trunk and 1.4 (and the fact that this
is effectively an API change) it is better to fix 1.4 independently.
These are

chan_sip.c::sip_register()
chan_skinny.c:: near line 2847
config.c:: near line 1774
logger.c::make_components()
res_adsi.c:: near line 1049

I may have missed some instances for modules that do not build here.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 13:18:40 +00:00
russell 4f3c4dc7f2 Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak)

Basically, this changes ...

if (option_verbose > 2)
   ast_verbose(VERBOSE_PREFIX_3, "Something\n");

to ...

ast_verb(3, "Something\n");


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26 15:49:18 +00:00
file cd15e6156e Cosmetic changes. Make main source files better conform to coding guidelines and standards. (issue #8679 reported by johann8384)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51486 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23 00:11:32 +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
kpfleming 8b0c007ad9 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21 02:11:39 +00:00