Commit Graph

368 Commits

Author SHA1 Message Date
Mark Michelson 6fa79e8f77 Make ACLs IPv6-capable.
ACLs can now be configured to match IPv6 networks. This is only
relevant for ACLs in chan_sip for now since other channel drivers
do not support IPv6 addressing. However, once those channel drivers
are outfitted to support IPv6 addressing, the ACLs will already be
ready for IPv6 support.

https://reviewboard.asterisk.org/r/791



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19 14:17:16 +00:00
Tilghman Lesher d72336e83f Merged revisions 277261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277261 | tilghman | 2010-07-16 13:04:11 -0500 (Fri, 16 Jul 2010) | 5 lines
  
  If variable gotten is not set, will segfault on Solaris.
  
  (closes issue #17636)
   Reported by: bklang
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 18:14:05 +00:00
Richard Mudgett ec37ffbdaf ast_callerid restructuring
The purpose of this patch is to eliminate struct ast_callerid since it has
turned into a miscellaneous collection of various party information.

Eliminate struct ast_callerid and replace it with the following struct
organization:

struct ast_party_name {
	char *str;
	int char_set;
	int presentation;
	unsigned char valid;
};
struct ast_party_number {
	char *str;
	int plan;
	int presentation;
	unsigned char valid;
};
struct ast_party_subaddress {
	char *str;
	int type;
	unsigned char odd_even_indicator;
	unsigned char valid;
};
struct ast_party_id {
	struct ast_party_name name;
	struct ast_party_number number;
	struct ast_party_subaddress subaddress;
	char *tag;
};
struct ast_party_dialed {
	struct {
		char *str;
		int plan;
	} number;
	struct ast_party_subaddress subaddress;
	int transit_network_select;
};
struct ast_party_caller {
	struct ast_party_id id;
	char *ani;
	int ani2;
};

The new organization adds some new information as well.

* The party name and number now have their own presentation value that can
be manipulated independently.  ISDN supplies the presentation value for
the name and number at different times with the possibility that they
could be different.

* The party name and number now have a valid flag.  Before this change the
name or number string could be empty if the presentation were restricted.
Most channel drivers assume that the name or number is then simply not
available instead of indicating that the name or number was restricted.

* The party name now has a character set value.  SIP and Q.SIG have the
ability to indicate what character set a name string is using so it could
be presented properly.

* The dialed party now has a numbering plan value that could be useful to
have available.

The various channel drivers will need to be updated to support the new
core features as needed.  They have simply been converted to supply
current functionality at this time.


The following items of note were either corrected or enhanced:

* The CONNECTEDLINE() and REDIRECTING() dialplan functions were
consolidated into func_callerid.c to share party id handling code.

* CALLERPRES() is now deprecated because the name and number have their
own presentation values.

* Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
contain garbage.  It also can only contain the caller id number so using
ast_callerid_parse() on it is silly.  There was also a typo in the
CALLERNAME if test.

* Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
number string.  ast_callerid_parse() alters the given buffer which in this
case is the channel's caller id number string.  Then using
ast_shrink_phone_number() could alter it even more.

* Fixed caller ID name and number memory leak in chan_usbradio.c.

* Fixed uninitialized char arrays cid_num[] and cid_name[] in
sig_analog.c.

* Protected access to a caller channel with lock in chan_sip.c.

* Clarified intent of code in app_meetme.c sla_ring_station() and
dial_trunk().  Also made save all caller ID data instead of just the name
and number strings.

* Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
function.

* Corrected some weirdness with app_privacy.c's use of caller
presentation.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 15:48:36 +00:00
Mark Michelson cd4ebd336f Add IPv6 to Asterisk.
This adds a generic API for accommodating IPv6 and IPv4 addresses
within Asterisk. While many files have been updated to make use of the
API, chan_sip and the RTP code are the files which actually support
IPv6 addresses at the time of this commit. The way has been paved for
easier upgrading for other files in the near future, though.

Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne
for their hard work on this.

(closes issue #17565)
Reported by: russell
Patches: 
      asteriskv6-test-report.pdf uploaded by russell (license 2)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-08 22:08:07 +00:00
Matthew Nicholson a1a08a7338 Fixed whitespace problems
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-01 14:37:37 +00:00
Matthew Nicholson 269989c50f Altered my comment about TCP_NODELAY
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-01 14:34:31 +00:00
Matthew Nicholson 2dc3b3a8c2 Set TCP_NODELAY on manager TCP sockets to prevent delays on outgoing packets. This regression was introduced in r48338.
AST-359


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-30 18:48:21 +00:00
Tilghman Lesher aed189605b Permission checking for the system application is backwards.
(closes issue #17550)
 Reported by: kenner
 Patches: 
       manager.c.diff uploaded by kenner (license 1040)
 Tested by: kenner


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-30 01:07:02 +00:00
Paul Belanger c9a0c500ae Correct manager variable 'EventList' case.
(closes issue #17520)
Reported by: kobaz
Patches:
      manager.patch uploaded by kobaz (license 834)
Tested by: lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-23 20:35:45 +00:00
David Vossel 3a875d8524 minor fixes for white/black event filters
This fixes a ref count leak in event filters and checks for
a filter container allocation failure during session creation.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-22 17:57:28 +00:00
Jeff Peeler 42c24b585a Add regular expression filtering for manager events.
This patch as documented in the sample config allows one to optionally apply
white, black, or both types of filtering to manager events. The new
'eventfilter' option is set per user.

(closes issue #14861)
Reported by: fnordian
Patches: 
      eventfilter3.patch uploaded by fnordian (license 110),
      modified by me

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-22 16:29:18 +00:00
Tilghman Lesher de625d9c08 Event well was going dry.
(issue #17234)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-07 18:59:27 +00:00
Tilghman Lesher 0807833f8d Verify event is not NULL before attempting to lower its usecount.
(closes issue #17234)
 Reported by: mav3rick


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-05 17:27:12 +00:00
Richard Mudgett afd4454c44 Generic Advice of Charge.
Asterisk Generic AOC Representation
- Generic AOC encode/decode routines.
  (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame)
- AST_CONTROL_AOC frame type to represent generic encoded AOC data
- Manager events for AOC-S, AOC-D, and AOC-E messages

Asterisk App Support
- app_dial AOC-S pass-through support on call setup
- app_queue AOC-S pass-through support on call setup

AOC Unit Tests
- AOC Unit Tests for encode/decode routines
- AOC Unit Test for manager event representation.

SIP AOC Support
- Pass-through of generic AOC-D and AOC-E messages to snom phones via the
  snom AOC specification.
- Creation of chan_sip page3 flags for the addition of the new
  'snom_aoc_enabled' sip.conf option.

IAX AOC Support
- Natively supports AOC pass-through through the use of the new
  AST_CONTROL_AOC frame type

DAHDI AOC Support
- ETSI PRI full AOC Pass-through support
- 'aoc_enable' chan_dahdi.conf option for independently enabling
  pass-through of AOC-S, AOC-D, AOC-E.
- 'aoce_delayhangup' option for retrieving AOC-E on disconnect.
- DAHDI A() dial string option for requesting AOC services.
  example usage:
  ;requests AOC-S, AOC-D, and AOC-E on call setup
  exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e))

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 18:10:15 +00:00
Richard Mudgett 28264c52b9 Add ETSI Advice Of Charge (AOC) event reporting.
This feature generates AMI events in the new aoc event class from the
events passed up by libpri.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 17:13:53 +00:00
Tilghman Lesher 7718567b24 Eliminate stale manager events after a set interval, even if AMI clients don't query for them.
Actions (or failures to act) by external clients should not cause memory leaks
in Asterisk, especially when those continued leaks could cause Asterisk to
misbehave later.

(closes issue #17234)
 Reported by: mav3rick
 Patches: 
       20100510__issue17234.diff.txt uploaded by tilghman (license 14)
       20100517__issue17234__trunk.diff.txt uploaded by tilghman (license 14)
 Tested by: mav3rick, davidw

(closes issue #17365)
 Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@266682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-01 16:41:00 +00:00
Terry Wilson 0390dae08d Merge the rest of the FullyBooted patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-24 22:21:58 +00:00
Leif Madsen fa5350f7d7 Missing newlines added to Set-Cookie line in manager.c
Sean Bright pointed out that we lost a set of newline characters in commit
190349 on a line I had recently changed. Yay for code review on commits.

(issue #17231, #10961)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-17 15:14:22 +00:00
Leif Madsen 193d495a8a Recorded merge of revisions 263456 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r263456 | lmadsen | 2010-05-17 09:35:18 -0500 (Mon, 17 May 2010) | 11 lines
  
  Manager cookies are not compatible with RFC2109.
  
  The Version field in the cookies we're setting contain quotes around the version
  number which is not compatible with RFC2109 and breaks some implementations.
  
  (closes issue #17231)
  Reported by: ecarruda
  Patches:
        manager_rfc2109-trunk-v1.patch uploaded by ecarruda (license 559)
        manager_rfc2109-1.6.2-v1.patch uploaded by ecarruda (license 559)
  Tested by: ecarruda, russell
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-17 14:37:35 +00:00
Paul Belanger b2f59bea24 New 'manager show settings' CLI command.
See the CHANGES file for more details.

(closes issue #16343)
Reported by: pabelanger
Patches:
      issue16343.patch.v5 uploaded by pabelanger (license 224)
Tested by: pabelanger, tilghman, lmadsen

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@261180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-05 00:44:37 +00:00
Matthew Nicholson 2724f89bba Merged revisions 257070 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r257070 | mnicholson | 2010-04-13 11:46:30 -0500 (Tue, 13 Apr 2010) | 9 lines
  
  Add an option to restore past broken behavor of the Events manager action
  
  Before r238915, certain values for the EventMask parameter of the Events action would result in no response being returned.  This patch adds an option to restore that broken behavior.  Also while fixing this bug I discovered that passing an empty EventMasks parameter would also result in no response being returned, this has been fixed as well while being preserved when the broken behavior is requested.
  
  (closes issue #17023)
  Reported by: nblasgen
  
  Review: https://reviewboard.asterisk.org/r/602/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-13 18:10:30 +00:00
Mark Michelson e24661fd18 Merge Call completion support into trunk.
From Reviewboard:
CCSS stands for Call Completion Supplementary Services. An admittedly out-of-date
overview of the architecture can be found in the file doc/CCSS_architecture.pdf
in the CCSS branch. Off the top of my head, the big differences between what is
implemented and what is in the document are as follows:

1. We did not end up modifying the Hangup application at all.
2. The document states that a single call completion monitor may be used across
   multiple calls to the same device. This proved to not be such a good idea
   when implementing protocol-specific monitors, and so we ended up using one
   monitor per-device per-call.
3. There are some configuration options which were conceived after the document
   was written. These are documented in the ccss.conf.sample that is on this
   review request.
		      
For some basic understanding of terminology used throughout this code, see the
ccss.tex document that is on this review.

This implements CCBS and CCNR in several flavors.

First up is a "generic" implementation, which can work over any channel technology
provided that the channel technology can accurately report device state. Call
completion is requested using the dialplan application CallCompletionRequest and can
be canceled using CallCompletionCancel. Device state subscriptions are used in order
to monitor the state of called parties.

Next, there is a SIP-specific implementation of call completion. This method uses the
methods outlined in draft-ietf-bliss-call-completion-06 to implement call completion
using SIP signaling. There are a few things to note here:

* The agent/monitor terminology used throughout Asterisk sometimes is the reverse of
  what is defined in the referenced draft.

* Implementation of the draft required support for SIP PUBLISH. I attempted to write
  this in a generic-enough fashion such that if someone were to want to write PUBLISH
  support for other event packages, such as dialog-state or presence, most of the effort
  would be in writing callbacks specific to the event package.

* A subportion of supporting PUBLISH reception was that we had to implement a PIDF
  parser. The PIDF support added is a bit minimal. I first wrote a validation
  routine to ensure that the PIDF document is formatted properly. The rest of the
  PIDF reading is done in-line in the call-completion-specific PUBLISH-handling
  code. In other words, while there is PIDF support here, it is not in any state
  where it could easily be applied to other event packages as is.

Finally, there are a variety of ISDN-related call completion protocols supported. These
were written by Richard Mudgett, and as such I can't really say much about their
implementation. There are notes in the CHANGES file that indicate the ISDN protocols
over which call completion is supported.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09 15:31:32 +00:00
Russell Bryant 3da9f8ed19 Resolve more compiler warnings on FreeBSD.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-20 12:03:07 +00:00
Jeff Peeler 80d3e91714 Optimization to manager events.
When potentially sending manager events, return immediately if there are no
sessions or hooks. Also, avoid locking the hooks list if it is empty.

(issue #16455)
Reported by: atis
Patches: 
      manager_hooks_trunk.patch uploaded by atis (license 242)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-28 22:37:15 +00:00
Olle Johansson 7c61a7105f Change api for pbx_builtin_setvar to actually return error code if a function can't be written to.
This patch removes code that was duplicated from pbx.c to manager.c
in order to prevent API change in released versions of Asterisk.

There are propably also other places that would benefit from reading the
return code and react if a function returns error codes on writing a value into it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-25 21:13:20 +00:00
Olle Johansson 52b0cb912b Merged revisions 242850 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r242850 | oej | 2010-01-25 21:03:38 +0100 (Mån, 25 Jan 2010) | 2 lines

Report error when writing to functions returns error in AMI setvar action

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-25 20:27:59 +00:00
Sean Bright e612d87695 Convert a few places to use ast_calloc_with_stringfields where applicable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15 18:21:50 +00:00
Tilghman Lesher 31e93b2865 Merged revisions 238915 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r238915 | tilghman | 2010-01-08 18:57:58 -0600 (Fri, 08 Jan 2010) | 6 lines
  
  -1 is interpreted as an error, intead of the maximum mask.
  (closes issue #16241)
   Reported by: vnovy
   Patches: 
         manager.c.patch uploaded by vnovy (license 922)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@238916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-09 01:08:04 +00:00
Jeff Peeler 5b36dd59ea Enhance AMI redirect to allow channels to be redirected to different places.
New parameters ExtraContext, ExtraExtension, and ExtraPriority have been added
to redirect the second channel to a different location. Previously, it was only
possible to redirect both channels to the same place.

(closes issue #15853)
Reported by: haakon
Patches:
      trunk-manager.c.patch uploaded by haakon (license 880)
Tested by: jpeeler


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-16 00:31:53 +00:00
Jeff Peeler 51df77df8b Merged revisions 232581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r232581 | jpeeler | 2009-12-02 15:57:42 -0600 (Wed, 02 Dec 2009) | 7 lines
  
  Send ack (response/message) after receiving manager action userevent
  
  (closes issue #16264)
  Reported by: dimas
  Patches: 
        event-ack.patch uploaded by dimas (license 88)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-02 22:02:43 +00:00
Jeff Peeler d01451c076 Make manager response to "Action: events" finish with empty line
(closes issue #16275)
Reported by: vnovy
Patches: 
      manager.c.diff uploaded by vnovy (license 922)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-02 21:32:50 +00:00
Tilghman Lesher 5e2aa190fe Display a list of channel variables in each channel-oriented event.
(Closes AST-33)
Reviewboard:	https://reviewboard.asterisk.org/r/368/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-13 20:42:03 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Olle Johansson 037a6d287b Add destruction of iterators to avoid problems with refcounters
(per Russell's review of another patch)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 08:22:00 +00:00
Russell Bryant b0778107c7 Resolve a warning from gcc 4.4.1.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 22:08:46 +00:00
David Brooks d87006ca1c AMI hook interface
This patch, originally submitted by jozza, enables custom modules to send actions to AMI
and receive messages from AMI via a hook interface. Included is a simple test module to
illustrate the interface.

(closes issue #14635)
Reported by: jozza

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 21:26:28 +00:00
Tilghman Lesher c6a34a201e Merged revisions 226138 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r226138 | tilghman | 2009-10-27 15:16:49 -0500 (Tue, 27 Oct 2009) | 7 lines
  
  Manager output is not always NULL-terminated, so force a NULL at the end of the filestream.
  (closes issue #15495)
   Reported by: pdf
   Patches: 
         20090916__issue15495.diff.txt uploaded by tilghman (license 14)
   Tested by: pdf
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-27 20:22:07 +00:00
Kevin P. Fleming cdd1f9e296 Finish implementaton of astobj2 OBJ_MULTIPLE, and convert ast_channel_iterator to use it.
This patch finishes the implementation of OBJ_MULTIPLE in astobj2 (the
case where multiple results need to be returned; OBJ_NODATA mode
already was supported). In addition, it converts ast_channel_iterators
(only the targeted versions, not the ones that iterate over all
channels) to use this method.

During this work, I removed the 'ao2_flags' arguments to the
ast_channel_iterator constructor functions; there were no uses of that
argument yet, there is only one possible flag to pass, and it made the
iterators less 'opaque'. If at some point in the future someone really
needs an ast_channel_iterator that does not lock the container, we can
provide constructor(s) for that purpose.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 21:08:47 +00:00
Kevin P. Fleming d04158f5b1 Eliminate unnecessary include of version.h in manager.c.
Including version.h here causes this file to get recompiled after
every commit or update, which is not needed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-25 14:50:29 +00:00
Sean Bright 2ee2947a55 Properly terminate the response to the manager Ping action.
In passing, correct the formatting of the Timestamp attribute so that there is a
space after the colon and before the value.

(closes issue #15861)
Reported by: Ivan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-09 12:11:12 +00:00
Tilghman Lesher 006b0b480b Properly initialize the session to prevent a crash.
(closes issue #15774)
 Reported by: lasko
 Patches: 
       20090831__issue15774.diff.txt uploaded by tilghman (license 14)
 Tested by: lasko


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-31 21:45:00 +00:00
Tilghman Lesher b8c75efa7e Ensure that we check for the special value CONFIG_STATUS_FILEINVALID.
(closes issue #15786)
 Reported by: a_villacis
 Patches: 
       asterisk-1.6.2.0-beta4-manager-fix-crash-on-include-nonexistent-file.patch uploaded by a villacis (license 660)
       (Plus a few of my own, to catch the remaining places within manager.c where it could have been a problem)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-27 21:26:37 +00:00
Sean Bright 98f42ac6fa Merged revisions 212763 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r212763 | seanbright | 2009-08-18 12:36:00 -0400 (Tue, 18 Aug 2009) | 11 lines
  
  Delay the creation of temporary files until we have a valid manager command to handle.
  
  Without this patch, asterisk creates a temporary file before determining if the
  specified command is valid.  If invalid, we weren't properly cleaning up the file.
  
  (closes issue #15730)
  Reported by: zmehmood
  Patches:
        M15730.diff uploaded by junky (license 177)
  Tested by: zmehmood
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 16:38:36 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Mark Michelson b1d9b989ee Merged revisions 207714 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r207714 | mmichelson | 2009-07-21 09:26:00 -0500 (Tue, 21 Jul 2009) | 5 lines
  
  Document default timeout for AMI originations.
  
  AST-224
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 14:29:40 +00:00
Russell Bryant 4cf8a968fd Add an API for reporting security events, and a security event logging module.
This commit introduces the security events API.  This API is to be used by
Asterisk components to report events that have security implications.
A simple example is when a connection is made but fails authentication.  These
events can be used by external tools manipulate firewall rules or something
similar after detecting unusual activity based on security events.

Inside of Asterisk, the events go through the ast_event API.  This means that
they have a binary encoding, and it is easy to write code to subscribe to these
events and do something with them.

One module is provided that is a subscriber to these events - res_security_log.
This module turns security events into a parseable text format and sends them
to the "security" logger level.  Using logger.conf, these log entries may be
sent to a file, or to syslog.

One service, AMI, has been fully updated for reporting security events.
AMI was chosen as it was a fairly straight forward service to convert.
The next target will be chan_sip.  That will be more complicated and will
be done as its own project as the next phase of security events work.

For more information on the security events framework, see the documentation
generated from doc/tex/.  "make asterisk.pdf"

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-11 19:15:03 +00:00
Mark Michelson e403a7fdfb Add timestamp to response to "Ping" manager action.
(closes issue #14596)
Reported by: JimDickenson
Patches:
      pong2.diff uploaded by JimDickenson (license 710)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 20:52:19 +00:00
Russell Bryant 0264eef115 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: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
Russell Bryant 3c23511069 Don't claim a char * is a mansession object.
Since there was only 1 bucket, and no hash function was specified, the code
actually worked perfectly fine.  However, in theory, this was invalid use of
the OBJ_POINTER flag, so remove it so the code provides a better usage example.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-16 02:32:33 +00:00
Kevin P. Fleming 82fb56886e More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:34:30 +00:00