Commit Graph

13040 Commits

Author SHA1 Message Date
Steve Murphy
596f31a1a1 (closes issue #13871)
Reported by: mdu113

This one is totally my fault. The code doesn't even
create a bridge if the channel CDR has POST_DISABLED.
I didn't check for that at the end of the bridge.
Fixed with a few small insertions. Tested. Looks
good. No cdr generated, no crash, no unnecc. data
objects created either.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 21:19:47 +00:00
Mark Michelson
72a8661580 This change had somehow gotten reverted due to a
completely unrelated commit. Thanks to Theo Belder
on the Asterisk-dev list for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 15:24:19 +00:00
Mark Michelson
6a632a5a2b There was an issue when attempting to reference an embedded
frame in a freed ast_filestream. This patch makes use of the
ao2 functions to make sure that we do not free an ast_filestream
structure until the embedded ast_frame has been "freed" as well.

(closes issue #13496)
Reported by: fst-onge
Patches:
      filestream_frame_1_4.diff uploaded by putnopvut (license 60)
Tested by: putnopvut

Closes AST-89



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 18:06:48 +00:00
Mark Michelson
3668ba67ab We don't handle 4XX responses to BYE well. According to
section 15 of RFC 3261, we should terminate a dialog if we
receive a 481 or 408 in response to our BYE. Since I am aware
of at least one phone manufacturer who may sometimes send a 
404 as well, I am being liberal and saying that any 4XX response
to a BYE should result in a terminated dialog.


(closes issue #12994)
Reported by: pabelanger
Patches:
      12994.patch uploaded by putnopvut (license 60)

Closes AST-129



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:48:42 +00:00
Mark Michelson
3a1a981e2e Make sure to set the hangup cause on the calling channel in the case
that ast_call() fails. For incoming SIP channels, this was causing
us to send a 603 instead of a 486 when the call-limit was reached on
the destination channel.

(closes issue #13867)
Reported by: still_nsk
Patches:
      13867.diff uploaded by putnopvut (license 60)
Tested by: blitzrage



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:33:06 +00:00
Richard Mudgett
238cd9ea24 Merged revision 157977 from
https://origsvn.digium.com/svn/asterisk/team/group/issue8824

........
Fixes JIRA ABE-1726

The dial extension could be empty if you are using MISDN_KEYPAD
to control ISDN provider features.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 01:46:09 +00:00
Kevin P. Fleming
187f6d485a the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).

while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@157859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 21:34:47 +00:00
Mark Michelson
a6fac748de Add some missing invite state changes necessary in the sip_write
function. Not setting the invite state correctly on the call was
resulting in the Record application leaving empty files. I also
have updated the doxygen comment next to the declaration of the
INV_EARLY_MEDIA constant to reflect that we also use this state
when we *send* a 18X response to an INVITE.

(closes issue #13878)
Reported by: nahuelgreco
Patches:
      sip-early-media-recording-1.4.22.patch uploaded by nahuelgreco (license 162)
	  Tested by: putnopvut


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@157503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-18 22:47:57 +00:00
Jeff Peeler
161a05a3d1 (closes issue #13899)
Reported by: akkornel

This fix is the result of a bug fix in ast_app_separate_args r124395. If an argument does not exist it should always be set to a null string rather than a null pointer.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@157365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-18 19:13:33 +00:00
Mark Michelson
3429c9de5e Fix a crash in the end_bridge_callback of app_dial and
app_followme which would occur at the end of an attended
transfer. The error occurred because we initially stored
a pointer to an ast_channel which then was hung up due
to a masquerade.

This commit adds a "fixup" callback to the bridge_config
structure to allow for end_bridge_callback_data to be
changed in the case that a new channel pointer is needed
for the end_bridge_callback.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@157305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-18 18:25:55 +00:00
Kevin P. Fleming
9bfbfb5496 when an individual directory dist-clean is run, run clean in that directory first, and when running top-level dist-clean, do not run subdirectory clean operations twice
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@157163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 19:31:03 +00:00
Kevin P. Fleming
eeae8abc61 dist-clean should remove dependency information files as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@157162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 19:24:24 +00:00
Kevin P. Fleming
dda8791081 major update to doxygen configuration file:
1) update to doxygen 1.5.x style file, as used in trunk

2) tell doxygen where are header files are, so include-file processing can be done

3) make all macros that are used to define variables/functions be expanded, so that doxygen will properly document the resulting variable/function

4) make all macros that are used to provide the contents of a variable (structure) be expanded, so that doxygen will be able to document the resulting fields

5) suppress compiler attributes (__attribute__(xxx)) from being seen by doxygen, so it will properly match up function definition and usage (for an example of th effect of this, look at the doxygen docs for ast_log() from before and afte this commit)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@157104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 18:00:32 +00:00
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