summaryrefslogtreecommitdiff
path: root/main/manager.c
AgeCommit message (Collapse)Author
2011-02-04Send manager event for blackfilter only if it DOES NOT match.Jeff Peeler
The logic got reversed, oops. Works properly now when multiple blackfilters are present. (closes issue #18283) Reported by: telecos82 Patches: ast_managereventfilter.patch uploaded by telecos82 (license 687) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04Replace ast_log(LOG_DEBUG, ...) with ast_debug()Paul Belanger
(closes issue #18556) Reported by: kkm Review: https://reviewboard.asterisk.org/r/1071/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Asterisk media architecture conversion - no more format bitfieldsDavid Vossel
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Merged revisions 305923 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r305923 | rmudgett | 2011-02-02 18:24:40 -0600 (Wed, 02 Feb 2011) | 24 lines Merged revisions 305889 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r305889 | rmudgett | 2011-02-02 18:15:07 -0600 (Wed, 02 Feb 2011) | 17 lines Merged revisions 305888 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r305888 | rmudgett | 2011-02-02 18:02:43 -0600 (Wed, 02 Feb 2011) | 8 lines Minor AST_FRAME_TEXT related issues. * Include the null terminator in the buffer length. When the frame is queued it is copied. If the null terminator is not part of the frame buffer length, the receiver could see garbage appended onto it. * Add channel lock protection with ast_sendtext(). * Fixed AMI SendText action ast_sendtext() return value check. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19Merged revisions 302837 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r302837 | russell | 2011-01-19 17:56:48 -0600 (Wed, 19 Jan 2011) | 2 lines Only check container count if it exists. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19Merged revisions 302789 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r302789 | russell | 2011-01-19 17:06:46 -0600 (Wed, 19 Jan 2011) | 11 lines Merged revisions 302788 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r302788 | russell | 2011-01-19 17:06:14 -0600 (Wed, 19 Jan 2011) | 4 lines Turn a noisy verbose message into a debug message. This can drown your console if you're using the AMI over HTTP. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19Merged revisions 302785 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r302785 | russell | 2011-01-19 16:35:15 -0600 (Wed, 19 Jan 2011) | 15 lines Resolve a memory leak with the manager interface is disabled. The intent of this check as it stands in previous versions of Asterisk was to check if there are any active sessions. If there were no sessions, then the function would return immediately and not bother with queueing up the manager event to be processed. Since the conversion of storing sessions in an astobj2 container, this check will always pass. I changed it to go back to checking what was intended. The side effect of this was that if the AMI is disabled, the manager event queue is populated anyway, but the code that runs to clear out the queue never runs. A producer with no consumer is a bad thing. Reported internally by kmorgan. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-12Merged revisions 301595 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r301595 | mnicholson | 2011-01-12 12:51:37 -0600 (Wed, 12 Jan 2011) | 22 lines Merged revisions 301594 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r301594 | mnicholson | 2011-01-12 12:50:31 -0600 (Wed, 12 Jan 2011) | 15 lines Removed a usleep(1) that shouldn't be necessary in session_do, and removed the ms_t member from the mansession_session structure. Merged revisions 301591 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r301591 | mnicholson | 2011-01-12 12:39:03 -0600 (Wed, 12 Jan 2011) | 5 lines Don't store the thread id for the manager session in the structure we pass to the thread for the manager session. ABE-2543 ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-02Merged revisions 293611 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r293611 | pabelanger | 2010-11-02 16:45:09 -0400 (Tue, 02 Nov 2010) | 2 lines If manager and tls are disabled, do not display TCP/TLS Bindaddress. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-21Merged revisions 292595 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r292595 | dvossel | 2010-10-21 11:14:33 -0500 (Thu, 21 Oct 2010) | 14 lines Fixes recursive lock problem in manager.c It is possible for a AMI session to freeze because of invalid use of recursive locks during the EVENT processing. This patch removes the unnecessary locks. (closes issue #18167) Reported by: sustav Patches: manager_locking_v1.diff uploaded by dvossel (license 671) Tested by: sustav ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-12Merged revisions 291227 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r291227 | dvossel | 2010-10-12 10:58:56 -0500 (Tue, 12 Oct 2010) | 16 lines Fixes manager.c crash. This issue was caused by improper use of the mansession lock and manession_session lock. These two structures are confusing to begin with so I'm not surprised this occurred. I fixed this by consistently making sure we use each of these locks only to protect the data in the corresponding structure. We had mismatched usage of these locks which resulted in no mutual exclusivity occurring at all. (closes issue #17994) Reported by: vrban Patches: mansession_locking_fix.diff uploaded by dvossel (license 671) Tested by: vrban ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@291228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-02Merged revisions 289951 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r289951 | oej | 2010-10-02 10:56:08 +0200 (Lör, 02 Okt 2010) | 16 lines Merged revisions 289950 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r289950 | oej | 2010-10-02 10:52:03 +0200 (Lör, 02 Okt 2010) | 9 lines Merged revisions 289949 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r289949 | oej | 2010-10-02 10:50:05 +0200 (Lör, 02 Okt 2010) | 2 lines Add documentation for undocumented option to AMI action originate ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-23Merged revisions 288572 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r288572 | twilson | 2010-09-23 13:05:16 -0500 (Thu, 23 Sep 2010) | 2 lines Make AMI honor enabled=no ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@288573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-19Merged revisions 287471 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r287471 | oej | 2010-09-19 18:09:28 +0200 (Sön, 19 Sep 2010) | 21 lines Merged revisions 287470 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r287470 | oej | 2010-09-19 18:06:10 +0200 (Sön, 19 Sep 2010) | 14 lines Merged revisions 287469 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r287469 | oej | 2010-09-19 17:56:50 +0200 (Sön, 19 Sep 2010) | 7 lines Make sure we always free variables properly in manager originate. (closes issue #17891) reported, solved and tested by oej Review: https://reviewboard.asterisk.org/r/869/ ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-28Merged revisions 284065 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r284065 | russell | 2010-08-28 16:29:45 -0500 (Sat, 28 Aug 2010) | 13 lines Be more flexible with whitespace on AMI action headers. Previously, this code required exactly one space to be after the ':' in headers for an AMI action. This now makes whitespace optional, and allows whitespace that is there to vary in amount. (closes issue #17862) Reported by: cmoye Patches: manager.c.patch_trunk uploaded by cmoye (license 858) manager.c.patch_1.8 uploaded by cmoye (license 858) Tested by: cmoye ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-27Doxygen formatting changesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-24Merged revisions 279273 via svnmerge from Paul Belanger
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r279273 | pabelanger | 2010-07-24 13:36:42 -0400 (Sat, 24 Jul 2010) | 6 lines Default sin_family to AF_INET for TCP / TLS Bindaddress. Otherwise, 'manager show settings' will generate errors if manager is not enabled. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20Merged revisions 278023 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r278023 | tilghman | 2010-07-20 11:37:18 -0500 (Tue, 20 Jul 2010) | 7 lines Off-by-one error (closes issue #16506) Reported by: nik600 Patches: 20100629__issue16506.diff.txt uploaded by tilghman (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19Make ACLs IPv6-capable.Mark Michelson
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-16Merged revisions 277261 via svnmerge from Tilghman Lesher
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-14ast_callerid restructuringRichard Mudgett
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-08Add IPv6 to Asterisk.Mark Michelson
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-01Fixed whitespace problemsMatthew Nicholson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-01Altered my comment about TCP_NODELAYMatthew Nicholson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-30Set TCP_NODELAY on manager TCP sockets to prevent delays on outgoing ↵Matthew Nicholson
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-30Permission checking for the system application is backwards.Tilghman Lesher
(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-23Correct manager variable 'EventList' case.Paul Belanger
(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-22minor fixes for white/black event filtersDavid Vossel
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-22Add regular expression filtering for manager events.Jeff Peeler
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-07Event well was going dry.Tilghman Lesher
(issue #17234) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-05Verify event is not NULL before attempting to lower its usecount.Tilghman Lesher
(closes issue #17234) Reported by: mav3rick git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02Generic Advice of Charge.Richard Mudgett
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-02Add ETSI Advice Of Charge (AOC) event reporting.Richard Mudgett
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-01Eliminate stale manager events after a set interval, even if AMI clients ↵Tilghman Lesher
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-05-24Merge the rest of the FullyBooted patchTerry Wilson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-17Missing newlines added to Set-Cookie line in manager.cLeif Madsen
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-17Recorded merge of revisions 263456 via svnmerge from Leif Madsen
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-05New 'manager show settings' CLI command.Paul Belanger
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-04-13Merged revisions 257070 via svnmerge from Matthew Nicholson
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-09Merge Call completion support into trunk.Mark Michelson
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-03-20Resolve more compiler warnings on FreeBSD.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-28Optimization to manager events.Jeff Peeler
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-25Change api for pbx_builtin_setvar to actually return error code if a ↵Olle Johansson
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-25Merged revisions 242850 via svnmerge from Olle Johansson
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-15Convert a few places to use ast_calloc_with_stringfields where applicable.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-09Merged revisions 238915 via svnmerge from Tilghman Lesher
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
2009-12-16Enhance AMI redirect to allow channels to be redirected to different places.Jeff Peeler
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-02Merged revisions 232581 via svnmerge from Jeff Peeler
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-02Make manager response to "Action: events" finish with empty lineJeff Peeler
(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-11-13Display a list of channel variables in each channel-oriented event.Tilghman Lesher
(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