Commit Graph

35 Commits

Author SHA1 Message Date
Russell Bryant 75e602376b Merged revisions 94828-94829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94828 | russell | 2007-12-27 08:33:21 -0600 (Thu, 27 Dec 2007) | 9 lines

Change ast_translator_best_choice() to only pay attention to audio formats.
This fixes a problem where Asterisk claims that a translation path can not be
found for channels involving video.

(closes issue #11638)
Reported by: cwhuang
Tested by: cwhuang
Patch suggested by cwhuang, with some additional changes by me.

........
r94829 | russell | 2007-12-27 08:44:29 -0600 (Thu, 27 Dec 2007) | 2 lines

Use the constant that I really meant to use here ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 14:52:07 +00:00
Jason Parker c18ca36147 Merged revisions 93381 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93381 | qwell | 2007-12-17 16:45:57 -0600 (Mon, 17 Dec 2007) | 4 lines

What was I thinking when I wrote this masterpiece?

-1 + 1 = 0..  who woulda thunk it?.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 22:50:49 +00:00
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:09:02 +00:00
Joshua Colp 5e4e4c5594 Minor documentation tweak and if an incorrect parameter is given to core show translation return the usage information.
(closes issue #11316)
Reported by: eliel
Patches:
      translate.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 15:00:41 +00:00
Luigi Rizzo 9335ace850 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 19:09:03 +00:00
Luigi Rizzo 1e6489a175 trim more redundant headers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 16:18:53 +00:00
Luigi Rizzo fdb7f7ba3d 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: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Kevin P. Fleming edc78d6023 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: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:28:47 +00:00
Tilghman Lesher 7c56918262 Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits.
 - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution.
   (This doesn't affect anything immediately, until another codec has wb support.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:51:48 +00:00
Jason Parker ebe4050128 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 20:05:18 +00:00
Jason Parker b0f3e6097e Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 18:29:40 +00:00
Russell Bryant e97a723cf1 Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)
(closes issue #10724)
Reported by: eliel
Patches: 
      chan_skinny.c.patch uploaded by eliel (license 64)
      chan_oss.c.patch uploaded by eliel (license 64)
      chan_mgcp.c.patch2 uploaded by eliel (license 64)
      pbx_config.c.patch uploaded by seanbright (license 71)
      iax2-provision.c.patch uploaded by eliel (license 64)
      chan_gtalk.c.patch uploaded by eliel (license 64)
      pbx_ael.c.patch uploaded by seanbright (license 71)
      file.c.patch uploaded by seanbright (license 71)
      image.c.patch uploaded by seanbright (license 71)
      cli.c.patch uploaded by moy (license 222)
      astobj2.c.patch uploaded by moy (license 222)
      asterisk.c.patch uploaded by moy (license 222)
      res_limit.c.patch uploaded by seanbright (license 71)
      res_convert.c.patch uploaded by seanbright (license 71)
      res_crypto.c.patch uploaded by seanbright (license 71)
      app_osplookup.c.patch uploaded by seanbright (license 71)
      app_rpt.c.patch uploaded by seanbright (license 71)
      app_mixmonitor.c.patch uploaded by seanbright (license 71)
      channel.c.patch uploaded by seanbright (license 71)
      translate.c.patch uploaded by seanbright (license 71)
      udptl.c.patch uploaded by seanbright (license 71)
      threadstorage.c.patch uploaded by seanbright (license 71)
      db.c.patch uploaded by seanbright (license 71)
      cdr.c.patch uploaded by moy (license 222)
      pbd_dundi.c.patch uploaded by moy (license 222)
      app_osplookup-rev83558.patch uploaded by moy (license 222)
      res_clioriginate.c.patch uploaded by moy (license 222)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11 19:03:06 +00:00
Matthew Fredrickson 32c5558676 Let's use process time instead of wall clock time for show translation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-29 00:19:15 +00:00
Steve Murphy 337c44236d This change set fixes bug 8126 in trunk. It is implemented via compile time options, activated via the menuselect stuff, which defaults to the old way. non-zero sample data added. Translate tables expressed in microseconds instead of milliseconds, with 5-digit data now instead of 3, giving 2 more digits of precision.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-20 22:53:48 +00:00
Russell Bryant f8483a0d04 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: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Luigi Rizzo a1a5701821 change the debug level to 3 for an exceedingly annoying message
(3-deep nested loop)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-25 14:13:17 +00:00
Russell Bryant 80166c6de8 Conversions to ast_debug()
(issue #9984, patches from eliel and dimas)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24 18:51:41 +00:00
Tilghman Lesher 9d05ff8ed5 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:20:11 +00:00
Joshua Colp a07d04cc02 Merged revisions 67631 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67631 | file | 2007-06-06 09:18:39 -0400 (Wed, 06 Jun 2007) | 2 lines

Fix plc_samples warning when registering a translator. (issue #9897 reported by xylome)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 13:20:38 +00:00
Jason Parker 4aaa1d1ec1 Merged revisions 65877 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r65877 | qwell | 2007-05-24 11:14:02 -0400 (Thu, 24 May 2007) | 4 lines

Fix handling of zero-length frames when a codec is capable of native PLC.

Issue 9183, patch by Mihai.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 15:28:29 +00:00
Luigi Rizzo c1220dd27e convert ast_build_str to ast_str_*
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-16 09:46:20 +00:00
Russell Bryant 17a2888d2e Staticize one, and Constify a bunch of usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:28:56 +00:00
Steve Murphy 6d270eacf4 This fix inspired by a patch supplied in bug 8189, which points out problems with the PLC code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-24 17:40:49 +00:00
Joshua Colp 8d1d9b0610 Convert translation core linked list over to read/write based one, since it spends most of it's time only reading.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 18:01:10 +00:00
Kevin P. Fleming 39a4700047 Merged revisions 46714 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46714 | kpfleming | 2006-10-31 15:47:48 -0600 (Tue, 31 Oct 2006) | 2 lines

add an API so that translators can activate/deactivate themselves when needed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 22:19:08 +00:00
Jason Parker 8b9ef26a45 Fix "core show translation" output. Issue #8243, patch by Damin.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 22:07:18 +00:00
Russell Bryant 94c9db95b1 Merged revisions 46554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46554 | russell | 2006-10-31 00:55:07 -0500 (Tue, 31 Oct 2006) | 5 lines

Add a small tweak to the code that checks to see whether destination formats
are translatable based on the source format.  If we have already determined
that there is no translation path in one direction, don't bother checking the
other direction.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 06:10:59 +00:00
Kevin P. Fleming 7afa6a1d01 Merged revisions 46526 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46526 | kpfleming | 2006-10-30 16:19:55 -0600 (Mon, 30 Oct 2006) | 3 lines

when unregistering a translator, don't rebuild the translation matrix unless needed
when filtering formats out of an offer, ensure we check for translation ability in both directions

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 22:27:56 +00:00
Russell Bryant 192a93aa37 Merged revisions 46329 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46329 | russell | 2006-10-26 11:31:05 -0500 (Thu, 26 Oct 2006) | 11 lines

- If the source has no audio or no video portion, do not call powerof() to
  get the format index.
- Don't run through the audio and video loops if there is no audio or video
  portion of the source
If 0 is passed to powerof, it will return -1.  This value of -1 was then being
used as an array index in these loops, which caused a crash on some systems.
Other than this issue, this code works as we expected it to.  If a format is
not in the source, and we have to translation path to it, it is not offered in
the list of acceptable destination formats.
(fixes issue #8231)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 16:35:34 +00:00
Kevin P. Fleming 5f5faa310a Merged revisions 46082-46083,46152-46153 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46082 | kpfleming | 2006-10-23 22:45:42 -0500 (Mon, 23 Oct 2006) | 2 lines

add an API call to allow channel drivers to determine which media formats are compatible (passthrough or transcode) with the format an existing channel is already using

........
r46083 | kpfleming | 2006-10-23 22:53:32 -0500 (Mon, 23 Oct 2006) | 2 lines

ensure that the translation matrix is properly lock-protected every place it is used

........
r46152 | kpfleming | 2006-10-24 18:45:19 -0500 (Tue, 24 Oct 2006) | 2 lines

if multiple translators are registered for the same source/dest combination, ensure that the lowest-cost one is always inserted earlier in the list

........
r46153 | kpfleming | 2006-10-24 19:10:54 -0500 (Tue, 24 Oct 2006) | 2 lines

code zone experiment: don't offer formats in the outbound INVITE that aren't either passthrough or translatable

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:55:11 +00:00
Kevin P. Fleming 88efcea05e Merged revisions 46154 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46154 | kpfleming | 2006-10-24 19:26:17 -0500 (Tue, 24 Oct 2006) | 2 lines

add passthrough and file format support for G.722 16KHz audio (issue #5084, original patch by andrew, updated by mithraen)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 00:32:23 +00:00
Tilghman Lesher 2b55678e1f Remove deprecated CLI apps from the core
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:17:39 +00:00
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Joshua Colp 11b5db3d61 Clarify what show translations is displaying a bit more (issue #7772 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 16:04:24 +00:00
Kevin P. Fleming 0a27d8bfe5 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00