Commit Graph

203 Commits

Author SHA1 Message Date
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 10:31:25 +00:00
Kevin P. Fleming 448562af93 improve configure script to remember the previous value of each dependency in build_tools/menuselect-deps, so that (once it has been written) menuselect can use this information to warn the user when a previously met dependency is no longer met
along the way, change tags used in configure script, menuselect-deps and code for various dependencies to be consistently named



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 15:07:54 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
Steve Murphy e235a07376 (closes issue #13557)
Reported by: nickpeirson
Patches:
      pbx.c.patch uploaded by nickpeirson (license 579)
      replace_bzero+bcopy.patch uploaded by nickpeirson (license 579)
Tested by: nickpeirson, murf

1. replaced all refs to bzero and bcopy to memset and memmove instead.
2. added a note to the CODING-GUIDELINES
3. add two macros to asterisk.h to prevent bzero, bcopy from creeping
   back into the source
4. removed bzero from configure, configure.ac, autoconfig.h.in




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 14:17:33 +00:00
Michiel van Baak 90751b16ca Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.

This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-28 23:32:14 +00:00
Steve Murphy e74584ca3c (closes issue #13557)
Reported by: nickpeirson

The user attached a patch, but the license is not yet
recorded. I took the liberty of finding and replacing
ALL index() calls with strchr() calls, and that
involves more than just main/pbx.c;

chan_oss, app_playback, func_cut also had calls
to index(), and I changed them out. 1.4 had no
references to index() at all.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 22:21:28 +00:00
Tilghman Lesher 08af5bb312 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Mark Michelson 68bc5b446d Fix a memory leak in chan_oss
(closes issue #13311)
Reported by: eliel
Patches:
      chan_oss.c.patch uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09 10:20:58 +00:00
Luigi Rizzo ff8ad6b497 implement the 'freeze' function for incoming frames;
fix a bug which caused a crash when a videodevice was
specified after startgui=1 in the config file. This also
involves a slightly different method to determine if the
gui is active or not.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-30 15:45:15 +00:00
Luigi Rizzo a768ae2122 implement a 'toggle' option for 'console mute' and 'console unmute'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29 13:02:54 +00:00
Michiel van Baak f1e9371da8 - 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: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:29:54 +00:00
Michiel van Baak 08e674bce0 Pass the hangup cause all the way to the calling app/channel.
(closes issue #11328)
Reported by: rain
Patches:
      20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14)
brought up-to-date to trunk by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-24 22:16:48 +00:00
Russell Bryant 5bd4e32a4c Merged revisions 108796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108796 | russell | 2008-03-14 15:09:22 -0500 (Fri, 14 Mar 2008) | 5 lines

Fix a channel name issue.  chan_oss registers the "Console" channel type,
but it created channels with an "OSS" prefix.

(closes issue #12194, reported by davidw, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 20:09:37 +00:00
Joshua Colp 496adc6fc0 Merged revisions 106235 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:43:22 +00:00
Luigi Rizzo bbbef73276 make get_video_desc() return the active console if
passed a null argument (channel).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 12:13:32 +00:00
Kevin P. Fleming e566f4eda7 eliminiate sound_thread() and other stuff from chan_oss since Asterisk indications can handle it
remove gentone and all the headers containing tones that are no longer needed


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 19:56:29 +00:00
Luigi Rizzo fb487bbc89 remove useless casts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 23:00:55 +00:00
Luigi Rizzo 7a1dcff6a6 Build console_video support by linking in, as opposed to including,
console_video.c

This will ease the task of splitting console_video.c into its components
(V4L and X11 grabbers, various video codecs and packetizers, SDL),
as well as ease future extensions (e.g. additional video sources,
codecs and rendering engines).

For the time being nothing changes for users: video support is off by
default, and requires -DHAVE_VIDEO_CONSOLE on the command line to be included
(if SDL and FFMPEG are available).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-22 18:28:40 +00:00
Luigi Rizzo b7adaa023c add some macros to simplify parsing the config file,
see description in config.h .

They are a variant of the set of macros i used in chan_oss.c,
structured in a way to be more robust to the presence of
spurious ';' - basically, they define wrappers for 'do {'
and '} while (0)', plus some helper functions to deal with simple
cases such as ast_copy_string, ast_malloc, strtoul, ast_true ...

The prefix (CV_ as 'Config Variable') tries to be easy to remember
and has been chosen to not conflict with other existing macros in the tree.

For the time being, I have only updated the three source files in the
tree that used the old M_* macros. Hopefully, more files will be
converted.

NOTE:

    I understand that inventing my own dialect of C is generally wrong;
    however, the lack of adequate support in the language encourages
    lazy programming practices (such as ignoring errors, bounds, etc.)
    and this increases the chance of vulnerability in the code, especially
    because we are parsing user input here.
    Hopefully, these macros and the use of ast_parse_arg (in config.h)
    should encourage the programmer to write more robust code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 12:56:07 +00:00
Luigi Rizzo 4a3c4095ba surprising as it may be, chan_oss compiles correctly under cygwin as well,
provided you look for soundcard.h in the right place...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 22:38:48 +00:00
Kevin P. Fleming 01f8a6959b make the configure script detect that it is running on a Windows platform, and report that information so that menuselect can use it (all information that is used to decide whether to build modules or not must be fed to menuselect so the user knows what will be built and why... don't make module build decisions in the makefiles, please)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 17:11:06 +00:00
Luigi Rizzo d5b6ce0d6d remove some redundant headers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-15 00:11:04 +00:00
Luigi Rizzo 1a38b870cd put in the necessary hooks for video support in the console.
This is a NOP as far as the current code is concerned,
but there is already support in ./configure and the
Makefiles for the various libraries used by console_video.c
(not yet in the tree) so addition is trivial.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-23 15:54:13 +00:00
Luigi Rizzo 7e8835e0d7 remove another set of redundant #include "asterisk/options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:24:55 +00:00
Luigi Rizzo 0595b5e2aa include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 18:52:04 +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
Luigi Rizzo e6e98982c9 move the inner part of config file parsing to a separate function,
so it can be reused in the implementation of cli commands when
they have a similar syntax.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 09:51:41 +00:00
Luigi Rizzo 7f8ecd2cd3 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: https://origsvn.digium.com/svn/asterisk/trunk@89268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 13:18:40 +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
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00
Joshua Colp d5eda8709c Merged revisions 79174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79174 | file | 2007-08-13 11:18:04 -0300 (Mon, 13 Aug 2007) | 4 lines

(closes issue #10437)
Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:22:46 +00:00
Joshua Colp 22114b509d Add support for using epoll instead of poll. This should increase scalability and is done in such a way that we should be able to add support for other poll() replacements.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 21:44:58 +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
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
Steve Murphy 901413c76c Merged revisions 61644 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r61644 | murf | 2007-04-13 11:01:02 -0600 (Fri, 13 Apr 2007) | 1 line

A fix for chan_oss that resulted from the CDR changes; it helps to use the right info.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-13 17:11:53 +00:00
Steve Murphy ecaf781933 Merged revisions 60989 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r60989 | murf | 2007-04-09 12:32:07 -0600 (Mon, 09 Apr 2007) | 1 line

This is a big improvement over the current CDR fixes. It may still need refinement, but this won't have as many folks bothered.
This also adds the mods from 1.4/r.61136;
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10 05:41:34 +00:00
Kevin P. Fleming 74f31a51bc add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in #if expressions will be caught
convert various #if expressions to #ifdef for macros that may not be defined (and where the value is not important)
Note: two of these changes are in bison generated files which is going to be inconvenient when they are regenerated


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 15:03:42 +00:00
Joshua Colp ee3ab150f6 Merged revisions 51788 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51788 | file | 2007-01-23 17:46:31 -0500 (Tue, 23 Jan 2007) | 2 lines

Update channel drivers to use module referencing so that unloading them while in use will not result in crashes. (issue #8897 reported by junky)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23 22:59:55 +00:00
Russell Bryant dcca8f345f Merged revisions 51311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51311 | russell | 2007-01-19 11:49:38 -0600 (Fri, 19 Jan 2007) | 23 lines

Merge the changes from the /team/group/vldtmf_fixup branch.

The main bug being addressed here is a problem introduced when two SIP
channels using SIP INFO dtmf have their media directly bridged.  So, when a
DTMF END frame comes into Asterisk from an incoming INFO message, Asterisk
would try to emulate a digit of some length by first sending a DTMF BEGIN
frame and sending a DTMF END later timed off of incoming audio.  However,
since there was no audio coming in, the DTMF_END was never generated.  This
caused DTMF based features to no longer work.

To fix this, the core now knows when a channel doesn't care about DTMF BEGIN
frames (such as a SIP channel sending INFO dtmf).  If this is the case, then
Asterisk will not emulate a digit of some length, and will instead just pass
through the single DTMF END event.

Channel drivers also now get passed the length of the digit to their digit_end
callback.  This improves SIP INFO support even further by enabling us to put
the real digit duration in the INFO message instead of a hard coded 250ms.
Also, for an incoming INFO message, the duration is read from the frame and
passed into the core instead of just getting ignored.

(issue #8597, maybe others...)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-19 18:06:03 +00:00
Tilghman Lesher b3288f79fe Feature: allow soundcard to be used in both modes (autoanswer and not),
selectable by how it is called in the dialplan.  This allows a speaker
system hooked up to the soundcard to be used for both ring notification,
as well as paging.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-15 02:28:32 +00:00
Russell Bryant 1f8001e816 Convert various comments to doxygen format.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-29 13:25:07 +00:00
Russell Bryant ad8a480085 Merged revisions 48948 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48948 | russell | 2006-12-24 16:19:37 -0500 (Sun, 24 Dec 2006) | 3 lines

Fix a typo in an error message that indicated that the MGCP channel type could
not be registered, instead of the correct type, OSS.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-24 21:21:21 +00:00
Russell Bryant ec8591d04c Constify a bunch of usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:35:31 +00:00
Luigi Rizzo 34ec231da7 prevent the sound thread from consuming all the available CPU
doing busy-wait on the output audio device.
As it is set now, it tries to push a frame every 10ms,
which is still too frequent but avoids deep restructuring
of the code (which i should do, though).

Note, this is only for ring tones, regular audio coming
from the network is still delivered as soon as it is
available.

Eventually this could well end up in the 1.4 branch, but
since i am probably the only user of chan_oss there isn't
much urgency to do that.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-18 08:19:41 +00:00
Luigi Rizzo b55e30b075 remove an unused function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 11:31:55 +00:00
Luigi Rizzo 779f4c0e0a use the regexp cli support on some of the command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 11:15:54 +00:00
Luigi Rizzo 24c241c5a9 convert two entries to new style
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 23:05:50 +00:00
Luigi Rizzo 2c9643d49f convert some handlers to new style.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 22:44:29 +00:00
Luigi Rizzo a63d971afc fix indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 22:03:27 +00:00
Luigi Rizzo 7dab91258a fix indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 17:40:09 +00:00
Steve Murphy 908f176cf3 A fair number of changes for the sake of bug 7506
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 21:47:49 +00:00
Luigi Rizzo fe28cd213b remove old/useless usecount management code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 17:58:49 +00:00
Kevin P. Fleming 3c876af5cf Merged revisions 44378 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines

update thread creation code a bit
reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space
add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 19:51:38 +00:00
Joshua Colp 794d34f90c Merged revisions 43456 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43456 | file | 2006-09-21 18:21:40 -0400 (Thu, 21 Sep 2006) | 2 lines

Some more clean up in the load function for chan_oss (issue #8002 reported by Mithraen with minor mods by moi)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 22:23:30 +00:00
Tilghman Lesher 6ae8741518 Lots more removal of deprecated things
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:59:12 +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 ac9e94d0ee Formatting fixes for chan_oss (issue #7808 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 03:51:26 +00:00
Matt O'Gorman 05a695af72 everything that loads a config that needs a config file to run
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it 
had a non static function when it should.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00:20 +00:00
Joshua Colp c6977b9983 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: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 01:59:02 +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
Russell Bryant 9f9a5f1984 move the calls to ast_jb_configure() to before the PBX thread is started on the
channel to remove the theoretical race condition that the channel could get
bridged before the channel's jitterbuffer gets configured.  This was pointed
out by PCadach on IRC.  Thanks!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 03:43:47 +00:00
Luigi Rizzo d0ef036696 fix uninitialized variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 11:45:06 +00:00
Kevin P. Fleming 6d0742fc16 merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 20:44:39 +00:00
Joshua Colp c56acadf7f Merged revisions 36998 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r36998 | file | 2006-07-05 11:31:01 -0400 (Wed, 05 Jul 2006) | 2 lines

Spell extension correctly in documentation for chan_oss dial (issue #7487 reported by flefoll)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 15:33:43 +00:00
Russell Bryant 73e8e2ab1f Blocked revisions 36725 via svnmerge
........
r36725 | russell | 2006-07-03 00:19:09 -0400 (Mon, 03 Jul 2006) | 4 lines

use ast_set_callerid to be more consistent and to make sure that the
"callerid" option in the conf files is always handled the same way and sets ANI
(issue #7285, gkloepfer)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 04:25:21 +00:00
Russell Bryant c8ceb92a4f revert my changes that converted the jb on the channel to be dynamically
allocated. These changes caused crashes when using a channel type that did
not support the jitterbuffer. Instead of fixing why it's crashing, I'm going
to implement this in a better way next week. The way I did it caused a
jitterbuffer to be allocated on every channel where the channel type supported
jitterbuffers, even if they were disabled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 16:49:12 +00:00
Russell Bryant 46018d5032 - dynamically allocate the ast_jb structure that is on the channel structure
so that channels not using a jitterbuffer don't waste as much memory
- ensure that the channel drivers that use jitterbuffers can handle a failure
  from configuring a jitterbuffer on a new channel because of a memory
  allocation error
- On passing through these channel drivers, configure the jitterbuffer before
  starting the PBX thread instead of afterwards. If the pbx fails to start for
  whatever reason, this would have caused a crash.
- Also on passing, move the increase of the usecount to after all of the
  possible failure conditions in the function
- fix a place where ast_update_use_count() was not called
- ensure that the owner channel pointer of the channel pvt strcutures is set to
  NULL in failure conditions


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 17:05:17 +00:00
Kevin P. Fleming 472c1ca282 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Russell Bryant 4c76028de9 - add the ability to configure forced jitterbuffers on h323, jingle,
and mgcp channels
- remove the jitterbuffer configuration from the pvt structures in
  the sip, zap, and skinny channel drivers, as copying the same global
  configuration into each pvt structure has no benefit.
- update and fix some typos in jitterbuffer related documentation
(issue #7257, north, with additional updates and modifications)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 16:47:28 +00:00
Russell Bryant 414106a3a6 move the includes of abstract_jb.h to be with the rest of the asterisk includes.
These used to be wrapped in a #ifdef


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 17:29:12 +00:00
Russell Bryant bb7dd96cfe Add support for using a jitterbuffer for RTP on bridged calls. This includes
a new implementation of a fixed size jitterbuffer, as well as support for the
existing adaptive jitterbuffer implementation. (issue #3854, Slav Klenov)

Thank you very much to Slav Klenov of Securax and all of the people involved
in the testing of this feature for all of your hard work!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 16:56:50 +00:00
Kevin P. Fleming fdcfd6469b ensure that control frames with payload can be sent to channel drivers via ->indicate()
update iax2_indicate to pass control frame payload to the connected channel
add an API call for sending an indication with payload, and use it for control frames with payload


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 12:24:11 +00:00
Mark Spencer db502da870 Make menuselect be able to show what the modules are
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:44:50 +00:00
Kevin P. Fleming 0adfa8c635 use proper method of detecting OSS support on Linux and FreeBSD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 17:49:50 +00:00
Kevin P. Fleming 574e14cbea Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:11:45 +00:00
Luigi Rizzo e43bc6634d This rather large commit changes the way modules are loaded.
As partly documented in loader.c and include/asterisk/module.h,
modules are now expected to return all of their methods and flags
into a structure 'mod_data', and are normally loaded with RTLD_NOW
| RTLD_LOCAL, so symbols are resolved immediately and conflicts
should be less likely.  Only in a small number of cases (res_*,
typically) modules are loaded RTLD_GLOBAL, so they can export
symbols.
 
The core of the change is only the two files loader.c and
include/asterisk/module.h, all the rest is simply adaptation of the
existing modules to the new API, a rather mechanical (but believe
me, time and finger-consuming!) process whose detail you can figure
out by svn diff'ing any single module.

Expect some minor compilation issue after this change, please
report it on mantis http://bugs.digium.com/view.php?id=6968
so we collect all the feedback in one place.

I am just sorry that this change missed SVN version number 20000!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 14:08:19 +00:00
Kevin P. Fleming f10f427d49 since the module API is changing, it's a good time to const-ify the description() and key() return values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:01:19 +00:00
Luigi Rizzo c163911efe don't use 8000, use DEFAULT_SAMPLE_RATE
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:45:43 +00:00
Luigi Rizzo 096bf1511f another batch of cli simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 23:33:02 +00:00
Luigi Rizzo bf2ae44338 fix documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 13:23:05 +00:00
Matthew Fredrickson c344781c4b Add boost gain option to microphone, also minor bug fixes (#6388)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 23:19:05 +00:00
Matt O'Gorman 5f0de64f78 Merged revisions 9232 via svnmerge from
https://svn.digium.com/svn/asterisk/branches/1.2

........
r9232 | mogorman | 2006-02-08 16:12:34 -0600 (Wed, 08 Feb 2006) | 4 lines

Make logger report error,warning,notice if logger.conf
not found, also updated chan_oss to give correct
error message if its config file is not found.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 23:14:17 +00:00
Kevin P. Fleming a16ae226b6 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: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 23:05:28 +00:00
Russell Bryant 6f71e1178e constify arguments in more places where strings should not be modified (issue #6286)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 22:17:31 +00:00
Russell Bryant 466a062b09 convert some channels to use the memory allocation wrappers.
(This is being added to the janitor projects list.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 01:20:29 +00:00
Russell Bryant a725468381 update doxygen docs to specify authors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 21:18:06 +00:00
Kevin P. Fleming 2c65582b66 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Russell Bryant 3cb060d80f issue #5800
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 01:11:40 +00:00
Russell Bryant c9ceb15e1e fix a lil' typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-12 23:44:16 +00:00
Russell Bryant 31a804b97c issue #5605
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-06 15:09:47 +00:00
Mark Spencer a67c2702c5 Fix chan_oss buglets (bug #5618)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-06 04:44:19 +00:00
Russell Bryant 9ddf0e4dce Remove unnecessary checks before calls to ast_strlen_zero. Also, change
some places where strlen is used instead of ast_strlen_zero


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-27 02:19:37 +00:00
Russell Bryant 3453e3efa5 Doxygen documentation update from oej (issue #5505)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24 20:12:06 +00:00
Mark Spencer f5a38b3871 Make alsa/oss ignore VIDUPDATE control frames
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-16 16:05:41 +00:00
Mark Spencer 266529a503 Fix "console" help (thanks to Andy Dvorak)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-27 00:55:55 +00:00
Kevin P. Fleming 5da915dcfd update MANY more files with proper copyright/license info (thanks Ian!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14 20:46:50 +00:00
Mark Spencer f08acd7b45 Fix newline issue (bug #4632)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-05 21:44:19 +00:00
Mark Spencer d8a7545a82 Fix documentation of overridecontext (bug #4379)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-03 19:58:34 +00:00