aboutsummaryrefslogtreecommitdiffstats
path: root/main
AgeCommit message (Collapse)AuthorFilesLines
2009-05-13Fix RFC2833 issues with DTMF getting duplicated and with duration wrapping over.file1-23/+58
(closes issue #14815) Reported by: geoff2010 Patches: v1-14815.patch uploaded by dimas (license 88) Tested by: geoff2010, file, dimas, ZX81, moliveras (closes issue #14460) Reported by: moliveras Tested by: moliveras git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@194208 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-13Fix logic for how to proceed with a single digit extension.tilghman1-1/+1
(closes issue #15091) Reported by: andrew Patches: 20090512__issue15091.diff.txt uploaded by tilghman (license 14) Tested by: andrew git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@194137 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-08Set the proper disposition on originated calls.mnicholson1-0/+11
(closes issue #14167) Reported by: jpt Patches: call-file-missing-cdr2.diff uploaded by mnicholson (license 96) Tested by: dlotina, rmartinez, mnicholson git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@193391 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-08Make absolute paths for logger channels work properlykpfleming1-11/+5
(Note: This is not a new feature, it was previously undocumented and broken.) The Asterisk logger has a feature to support absolute pathnames for logger channels, but the code implementing the feature was broken. This has been fixed, and the absolute path feature is now documented in the sample logger.conf. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@193193 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-07Fix Background within a Macro for FreePBX.tilghman1-2/+17
If the single digit DTMF is an extension in the specified context, then go there and signal no DTMF. Otherwise, we should exit with that DTMF. If we're in Macro, we'll exit and seek that DTMF as the beginning of an extension in the Macro's calling context. If we're not in Macro, then we'll simply seek that extension in the calling context. Previously, someone complained about the behavior as it related to the interior of a Gosub routine, and the fix (#14011) inadvertently broke FreePBX (#14940). This change should fix both of these situations, but with the possible incompatibility that if a single digit extension does not exist (but a longer extension COULD have matched), it would have previously gone immediately to the "i" extension, but will now need to wait for a timeout. (closes issue #14940) Reported by: p_lindheimer Patches: 20090420__bug14940.diff.txt uploaded by tilghman (license 14) Tested by: p_lindheimer git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@193119 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-01Fix DTMF not being sent to other side after a partial feature matchjpeeler1-1/+20
This fixes a regression from commit 176701. The issue was that ast_generic_bridge never exited after the feature digit timeout had elapsed, which prevented the queued DTMF from being sent to the other side. This issue was reported to me directly. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@191488 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-21Add check in configure script to check for GLOB_NOMAGIC and GLOB_BRACE in ↵dbailey1-8/+1
glob.h This allows config.c to compile when linked against uclibc that does not support these parameters git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@189601 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-20Clean up problem with manager implementation of mmap where it was not ↵dbailey2-12/+14
testing against MAP_FAILED response. Got rid of shadowed variable used in processign the mmap results. Change test of mmap results to compare against MAP_FAILED git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@189391 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-20Move the check for chan->fdno == -1 to after the zombie/hangup check.mmichelson1-7/+7
Many users were finding that their hung up channels were staying up and causing 100% CPU usage. (issue #14723) Reported by: seadweller Patches: 14723_1-4-tip.patch uploaded by mmichelson (license 60) Tested by: falves11, bamby git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@189277 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17Make Busy() application set the CDR disposition to BUSY.mnicholson1-1/+3
(closes issue #14306) Reported by: cristiandimache git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@189009 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-15Update ast_readvideo_callback to match ast_readaudio_callback.mmichelson1-2/+11
This fixes potential refcount errors that may occur on ast_filestreams. AST-208 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@188582 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-14audio_audiohook_write_list() does not correctly update sample size after ↵dvossel1-0/+1
ast_translate. audio_audiohook_write_list() does not take into account that the sample size may change after translation depending on if the original frame is is 8khz or 16khz. While no 16kz codecs are supported in 1.4 at the moment, this will save headaches in the future if they ever are. the sample size is now updated after translating to reflect this possibility. Thanks to jcolp and mmichelson for helping me work this out. (issue AST-197) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@188287 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09Race condition between ast_cli_command() and 'module unload' could cause a ↵tilghman1-3/+14
deadlock. Add lock timeouts to avoid this potential deadlock. (closes issue #14705) Reported by: jamessan Patches: 20090320__bug14705.diff.txt uploaded by tilghman (license 14) Tested by: jamessan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@187428 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09Oops, missed this file in the last commit.tilghman1-0/+266
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@187301 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09Add debugging mode for diagnosing file descriptor leaks.tilghman3-4/+8
(Related to issue #14625) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@187300 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08Backport resolution for file descriptor leak in 1.6.0 to 1.4.tilghman1-105/+187
This fixes short reads in http manager sessions, such as those done by the ast-gui branch. (Fixes AST-198) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@187209 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08Make a couple of changes with regards to a new message printed in ast_read().mmichelson1-6/+12
"ast_read() called with no recorded file descriptor" is a new message added after a bug was discovered. Unfortunately, it seems there are a bunch of places that potentially make such calls to ast_read() and trigger this error message to be displayed. This commit does two things to help to make this message appear less. First, the message has been downgraded to a debug level message if dev mode is not enabled. The message means a lot more to developers than it does to end users, and so developers should take an effort to be sure to call ast_read only when a channel is ready to be read from. However, since this doesn't actually cause an error in operation and is not something a user can easily fix, we should not spam their console with these messages. Second, the message has been moved to after the check for any pending masquerades. ast_read() being called with no recorded file descriptor should not interfere with a masquerade taking place. This could be seen as a simple way of resolving issue #14723. However, I still want to try to clear out the existing ways of triggering this message, since I feel that would be a better resolution for the issue. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@186984 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-07Set the AST_FEATURE_WARNING_ACTIVE flag when a p2p bridge returns ↵mmichelson1-0/+3
AST_BRIDGE_RETRY. Without this flag set, warning sounds will not be properly played to either party of the bridge. (closes issue #14845) Reported by: adomjan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@186832 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-07Ensure that \r\n is printed after the ActionID in an OriginateResponse.mmichelson1-3/+4
(closes issue #14847) Reported by: kobaz git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@186719 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-01Fix a case where DTMF could bypass audiohooks.russell1-0/+7
This change fixes a situation where an audiohook that wants DTMF would not actually get it. This is in the code path where we end DTMF digit length emulation while handling a NULL frame. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@185771 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31Fix crash when moving audiohooks between channels.file1-3/+3
Handle the scenario where we are called to move audiohooks between channels and the source channel does not actually have any on it. (closes issue #14734) Reported by: corruptor git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@185196 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25Avoid destroying the CLI line when moving the cursor backward and trying to ↵eliel1-3/+10
autocomplete. When moving the cursor backward and pressing TAB to autocomplete, a NULL is put in the line and we are loosing what we have already wrote after the actual cursor position. (closes issue #14373) Reported by: eliel Patches: asterisk.c.patch uploaded by eliel (license 64) Tested by: lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@184188 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Export some more required symbols.qwell1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@183291 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Remove the use of RTLD_NOLOAD, as it is not behaving like expected.russell1-13/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@183241 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Allow the AES API to work.russell1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@183238 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Add missing semicolon in exports script.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@183145 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Allow the CallerID API to work again.russell1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@183123 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18fix another symbol namespace issue (reported by Andrew on asterisk-dev)kpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182882 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18Fix cases where the internal poll() was not being used when it needed to be.russell7-37/+23
We have seen a number of problems caused by poll() not working properly on Mac OSX. If you search around, you'll find a number of references to using select() instead of poll() to work around these issues. In Asterisk, we've had poll.c which implements poll() using select() internally. However, we were still getting reports of problems. vadim investigated a bit and realized that at least on his system, even though we were compiling in poll.o, the system poll() was still being used. So, the primary purpose of this patch is to ensure that we're using the internal poll() when we want it to be used. The changes are: 1) Remove logic for when internal poll should be used from the Makefile. Instead, put it in the configure script. The logic in the configure script is the same as it was in the Makefile. Ideally, we would have a functionality test for the problem, but that's not actually possible, since we would have to be able to run an application on the _target_ system to test poll() behavior. 2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT is not defined. 3) Change uses of poll() throughout the source tree to ast_poll(). I feel that it is good practice to give the API call a new name when we are changing its behavior and not using the system version directly in all cases. So, normally, ast_poll() is just redefined to poll(). On systems where AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll(). 4) Change poll() in main/poll.c to be ast_internal_poll(). It's worth noting that any code that still uses poll() directly will work fine (if they worked fine before). So, for example, out of tree modules that are using poll() will not stop working or anything. However, for modules to work properly on Mac OSX, ast_poll() needs to be used. (closes issue #13404) Reported by: agalbraith Tested by: russell, vadim http://reviewboard.digium.com/r/198/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182810 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18Improve the build system to *properly* remove unnecessary symbols from the ↵kpfleming3-8/+39
runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix. With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182808 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18revert commit that included extranous changeskpfleming8-293/+174
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182807 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18Improve the build system to *properly* remove unnecessary symbols from the ↵kpfleming8-174/+293
runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix. With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182802 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17Fix race in astdbtilghman1-3/+6
The underlying db1 implementation does not fully isolate the pages retrieved from astdb, so the lock protecting accesses needs to be extended until the copy from the shared memory structure is done. (closes issue #14682) Reported by: makoto git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@182449 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Make code that updates BRIDGEPEER variable thread-safe.russell1-14/+30
It is not safe to read the name field of an ast_channel without the channel locked. This patch fixes some places in channel.c where this was being done, and lead to crashes related to masquerades. (closes issue #14623) Reported by: guillecabeza git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@181423 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-06Fix handling of backreferences for ENUM lookupsdvossel1-34/+53
enum.c did not handle regex backtraces correctly. The '\1' in the regex is a backreference that requires a pattern match to be inserted. The way the code used to work is that it would find the backreference and insert the entire input string minus the '+'. This is incorrect. The regexec() function takes in a variable called pmatch which is an array of structs containing the start and end indexes for each backreference substring. The original code actually passed the pmatch array pointer into regexec but never did anything with it. Now when a backtrace is found, the backtrace number is looked up in the pmatch array and the correct substring is inserted. (closes issue #14576) Reported by: chris-mac Review: http://reviewboard.digium.com/r/187/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@180532 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-05Fix problems when RTP packet frame size is changedkpfleming2-37/+103
During some code analysis, I found that calling ast_rtp_codec_setpref() on an ast_rtp session does not work as expected; it does not adjust the smoother that may on the RTP session, in fact it summarily drops it, even if it has data in it, even if the current format's framing size has not changed. This is not good. This patch changes this behavior, so that if the packetization size for the current format changes, any existing smoother is safely updated to use the new size, and if no smoother was present, one is created. A new API call for smoothers, ast_smoother_reconfigure(), was required to implement these changes. Review: http://reviewboard.digium.com/r/184/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@180372 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-04Look for the number in a callerid string starting from the end. This way a ↵file1-1/+1
value using <> can exist in the name portion. (issue #AST-194) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@180194 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03These changes allow AEL to better check ${} constructs within $[...], that ↵murf5-142/+194
are concatenated with text. I modified and added rules in ast_expr2.fl to better handle the concatenations. I added some default routines to ast_expr2.y so the standalone would compile. It also looks like I haven't run this thru bison since 2.1, so it's good to get this updated. The Makefile has comments added now for check_expr2 and check_expr to explain what they are for, and how to run them. The testexpr2s stuff has been removed, in favor of check_expr2. expr2.testinput has been updated to include the two expressions that inspired these changes (from mcnobody on #asterisk this morning) The regression has been run and all looks well. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179807 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03Ensure chan->fdno always gets reset to -1 after handling a channel fd event.russell1-1/+4
Since setting fdno to -1 had to be moved, a couple of other code paths that do process an fd event return early and do not pass through the code path where it was moved to. So, set it to -1 in a few other places, too. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179741 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03Move where fdno is set to the default value to *after* the read callback of ↵file1-6/+6
the channel driver is called. We have to do this as the underlying channel driver may need the fdno value to determine what to read. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179671 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03Make it easier to detect an improper call to ast_read().russell1-0/+12
When you call ast_waitfor() on a channel, the index into the channel fds array that holds the file descriptor that poll() determines has input available is stored in fdno. This patch clears out this value after a call to ast_read() and also reports errors if ast_read() is called without an fdno set. From a discussion on the asterisk-dev list. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179608 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02Fix bridging regression from commit 176701jpeeler1-1/+1
This fixes a bad regression where the bridge would exit after an attended transfer was made. The problem was due to nexteventts getting set after the masquerade which caused the bridge to return AST_BRIDGE_COMPLETE. (closes issue #14315) Reported by: tim_ringenbach git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179536 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02When ending a recording with silence detection, remember to reduce the duration.tilghman1-1/+9
The end of the recording is correspondingly trimmed, but the duration was not trimmed by the number of seconds trimmed, so the saved duration was necessarily longer than the actual soundfile duration. (closes issue #14406) Reported by: sasargen Patches: 20090226__bug14406.diff.txt uploaded by tilghman (license 14) Tested by: sasargen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179468 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02Ensure that only one thread is calling ast_settimeout() on a channel at a time.russell1-0/+2
For example, with an IAX2 channel, you can have both the channel thread and the chan_iax2 processing threads calling this function, and doing so twice at the same time is a bad thing. (Found in a debugging session with dvossel and mmichelson) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179461 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02Remove several silly warnings in editline. One about a broken preprocessor ↵qwell4-5/+129
directive, and another about strlcpy/strlcat. (closes issue #14264) Reported by: dimas git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@179395 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-25This patch completes the fixes nec. to make 1.4 asterisk dialplan ↵murf2-75/+80
expressions ($[...]) 8-bit transparent While I was updating ast_expr2.fl, I missed one rule that would allow 8-bit chars to be caught in tokens; and in so doing, it absorbs the ${ sequence and messes up the checking of raw exprs by AEL. Trunk already has these changes. (closes issue #14543) Reported by: klaus3000 Patches: patch.14543 uploaded by murf (license 17) Tested by: murf git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@178640 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-25Update the copyright year for the main page of the doxygen documentation.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@178508 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-24Only set dtmfcount on BEGIN, and ensure it gets reset to 0 properly.russell1-3/+3
(issue #14460) Reported by: moliveras Tested by: russell git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@178373 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-23Fix infinite DTMF when a BEGIN is received without an END.russell1-10/+3
This commit is related to rev 175124 of 1.4 where a previous attempt was made to fix this problem. The problem with the previous patch was that the inserted code needed to go _before_ setting the lastrxts to the current timestamp. Because those were the same, the dtmfcount variable was never decremented, and so the END was never sent. In passing, I removed the dtmfsamples variable which was completed unused. I also removed a redundant setting of the lastrxts variable. (closes issue #14460) Reported by: moliveras git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@178141 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-20Don't print the CR-NL combination when we aren't outputting to the manager.tilghman1-1/+1
An embedded CR-NL in a CLI command screws up several AMI parsers that don't expect to see that combination in the middle of output. (Closes issue #14305) Reported by: martins Patch by: tilghman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@177786 f38db490-d61c-443f-a65b-d21fe96a405b