summaryrefslogtreecommitdiff
path: root/channels
AgeCommit message (Collapse)Author
2008-04-05Found a little problem with the sip request handling that could lead to a ↵Steve Murphy
quick crash of asterisk, and a road to a DOS attack if left unfixed. Attaching to a running asterisk with "telnet hostname 5060", I would input "something", then hit return three times, and asterisk crashes. I traced it to handle_request_do(), which zeroes out the data (an ast_str ptr) if the string is too short. Instead of freeing the struct and nulling the pointer, it now just resets it, because this ast_str is expected by the calling routine to still be there after handle_request_do() returns. This appears to fix the crash. I assume that it was introduced with ast_str's being adopted. It's a subtle and easy-to-miss sort of problem. I also found all the places where the req.data is freed, and made sure the ptr is Nulled out as well; no good leaving bad ptrs laying around-- I didn't need to do this, but it seemed a good thing to do... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-04Merged revisions 112820 via svnmerge from Philippe Sultan
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r112820 | phsultan | 2008-04-04 21:26:15 +0200 (Fri, 04 Apr 2008) | 1 line Free newly allocated channel before returning ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-04Merged revisions 112766 via svnmerge from Philippe Sultan
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r112766 | phsultan | 2008-04-04 19:16:59 +0200 (Fri, 04 Apr 2008) | 7 lines Prevent call connections when codecs don't match. (closes issue #10604) Reported by: keepitcool Patches: branch-1.4-10604-2.diff uploaded by phsultan (license 73) Tested by: phsultan ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-03Merged revisions 112599 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r112599 | mmichelson | 2008-04-03 09:32:20 -0500 (Thu, 03 Apr 2008) | 9 lines Fix the testing of the "res" variable so that it is more logically correct and makes the correct warning and debug messages print. (closes issue #12361) Reported by: one47 Patches: chan_zap_deferred_digit.patch uploaded by one47 (license 23) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-02Make MISDN generate channel rename events when the name changes.Tilghman Lesher
(closes issue #11142) Reported by: julianjm Patches: chan_misdn_tmpchan_trunk_v1.diff uploaded by julianjm (license 99) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-02Since the SIP request structure gets reused multiple times with TCP handling ↵Joshua Colp
we have to clear the debug state or else we will keep spitting out debug even after it has been turned off. (closes issue #12169) Reported by: pj Patches: 12169-debugoff-2.diff uploaded by qwell (license 4) Tested by: pj git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01Added dnsmgr status output for sip show registry.Jeff Peeler
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01Fix a typo that prevented configuration of non-dynamic peers.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01Existing DNS manager lookups extended to check for SRV records.Jeff Peeler
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01Fix last commitTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01This adds DNS SRV record support to DNS manager. If there is a SRV record ↵Jeff Peeler
for a given domain, the hostname and port listed in the SRV record will be used. If no SRV record exists or a SRV lookup is not attempted, the DNS lookup on the specified domain will be performed as normal. Chan_sip has been modified to take advantage of the new SRV support. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01Merged revisions 112204 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r112204 | file | 2008-04-01 14:43:46 -0300 (Tue, 01 Apr 2008) | 4 lines Do not pass audio until the remote side has indicated they are providing early media, or if the channel has been answered. (closes issue #11823) Reported by: SDamm ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01Demote a log message down to a warning.Joshua Colp
(closes issue #12345) Reported by: caio1982 Patches: limit_msg.diff uploaded by caio1982 (license 22) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01Now that zaptel trunk has been removed, add the PSTN deprecation notice to ↵Russell Bryant
chan_zap, as well. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31I missed a place when this define was changed.Jason Parker
(closes issue #12334) Reported by: ovi Patches: 12334-asterisk.patch uploaded by dimas (license 88) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31This fixes a high fence violation that MALLOC_DEBUG reported to me.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28This time the fix is proper for issue 12284. I have tested it thoroughly and ↵Mark Michelson
found that valgrind no longer complains and that calls do complete correctly. The fix is along the same lines as before: Make sure the final null terminator gets copied into the new sip_request's data pointer. Without it, parse_request will read and potentially write past the end of the string, causing potential crashes. (closes issue #12284...for real this time!) reported by falves11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28Temporary revert of 111662. It's causing lots of trouble and appears to not beMark Michelson
the proper solution to the problem reported anyway. (related to issue #12884) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28Merged revisions 111720 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r111720 | qwell | 2008-03-28 12:55:05 -0500 (Fri, 28 Mar 2008) | 1 line Remove unimplemented softkeys. Prompted by issue #12325. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28The copy_request function did not take into account the necessary null ↵Mark Michelson
terminator for the string to be copied into. This resulted in parse_request reading invalid memory beyond the end of the string, and in some cases led to crashes. Thanks to falves11 for providing the valgrind output which led to the closure of this issue. (closes issue #12284) Reported by: falves11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26Oops, missed oneTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26Add expiry value to the sip show subscriptions CLI command.Joshua Colp
(closes issue #12025) Reported by: agx git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26Large cleanup of DSP codeJason Parker
Per comments from dimas: 1. The code now generates DTMF_BEGIN frames in addition to DTMF_END ones. 2. "quelching" rewritten - now each detector (MF/DTMF/generic tone) may mark fragment of a frame for suppression (squelching, muting) with a call to mute_fragment. Actual muting happens only once at the very end of ast_dsp_process where all marked fragments are zeroed. This way every detector sees original data in the frame without any piece of a frame being zeroed by a detector which was run before. 3. DTMF detector tries to "mute" one block before and one block after the block where actual tone was detected. Muting of previois block is something new for this patch. Obviously this operation is not always possible - if current frame does not contain data for previous block - it is too late. But at least we make our best. Muting of next block was already done by the old code but it only affects part of the next block which is in the frame being processed. New code keeps this information in state structures so it will mute proper number of samples in the next frame(s) too. 4. Removed ast_dsp_digitdetect and ast_dsp_getdigits APIs because these are not used. 5. DSP API extended a bit - ast_dsp_was_muted() function added which returns true if DSP code was muting any fragment in the last frame. chan_zap uses this function to decide it needs to turn on confmute on the channel. This is to replace AST_FRAME_DTMF 'm'/'u' (mute/unmute) functionality. (closes issue #11968) Reported by: dimas Patches: v2-11968-dsp.patch uploaded by dimas (license 88) v4-11968-zap.patch uploaded by dimas (license 88) Tested by: dimas, qwell git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26Merged revisions 111020 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r111020 | file | 2008-03-26 16:04:35 -0300 (Wed, 26 Mar 2008) | 4 lines If we are requested to authenticate a reinvite make sure that it contains T38 SDP if need be. (closes issue #11995) Reported by: fall ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26Merged revisions 110628 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases. (closes issue #10058) Reported by: tracinet ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26Add the "config reload <conffile>" command, which allows you to tell AsteriskTilghman Lesher
to reload any file that references a given configuration file. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25This one line change makes an if inside a for loop (in realtime_peer) check ↵Jeff Peeler
all the ast_variables the loop was intending to test rather than just the first one. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25Oops here too. I need to stop coding for a while...Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25Merged revisions 110635 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r110635 | mmichelson | 2008-03-25 10:40:33 -0500 (Tue, 25 Mar 2008) | 7 lines When reverting a commit, I accidentally left in this bit which was an experiment to see what would happen. It passed the compile test, and I didn't notice I had left this change in too. So this is a revert of a revert...sort of. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25Add a special dialplan variable to chan_sip which will cause an audio file ↵Joshua Colp
to be played upon completion of an attended transfer. (closes issue #9239) Reported by: sunder git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25Use the "Server" header when responding to SIP requests.Olle Johansson
(closes issue #12278) Reported by: rjain Patches: chan_sip.c.diff uploaded by rjain (license 226) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-24Remove the "Event: registration" header from Asterisk-generatedMark Michelson
SIP REGISTER requests. rjain points out that RFC 3265 specifies that the Event: header is not a valid header for REGISTER requests and that the "registration" value is not defined at IANA. (closes issue #12279) Reported by: rjain Patches: chan_sip.c.diff uploaded by rjain (license 226) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-24Merged revisions 110618 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r110618 | mmichelson | 2008-03-24 14:17:41 -0500 (Mon, 24 Mar 2008) | 15 lines This is a revert for revision 108288. The reason is that that revision was not for an actual bug fix per se, and so it really should not have been in 1.4 in the first place. Plus, people who compile with DO_CRASH are more likely to encounter a crash due to this change. While I think the usage of DO_CRASH in ast_sched_del is a bit absurd, this sort of change is beyond the scope of 1.4 and should be done instead in a developer branch based on trunk so that all scheduler functions are fixed at once. I also am reverting the change to trunk and 1.6 since they also suffer from the DO_CRASH potential. (closes issue #12272) Reported by: qq12345 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-24Merged revisions 110614 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r110614 | russell | 2008-03-24 12:34:56 -0500 (Mon, 24 Mar 2008) | 2 lines Turn a NOTICE into a DEBUG message. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-24Only print out the set_address_from_contact host verbose message if ↵Joshua Colp
debugging is enabled on the dialog. (closes issue #12280) Reported by: rjain Patches: chan_sip.c.diff uploaded by rjain (license 226) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20Merged revisions 110336 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r110336 | russell | 2008-03-20 16:54:58 -0500 (Thu, 20 Mar 2008) | 14 lines Merged revisions 110335 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r110335 | russell | 2008-03-20 16:53:27 -0500 (Thu, 20 Mar 2008) | 6 lines Fix some very broken code that was introduced in 1.2.26 as a part of the security fix. The dnsmgr is not appropriate here. The dnsmgr takes a pointer to an address structure that a background thread continuously updates. However, in these cases, a stack variable was passed. That means that the dnsmgr thread would be continuously writing to bogus memory. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20Fix recent trunk breakageTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19Rename DSP_FEATURE_DTMF_DETECT, because we are *NOT* only detecting DTMF digits.Jason Parker
This was very misleading. Early cleanup for issue #11968 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19Rename very poorly named function to reflect what it actually does. This ↵Jason Parker
was causing quite a bit of confusion for me... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19This change adds DNS manager support for registrations not referencing a ↵Jeff Peeler
peer entry. It looks like there is support for DNS manager for realtime peers as well, however it is not implemented correctly. The improper usage occurs when ast_dnsmgr_lookup is called with one of the arguments being an address from the stack to be continually updated. The variable from the stack will go out of scope and dnsmgr will continue to try and update the memory there, causing possible stack corruption. This problem will be worked on next as well as adding DNS manager support for peer entries. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19Set req->data to NULL after free'ing to ensure that it never gets accidentallyRussell Bryant
double free'd. (reported by dhubbard directly to me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Fix a typo which caused a double free in chan_zap. This was discoveredMark Michelson
by Juggie while attempting to load chan_zap. Apparently this would happen if an error were encountered while trying to process zapata.conf. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Since a sip request's data field is now a stringfield, we not only have to checkMark Michelson
if the string is zero-length, but also if the data field is non-null. (closes issue #12250) Reported by: caio1982 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Merged revisions 109575 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r109575 | mmichelson | 2008-03-18 12:58:11 -0500 (Tue, 18 Mar 2008) | 6 lines Make sure an agent doesn't try to send dtmf to a NULL channel closes issue #12242 Reported by Yourname ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18fix up various warnings found via the addition of format string checking... ↵Kevin P. Fleming
some of these were really, really bad code git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Go through and fix a bunch of places where character strings were being ↵Terry Wilson
interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Merged revisions 109386 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r109386 | file | 2008-03-18 11:58:39 -0300 (Tue, 18 Mar 2008) | 3 lines Put a maximum limit on the number of payloads accepted, and also make sure a given payload does not exceed our maximum value. (AST-2008-002) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Do not return with a successful authentication if the From header ends up empty.Jason Parker
(AST-2008-003) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18Add manager peerstatus events when peer can't authenticate.Olle Johansson
(closes issue #11959) Reported by: mostyn Patches: peerstatus3.patch uploaded by mostyn (license 398) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17Update the directory of placed calls on skinny phonesMichiel van Baak
when dialing a channel that does not provide progress (analog ZAP lines) The phone does handle the double update on calls to channels that do provide progress and wont insert duplicate items (closes issue #12239) Reported by: DEA Patches: chan_skinny-call-log.txt uploaded by DEA (license 3) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109168 65c4cc65-6c06-0410-ace0-fbb531ad65f3