aboutsummaryrefslogtreecommitdiffstats
path: root/main
AgeCommit message (Collapse)AuthorFilesLines
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
2009-09-16Properly deal with quotes in the arguments of '#exec' includes.tilghman1-9/+18
(closes issue #15583) Reported by: pkempgen Patches: 20090726__issue15583.diff.txt uploaded by tilghman (license 14) 20090726__issue15583-1.4-4.diff.txt uploaded by pkempgen (license 169) Tested by: pkempgen git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@219023 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-16Fixes CID pattern matching behavior to mirror that of extension pattern ↵dbrooks1-1/+1
matching. Pattern matching for extensions uses a type of scoring system, giving values for specificity to each character in the pattern. Unfortunately, this is done character by character, in order. This does lead to some less specific patterns being first in line for matching, but it will usually get the job done. This patch merely brings CID matching to the same level as extension matching. This patch does not attempt to tackle the problem shared by extension matching. (closes issue #14708) Reported by: klaus3000 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@218867 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-04make asterisk compile under devmode with DEBUG_THREADS enabled on OpenBSDmvanbaak1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@216435 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-04Make apps send PROGRESS control frame for early media and fix too early ↵oej1-0/+2
media issue in SIP The issue at hand is that some legacy (dying) PBX systems send empty media frames on PRI links *before* any call progress. The SIP channel receives these frames and by default signals 183 Session progress and starts sending media. This will cause phones to play silence and ignore the later 180 ringing message. A bad user experience. The fix is twofold: - We discovered that asterisk apps that support early media ("noanswer") did not send any PROGRESS frame to indicate early media. Fixed. - We introduce a setting in chan_sip so that users can disable any relay of media frames before the outbound channel actually indicates any sort of call progress. In 1.4, 1.6.0 and 1.6.1, this will be disabled for backward compatibility. In later versions of Asterisk, this will be enabled. We don't assume that it will change your Asterisk phone experience - only for the better. We encourage third-party application developers to make sure that if they have applications that wants to send early media, add a PROGRESS control frame transmission to make sure that all channel drivers actually will start sending early media. This has not been the default in Asterisk previous to this patch, so if you got inspiration from our code, you need to update accordingly. Sorry for the trouble and thanks for your support. This code has been running for a few months in a large scale installation (over 250 servers with PRI and/or BRI links to old PBX systems). That's no proof that this is an excellent patch, but, well, it's tested :-) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@216430 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-04Make sure 'start' is always initialized.mvanbaak1-1/+1
This is the same as rev 216222 in trunk but 1.4 is affected as well git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@216369 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-03Merge code associated with AST-2009-006dvossel2-13/+18
(closes issue #12912) Reported by: rathaus Tested by: tilghman, russell, dvossel, dbrooks git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@216000 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-28Modify comment to be a bit more accurate.tilghman1-4/+4
We have kept this comment around long enough, that it's pretty clear that we're keeping the code, because changing the code would require a pretty fundamental architectural shift. We've also taken criticism in some quarters, because it was believed that it was referring to the code being nasty. No, the code isn't nasty, just the operation itself is rather odd. Fixed for eternity (probably not). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@214701 f38db490-d61c-443f-a65b-d21fe96a405b