Commit Graph

215 Commits

Author SHA1 Message Date
Russell Bryant 96e04792bd add a destroy API call for a server instance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 22:28:03 +00:00
Russell Bryant cc55483858 More public API name changes to use an appropriate ast_ prefix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 22:23:21 +00:00
Russell Bryant efb1e30a38 Rename public object server_instance to ast_tcptls_server_instance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 22:15:18 +00:00
Tilghman Lesher 133a18478c Merged revisions 104704 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104704 | tilghman | 2008-02-27 12:15:10 -0600 (Wed, 27 Feb 2008) | 2 lines

Ensure the session ID can't be 0.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 18:20:35 +00:00
Russell Bryant 0036cde5f3 Rename version.h to ast_version.h. Next, I will be re-adding version.h as an
automatically generated file like it used to be.  This still needs to be there
for modules that have to check it to compile against multiple asterisk versions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 20:02:14 +00:00
Tilghman Lesher f92a3e119e Move Originate to a separate privilege and require the additional System privilege to call out to a subshell.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-22 22:55:35 +00:00
Kevin P. Fleming 1a6711a42d Merged revisions 104015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104015 | kpfleming | 2008-02-21 08:33:51 -0600 (Thu, 21 Feb 2008) | 2 lines

reduce the likelihood that HTTP Manager session ids will consist of primarily '1' bits

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 14:44:04 +00:00
Jason Parker 2aa1c03667 Even more sane permissions. This should be handled via a umask, like in many other places.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 20:27:01 +00:00
Jason Parker 7dd21605f3 Use slight more sane permissions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 20:02:32 +00:00
Russell Bryant d42f6f7ce5 Fix build on *BSD. These permissions constants are not available there.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 15:16:39 +00:00
Jeff Peeler 16a14a4cd8 Requested changes from Pari, reviewed by Russell.
Added ability to retrieve list of categories in a config file.
Added ability to retrieve the content of a particular category.
Added ability to empty a context.
Created new action to create a new file.
Updated delete action to allow deletion by line number with respect to category.
Added new action insert to add new variable to category at specified line.
Updated action newcat to allow new category to be inserted in file above another existing category.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 00:24:36 +00:00
Joshua Colp c81350d6f6 Just some minor coding style cleanup...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 18:27:47 +00:00
Tilghman Lesher fa4c9a958b CoreSettings and CoreStatus are missing the terminating "\r\n". Also, some
miscellaneous spacing and initialization issues.
(closes issue #11909)
 Reported by: srt
 Patches: 
       patch-11909-2.diff uploaded by srt (license 378)
 Tested by: srt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-03 17:40:48 +00:00
Russell Bryant b995c78c31 Merge changes from team/group/sip-tcptls
This set of changes introduces TCP and TLS support for chan_sip.  There are various
new options in configs/sip.conf.sample that are used to enable these features.  Also,
there is a document, doc/siptls.txt that describes some things in more detail.

This code was implemented by Brett Bryant and James Golovich.  It was reviewed
by Joshua Colp and myself.  A number of other people participated in the testing
of this code, but since it was done outside of the bug tracker, I do not have their
names.  If you were one of them, thanks a lot for the help!

(closes issue #4903, but with completely different code that what exists there.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-18 22:04:33 +00:00
Joshua Colp e8dee9f956 Make sure the user's manager secret exists, even if it is blank.
(closes issue #11749)
Reported by: srt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 20:01:19 +00:00
Tilghman Lesher 3968dd1c3d Conversion to load manager.conf into memory did not convert the password
functions correctly.  (Closes issue #11749)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-12 18:12:56 +00:00
Tilghman Lesher 247ca0a827 oops, missed the case of a 0 permission (which should mean everybody is allowed, not nobody)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:39:34 +00:00
Tilghman Lesher 857e3412f4 Several manager changes:
1) Add the Dialplan class, for NewExten and VarSet events, which should cut
down on the volume of traffic in the Call class.
2) Permit some commands to be run from multiple classes, such as allowing
DBGet to be run from either the System or the Reporting class.
3) Heavily document each class in the sample config, as there were several
that made no sense to be in the write= line, and two that made no sense to be
in the read= line (since they controlled no permissions there).

(Closes issue #10386)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:12:35 +00:00
Joshua Colp 96f5a494cf 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: https://origsvn.digium.com/svn/asterisk/trunk@96858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 15:52:55 +00:00
Russell Bryant 54bc2c20b6 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: https://origsvn.digium.com/svn/asterisk/trunk@96717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-05 22:09:06 +00:00
Kevin P. Fleming d756129b1d 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: https://origsvn.digium.com/svn/asterisk/trunk@94825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 01:03:16 +00:00
Tilghman Lesher 2bed4ec968 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: https://origsvn.digium.com/svn/asterisk/trunk@94809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 20:49:35 +00:00
Olle Johansson c92dafd551 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: https://origsvn.digium.com/svn/asterisk/trunk@93166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-16 13:35:09 +00:00
Olle Johansson 130fe4000a 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: https://origsvn.digium.com/svn/asterisk/trunk@93165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-16 13:32:48 +00:00
Mark Michelson 74577dd091 I needed to increment the numbers used on the VERBOSITY_ATLEAST calls by 1.
Thanks to kpfleming for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 19:19:07 +00:00
Mark Michelson 83f152b95c Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 18:54:48 +00:00
Mark Michelson 4f75e15665 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: https://origsvn.digium.com/svn/asterisk/trunk@93042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 18:47:44 +00:00
Olle Johansson 814d0ed4f8 - 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: https://origsvn.digium.com/svn/asterisk/trunk@91420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 15:50:43 +00:00
Olle Johansson 7e38b474d9 Change description of new manager command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 10:29:02 +00:00
Olle Johansson 5af2cf109e 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: https://origsvn.digium.com/svn/asterisk/trunk@91347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 10:27:54 +00:00
Tilghman Lesher ce2f670228 Change cdr_manager to use a "CDR" level, rather than the (overcrowded) "call" level.
(Closes issue #11015)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 16:46:47 +00:00
Russell Bryant fac7480820 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: https://origsvn.digium.com/svn/asterisk/trunk@90351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30 19:34:47 +00:00
Kevin P. Fleming c13ed407db restore behavior from the 1.4 branch... manager users created via users.conf should default to *all* permissions, not none
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 13:30:50 +00:00
Kevin P. Fleming 57c2bcca86 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: https://origsvn.digium.com/svn/asterisk/trunk@90100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28 22:44:38 +00:00
Tilghman Lesher eac58d0fb3 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: https://origsvn.digium.com/svn/asterisk/trunk@89537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-23 17:56:56 +00:00
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:09:02 +00:00
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:16:15 +00:00
Luigi Rizzo 915b97d300 move internal function declarations to include/asterisk/_private.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 22:18:21 +00:00
Luigi Rizzo 9335ace850 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 19:09:03 +00:00
Luigi Rizzo a0f06d0dd5 start using asterisk/network.h for network related headers.
Also remove some unnecessary includes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 14:11:53 +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
Mark Michelson fd7b3e7261 Fixing a problem pointed out by Qwell
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 19:51:47 +00:00
Mark Michelson 3107395445 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: https://origsvn.digium.com/svn/asterisk/trunk@89331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 19:41:15 +00:00
Luigi Rizzo 09d9cce1d8 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: https://origsvn.digium.com/svn/asterisk/trunk@89293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 16:20:47 +00:00
Mark Michelson 6260590ec2 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: https://origsvn.digium.com/svn/asterisk/trunk@89289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 14:58:30 +00:00
Mark Michelson eee4ed80cf 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: https://origsvn.digium.com/svn/asterisk/trunk@89287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 14:55:35 +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
Kevin P. Fleming edc78d6023 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: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:28:47 +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