Commit Graph

13027 Commits

Author SHA1 Message Date
Mark Michelson
b753654cbd If the prompt to reenter a voicemail password timed out, it
resulted in the password not being saved, even if the input matched
what you gave when first prompted to enter a new password. This is
because the return value of ast_readstring was checked, but not checked
properly.

This bug was discovered by Jared Smith during an Asterisk training course.
Thanks for reporting it!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 15:18:59 +00:00
Tilghman Lesher
bc208d63c2 ast_waitfordigit() requires that the channel be up, for no good logical
reason.  This prevents While/EndWhile from working within the "h"
extension.
Reported by: jgalarneau (for ABE C.2)
Fixed by: me


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 00:41:37 +00:00
Tilghman Lesher
ad1cd04005 Provide more space for all the data which can appear in an originating
channel name.
(closes issue #13398)
 Reported by: bamby
 Patches: 
       manager.c.diff uploaded by bamby (license 430)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 21:24:00 +00:00
Kevin P. Fleming
53c3cdab37 revert this change... non-functional changes don't belong here
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 11:58:41 +00:00
Kevin P. Fleming
350cec723a correct minor syntax error... no functional change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 11:51:27 +00:00
Tilghman Lesher
382459fac8 When using call limits under 1 second, infinite call lengths are allowed,
instead.
(closes issue #13851)
 Reported by: ruddy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 21:18:57 +00:00
Steve Murphy
3557bc1b4d It turns out that the 0x0XX00 codes being returned for
N, X, and Z are off by one, as per conversation with
jsmith on #asterisk-dev;  he was teaching a class
and disconcerted that this published rule was not
being followed, with patterns _NXX, _[1-8]22 and
_[2-9]22... and NXX was winning, but [1-8] should
have been. 

This change, tested on these 3 patterns now 
picks the proper one.

However, this change may surprise users who
set up dialplans based on previous behavior,
which has been there for what, 2 and half 
years or so now.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 19:36:16 +00:00
Tilghman Lesher
7e353eeaa1 If the SLA thread is not started, then reload causes a memory leak.
(closes issue #13889)
 Reported by: eliel
 Patches: 
       app_meetme.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 19:26:45 +00:00
Jeff Peeler
738ec1fb71 For whatever reason, gcc only warned me about the possible use of an uninitialized variable when compiling 1.6.1.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 19:10:12 +00:00
Tilghman Lesher
1d023ca457 Revert revision 132506, since it occasionally caused IAX2 HANGUP packets not
to be sent, and instead, schedule a task to destroy the iax2 pvt structure
10 seconds later.  This allows the IAX2 HANGUP packet to be queued,
transmitted, and ACKed before the pvt is destroyed.
(closes issue #13645)
 Reported by: dzajro
 Patches: 
       20081111__bug13645__3.diff.txt uploaded by Corydon76 (license 14)
 Tested by: vazir
 Reviewed: http://reviewboard.digium.com/r/51/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 18:39:21 +00:00
Jeff Peeler
c9cec47bf0 (closes issue #13173)
Reported by: pep

This change adds an announce_thread responsible for playing announcements to an existing conference. This allows all announcing to be immediately stopped if necessary but more importantly allows other threads that need to play something to not block. There are multiple benefits to this, but the actual bug is for solving the scenario for a channel to be unusable after hang up for the entire duration of the parting announcement. The parting announcement can be extremely long depending on what the user recorded upon joining the conference.

Reviewed by Russell on Review Board:
http://reviewboard.digium.com/r/25/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 17:53:44 +00:00
Mark Michelson
bd9001e16b When doing some tests, I was having a crash at the end of every call
if an attended transfer occurred during the call. I traced the cause to
the CDR on one of the channels being NULL. murf suggested a check in
the end bridge callback to be sure the CDR is non-NULL before proceeding,
so that's what I'm adding.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 17:38:33 +00:00
Russell Bryant
96d185b5aa Move the sanity check that makes sure "always fork" is not set along with the
console option to be after the code that reads options from asterisk.conf.  
This resolves a situation where Asterisk can start taking up 100% when
misconfigured.
(Thanks to Bryce Porter (x86 on IRC) for letting me log in to his system to
 figure out what was causing the 100% CPU problem.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@156164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 17:29:52 +00:00
Mark Michelson
abc56833ad Channel drivers assume that when their indicate callback
is invoked, that the channel on which the callback was called
is locked. This patch corrects an instance in chan_agent where
a channel's indicate callback is called directly without first
locking the channel.

This was leading to some observed locking issues in chan_local,
but considering that all channel drivers operate under the
same expectations, the generic fix in chan_agent is the right
way to go.

AST-126



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@155861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-10 21:07:39 +00:00
Tilghman Lesher
52e17f5cf8 I got tired of saying this in every single bugnote referring to this file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@155803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-10 20:49:59 +00:00
Sean Bright
f2ecc4c80e Use static functions here instead of nested ones. This requires a small
change to the ast_bridge_config struct as well.  To understand the reason
for this change, see the following post:

    http://gcc.gnu.org/ml/gcc-help/2008-11/msg00049.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@155553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-09 01:08:07 +00:00
Tilghman Lesher
a0386906cf Clarify error message.
(closes issue #13809)
 Reported by: denke
 Patches: 
       20081104__bug13809.diff.txt uploaded by Corydon76 (license 14)
 Tested by: denke


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@155398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 22:27:32 +00:00
Mark Michelson
a5ebe35d26 The documentation listed the ability to set 'maxmsg' per
context. The truth is that you can only set this in the general section
or per mailbox. Thus I am updating the sample config file to be more
accurate.

Thanks to sasargen on IRC for bringing up this issue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@155011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-06 19:45:52 +00:00
Mark Michelson
a82f9caadf The logic of a strcasecmp call was reversed
(closes issue #13841)
Reported by: clegall_proformatique



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@154724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 16:44:34 +00:00
Steve Murphy
8c352bb9aa This fix was prompted by communication from user, who was seeing thousands of error logs... looks like EAGAIN. Made such uninteresting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@154685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 16:06:53 +00:00
Tilghman Lesher
537f626328 On busy systems, it's possible for the values checked within a single line
of code to change, unless the structure is locked to ensure a consistent
state.
(closes issue #13717)
 Reported by: kowalma
 Patches: 
       20081102__bug13717.diff.txt uploaded by Corydon76 (license 14)
 Tested by: kowalma


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@154365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 20:49:33 +00:00
Richard Mudgett
f7c8bfed9c JIRA ABE-1703
mISDN sets the channel to the wrong state when it receives
the indication AST_CONTROL_RINGING.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@154266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 19:01:08 +00:00
Tilghman Lesher
66d3d10d8c Make the monitor thread non-detached, so it can be joined (suggested by Russell
on -dev list).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@154263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 18:58:05 +00:00
Tilghman Lesher
799fe53401 Attempting to expunge a mailbox when the mailstream is NULL will crash Asterisk.
(Closes issue #13829)
Reported by: jaroth
Patch by: me (modified jaroth's patch)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@154066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03 22:27:10 +00:00
Tilghman Lesher
9f7707dae8 Remove the potential for a division by zero error.
(Closes issue #13810)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@154060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03 21:48:21 +00:00
Kevin P. Fleming
18df35a2c1 somehow missed a bunch of gcc 4.3.x warnings in this branch on the first pass
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03 13:01:18 +00:00
Russell Bryant
0d1441526e features.h depends on linkedlists.h, so include it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 19:51:17 +00:00
Kevin P. Fleming
add5ff5b05 fix a bunch of potential problems found by gcc 4.3.x, primarily bare strings being passed to printf()-like functions and ignored results from read()/write() and friends
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01 18:22:39 +00:00
Terry Wilson
705d6f3742 Add end_bridge_callback for app_follome and add AUTOLOOP flag to res_features
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 22:36:57 +00:00
Tilghman Lesher
1c4d34a0f7 Turn off qualify on uncached realtime peers.
(Closes issue #13383)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 16:30:32 +00:00
Terry Wilson
6280e04736 Recent CDR fixes moved execution of the 'h' exten into the bridging code, so variables that were set after ast_bridge_call was called would not show up in the 'h' exten. Added a callback function to handle setting variables, etc. from w/in the bridging code. Calls back into a nested function within the function calling ast_bridge_call
(closes issue #13793)
Reported by: greenfieldtech


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@153095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 15:45:29 +00:00
Sean Bright
db2283b512 The -I argument to aclocal needs a space before the include directory name.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 20:58:24 +00:00
Tilghman Lesher
ac0c617f43 Cannot join detached threads. See http://www.opengroup.org/onlinepubs/000095399/functions/pthread_join.html
(Closes issue #13400)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 20:33:28 +00:00
Tilghman Lesher
e8b8a35b3d Unlock before returning, when extension doesn't exist.
(closes issue #13807)
 Reported by: eliel
 Patches: 
       chan_local.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 19:43:38 +00:00
Kevin P. Fleming
1a56159a79 instead of comparing the string pointer to 0, let's compare the value that was actually parsed out of the string (found by sparse)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:53:48 +00:00
Russell Bryant
c1cdf01a0e Fix an incorrect usage of sizeof()
(closes issue #13795)
Reported by: andrew53
Patches:
	chan_sip_sizeof.patch uploaded by andrew53 (license 519)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:23:51 +00:00
Steve Murphy
fffb7722be A little documentation cross-ref between features and
dial and queue... I wasted some time (stupidly) trying
to get the one-touch parking stuff working, because it
didn't occur to me that I had to also have the corresponding
options in the dial command! Duh! (In all this time, I never
set this up before!)
So, to keep some poor fool from suffering the same fate,
I made the features.conf.sample file mention the corresponding
opts in dial/queue; and the docs for dial/app specifically
mention the corresponding decls in the feature.conf file.

I hope this doesn't spoil some vast, eternal plan...



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:19:04 +00:00
Steve Murphy
961bc7e758 The magic trick to avoid this crash is not to
try to find the channel by name in the list,
which is slow and resource consuming, but rather
to pay attention to the result codes from the
ast_bridge_call, to which I added the 
AST_PBX_NO_HANGUP_PEER_PARKED value, which
now are returned when a channel is parked.

If you get AST_PBX_KEEPALIVE,
then don't touch the channel pointer.

If you get AST_PBX_NO_HANGUP_PEER, or
AST_PBX_NO_HANGUP_PEER_PARKED, then don't
touch the peer pointer.

Updated the several places where the results
from a bridge were not being properly obeyed,
and fixed some code I had introduced so that
the results of the bridge were not overridden 
(in trunk).

All the places that previously tested for 
AST_PBX_NO_HANGUP_PEER now have to check for
both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED.

I tested this against the 4 common parking
scenarios:


1. A calls B; B answers; A parks B; B hangs up while A is getting the parking
slot announcement, immediately after being put on hold.

2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but
before the park times out.

3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold.

4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out.


No crash.

I also ran the scenarios above against valgrind, and accesses looked good.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 04:36:32 +00:00
Tilghman Lesher
fd9de775c5 Quoting in the wrong direction
(Fixes AST-107)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-28 22:32:34 +00:00
Tilghman Lesher
785f27a29a Reset all DIAL variables back to blank, in case Dial is called multiple times
per call (which could otherwise lead to inconsistent status reports).
(closes issue #13216)
 Reported by: ruddy
 Patches: 
       20081014__bug13216.diff.txt uploaded by Corydon76 (license 14)
 Tested by: ruddy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-28 17:04:56 +00:00
Jeff Peeler
1400db9dfc Buffer policy setting for half is not needed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27 23:28:49 +00:00
Tilghman Lesher
2156982d3e Inherit ALL elements of CallerID across a local channel.
(closes issue #13368)
 Reported by: Peter Schlaile
 Patches: 
       20080826__bug13368.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27 21:32:00 +00:00
Sean Bright
a300fefab6 Since passing \0 as the second argument to strchr is valid (and will
match the trailing \0 of a string) we need to check that first, otherwise
we end up with incorrect results.  Fix suggested by reporter.

(closes issue #13787)
Reported by: meitinger


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-26 20:23:36 +00:00
Russell Bryant
17f164852c Move AMI initialization to occur after loading modules. This prevents a
deadlock when someone tries to initiate a module reload from the AMI just
as Asterisk is starting.

(closes issue #13778)
Reported by: hotsblanc
Fix suggested by hotsblanc


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-25 10:59:02 +00:00
Terry Wilson
3f6d4154b8 Backport fix from 1.6.0 that allows you to set parkedcalltransfers=no|caller|callee|both, but default to both which would be the equivalent of the existing behaviour.
The problem was that if someone parked a call, the callee and caller would both get assigned the builtin transfer feature, which would not only be potentially giving someone the ability to transfer themselves when they shouldn't have it, but would also dissallow reinviting the media off of the call.
(closes issue #12854)
	Reported by: davidw
	Patches: 
	      parkingfix4.diff.txt uploaded by otherwiseguy
		  Tested by: davidw, otherwiseguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-23 16:04:42 +00:00
Kevin P. Fleming
bc51c18f3d rename this macro to properly reflect what it does
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-20 04:57:33 +00:00
Kevin P. Fleming
fe3cd94ec6 break up acinclude.m4 into individual files, which will make it easier to maintain, easier to add new macros (less patching) and will ease maintenance of these macros across Asterisk branches
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-20 04:45:56 +00:00
BJ Weschke
656de6f30d As per kpfleming's comments to the prior commit, I'm reverting some of the changes here.
A comment was made in bug #13726 
 "3. The same mistake as in (2) is done in a few other places in the code that check for: #if defined(HAVE_ZAPTEL) || defined(HAVE_DAHDI)
Harmless, but still incorrect."

 In the case of main/asterisk.c, this is not incorrect because without HAVE_ZAPTEL defined, we're missing
 the include for ioctl and the namespace that defines DAHDI_TIMERCONFIG which is still required when
 using Zaptel with the 1.4 branch.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-19 19:51:16 +00:00
BJ Weschke
77b4928d8d Fix the 1.4 branch compile again broken with r150557 when using with Zaptel and not DAHDI
(closes issue #13740)
 reported by: jmls
 patch by: bweschke



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@151100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-19 19:07:05 +00:00
BJ Weschke
4ac62c324b Using the GetVar handler in AMI is potentially dangerous (insta-crash [tm]) when you use a dialplan function that requires a channel and then you don't provide one or provide an invalid one in the Channel: parameter. We'll handle this situation exactly the same way it was handled in pbx.c back on r61766.
We'll create a bogus channel for the function call and destroy it when we're done. If we have trouble allocating the bogus channel then we're not going to try executing the function call at all and run the risk of crashing.
 (closes issue #13715)
 reported by: makoto
 patch by: bweschke


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-18 01:42:23 +00:00