summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2010-04-22Fix previous commit.Matthew Nicholson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22Merged revisions 193391,258670 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r193391 | mnicholson | 2009-05-08 16:01:25 -0500 (Fri, 08 May 2009) | 8 lines Set the proper disposition on originated calls. (closes issue #14167) Reported by: jpt Patches: call-file-missing-cdr2.diff uploaded by mnicholson (license 96) Tested by: dlotina, rmartinez, mnicholson ........ r258670 | mnicholson | 2010-04-22 16:49:07 -0500 (Thu, 22 Apr 2010) | 11 lines Fix broken CDR behavior. This change allows a CDR record previously marked with disposition ANSWERED to be set as BUSY or NO ANSWER. Additionally this change partially reverts r235635 and does not set the AST_CDR_FLAG_ORIGINATED flag on CDRs generated from ast_call(). To preserve proper CDR behavior, the AST_CDR_FLAG_DIALED flag is now cleared from all brige CDRs in ast_bridge_call(). (closes issue #16797) Reported by: VarnishedOtter Tested by: mnicholson ........ (closes issue #16222) Reported by: telles Tested by: mnicholson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22Add ast_event subscription unit test and fix some ast_event API bugs.Russell Bryant
This patch introduces another test in test_event.c that exercises most of the subscription related ast_event API calls. I made some minor additions to the existing event allocation test to increase API coverage by the test code. Finally, I made a list in a comment of API calls not yet touched by the test module as a to-do list for future test development. During the development of this test code, I discovered a number of bugs in the event API. 1) subscriptions to AST_EVENT_ALL were not handled appropriately in a couple of different places. The API allows a subscription to all event types, but with IE parameters, just as if it was a subscription to a specific event type. However, the parameters were being ignored. This affected ast_event_check_subscriber() and event distribution to subscribers. 2) Some of the logic in ast_event_check_subscriber() for checking subscriptions against query parameters was wrong. Review: https://reviewboard.asterisk.org/r/617/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22Remove ABI differences that occured when compiling with DEBUG_THREADS.Jason Parker
"Bad Things" would happen if Asterisk was compiled with DEBUG_THREADS, but a loaded module was not (or vice versa). This also immensely simplifies the lock code, since there are no longer 2 separate versions of them. Review: https://reviewboard.asterisk.org/r/508/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22Asterisk data retrieval API.Eliel C. Sardanons
This module implements an abstraction for retrieving and exporting asterisk data. Developed by: Brett Bryant <brettbryant@gmail.com> Eliel C. Sardanons (LU1ALY) <eliels@gmail.com> For the Google Summer of code 2009 Project. Documentation can be found in doxygen format and inside the header include/asterisk/data.h Review: https://reviewboard.asterisk.org/r/275/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-21Added MixMonitorMute manager commandJulian Lyndon-Smith
Added a new manager command to mute/unmute MixMonitor audio on a channel. Added a new feature to audiohooks so that you can mute either read / write (or both) types of frames - this allows for MixMonitor to mute either side of the conversation without affecting the conversation itself. (closes issue #16740) Reported by: jmls Review: https://reviewboard.asterisk.org/r/487/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-19Change log message to match severity.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-19Don't consider a missing indications.conf to be a critical error.Jason Parker
There were many changes in revision 176627 which would avoid the error that a missing config would have caused. Other than this, there are no other config files (including asterisk.conf, surprisingly) that are required. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-19Fix incomplete CDR merge from r195881Terry Wilson
Because res/res_features.c was removed and main/cdr.c added, these changes didn't make it to trunk and the 1.6.x branches git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-15Merged revisions 257544 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r257544 | tilghman | 2010-04-15 16:23:24 -0500 (Thu, 15 Apr 2010) | 6 lines Allow application options with arguments to contain parentheses, through a variety of escaping techniques. Fixes SWP-1194 (ABE-2143). Review: https://reviewboard.asterisk.org/r/604/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-14Yet another issue where the conversion of the application delimiter to comma ↵Tilghman Lesher
caused an issue. Application arguments within the feature map could possibly contain a comma, which conflicts with the syntax of the features.conf configuration file. This patch allows the argument to be wrapped in parentheses or quoted, to allow the application arguments to be interpreted as a single configuration parameter. (closes issue #16646) Reported by: pinga-fogo Patches: 20100414__issue16646.diff.txt uploaded by tilghman (license 14) Tested by: tilghman Review: https://reviewboard.asterisk.org/r/547/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257262 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-12Fix issue where recall would not happen when it should.Mark Michelson
Specifically, the situation would happen when multiple callers would request CC for a single generically-monitored device. If the monitored device became available but the caller did not answer the recall, then there was nothing that would poke the CC core to let it know that it should attempt to recall someone else instead. After careful consideration, I came to the conclusion that the only area of Asterisk that needed to be touched was the generic CC monitor. All other types of CC would require something outside of Asterisk to invoke a recall for a separate device. This was accomplished by changing the generic monitor destructor to poke other generic monitor instances if the device is currently available and the specific instance was currently not suspended. In order to not accidentally trigger recalls at bad times, the fit_for_recall flag was also added to the generic_monitor_instance_list struct. This gets set as soon as a monitored device becomes available. It gets cleared if a CCNR request triggers the creation of a new generic monitor instance. By doing this, we don't accidentally try to recall a device when the monitored device was being monitored for CCNR and never actually became available for recall in the first place. This error was discovered by Steve Pitts during in-house testing at Digium. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-12CLI command logger set level auto complete.Leif Madsen
A simple patch to enable auto tab complete. (closes issue #17152) Reported by: pabelanger Patches: 0017152.patch uploaded by pabelanger (license 224) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-09Remove status_response callbacks where they are not needed.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256661 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-04-09func_srv and explicit specification of a remote IP for SIP.Mark Michelson
From Review Board: There are two interrelated changes here. First, there is the introduction of func_srv. This adds two new read-only dialplan functions, SRVQUERY and SRVRESULT. They work very similarly to the ENUMQUERY and ENUMRESULT functions, except that this allows one to query SRV records instead. In order to facilitate this work, I added a couple of new API calls to srv.h. ast_srv_get_record_count tells the number of records returned by an SRV lookup. This number is calculated at the time of the SRV lookup. ast_srv_get_nth_record allows one to get a numbered SRV record. Second, there is the modification to chan_sip that allows one to specify a hostname or IP address (along with a port) to send an outgoing INVITE to when dialing a SIP peer. This goes hand-in-hand with func_srv. You can query SRV records and then use the host and port from the results to dial via a specific host instead of what is configured in sip.conf. Review: https://reviewboard.asterisk.org/r/608 SWP-1200 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-03Consolidate ast_channel.cid.cid_rdnis into ast_channel.redirecting.from.number.Richard Mudgett
SWP-1229 ABE-2161 * Ensure chan_local.c:local_call() will not leak cid.cid_dnid when copying. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-02Merged revisions 256009 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r256009 | russell | 2010-04-02 18:30:15 -0500 (Fri, 02 Apr 2010) | 2 lines Remove extremely verbose debug message. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-02Pass the PID of the Asterisk process, not the PID of the canary.Tilghman Lesher
(closes issue #17065) Reported by: globalnetinc Patches: astcanary.patch uploaded by makoto (license 38) Tested by: frawd, globalnetinc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-02Allow symbol export filtering to work properly on platforms that have symbol ↵Kevin P. Fleming
prefixes. Some platforms prefix externally-visible symbols in object files generated from C sources (most commonly, '_' is the prefix). On these platforms, the existing symbol export filtering process ends up suppressing all the symbols that are supposed to be left visible. This patch allows the prefix string to be supplied to the top-level Makefile in the LINKER_SYMBOL_PREFIX variable, and then generates the linker scripts as required to include the prefix supplied. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-29Remove a debugging log entry.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-25Merged revisions 254451 via svnmerge from Terry Wilson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r254451 | twilson | 2010-03-25 10:57:29 -0500 (Thu, 25 Mar 2010) | 2 lines Handle new SRCCHANGE control message here too ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-25Improve handling of T.38 re-INVITEs that arrive before a T.38-capableKevin P. Fleming
application is executing on a channel. This patch addresses an issue found during working with end-users using res_fax. If an incoming call is answered in the dialplan, or jumps to the 'fax' extension due to reception of a CNG tone (with faxdetect enabled), and then the remote endpoint sends a T.38 re-INVITE, it is possible for the channel's T.38 state to be 'T38_STATE_NEGOTIATING' when the application starts up. Unfortunately, even if the application wants to use T.38, it can't respond to the peer's negotiation request, because the AST_CONTROL_T38_PARAMETERS control frame that chan_sip sent originally has been lost, and the application needs the content of that frame to be able to formulate a reply. This patch adds a new 'request' type to AST_CONTROL_T38_PARAMETERS, AST_T38_REQUEST_PARMS. If the application sends this request, chan_sip will re-send the original control frame (with AST_T38_REQUEST_NEGOTIATE as the request type), and the application can respond as normal. If this occurs within the five second timeout in chan_sip, the automatic cancellation of the peer reinvite will be stopped, and the application will 'own' the negotiation process from that point onwards. This also improves the code path in chan_sip to allow sip_indicate(), when called for AST_CONTROL_T38_PARAMETERS, to be able to return a non-zero response, which should have been in place before since the control frame *can* fail to be processed properly. It also modifies ast_indicate() to return whatever result the channel driver returned for this control frame, rather than converting all non-zero results into '-1'. Finally, the new request type intentionally returns a positive value, so that an application that sends AST_T38_REQUEST_PARMS can know for certain whether the channel driver accepted it and will be replying with a control frame of its own, or whether it was ignored (if the sip_indicate()/ast_indicate() path had properly supported failure responses before, this would not be necessary). This patch also modifies res_fax to take advantage of the new request. In addition, this patch makes sip_t38_abort() actually lock the private structure before doing its work... bad programmer, no donut. This patch also enhances chan_sip's 'faxdetect' support to allow triggering on T.38 re-INVITEs received as well as CNG tone detection. Review: https://reviewboard.asterisk.org/r/556/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-24Fix potential invalid reads that could occur in pbx.cMark Michelson
Here is a cut and paste of my review request for this change: This past weekend, Russell ran our current suite of unit tests for Asterisk under valgrind. The PBX pattern match test caused valgrind to spew forth two invalid read errors. This patch contains two changes that shut valgrind up and do not cause any new memory leaks. Change 1: In ast_context_remove_extension_callerid2, valgrind reported an invalid read in the for loop close to the function's end. Specifically, one of the the strcmp calls in the loop control was reading invalid memory. This was because the caller of ast_context_remove_extension_callerid2 (__ast_context destroy in this case) passed as a parameter a shallow copy of an ast_exten's exten field. This same ast_exten was what was destroyed inside the for loop, thus any iterations of the for loop beyond the destruction of the ast_exten would result in invalid reads. My fix for this is to make a copy of the ast_exten's exten field and pass the copy to ast_context_remove_extension_callerid2. In addition, I have also acted similarly with the ast_exten's matchcid field. Since in this case a NULL is handled quite differently than an empty string, I needed to be a bit more careful with its handling. Change 2: In __ast_context_destroy, we iterated over a hashtab and called ast_context_remove_extension_callerid2 on each item. Specifically, the hashtab over which we were iterating was an ast_exten's peer_table. Inside of ast_context_remove_extension_callerid2, we could possibly destroy this ast_exten, which also caused the hashtab to be freed. Attempting to call ast_hashtab_end_traversal on the hashtab iterator caused an invalid read to occur when trying to read the iterator->tab->do_locking field since iterator->tab had already been freed. My handling of this problem is a bit less straightforward. With each iteration over the hashtab's contents, we set a variable called "end_traversal" based on the return of ast_context_remove_extension_callerid2. If 0 is ever returned, then we know that the extension was found and destroyed. Because of this, we cannot call ast_hashtab_end_traversal because we will be guaranteeing a read of invalid memory. In such a case, we forego calling ast_hashtab_end_traversal and instead call ast_free on the hashtab iterator. Review: https://reviewboard.asterisk.org/r/585 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-23make 'core show settings' should show all settable directoriesTzafrir Cohen
(closes issue #17086) Reported by: tzafrir Patches: asterisk_extra_settings_dirs.diff uploaded by tzafrir (license 46) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-23Put test output for a failure in a CDATA section in the XML results.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-23Exit native bridging early for greater timing accuracy with warningsJeff Peeler
This changes native bridging to break one millisecond early so that the more accurate timeval calculations done in the generic bridge can be performed using the bridge config. Currently the time between exiting native bridging slightly late can sometimes cause a large enough discrepancy for warnings to be missed. For the record, 1.4 does not attempt to native bridge at all when warnings are enabled. (closes issue #15815) Reported by: adomjan Review: https://reviewboard.asterisk.org/r/577/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@254050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-23Don't act like an http write failed when it didn'tTerry Wilson
fwrite returns the number of items written, not the number of bytes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-23Change per-file debug and verbose levels to be per-module, the wayKevin P. Fleming
users expect them to work. 'core set debug' and 'core set verbose' can optionally change the level for a specific filename; however, this is actually for a specific source file name, not the module that source file is included in. With examples like chan_sip, chan_iax2, chan_misdn and others consisting of multiple source files, this will not lead to the behavior that users expect. If they want to set the debug level for chan_sip, they want it set for all of chan_sip, and not to have to also set it for reqresp_parser and other files that comprise the chan_sip module. This patch changes this functionality to be module-name based instead of file-name based. To make this work, some Makefile modifications were required to ensure that the AST_MODULE definition is present in each object file produced for each module as well. Review: https://reviewboard.asterisk.org/r/574/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-22Initialize channels prior to loading "preload" modules.Mark Michelson
We can have bad results when a module, upon being loaded, attempts to reference the channels container if the container hasn't yet been initialized. I saw this happen by trying to preload pbx_config.so and having a hint defined which referenced a non-existent SIP peer. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-22Merged revisions 253799 via svnmerge from Matthew Nicholson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r253799 | mnicholson | 2010-03-22 14:50:00 -0500 (Mon, 22 Mar 2010) | 4 lines Unconditionally copy the caller's account code to the called party. (related to issue #16331) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253800 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-03-19prevent segfault if bad magic number is encountered.Alec L Davis
internal_ao2_ref uses INTERNAL_OBJ which mzy report 'bad magic number', but internal_ao2_ref continues on, causing segfault. Although AO2_MAGIC number is checked by INTERNAL_OBJ before internal_ao2_ref is called, A02_MAGIC is being destroyed (or a wrong pointer) by the time internal_ao2_ref uses INTERNAL_OBJ. internal_ao2_ref now returns -1 if INTERNAL_OBJ encouters a bad magic number. (issue #17037) Reported by: alecdavis Patches: bug17037.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-18Update comment to reflect new timeout value.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-18Increase CLI command output timeout for asterisk -rx to 60 seconds.Russell Bryant
(closes issue #17049) Reported by: russell Tested by: russell Review: https://reviewboard.asterisk.org/r/573/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-18Just in case of a race, send the signal on interrupt.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-17main/test.c reports erroneous CLI message.Leif Madsen
(closes issue #17051) Reported by: Nick_Lewis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-17Fix a typo.Leif Madsen
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-16Fix test_time on Mac OS X (and other platforms without inotify)Tilghman Lesher
Reviewboard: https://reviewboard.asterisk.org/r/554/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-15Merged revisions 252361 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r252361 | tilghman | 2010-03-14 20:33:50 -0500 (Sun, 14 Mar 2010) | 4 lines Launch Asterisk on Mac OS X with launchd. Reviewboard: https://reviewboard.asterisk.org/r/551/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-13Resolve unit test failure that occurred on Mac OSX.Russell Bryant
On Linux (glibc), regcomp() does not return an error for an empty string. However, the version on OSX will return an error. The test for channel group matching by regex now passes on the mac, as well. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-12Only change the RTP ssrc when we see that it has changedTerry Wilson
This change basically reverts the change reviewed in https://reviewboard.asterisk.org/r/374/ and instead limits the updating of the RTP synchronization source to only those times when we detect that the other side of the conversation has changed the ssrc. The problem is that SRCUPDATE control frames are sent many times where we don't want a new ssrc, including whenever Asterisk has to send DTMF in a normal bridge. This is also not the first time that this mistake has been made. The initial implementation of the ast_rtp_new_source function also changed the ssrc--and then it was removed because of this same issue. Then, we put it back in again to fix a different issue. This patch attempts to only change the ssrc when we see that the other side of the conversation has changed the ssrc. It also renames some functions to make their purpose more clear. Review: https://reviewboard.asterisk.org/r/540/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-10Add new unit test for stringfields.Jeff Peeler
(Copied from reviewboard) Tests the following: 1. Basic allocation and setting of string fields. 2. Shrinking a string field and re-expanding it. 3. Growing the last allocation in a string field pool. 4. Setting a string to a large value such that a new string field pool must be allocated. In each part, we make sure that the string field is accurate (has the correct value in it), make sure that the 2 bytes before the string field has the correct capacity for the field, and for tests 2-4, we make sure that the string field is where we expect it to be in memory. Also tested: 5. Shrinking a string field and partially re-expanding it. 6. Setting strings in such a way as to create three separate string field pools and then removing the middle pool. There is a bug fix in the init function, which ensures the embedded_pool is set to NULL which is important for stack allocated structures. Review: https://reviewboard.asterisk.org/r/185/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-10Fix ParkAndAnnounce not respecting parking options.Jeff Peeler
The patch ensures that if a peer does not exist, parking settings are read from the channel. A unit test has been written to ensure proper operation for both standard parking and parking using masquerades. (closes issue #16592) Reported by: mwyres Patches: bug_16592.diff uploaded by snuffy (license 35) Review: https://reviewboard.asterisk.org/r/539/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-10Fix jitterbuffer logging not creating logfiles.Jeff Peeler
Three changes made here: 1) Do not fail if a previous log does not exist (in fact, this is probably expected). 2) Ensure that the file descriptor to write to gets assigned properly. I am at a loss as to why assigning safe_fd outside the if fixes this, but it makes the if statement slightly less complicated anyway. 3) Move up the failure message so that the errno of the failure is not overwritten by fclose. (closes issue #16917) Reported by: Artem git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-08Remove portions that weren't meant to be committed for the OS X compat fixTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-08Change needed to make Mac OS X 10.6 happyTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-03Removed cdrflags from ast_channel structure.Richard Mudgett
Only chan_dahdi set a value in cdrflags. Everyone else just copied it around the system. Noone cared about any value it may have contained. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-03Changes 0ms to <1ms in cli END results during 'test execute'David Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@250478 65c4cc65-6c06-0410-ace0-fbb531ad65f3