dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

140 Commits

Author SHA1 Message Date
qwell 176dfa7845 Add manager events for RTCP statistics.
Also adds a new "reporting" permission for manager, since it can be incredibly spammy.
  This permission was discussed on the -dev mailing list some months back.

Issue 8613, patch by johann8384, with some minor changes by me.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70961 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-21 23:07:20 +00:00
kpfleming 4c5507d166 Merged revisions 69392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69392 | kpfleming | 2007-06-14 16:50:40 -0500 (Thu, 14 Jun 2007) | 2 lines

use ast_localtime() in every place localtime_r() was being used

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69405 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14 22:09:20 +00:00
bbryant cf12cac752 Couple of manager ssl options weren't loading because of a typo.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69261 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14 15:43:50 +00:00
qwell 17d0ce8001 Change displayconnects option in manager.conf to be per-user.
Issue 9932, patch by eliel


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68831 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11 22:07:50 +00:00
file 06d778dd1d Add username completion for manager show user CLI command. (issue #9929 reported by eliel)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68663 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11 11:59:53 +00:00
russell ae627acb2f Fix a bunch of doxygen errors and document more things
(issue #9842, snuffy)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68339 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-07 23:07:25 +00:00
tilghman eb5d461ed4 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06 21:20:11 +00:00
russell 923c1c3300 Minor formatting change to test closing mantis issues through commit tags
(closes issue #9828)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67843 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06 20:35:05 +00:00
russell bde496c910 Minor formatting change to test closing mantis issues through commit tags
(closes issue #9828)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67842 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06 20:21:31 +00:00
qwell d2915a278d Make sure we default allowmultiplelogin to on/yes, per the default stated in the config.
Issue 9885, patch by eliel.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67398 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05 17:47:37 +00:00
russell a42bc96f14 Add a new API call for creating detached threads. Then, go replace all of the
places in the code where the same block of code for creating detached threads
was replicated.  (patch from bbryant)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65968 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24 18:30:19 +00:00
file d01a449298 Merged revisions 65902 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r65902 | file | 2007-05-24 11:27:23 -0400 (Thu, 24 May 2007) | 2 lines

Add the ability to blacklist certain commands from being executed using the Command AMI action. (issue #9240 reported by junky)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65905 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24 15:30:06 +00:00
russell c180e625c1 Add an option that lets you only allow one connection at a time for each
manager user.  (issue #8664, reported and original patch by ssokol, patch
updated by bkruse, and further updated by me)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@64786 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-17 17:12:23 +00:00
qwell 28913582e8 Merged revisions 63982 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63982 | qwell | 2007-05-11 15:16:17 -0500 (Fri, 11 May 2007) | 7 lines

Hide manager password from "manager show user foo".

I realize that there are other ways to get this,
 but we really don't need to just show it in plain text so easily.

Issue 9273, patch by junky

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63983 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-11 20:16:56 +00:00
russell 9322f6b218 Merged revisions 63886 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63886 | russell | 2007-05-11 11:05:43 -0500 (Fri, 11 May 2007) | 6 lines

When MD5 authentication is not possible because there is no challenge present,
either because the Challenge action was never issued, or some other reason,
give a proper error message and return an error instead of claiming that the
user wasn't found.
(reported by jsmith on IRC)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63902 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-11 16:21:45 +00:00
russell 18bb03b618 Merged revisions 63804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r63804 | russell | 2007-05-10 17:23:42 -0500 (Thu, 10 May 2007) | 4 lines

Strip terminal escape sequences from CLI command output that is going to be
sent out over the manager interface.
(issue #9659, reported by pari, fixed by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63805 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-10 22:25:54 +00:00
russell bac4677f3c Convert spaces to tabs for indentation.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63089 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-04 19:48:52 +00:00
oej add6450862 Add "CoreStatus" - from the moremanager branch.
This can be extended with more information, ideas and patches are welcome, as usual :-)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63031 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-04 13:47:11 +00:00
oej 189e5866cf - Add manager command CoreSettings
- Add missing option to options.h
- Add missing variables to asterisk.h
- Move manager version to manager.h include file


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63030 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-04 13:44:50 +00:00
russell 86e2deef74 Merged revisions 61787 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r61787 | russell | 2007-04-24 16:34:53 -0500 (Tue, 24 Apr 2007) | 12 lines

Merged revisions 61786 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r61786 | russell | 2007-04-24 16:33:59 -0500 (Tue, 24 Apr 2007) | 4 lines

Don't crash if a manager connection provides a username that exists in
manager.conf but does not have a password, and also requests MD5 
authentication. (ASA-2007-012)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61788 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-24 21:37:00 +00:00
russell be90f5388d When building a JSON encoded string in the GetConfigJSON manager action, escape
the '\' and '"' characters.  (issue #9475, reported by pari, patch by me)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61767 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-23 18:49:19 +00:00
russell 28472c7383 Merged revisions 61690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r61690 | russell | 2007-04-20 13:19:18 -0500 (Fri, 20 Apr 2007) | 4 lines

Fix the UpdateConfig manager action to properly treat "variables" and "objects"
differently (a=b versus a=>b).
(issue #9568, reported by pari, patch by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61691 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-20 18:23:24 +00:00
tilghman 9cc6c9ed4f Merged revisions 61683 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r61683 | tilghman | 2007-04-18 23:36:20 -0500 (Wed, 18 Apr 2007) | 2 lines

Bug 9557 - simple reason why reading a function always returned NULL

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61684 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-19 04:37:29 +00:00
tilghman c58ebc051c Issue 6082 - New DTMF event for manager
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61324 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-10 23:55:26 +00:00
oej 7abb4e9065 Add hint to ExtensionStatus AMI event in manager
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61021 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-09 19:05:40 +00:00
russell fe453b5ef2 Merged revisions 60603 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r60603 | russell | 2007-04-06 15:58:43 -0500 (Fri, 06 Apr 2007) | 13 lines

To be able to achieve the things that we would like to achieve with the
Asterisk GUI project, we need a fully functional HTTP interface with access
to the Asterisk manager interface.  One of the things that was intended to be
a part of this system, but was never actually implemented, was the ability for
the GUI to be able to upload files to Asterisk.  So, this commit adds this in
the most minimally invasive way that we could come up with.

A lot of work on minimime was done by Steve Murphy.  He fixed a lot of bugs in
the parser, and updated it to be thread-safe.  The ability to check
permissions of active manager sessions was added by Dwayne Hubbard.  Then,
hacking this all together and do doing the modifications necessary to the HTTP
interface was done by me.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60604 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-06 21:16:38 +00:00
russell 05fda0428c Merged revisions 60137 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r60137 | russell | 2007-04-04 12:40:10 -0500 (Wed, 04 Apr 2007) | 14 lines

Merged revisions 60134 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r60134 | russell | 2007-04-04 12:38:47 -0500 (Wed, 04 Apr 2007) | 6 lines

It is valid to redirect channels via the manager interface that are not in the
UP state.  Instead of checking for that to prevent to ensure a dead channel
doesn't get redirected, just use the ast_check_hangup() API call.
(issue #9457, reported by Callmewind, patch by me)
(related to issue #8977)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60141 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-04 17:41:37 +00:00
russell 59144ac097 Merged revisions 58165 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r58165 | russell | 2007-03-06 18:25:19 -0600 (Tue, 06 Mar 2007) | 12 lines

Merged revisions 58164 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r58164 | russell | 2007-03-06 18:20:13 -0600 (Tue, 06 Mar 2007) | 4 lines

If the channels acquired using the manager Redirect action are not up, then
don't attempt to do anything with them.  It could lead to weird behavior,
including crashes.  (issue #8977)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-07 00:26:01 +00:00
oej 2c162efa7e Doxygen updates and corrections
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56648 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-24 19:49:11 +00:00
russell 8251ec7eac Introduce a new manager action, GetConfigJSON, which is intended to improve
performance of the GUI.  This encodes the configuration into the JSON format
in a manager header, "JSON: ".  The encoded information can be directly used
as a javascript object, so no parsing is needed.  For large configuration
files, this can greatly improve loading times in the GUI. Furthermore, the 
encoding takes up a lot less space when being transmitted than the other 
alternatives.  (Inspired by discussion with Pari)

Here is an example of what you get:
http://localhost:8088/asterisk/rawman?action=getconfigjson&filename=users.conf

Response: Success
JSON: {"general":["hasvoicemail=yes"],"6000":["fullname=russell","secret=1234"]}


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56323 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-23 00:45:04 +00:00
file 01c1553ffd Properly handle an error result from a manager action. This could have left the action list permanently locked for reading.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54711 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16 00:10:17 +00:00
oej 18b268814d New CLI command "Core show settings" to list some core settings
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54464 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-14 20:22:20 +00:00
file 1e80cfd061 It is with pleasure that I announce the return of rawman support through the HTTP server. (issue #9013 reported by Jynger)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53635 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-08 20:39:41 +00:00
tilghman aaaa855c7d Merged revisions 53246 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r53246 | tilghman | 2007-02-06 01:00:52 -0600 (Tue, 06 Feb 2007) | 10 lines

Merged revisions 53245 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53245 | tilghman | 2007-02-06 00:58:28 -0600 (Tue, 06 Feb 2007) | 2 lines

Issue 8987 - Status could return two responses (mnicholson)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53247 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-06 07:07:22 +00:00
russell ee25f98f93 Merged revisions 53046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r53046 | russell | 2007-01-31 15:32:08 -0600 (Wed, 31 Jan 2007) | 11 lines

Merged revisions 53045 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines

Fix a bunch of places where pthread_attr_init() was called, but
pthread_attr_destroy() was not.

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53047 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-31 21:35:15 +00:00
russell e5b89f157d Merged revisions 52688 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r52688 | russell | 2007-01-29 16:55:41 -0600 (Mon, 29 Jan 2007) | 3 lines

Remove a recursive lock of the manager session.  This was pointed out by 
zandbelt in issue #8711.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@52692 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-29 22:57:16 +00:00
russell 2206f4e9bc The changes for trunk are less extensive, but include
- changing the actionlock to a rwlock
 - not locking the session before doing the action callback
The crash issue in 8711 should not be an issue here.


Merged revisions 52611 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r52611 | russell | 2007-01-29 14:39:20 -0600 (Mon, 29 Jan 2007) | 10 lines

The session lock can not be held while calling action callbacks.  If so, then
when the WaitEvent callback gets called, then no event can happen because the
session can't be locked by another thread.  Also, the session needs to be
locked in the HTTP callback when it reads out the output string.  This fixes
the deadlock reported in both 8711 and 8934.
Regarding issue 8711, there still may be an issue.  If there is a second action
requested before the processing of the first action is finished, there could
still be some corruption of the output string buffer used to build the result.
(issue #8711, #8934)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@52613 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-29 20:51:24 +00:00
file 7658155245 Close file after we do the translation, and map memory for both reading/writing. (issue #8886 reported by cwegener)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51831 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-24 00:22:50 +00:00
russell 15e3b6e0c0 Merged revisions 51781 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51781 | russell | 2007-01-23 16:04:01 -0600 (Tue, 23 Jan 2007) | 6 lines

Fix some bugs in process_message().  The manager session lock needs to be held
when sending some sort of response, or calling one of the manager action
callbacks.  This resolves an issue where people using the GUI would get random
crashes when they start clicking around a lot.
(issue #8711, reported and debugged by zandbelt)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51787 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23 22:09:23 +00:00
russell 70089450f1 Merged revisions 51750 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51750 | russell | 2007-01-23 15:33:15 -0600 (Tue, 23 Jan 2007) | 4 lines

When traversing the list of manager actions, the iterator needs to be
initialized to the list head *after* locking the list.  Also, lock the actions
list in one place it is being accessed where it was not being done.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51751 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23 21:38:31 +00:00
russell 2da13ceac8 Break out of the config processing loop for manager.conf once the correct user
has been found so that 'cat' is non-NULL.  This way, users.conf is only checked
when necessary.  (issue #8852, akohlsmith, committed patch a bit different)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51296 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-19 16:30:00 +00:00
russell 6d94715209 Fix trunk version of manager support for users.conf. Now it actually pays
attention to the "hasmanager" option.

(Thanks to Anthony L. for pointing out that this was broken!)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51247 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-18 18:54:51 +00:00
russell f0963f006f Merged revisions 51233 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51233 | russell | 2007-01-18 11:18:43 -0600 (Thu, 18 Jan 2007) | 3 lines

Make the "hasmanager" option in users.conf actually have an effect.
(issue #8740, LnxPrgr3)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51234 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-18 17:33:33 +00:00
file 96d205289a Merged revisions 50895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r50895 | file | 2007-01-15 11:36:07 -0500 (Mon, 15 Jan 2007) | 2 lines

Move event processing into do_message so that it gets executed again when events are tripped.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@50896 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-15 16:40:48 +00:00
file 451d1a2d55 Exit from session loop upon error (ie: they disconnected) and don't do any buffer manipulation in do_message. get_input will handle it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@50629 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-12 18:13:50 +00:00
file 9b1dfc49c6 Merged revisions 50602 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r50602 | file | 2007-01-12 11:42:33 -0500 (Fri, 12 Jan 2007) | 2 lines

We need to check for res being 0 in do_message itself, otherwise our headers will get lost.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@50603 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-12 16:47:20 +00:00
kpfleming 28749c0589 probably shouldn't leave the mmap'ed file hanging around in memory
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49735 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-06 00:02:06 +00:00
kpfleming 717d699a13 a little more const-ification
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49727 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05 23:58:53 +00:00
kpfleming a037fd277b Merged revisions 49680 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49680 | kpfleming | 2007-01-05 16:52:37 -0600 (Fri, 05 Jan 2007) | 2 lines

don't 'consume' the params list before we try to use it again

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49681 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05 22:53:38 +00:00
kpfleming 56867dba7a use mmap() to read in the results of the manager action for an HTTP request, instead of reading it into a buffer
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49679 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05 22:52:16 +00:00