dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

197 Commits

Author SHA1 Message Date
file a995706a85 Move ModuleLoad and ModuleCheck manager commands from loader.c to manager.c. Previously they would get registered twice because of the way manager.c operates.
(closes issue #11699)
Reported by: caio1982
Patches:
      manager_module_commands1.diff uploaded by caio1982 (license 22)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96858 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-07 15:52:55 +00:00
russell ab908a2a8b Now that the version.h file was getting properly regenerated every time the svn
revision changed, every module that used the version was getting rebuilt after
every svn update.  This severly annoyed me pretty quickly, so I have improved
the situation.

Now, instead of generating version.h, main/version.c is generated.  version.c
includes the version information, as well as a couple of API calls for modules
to retrieve the version.  So now, only version.c will get rebuilt, and the main
asterisk binary relinked, which is must faster than rebuilding http.c, manager.c,
asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ...

The only minor change in behavior here is that the version information reported by
chan_sip, for example, is the version of the Asterisk core, and not necessarily the
Asterisk version that the chan_sip module came from.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96717 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-05 22:09:06 +00:00
kpfleming 3c7dd8c954 Merged revisions 94824 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94824 | kpfleming | 2007-12-26 18:01:47 -0700 (Wed, 26 Dec 2007) | 2 lines

make this comment explain the situation in an even more explicit fashion

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94825 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27 01:03:16 +00:00
tilghman 2d1c262738 Merged revisions 94808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94808 | tilghman | 2007-12-26 14:43:38 -0600 (Wed, 26 Dec 2007) | 6 lines

Workaround for what is probably a glibc bug (but we'll see this crop up again
and again, if we don't add the workaround).
Reported by: rolek
Patch by: tilghman
(Closes issue #11601, closes issue #11426)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94809 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-26 20:49:35 +00:00
oej 9e3315f20f Adding a new CLI command for "manager reload", which is important now that
you need to reload after changes. Thanks YS.

Reported by: ys
Patches: 
      trunk93163_manager_reload.c.diff uploaded by ys (license 281)
(related to issue #11414)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-16 13:35:09 +00:00
oej d9fce0bbd1 Change manager so that registered accounts are stored in memory. This opens for a
manager realtime implementation.

If you change accounts in manager.conf, you now need to reload to activate the
changes (deletions, additions). This was not the case with 1.4.

Reported by: ys
Patches: 
      trunk93163_manager_reload.c.diff uploaded by ys (license 281)
(closes issue #11414)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93165 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-16 13:32:48 +00:00
mmichelson 7e035d675e I needed to increment the numbers used on the VERBOSITY_ATLEAST calls by 1.
Thanks to kpfleming for pointing this out.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93065 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14 19:19:07 +00:00
mmichelson 3838d4b2c6 Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93063 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14 18:54:48 +00:00
mmichelson 0fecfb254c After reading Russell's e-mail to the dev list stating that checking option_verbose is not
equivalent to the check done by ast_verb, I wrote a macro, VERBOSITY_LEVEL, which does this
check. I did a quick look in the source and used this macro in some places where option_verbose
was used.

I also converted some verbose messages in logger.c to use ast_verb instead of ast_verbose.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14 18:47:44 +00:00
oej 119bb09f05 - The Ping Action
- Now use Response: success
        - New header "Ping: pong" :-)

- The Events action
        - Now use Response: Success
        - The new status is reported as "Events: On" or "Events: Off"

- Report if manager is enabled in the reload event

Small cleanups...

From moremanager


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91420 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06 15:50:43 +00:00
oej 21f8732bd3 Change description of new manager command
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06 10:29:02 +00:00
oej 9a86564730 Add manager command for showing all current channels.
Thanks, eliel, for writing the original patch. Modified by me to follow
other manager events and the new "moremanager" style.

(closes issue #11478)
Reported by: eliel
Patches: 
      manager.c.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91347 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06 10:27:54 +00:00
tilghman a17700ba80 Change cdr_manager to use a "CDR" level, rather than the (overcrowded) "call" level.
(Closes issue #11015)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91173 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05 16:46:47 +00:00
russell 7cfa10f05b Merged revisions 90348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90348 | russell | 2007-11-30 13:26:04 -0600 (Fri, 30 Nov 2007) | 8 lines

Change the behavior of ao2_link().  Previously, in inherited a reference.
Now, it automatically increases the reference count to reflect the reference
that is now held by the container.

This was done to be more consistent with ao2_unlink(), which automatically
releases the reference held by the container.  It also makes it so it is
no longer possible for a pointer to be invalid after ao2_link() returns.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90351 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30 19:34:47 +00:00
kpfleming cdc42b28f3 restore behavior from the 1.4 branch... manager users created via users.conf should default to *all* permissions, not none
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90149 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29 13:30:50 +00:00
kpfleming 92cd657a6d Merged revisions 90098 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90098 | kpfleming | 2007-11-28 16:30:46 -0600 (Wed, 28 Nov 2007) | 2 lines

it is impossible to set permissions for manager accounts created by users.conf (reported internally, patched by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90100 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 22:44:38 +00:00
tilghman 8b1450abe3 Merged revisions 89536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89536 | tilghman | 2007-11-23 11:18:26 -0600 (Fri, 23 Nov 2007) | 10 lines

Up until this point, the XML output of the manager has been technically
invalid, due to the repetition of certain parameters in a single event.
This caused various issues for XML parsers, some of which refused to parse
at all, given the invalidity of the rendered XML.  So this commit fixes
the XML output, ensuring that each entity parameter has a unique name, thus
ensuring valid XML.
Reported by: msetim
Patch by: tilghman
(Closes issue #10220)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89537 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-23 17:56:56 +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
rizzo fb8143ad31 start using asterisk/network.h for network related headers.
Also remove some unnecessary includes.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89380 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:11:53 +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 4948a0f37c Fixing a problem pointed out by Qwell
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89332 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 19:51:47 +00:00
mmichelson b075ea8bbb Added some locks that should have been around astman_send_error,
at least according to the comments.

(closes issue #11258, reported and patched by eliel)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89331 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 19:41:15 +00:00
rizzo 6a4d64e3ef access channel locks through ast_channel_lock/unlock/trylock and not
through ast_mutex primitives.

To detect all occurrences, I have renamed the lock field in struct ast_channel
so it is clear that it shouldn't be used directly.

There are some uses in res/res_features.c (see details of the diff)
that are error prone as they try and lock two channels without
caring about the order (or without explaining why it is safe).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89293 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 16:20:47 +00:00
mmichelson 5b4bf856a6 Merged revisions 89288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89288 | mmichelson | 2007-11-15 08:57:28 -0600 (Thu, 15 Nov 2007) | 3 lines

Undoing previous commit since I realize it was wrong


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89289 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 14:58:30 +00:00
mmichelson c47553e084 Merged revisions 89286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89286 | mmichelson | 2007-11-15 08:54:10 -0600 (Thu, 15 Nov 2007) | 4 lines

Adding a missing mutex unlock.

(closes issue 11256, reported and patched by ys)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89287 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 14:55:35 +00:00
rizzo ea0d4674a6 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: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 13:18:40 +00:00
kpfleming a45a413db3 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 05:28:47 +00:00
qwell 7756b987a0 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 20:05:18 +00:00
qwell d542122e6a Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19 18:29:40 +00:00
russell cee99650f4 Merged revisions 84742 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84742 | russell | 2007-10-04 20:39:07 -0500 (Thu, 04 Oct 2007) | 3 lines

Fix a copy/paste error in the description of UpdateConfig that was pointed
out by JerJer on #asterisk-dev

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84743 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-05 01:40:20 +00:00
dhubbard ca89337622 Merged revisions 84274 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84274 | dhubbard | 2007-10-01 16:25:37 -0500 (Mon, 01 Oct 2007) | 1 line

moved get_base_channel() code from action_redirect to ast_channel_masquerade() for issue 7706 and BE-160
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84275 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01 21:31:16 +00:00
dhubbard c2fe27f94a Merged revisions 84018 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84018 | dhubbard | 2007-09-27 18:12:25 -0500 (Thu, 27 Sep 2007) | 1 line

if an Agent is redirected, the base channel should actually be redirected.  This was causing multiple issues, especially issue 7706 and BE-160
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84019 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-27 23:18:09 +00:00
tilghman 9a467a1d9d Add the MeetmeList and Reload manager commands, which supplement the need to have Command privilege. (closes issue #10736)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83532 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-22 14:03:48 +00:00
russell 4e556095c0 Merged revisions 83121 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83121 | russell | 2007-09-19 10:10:14 -0500 (Wed, 19 Sep 2007) | 4 lines

Fix up another potential race condition.  Do the loop decrementing use count
on events with the eventq protected from being changed.
(reported on IRC by Ivan)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83126 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19 15:11:12 +00:00
file 66c8214ea3 Extend manager show connected with additional information.
(closes issue #10757)
Reported by: outtolunc
Patches:
      manager.c.sessionstart.diff uploaded by outtolunc (license 237)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83073 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19 13:30:01 +00:00
qwell ab51c0d7fa (issue #10724)
Reported by: eliel
Patches:
      res_features.c.patch uploaded by eliel (license 64)
      res_agi.c.patch uploaded by seanbright (license 71)
      res_musiconhold.c.patch uploaded by seanbright (license 71)
      pbx.c.patch uploaded by moy (license 222)
      logger.c.patch uploaded by moy (license 222)
      frame.c.patch uploaded by moy (license 222)
      manager.c.patch uploaded by moy (license 222)
      http.c.patch uploaded by moy (license 222)
      dnsmgr.c.patch uploaded by moy (license 222)
      res_realtime.c.patch uploaded by eliel (license 64)
      res_odbc.c.patch uploaded by seanbright (license 71)
      res_jabber.c.patch uploaded by eliel (license 64)
      chan_local.c.patch uploaded by eliel (license 64)
      chan_agent.c.patch uploaded by eliel (license 64)
      chan_alsa.c.patch uploaded by eliel (license 64)
      chan_features.c.patch uploaded by eliel (license 64)
      chan_sip.c.patch uploaded by eliel (license 64)
      RollUp.1.patch (includes all of the above patches) uploaded by seanbright (license 71)

Convert many CLI commands to the NEW_CLI format.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82930 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-18 22:43:45 +00:00
russell ce5ec8ec73 Merged revisions 82867 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82867 | russell | 2007-09-18 15:56:43 -0500 (Tue, 18 Sep 2007) | 10 lines

Fix a memory leak that can occur on systems under higher load.  The issue is
that when events are appended to the master event queue, they use the number
of active sessions as a use count so it will know when all active sessions
at the time the event happened have consumed it.  However, the handling of
the number of sessions was not properly synchronized, so the use count was
not always correct, causing an event to disappear early, or get stuck in
the event queue for forever.

(closes issue #9238, reported by bweschke, patch from Ivan, modified by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82868 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-18 20:59:21 +00:00
file 63abca7cf4 (closes issue #10695)
Reported by: junky
Patches:
      count_showconn.diff uploaded by junky (license 177)
Provide a count of connected users to manager.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82232 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-11 13:15:37 +00:00
murf 88e10708c5 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29 20:55:40 +00:00
tilghman dbec3d56c1 Don't reload a configuration file if nothing has changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16 21:09:46 +00:00
file 9d14a34591 Use the linkedlists.h macros for the manager action list.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78521 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07 22:13:40 +00:00
russell 3cf99f7033 Remove an XXX comment noting that it would be nice for a declaration to be
inside of a function.  (Yes, it would!)  Replace it with a note that explains
why it can't be done using the way that the AST_THREADSTORAGE macro is
currently defined.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77790 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-30 19:31:27 +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 919446e599 Move manager users list over to an rwlist.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76712 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-24 02:59:49 +00:00
file b2f6516547 Don't bother calling AST_RWLIST_EMPTY on a list before AST_RWLIST_TRAVERSE, it's just a double check.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76710 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23 23:05:18 +00:00
tilghman 74c2948c22 Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18 19:47:20 +00:00
file f913b3ee0a Make sure the idText variable is empty, and put it in the right place for the manager ack packet. (issue #10152 reported by srt)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73932 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09 01:25:00 +00:00