aboutsummaryrefslogtreecommitdiffstats
path: root/main
AgeCommit message (Collapse)AuthorFilesLines
2010-01-05Change a NOTICE log message to DEBUG where it belongs.russell1-1/+3
(closes issue #16479) Reported by: alexrecarey (closes SWP-577) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@237697 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04Bounds checking for input stringtilghman1-25/+25
(closes issue #16407) Reported by: qwell Patches: 20100104__issue16407.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@237573 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04Regression in issue #15421 - Pattern matchingtilghman1-22/+20
(closes issue #16482) Reported by: wdoekes Patches: astsvn-16482-betterfix.diff uploaded by wdoekes (license 717) 20091223__issue16482.diff.txt uploaded by tilghman (license 14) Tested by: wdoekes, tilghman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@237493 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04Add a flag to disable the Background behavior, for AGI users.tilghman1-1/+6
This is in a section of code that relates to two other issues, namely issue #14011 and issue #14940), one of which was the behavior of Background when called with a context argument that matched the current context. This fix broke FreePBX, however, in a post-Dial situation. Needless to say, this is an extremely difficult collision of several different issues. While the use of an exception flag is ugly, fixing all of the issues linked is rather difficult (although if someone would like to propose a better solution, we're happy to entertain that suggestion). (closes issue #16434) Reported by: rickead2000 Patches: 20091217__issue16434.diff.txt uploaded by tilghman (license 14) 20091222__issue16434__1.6.1.diff.txt uploaded by tilghman (license 14) Tested by: rickead2000 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@237405 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-18Correct CDR dispositions for BUSY/FAILEDjpeeler1-1/+3
This patch is simple in that it reorders the disposition defines so that the fix for issue 12946 works properly (the default CDR disposition was changed to AST_CDR_NOANSWER). Also, the AST_CDR_FLAG_ORIGINATED flag was set in ast_call to ensure all CDR records are written. The side effects of CDR changes are scary, so I'm documenting the test cases performed to attempt to catch any regressions. The following tests were all performed using 1.4 rev 195881 vs head (235571) + patch: A calls B C calls B (busy) Hangup C Hangup A (Both SIP and features) A calls B A blind transfers to C Hangup C (Both SIP and features) A calls B A attended transfers to C Hangup C A calls B A attended transfers to C (SIP) C blind transfers to A (features) Hangup A All of the test scenario CDRs matched. The following tests were performed just with the patch to ensure proper operation (with unanswered=yes): exten =>s,1,Answer exten =>s,n,ResetCDR(w) exten =>s,n,ResetCDR(w) exten =>s,1,ResetCDR(w) exten =>s,n,ResetCDR(w) (closes issue #16180) Reported by: aatef Patches: bug16180.patch uploaded by jpeeler (license 325) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@235635 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-17Use context from which Macro is executed, not macro context, if applicable.tilghman1-3/+13
Also, ensure that the extension COULD match, not just that it won't match more. (closes issue #16113) Reported by: OrNix Patches: 20091216__issue16113.diff.txt uploaded by tilghman (license 14) Tested by: OrNix git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@235421 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-09Fix breakage of the "module load <module>" CLI command.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@233879 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-09Set a module load priority for format modules.russell1-46/+72
A recent change to app_voicemail made it such that the module now assumes that all format modules are available while processing voicemail configuration. However, when autoloading modules, it was possible that app_voicemail was loaded before the format modules. Since format modules don't depend on anything, set a module load priority on them to ensure that they get loaded first when autoloading. This version of the patch is specific to Asterisk 1.4 and 1.6.0. These versions did not already support module load priority in the module API. This adds a trivial version of this which is just a module flag to include it in a pass before loading "everything". Thanks to mmichelson for the review! (closes issue #16412) Reported by: jiddings Tested by: russell Review: https://reviewboard.asterisk.org/r/445/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@233782 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-07hex escape control and non 7-bit clean characters in uri_encodedvossel1-1/+1
In ast_uri_encode, non 7-bit clean characters were being hex escaped correctly, but control characters were not. (issue #16299) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@233609 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-04Only do frame payload check for HOLD frames.russell1-3/+3
This code was added for helping to debug the source of invalid HOLD frames. However, a side effect of this is that it will incorrectly report errors for frames that have an integer payload. Make the check for this block specific to the HOLD frame case. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@233092 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-04Warning message gets displayed only oncemnick1-1/+6
Added additional field 'int display_inband_dtmf_warning', which when set to '1' displays the warning ('Inband DTMF is not supported on codec %s. Use RFC2833'), and when set to '0' doesn't display the warning. Otherwise you would get hundreds of warnings every second. (closes issue #15769) Reported by: falves11 Patches: patch_15769_14.txt uploaded by mnick (license 874) Tested by: mnick, falves11 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@233014 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02Send ack (response/message) after receiving manager action usereventjpeeler1-0/+1
(closes issue #16264) Reported by: dimas Patches: event-ack.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@232581 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02ast_outaddrfor doesn't do htons() on port, looks odd in strace.dvossel1-1/+1
(closes issue #16290) Reported by: wdoekes git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@232350 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02Fix compiling without devmodetwilson1-1/+3
(closes issue #16367) Reported by: falves11 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@232165 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-01Fix a warning pointed out by buildbot.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@232007 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-01log channel name in dev mode as welljpeeler1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@231926 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-01Fix crash with invalid frame datajpeeler1-0/+11
The crash was happening as a result of a frame containing an invalid data pointer, but was set with data length of zero. The few times the issue was reproduced it _seemed_ that the frame was queued properly, that is the data pointer was set to NULL. I never could reproduce the crash so as a last resort the crash has been fixed, but a check in __ast_read has been added to give as much information about the source of problematic frames in the future. (closes issue #16058) Reported by: atis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@231911 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-01WaitExten m option with no parameters generates frame with zero datalen but ↵dvossel1-1/+1
non-null data ptr git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@231853 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-01Ignore unknown formats in ast_format_str_reduce() and return an error if no ↵mnicholson1-2/+15
know formats are found. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@231740 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-30Remove duplicate entries from voicemail format lists. This prevents ↵mnicholson2-6/+66
app_voicemail from entering an infinite loop when the same format is specified twice in the format list. (closes issue #15625) Reported by: Shagg63 Tested by: mnicholson Review: https://reviewboard.asterisk.org/r/429/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@231614 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-30fixes crash caused by RTP comfort noise payload greater than 24 bytesdvossel1-1/+0
AST-2009-010 (closes issue #16242) Reported by: amorsen Patches: issue16242.diff uploaded by oej (license 306) Tested by: amorsen, oej, dvossel git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@231441 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-25After a frame duplication failure, unlock the channel before returning.tilghman1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@231298 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-19Update copyright year in visible output. (cli)mvanbaak1-3/+3
Spotted by Stuart Henderson git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@230469 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-11Solaris doesn't like NULL going to ast_logdbrooks1-4/+5
Solaris will crash if NULL is passed to ast_log. This simple patch simply uses S_OR to get around this. (closes issue #15392) Reported by: yrashk git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@229498 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-10If two pattern classes start with the same digit and have the same number of ↵tilghman1-18/+36
characters, they will compare equal. The example given in the issue report is that of [234] and [246], which have these characteristics, yet they are clearly not equivalent. The code still uses these two characteristics, yet when the two scores compare equal, an additional check will be done to compare all characters within the class to verify equality. (closes issue #15421) Reported by: jsmith Patches: 20091109__issue15421__2.diff.txt uploaded by tilghman (license 14) Tested by: jsmith, thedavidfactor git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@229360 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-09Update WARNING message.lmadsen1-1/+1
Update a WARNING message to give a suggested fix when encountered. (closes issue #16198) Reported by: atis Tested by: atis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@228896 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06fixes audiohook write crash occuring in chan_spy whisper mode.dvossel1-2/+10
After writing to the audiohook list in ast_write(), frames were being freed incorrectly. Under certain conditions this resulted in a double free crash. (closes issue #16133) Reported by: wetwired (closes issue #16045) Reported by: bluecrow76 Patches: issue16045.diff uploaded by dvossel (license 671) Tested by: bluecrow76, dvossel, habile git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@228692 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06Fix a bug caused by a partially invalid frame (from the jitterbuffer) ↵file1-5/+1
passing through the Asterisk core. (closes issue #15560) Reported by: jvandal (closes issue #15709) Reported by: covici git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@228409 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06Properly handle '=' while decoding base64 messages and null terminate ↵mnicholson1-1/+1
strings returned from BASE64_DECODE. (closes issue #15271) Reported by: chappell Patches: base64_fix.patch uploaded by chappell (license 8) Tested by: kobaz git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@228378 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06fixes crash in astfd.cdvossel1-4/+9
(closes issue #15981) Reported by: slavon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@228338 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-27Manager output is not always NULL-terminated, so force a NULL at the end of ↵tilghman1-2/+6
the filestream. (closes issue #15495) Reported by: pdf Patches: 20090916__issue15495.diff.txt uploaded by tilghman (license 14) Tested by: pdf git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@226138 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21Revert 225169, as this doesn't account for the possibility of a list of frames.russell1-6/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@225171 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21Isolate the frame returned from ast_translate().russell1-2/+6
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@225169 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21Fix documentation for ast_softhangup() and correct the misuse thereof.tilghman1-2/+3
(closes issue #16103) Reported by: majorbloodnok git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@225105 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-21Isolate frames returned from a DSP instance or codec translator.russell3-76/+8
The reasoning for these changes are the same as what I wrote in the commit message for rev 222878. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@224931 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-20Pay attention to the return value of the manipulate function.tilghman1-4/+12
While this looks like an optimization, it prevents a crash from occurring when used with certain audiohook callbacks (diagnosed with SVN trunk, backported to 1.4 to keep the source consistent across versions). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@224855 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-19Correct timestamp calculations when RTP sample rates over 8kHz are used.kpfleming1-9/+14
While testing some endpoints that support 16kHz and 32kHz sample rates, some log messages were generated due to calc_rxstamp() computing timestamps in a way that produced odd results, so this patch sanitizes the result of the computations. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@224670 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-11Remove some unnecessary code.russell1-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@223486 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-11Don't use data outside of its scope.russell1-1/+5
The purpose of this code was to have a hangup frame put on the list of deferred frames. However, the code that read the hangup frame was outside of the scope of where the hangup frame was declared. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@223485 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-09Signal timeouts by returning AST_CONTROL_RINGING when originating calls.mnicholson1-1/+5
(closes issue #15104) Reported by: nblasgen Patches: manager-timeout1.diff uploaded by mnicholson (license 96) Tested by: nblasgen, mnicholson git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@223225 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-08Make filestream frame handling safer by isolating frames before returning them.russell2-49/+38
This patch is related to a number of issues on the bug tracker that show crashes related to freeing frames that came from a filestream. A number of fixes have been made over time while trying to figure out these problems, but there re still people seeing the crash. (Note that some of these bug reports include information about other problems. I am specifically addressing the filestream frame crash here.) I'm still not clear on what the exact problem is. However, what is _very_ clear is that we have seen quite a few problems over time related to unexpected behavior when we try to use embedded frames as an optimization. In some cases, this optimization doesn't really provide much due to improvements made in other areas. In this case, the patch modifies filestream handling such that the embedded frame will not be returned. ast_frisolate() is used to ensure that we end up with a completely mallocd frame. In reality, though, we will not actually have to malloc every time. For filestreams, the frame will almost always be allocated and freed in the same thread. That means that the thread local frame cache will be used. So, going this route doesn't hurt. With this patch in place, some people have reported success in not seeing the crash anymore. (SWP-150) (AST-208) (ABE-1834) (issue #15609) Reported by: aragon Patches: filestream_frisolate-1.4.diff2.txt uploaded by russell (license 2) Tested by: aragon, russell (closes issue #15817) Reported by: zerohalo Tested by: zerohalo (closes issue #15845) Reported by: marhbere Review: https://reviewboard.asterisk.org/r/386/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@222878 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-08fixes an ast_netsock_list memory leak.dvossel1-0/+1
ABE-1998 Review: https://reviewboard.asterisk.org/r/395/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@222877 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06Fix ao2_iterator API to hold references to containers being iterated.kpfleming1-2/+13
See Mantis issue for details of what prompted this change. Additional notes: This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK has become an enum instead of a macro, with a name that fits our naming policy; also, it is now necessary to call ao2_iterator_destroy() on any iterator that has been created. Currently this only releases the reference to the container being iterated, but in the future this could also release other resources used by the iterator, if the iterator implementation changes to use additional resources. (closes issue #15987) Reported by: kpfleming Review: https://reviewboard.asterisk.org/r/383/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@222152 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-02Ensure the result of the hash function is positive. Negative array offsets ↵tilghman1-1/+1
suck. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@221970 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-01Fix a bunch of off-by-one errorstilghman3-19/+19
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@221776 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-30Avoid a potential NULL dereference.tilghman1-5/+2
(closes issue #15865) Reported by: kobaz Patches: 20090915__issue15865.diff.txt uploaded by tilghman (license 14) Tested by: kobaz git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@221200 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-30Change the SSRC by default when our media stream changestwilson1-1/+9
Be default, change SSRC when doing an audio stream changes Asterisk doesn't honor marker bit when reinvited to already-bridged RTP streams,resulting in far-end stack discarding packets with "old" timestamps that areactually part of a new stream. This patch sends AST_CONTROL_SRCUPDATE whenever there is a reinvite, unless the 'constantssrc' is set to true in sip.conf. The original issue reported to Digium support detailed the following situation: ITSP <-> Asterisk 1.4.26.2 <-> SIP-based Application Server Call comes in fromITSP, Asterisk dials the app server which sends a re-invite back toAsterisk--not to negotiate to send media directly to the ITSP, but to indicatethat it's changing the stream it's sending to Asterisk. The app servergenerates a new SSRC, sequence numbers, timestamps, and sets the marker bit on the new stream. Asterisk passes through the teimstamp of the new stream, butdoes not reset the SSRC, sequence numbers, or set the marker bit. When the timestamp on the new stream is older than the timestamp on the originalstream, the ITSP (which doesn't know there has been any change) discards the newframes because it thinks they are too old. This patch addresses this by changing the SSRC on a stream update unless constantssrc=true is set in sip.conf. Review: https://reviewboard.asterisk.org/r/374/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@221086 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-24Implicitly sending a progress signal breaks some applications.tilghman1-2/+0
Call Progress() in your dialplan if you explicitly want progress to be sent. (Reverts change 216430, closes issue #15957) Reported by: Pavel Troller on the Asterisk-Dev mailing list http://lists.digium.com/pipermail/asterisk-dev/2009-September/039897.html git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@220288 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-20Really stop the stream, when ast_closestream() is called.tilghman1-0/+16
(closes issue #15129) Reported by: bmh Patches: 20090918__issue15129.diff.txt uploaded by tilghman (license 14) Review: https://reviewboard.asterisk.org/r/372/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@219653 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-17Prevent a potential race condition and crash when hanging up a channel by ↵mnicholson1-8/+26
removing the channel from the channel list before begining channel tear down. This fix may potentially cause problems with CDR backends that access the channel a CDR is associated with via the channel list. This fix makes the channel unavabile at the time when the CDR backend is invoked. This has been documented in include/asterisk/cdr.h. (closes issue #15316) Reported by: vmarrone Tested by: mnicholson Review: https://reviewboard.asterisk.org/r/362/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@219136 f38db490-d61c-443f-a65b-d21fe96a405b