dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

138 Commits

Author SHA1 Message Date
tilghman d1ec1aa57d AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10 19:20:57 +00:00
mvanbaak 9d2db62b61 add default alias reload to run module reload.
Requiring 'module reload' to reload everything, including
core etc makes russell very unhappy.

The default configuration already loads the 'friendly' aliases template.
Added 'reload=module reload' to that template.

Also removed the comment in main/cli.c that reload should come back.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@208813 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-25 12:03:25 +00:00
russell 661b443775 Note that "reload" needs to be added back.
I keep getting annoyed at having to type "module reload" to reload everything,
so I'm adding a note that we need to add "reload" back.  "module reload" doesn't
really make sense as the command to reload everything, including the core.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@208706 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-24 20:54:37 +00:00
russell 28b480de5b Don't log a warning for something that does not affect operation.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@208693 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-24 20:25:23 +00:00
russell ac3b35dcc7 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

Review: https://reviewboard.asterisk.org/r/239/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203638 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26 15:28:53 +00:00
twilson c17828979c Merged revisions 203380 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r203380 | twilson | 2009-06-25 16:13:10 -0500 (Thu, 25 Jun 2009) | 4 lines
  
  I didn't see that Mark already fixed the underlying issue!
  
  Yay for removing useless code.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203381 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-25 21:15:11 +00:00
twilson 2ab5b505cc Merged revisions 203311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r203311 | twilson | 2009-06-25 15:09:15 -0500 (Thu, 25 Jun 2009) | 2 lines
  
  Don't try to free NULL
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203338 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-25 20:25:39 +00:00
kpfleming 5fa0b7c277 More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15 17:34:30 +00:00
tilghman 7e7b82276d Eliminate several needless checks and fix a few memory leaks
(closes issue #14833)
 Reported by: contactmayankjain
 Patches: 
       all_changes.patch uploaded by contactmayankjain (license 740)
       slightly modified by me


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@197616 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28 15:35:23 +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
russell 89175b7e04 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container 
for channels is an astobj2 hash table.  All of the code related to searching 
for channels or iterating active channels has been rewritten.  Let n be 
the number of active channels.  Iterating the channel list has gone from 
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
Searching for a channel by extension is still O(n), but uses a new method 
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits 
here are plentiful.  Some benefits directly related to issues in the 
previous code include:

1) When threads other than the channel thread owning a channel wanted 
   access to a channel, it had to hold the lock on it to ensure that it didn't 
   go away.  This is no longer a requirement.  Holding a reference is 
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods 
   of time.

4) There are places where dealing with more than one channel at a time becomes 
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count 
handling can be found in channel.h, where a new section has been added that 
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the 
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
much easier to deal with holding on to a channel pointer for an extended period 
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David 
did the conversion of the DAHDIScan application by making it become a wrapper 
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190423 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-24 14:04:26 +00:00
jpeeler f3943d3662 Fix building of chan_h323 with gcc-3.3
There seems to be a bug with old versions of g++ that doesn't allow a structure
member to use the name list. Rename list member to group_list in ast_group_info
and change the few places it is used.

(closes issue #14790)
Reported by: stuarth


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190057 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-22 21:15:55 +00:00
russell 4bc54633d7 Change global_app_buf to ast_str_thread_global_buf.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184693 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27 16:21:10 +00:00
rmudgett 6f805da8ab Remove tabs from comment
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172440 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-29 23:15:20 +00:00
seanbright 347942d5e5 Don't crash when typing 'core set verbose' or 'core set debug' by themselves.
(closes issue #14219)
Reported by: jamesgolovich
Patches:
      asterisk-setverbosecrash.diff.txt uploaded by jamesgolovich (license 176)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168626 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-14 23:10:48 +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
mvanbaak 1c65c0fc8d add tab completion for 'core set debug X filename.c'
(closes issue #13969)
Reported by: jtodd
Patches:
      20081205__bug13969.diff.txt uploaded by Corydon76 (license 14)
Tested by: mvanbaak, eliel


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162687 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-10 17:09:15 +00:00
eliel 6e243a5434 Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05 10:31:25 +00:00
eliel 71b0952e7e Fix minor coding guidelines introduced with CLI permissions.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161077 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-04 19:31:48 +00:00
tilghman ad1d52df72 Merged revisions 160207 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r160207 | tilghman | 2008-12-01 18:25:16 -0600 (Mon, 01 Dec 2008) | 3 lines
  
  Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
  and glibc.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160208 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-02 00:37:21 +00:00
eliel c3bceb968b Introduce CLI permissions.
Based on cli_permissions.conf configuration file, we are able to permit or deny
cli commands based on some patterns and the local user and group running rasterisk.

(Sorry if I missed some of the testers).

Reviewboard: http://reviewboard.digium.com/r/11/

(closes issue #11123)
Reported by: eliel
Tested by: eliel, IgorG, Laureano, otherwiseguy, mvanbaak



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@160062 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-01 18:52:14 +00:00
mvanbaak e005e919bd This commit does two things:
- Add CLI aliases module to asterisk.
- Remove all deprecated CLI commands from the code

Initial work done by file.
Junk-Y and lmadsen did a lot of work and testing to
get the list of deprecated commands into the configuration file.

Deprecated CLI commands are now handled by this new module,
see cli_aliases.conf for more info about that.

ok russellb@ via reviewboard

(closes issue #13735)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156120 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 06:46:04 +00:00
mvanbaak 236e62078c Fix CLI command 'channel request hangup'
Prodded on IRC by Russell and fixed by eliel

(closes issue #13730)
Reported by: eliel
Patches:
      main_cli.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150664 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17 17:31:07 +00:00
murf 6499c3c6d4 (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: http://svn.digium.com/svn/asterisk/trunk@147807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09 14:17:33 +00:00
seanbright bbd18df3cf Resolve a subtle bug where we would never successfully be able to get
the first item in the CLI entry list.  This was preventing '!' from
showing up in either 'help' or in tab completion.

(closes issue #13578)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146198 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-03 22:10:18 +00:00
mvanbaak b6fa2c3b98 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: http://svn.digium.com/svn/asterisk/trunk@145121 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-28 23:32:14 +00:00
mvanbaak 02e84822e5 Some fixes to autocompletion in some commands.
Changes applied by this patch:

- Fix autocompletion in 'sip prune realtime', sip peers where never auto completed. Now we complete this command with:
  'sip prune realtime peer' -> all | like | sip peers
  Also I have modified the syntax in the usage, was wrong...
- Pass ast_cli_args->argv and ast_cli_args->argc while running autocompletion on CLI commands (CLI_GENERATE).
  With this we avoid comparisons on ast_cli_args->line like this:
  strcasestr(a->line, " description")
  strcasestr(a->line, "descriptions ")
  strcasestr(a->line, "realtime peer"), and so on..

  Making the code more confusing (check the spaces in description!).
  The only thing we must be sure is to first check a->pos or a->argc.
														      
- Fix 'iax2 prune realtime' autocompletion, now we autocomplete this command with 'all' & 'iax2 peers', check a look that iax2 peers where all the peers, now only the ones in the cache..

(closes issue #13133)
Reported by: eliel
Patches:
      clichanges.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141464 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-06 12:03:11 +00:00
seanbright 9ae91f799a Another batch of files from RSW. The remaining apps and a few more
files from main/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137089 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10 20:23:50 +00:00
seanbright 4c8b97a037 Merged revisions 135597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r135597 | seanbright | 2008-08-05 09:25:00 -0400 (Tue, 05 Aug 2008) | 1 line

Use PATH_MAX for filenames
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135598 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05 13:26:34 +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 22bb3309ec Code wasn't ready to be merged - see -dev list discussion
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129307 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-09 03:39:59 +00:00
oej 80e141d6ff Implement flags for AGI in the channel structure so taht "show channels" and
AMI commands can display that a channel is under control of an AGI.

Work inspired by work at customer site, but paid for by Edvina AB


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@128240 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-05 20:54:30 +00:00
tilghman 3707e8c13e Merged revisions 118551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118551 | tilghman | 2008-05-27 14:15:27 -0500 (Tue, 27 May 2008) | 6 lines

When showing an error message for a command, don't shorten the command output,
as it tends to confuse the user (it's fine for suggesting other commands,
however).
 Reported by: seanbright (on #asterisk-dev)
 Fixed by: me

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118554 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27 19:21:03 +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
twilson 9e8ebe6a94 Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109447 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18 15:43:34 +00:00
tilghman 832983e43a Whitespace changes only
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105840 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-04 23:04:29 +00:00
tilghman a5efdcb361 Context tracing for channels
(closes issue #11268)
 Reported by: moy
 Patches: 
       chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103754 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18 04:43:33 +00:00
twilson 3d2e5fea00 Check pointers before freeing (was getting WARNINGS under MALLOC_DEBUG)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97825 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10 19:03:04 +00:00
qwell 34c07ddcaf Merged revisions 97622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11718)
........
r97622 | qwell | 2008-01-09 14:28:43 -0600 (Wed, 09 Jan 2008) | 5 lines

Correctly display a message if a command could not be found.
Also fix a comment which may have led to this happening.

Issue 11718, reported by kshumard.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97623 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09 20:30:54 +00:00
qwell 2b30b408f6 Merged revisions 97618 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97618 | qwell | 2008-01-09 14:05:45 -0600 (Wed, 09 Jan 2008) | 1 line

Fix some locking and return value funkiness.  We really shouldn't be unlocking this lock inside of a function, unless we locked it there too.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97620 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09 20:13:14 +00:00
tilghman 718f79ad46 Merged revisions 97350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97350 | tilghman | 2008-01-08 18:44:14 -0600 (Tue, 08 Jan 2008) | 5 lines

Allow filename completion on zero-length modules, remove a memory leak, remove
a file descriptor leak, and make filename completion thread-safe.
Patched and tested by tilghman.
(Closes issue #11681)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97364 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09 00:51:59 +00:00
qwell 20476ae522 Add count of total number of calls processed by asterisk during it's lifetime.
Add number of total calls and current calls to SNMP.

Closes issue #10057, patch by jcmoore.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91779 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-07 16:11:05 +00:00
file d3894478e7 file says... compile before you commit!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90099 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 22:32:57 +00:00
qwell 8cce4fbf02 Remove "old"-style CLI handler, since nothing uses it anymore.
Closes issue #11403, patch by eliel.  This also completes the janitor project.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90038 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 20:27:40 +00:00
file 04dbf0cfc6 Hide CLI commands starting with _ from tab completion as was done previously.
(closes issue #11395)
Reported by: eliel
Patches:
      cli.c.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89982 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 15:48:00 +00:00
oej d33873fade - Mark "concise" as deprecated
- Restructure other changes to UPGRADE.txt and CHANGES

We're still looking for scripts that replace 
	asterisk -rx "show shannels concise"
by using the manager interface, but still produces the same output.
Anyone?


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89606 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 19:24:23 +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 89d8d78652 move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 23:16:15 +00:00
rizzo 8d3385f534 move internal function declarations to include/asterisk/_private.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89465 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 22:18:21 +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