dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

68 Commits

Author SHA1 Message Date
lmadsen e73cab2f3f Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328259 f38db490-d61c-443f-a65b-d21fe96a405b
2011-07-14 20:28:54 +00:00
kpfleming a2c426f29f Last batch of 'static' qualifiers for module-level global variables.
Fix up modules in the 'apps' directory, and also correct the bad example of
enum definitions in include/asterisk/app.h, which many developers followed
(thanks for reading the documentation!). In addition, add some basic usage
examples of the 'pahole' and 'pglobal' tools to the coding guidelines.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200656 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15 19:10:10 +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 58c677376b app_read does not break from prompt loop with user terminated empty string
In app.c, ast_app_getdata is called to stream the prompts and receive DTMF input.  If ast_app_getdata() receives an empty string caused by the user inputing the end of string character, in this case '#', it should break from the prompt loop and return to app_read, but instead it cycles through all the prompts.  I've added a return value for this special case in ast_readstring() which uses an enum I've delcared in apps.h.  This enum is now used as a return value for ast_app_getdata().

(closes issue #14279)
Reported by: Marquis
Patches:
	fix_app_read.patch uploaded by Marquis (license 32)
	read-ampersanmd.patch2 uploaded by dvossel (license 671)
Tested by: Marquis, dvossel
Review: http://reviewboard.digium.com/r/177/




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180032 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 23:21:18 +00:00
russell 1f57cd4e51 Merge a large set of updates to the Asterisk indications API.
This patch includes a number of changes to the indications API.  The primary
motivation for this work was to improve stability.  The object management
in this API was significantly flawed, and a number of trivial situations could
cause crashes.

The changes included are:

1) Remove the module res_indications.  This included the critical functionality
   that actually loaded the indications configuration.  I have seen many people
   have Asterisk problems because they accidentally did not have an
   indications.conf present and loaded.  Now, this code is in the core,
   and Asterisk will fail to start without indications configuration.

   There was one part of res_indications, the dialplan applications, which did
   belong in a module, and have been moved to a new module, app_playtones.

2) Object management has been significantly changed.  Tone zones are now
   managed using astobj2, and it is no longer possible to crash Asterisk by
   issuing a reload that destroys tone zones while they are in use.

3) The API documentation has been filled out.

4) The API has been updated to follow our naming conventions.

5) Various bits of code throughout the tree have been updated to account
   for the API update.

6) Configuration parsing has been mostly re-written.

7) "Code cleanup"

The code is from svn/asterisk/team/russell/indications/.

Review: http://reviewboard.digium.com/r/149/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176627 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 20:41:24 +00:00
russell d056b18a40 Merged revisions 168561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines

Revert unnecessary indications API change from rev 122314

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168562 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13 19:22:13 +00:00
eliel 50b9863fdb - Add Read() application XML documentation.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154507 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 11:26:40 +00:00
tilghman d1cc29c9c1 Modify TIMEOUT() to be accurate down to the millisecond.
(closes issue #10540)
 Reported by: spendergrass
 Patches: 
       20080417__bug10540.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115076 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-01 23:06:23 +00:00
rizzo e8a5f98fe8 shuffle a little bit the content of header files to reduce dependencies.
In this commit:
- move the ast_register/unregister_app functions to module.h
  to avoid the need to include pbx.h for the simpler apps;
- move the ast_group structure to channel.h to remove the
  dependency of app.h on linkedlists.h

Note, this is a long process that I am doing in small steps.

The main difficulty is that now for each subsystem we
have a single header (e.g. channel.h) included by the subsystem
provider (usually one file, e.g. channel.c) and by its clients
(dozens of them, e.g. we have some 70+ apps and 30+ functions).

This requires the clients to include all the extra headers
required by the provider (eg. lock.h, linkedlists.h, definitions
of substructures...) even though many of the clients would be
just happy with opaque struct declarations and function prototypes.

The long term plan is to eventually rectify this structure
so that the compilation can become faster, and also APIs
are more stable.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89522 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 03:50:04 +00:00
rizzo c94efd7d1e remove redundant headers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89518 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 01:39:06 +00:00
rizzo 150b2c22ef remove another set of redundant #include "asterisk/options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:24:55 +00:00
tilghman 21981c69ae Change Read to set READSTATUS as an indication of the result
Also, some cleanup to CHANGES.
Reported by: michael-fig
Patch by: michael-fig,tilghman
(Closes issue #11004)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89489 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 18:38:18 +00:00
rizzo 9cf442d7f7 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: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 18:52:04 +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
mmichelson a2965486cc Fixing app_read so that if a timeout of less than 1 ms is specified,
assume that 1 ms is desired.

(closes issue #11000, reported and patched by michael-fig, with a warning line added by me)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85965 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-16 21:38:05 +00:00
tilghman 356721a45c Mostly cleanup of documentation to substitute the pipe with the comma, but a few other formatting cleanups, too.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31 01:10:47 +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 d17ff1ea42 Applications no longer need to call ast_module_user_add and ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16 14:39:29 +00:00
file 9e24ed5ccf It is no longer required for each module that deals with a channel to call ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16 13:35:20 +00:00
rizzo 1b4ffa5248 rename the structs struct tone_zone_sound and struct tone_zone
defined in indications.h to ind_tone_zone_sound and ind_tone_zone,
to avoid conflicts with the structs with the same names
defined in tonezone.h

Hope i haven't missed any instance.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48958 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-25 06:38:09 +00:00
russell b5963fa342 Add the ability to specify multiple prompts to the Read() dialplan application,
similar to Background() and Playback().
(issue #7897, jsmith, with some modifications)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47408 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-10 03:59:48 +00:00
murf 6c89612673 As per ToDo list, I have made it so that Wait(), WaitExten(), Congestion(), Busy(), Read(), WaitForRing(), will now either actually handle a floating point argument as advertised, or has been upgraded to accept a floating point [timeout] arg.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44435 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-05 01:40:06 +00:00
file e23dc303bc Minor cleanup and make sure the tmp variable is clean
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42298 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-07 18:54:36 +00:00
file 4eec1a091b Set the variable even if the caller disconnects (issue #7896 reported by jsmith)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42262 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-07 16:40:15 +00:00
murf 295a02c1ab These small app documentation changes to app_dial and app_read will hopefully avert any more 7544 type bug reports\!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42111 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-06 17:14:50 +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
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
russell d99b677f35 remove almost all of the checks of the result from ast_strdupa() or alloca().
As it turns out, all of these checks were useless, because alloca will never
return NULL.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26451 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-10 13:22:15 +00:00
rizzo 3664249356 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: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14 14:08:19 +00:00
kpfleming e4880150b1 since the module API is changing, it's a good time to const-ify the description() and key() return values
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08 22:01:19 +00:00
russell c72e5e1b38 remove the uses of the deprecated STANDARD_LOCAL_USER
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10241 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-15 20:11:56 +00:00
russell 252fb982f4 on this pass, only remove duplicate log messages
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8403 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21 20:57:06 +00:00
russell b14bdc5a12 revert my pass through the tree to remove checks of the result of ast_strdupa
(revisions 8378 through 8381)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8387 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21 17:50:04 +00:00
russell 3f2c7248c6 remove lots of useless checks of the result of ast_strdupa
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8379 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21 08:13:12 +00:00
mogorman a2675c0d34 oops minor formatting fixes, and taking out
debug message.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7821 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-05 21:04:06 +00:00
mogorman a35b84bd06 Added feature from bug #5573 and updated app_read
to be able to use indication tones, and argument 
parsing code. Documented possible problems this might
cause an older dialplans in UPGRADE.txt


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7818 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-05 19:55:03 +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
russell 465d1d7712 make app_queue 1.2 jump compliant (issue #5580)
add missing includes of stdio.h
remove some unused and duplicate headers


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7026 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08 04:48:00 +00:00
kpfleming e61f71745f application doc update
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6992 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-07 22:01:22 +00:00
russell d3ddc001a2 issue #5605
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6979 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-06 15:09:47 +00:00
kpfleming ae35e4e069 major update to arg/option parsing APIs and documentation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6953 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-03 21:19:11 +00:00
russell 2a1fd152ed remove unnecessary checks before calls to ast_strlen_zero
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6864 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-26 19:48:14 +00:00
russell 2c3b3edc86 Doxygen documentation update from oej (issue #5505)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24 20:12:06 +00:00
russell 58818426d6 Massive cleanups to applications for LOCAL_USER handling and some other things.
In general, LOCAL_USER_ADD/REMOVE should be the first/last thing called in an
application.  An exception is if there is some *fast* setup code that might
halt the execution of the application, such as checking to see if an argument
exists.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6832 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-19 18:19:02 +00:00
russell 2c83f05ebb it's a good idea to unregister everything before calling STANDARD_HANGUP_LOCALUSERS
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6828 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-18 22:52:21 +00:00
kpfleming 95fe2b8fd4 update MANY more files with proper copyright/license info (thanks Ian!)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6596 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-14 20:46:50 +00:00
kpfleming 09ab7d67e4 make CLI output use singular/plural when appropriate (bug #4654)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6047 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-07 22:32:20 +00:00
kpfleming 8dc28b2439 the last round of file version tags
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5867 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06 22:39:32 +00:00
russell 792fde9ad6 fix timeout option
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5806 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-01 17:23:50 +00:00