]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
16 years agoConvert all release tags to Opsound music-on-hold. 1.4.23-rc2
Kevin P. Fleming [Tue, 18 Aug 2009 20:42:51 +0000 (20:42 +0000)] 
Convert all release tags to Opsound music-on-hold.

For more details:
http://blogs.digium.com/2009/08/18/asterisk-music-on-hold-changes/

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.23-rc2@212958 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoUse autotagged externals
Tilghman Lesher [Mon, 1 Dec 2008 22:22:32 +0000 (22:22 +0000)] 
Use autotagged externals

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.23-rc2@160146 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoImporting files for 1.4.23-rc2 release
Tilghman Lesher [Mon, 1 Dec 2008 22:22:05 +0000 (22:22 +0000)] 
Importing files for 1.4.23-rc2 release

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.23-rc2@160145 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoCreating tag for the release of asterisk-1.4.23-rc2
Tilghman Lesher [Mon, 1 Dec 2008 22:20:42 +0000 (22:20 +0000)] 
Creating tag for the release of asterisk-1.4.23-rc2

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.23-rc2@160143 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoUse autotagged externals
Tilghman Lesher [Mon, 1 Dec 2008 22:08:46 +0000 (22:08 +0000)] 
Use autotagged externals

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.23-rc2@160136 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoImporting files for 1.4.23-rc2 release
Tilghman Lesher [Mon, 1 Dec 2008 22:08:07 +0000 (22:08 +0000)] 
Importing files for 1.4.23-rc2 release

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.23-rc2@160135 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoCreating tag for the release of asterisk-1.4.23-rc2
Tilghman Lesher [Mon, 1 Dec 2008 22:05:50 +0000 (22:05 +0000)] 
Creating tag for the release of asterisk-1.4.23-rc2

git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.23-rc2@160134 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoApply some logic used in iax2_indicate() to iax2_setoption(), as well, since they
Russell Bryant [Mon, 1 Dec 2008 17:27:30 +0000 (17:27 +0000)] 
Apply some logic used in iax2_indicate() to iax2_setoption(), as well, since they
both have the potential to send control frames in the middle of call setup.  We
have to wait until we have received a message back from the remote end before
we try to send any more frames.  Otherwise, the remote end will consider it
invalid, and we'll get stuck in an INVAL/VNAK storm.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160003 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoGet rid of the useless format string and argument in the Bogus/ manager channelname.
Michiel van Baak [Mon, 1 Dec 2008 16:08:36 +0000 (16:08 +0000)] 
Get rid of the useless format string and argument in the Bogus/ manager channelname.
Noted by kpfleming and name Bogus/manager suggested by eliel

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159976 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoForce a "make clean" to avoid a bizarre build issue ...
Russell Bryant [Mon, 1 Dec 2008 14:52:56 +0000 (14:52 +0000)] 
Force a "make clean" to avoid a bizarre build issue ...

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159900 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agomake manager compile on OpenBSD.
Michiel van Baak [Mon, 1 Dec 2008 14:05:41 +0000 (14:05 +0000)] 
make manager compile on OpenBSD.
The last (10th) argument to ast_channel_alloc here should be a pointer
and NULL is not really a pointer.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159897 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoupdate dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid...
Kevin P. Fleming [Sat, 29 Nov 2008 16:58:29 +0000 (16:58 +0000)] 
update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors

since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159808 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agorename these files so as to avoid conflicts when users update their working copies...
Kevin P. Fleming [Wed, 26 Nov 2008 20:21:04 +0000 (20:21 +0000)] 
rename these files so as to avoid conflicts when users update their working copies and have unversioned files already in place

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159571 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agosimplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode
Kevin P. Fleming [Wed, 26 Nov 2008 18:36:24 +0000 (18:36 +0000)] 
simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode

add channels/busy.h and channels/ringtone.h to the repository instead of generating them repeatedtly; most users do not change the settings to build them, but the Makefile rules are still there if they wish to do so

ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159476 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years ago(closes issue #12694)
Steve Murphy [Tue, 25 Nov 2008 22:41:10 +0000 (22:41 +0000)] 
(closes issue #12694)
Reported by: yraber
Patches:
      12694.2nd.diff uploaded by murf (license 17)
Tested by: murf, laurav

Thanks to file (Joshua Colp) for his IAX fix.

the change to cdr.c allows no-answer to percolate
up into CDR's, and feels like the right place to
locate this fix; if BUSY is done here, no-answer
should be, too.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159316 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoDon't try to send a response on a NULL pvt.
Tilghman Lesher [Tue, 25 Nov 2008 21:56:48 +0000 (21:56 +0000)] 
Don't try to send a response on a NULL pvt.
(closes issue #13919)
 Reported by: barthpbx
 Patches:
       chan_iax2.c.patch uploaded by eliel (license 64)
 Tested by: barthpbx

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159269 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMerged revisions 159245 via svnmerge from
Tilghman Lesher [Tue, 25 Nov 2008 21:40:28 +0000 (21:40 +0000)] 
Merged revisions 159245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r159245 | tilghman | 2008-11-25 15:37:06 -0600 (Tue, 25 Nov 2008) | 7 lines

  Regression fix for last security fix.  Set the iseqno correctly.
  (closes issue #13918)
   Reported by: ffloimair
   Patches:
         20081119__bug13918.diff.txt uploaded by Corydon76 (license 14)
   Tested by: ffloimair
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159246 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAdd ao2_trylock() to go along with ao2_lock() and ao2_unlock()
Russell Bryant [Tue, 25 Nov 2008 17:34:50 +0000 (17:34 +0000)] 
Add ao2_trylock() to go along with ao2_lock() and ao2_unlock()

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159158 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAdd missing variable declaration in the PPC code
Terry Wilson [Tue, 25 Nov 2008 16:23:38 +0000 (16:23 +0000)] 
Add missing variable declaration in the PPC code

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159096 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoSystem call ioperm is non-portable, so check for its existence in autoconf.
Tilghman Lesher [Tue, 25 Nov 2008 04:50:00 +0000 (04:50 +0000)] 
System call ioperm is non-portable, so check for its existence in autoconf.
(Closes issue #13863)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159025 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years ago(closes issue #13786)
Jeff Peeler [Sat, 22 Nov 2008 00:04:36 +0000 (00:04 +0000)] 
(closes issue #13786)
Reported by: tzafrir

When compiling against Zaptel dahdi_compat will now only define all the DAHDI defines if the Zaptel define is present. Also, there is no such thing as DAHDI_PRI.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158629 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoIn reference to the fix made for 13871, I was
Steve Murphy [Fri, 21 Nov 2008 23:14:50 +0000 (23:14 +0000)] 
In reference to the fix made for 13871, I was
merging the fix into 1.6.0 and realized I missed
the code in the h-exten block, and didn't catch it
because my test case had the h-exten commented out.

So, this corrects the code I missed, as a
preventative against another crash report.
Tested with the h-exten defined, all is well.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158603 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoThe passed extension may not be the same in the list as the current entry,
Tilghman Lesher [Fri, 21 Nov 2008 23:07:46 +0000 (23:07 +0000)] 
The passed extension may not be the same in the list as the current entry,
because we strip spaces when copying the extension into the structure.
Therefore, use the copied item to place the item into the list.
(found by lmadsen on -dev, fixed by me)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158600 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoWhen compiling with DEBUG_THREADS, report the real file/func/line for ao2_lock/ao2_unlock
Russell Bryant [Fri, 21 Nov 2008 22:05:55 +0000 (22:05 +0000)] 
When compiling with DEBUG_THREADS, report the real file/func/line for ao2_lock/ao2_unlock

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158539 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years ago(closes issue #13871)
Steve Murphy [Fri, 21 Nov 2008 21:19:47 +0000 (21:19 +0000)] 
(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

16 years agoThis change had somehow gotten reverted due to a
Mark Michelson [Fri, 21 Nov 2008 15:24:19 +0000 (15:24 +0000)] 
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

16 years agoThere was an issue when attempting to reference an embedded
Mark Michelson [Thu, 20 Nov 2008 18:06:48 +0000 (18:06 +0000)] 
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

16 years agoWe don't handle 4XX responses to BYE well. According to
Mark Michelson [Thu, 20 Nov 2008 17:48:42 +0000 (17:48 +0000)] 
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

16 years agoMake sure to set the hangup cause on the calling channel in the case
Mark Michelson [Thu, 20 Nov 2008 17:33:06 +0000 (17:33 +0000)] 
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

16 years agoMerged revision 157977 from
Richard Mudgett [Thu, 20 Nov 2008 01:46:09 +0000 (01:46 +0000)] 
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

16 years agothe gcc optimizer frequently finds broken code (use of uninitalized variables, unreac...
Kevin P. Fleming [Wed, 19 Nov 2008 21:34:47 +0000 (21:34 +0000)] 
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

16 years agoAdd some missing invite state changes necessary in the sip_write
Mark Michelson [Tue, 18 Nov 2008 22:47:57 +0000 (22:47 +0000)] 
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

16 years ago(closes issue #13899)
Jeff Peeler [Tue, 18 Nov 2008 19:13:33 +0000 (19:13 +0000)] 
(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

16 years agoFix a crash in the end_bridge_callback of app_dial and
Mark Michelson [Tue, 18 Nov 2008 18:25:55 +0000 (18:25 +0000)] 
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

16 years agowhen an individual directory dist-clean is run, run clean in that directory first...
Kevin P. Fleming [Sat, 15 Nov 2008 19:31:03 +0000 (19:31 +0000)] 
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

16 years agodist-clean should remove dependency information files as well
Kevin P. Fleming [Sat, 15 Nov 2008 19:24:24 +0000 (19:24 +0000)] 
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

16 years agomajor update to doxygen configuration file:
Kevin P. Fleming [Sat, 15 Nov 2008 18:00:32 +0000 (18:00 +0000)] 
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

16 years agoIf the prompt to reenter a voicemail password timed out, it
Mark Michelson [Fri, 14 Nov 2008 15:18:59 +0000 (15:18 +0000)] 
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

16 years agoast_waitfordigit() requires that the channel be up, for no good logical
Tilghman Lesher [Fri, 14 Nov 2008 00:41:37 +0000 (00:41 +0000)] 
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

16 years agoProvide more space for all the data which can appear in an originating
Tilghman Lesher [Thu, 13 Nov 2008 21:24:00 +0000 (21:24 +0000)] 
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

16 years agorevert this change... non-functional changes don't belong here
Kevin P. Fleming [Thu, 13 Nov 2008 11:58:41 +0000 (11:58 +0000)] 
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

16 years agocorrect minor syntax error... no functional change
Kevin P. Fleming [Thu, 13 Nov 2008 11:51:27 +0000 (11:51 +0000)] 
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

16 years agoWhen using call limits under 1 second, infinite call lengths are allowed,
Tilghman Lesher [Wed, 12 Nov 2008 21:18:57 +0000 (21:18 +0000)] 
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

16 years agoIt turns out that the 0x0XX00 codes being returned for
Steve Murphy [Wed, 12 Nov 2008 19:36:16 +0000 (19:36 +0000)] 
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

16 years agoIf the SLA thread is not started, then reload causes a memory leak.
Tilghman Lesher [Wed, 12 Nov 2008 19:26:45 +0000 (19:26 +0000)] 
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

16 years agoFor whatever reason, gcc only warned me about the possible use of an uninitialized...
Jeff Peeler [Wed, 12 Nov 2008 19:10:12 +0000 (19:10 +0000)] 
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

16 years agoRevert revision 132506, since it occasionally caused IAX2 HANGUP packets not
Tilghman Lesher [Wed, 12 Nov 2008 18:39:21 +0000 (18:39 +0000)] 
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

16 years ago(closes issue #13173)
Jeff Peeler [Wed, 12 Nov 2008 17:53:44 +0000 (17:53 +0000)] 
(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

16 years agoWhen doing some tests, I was having a crash at the end of every call
Mark Michelson [Wed, 12 Nov 2008 17:38:33 +0000 (17:38 +0000)] 
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

16 years agoMove the sanity check that makes sure "always fork" is not set along with the
Russell Bryant [Wed, 12 Nov 2008 17:29:52 +0000 (17:29 +0000)] 
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

16 years agoChannel drivers assume that when their indicate callback
Mark Michelson [Mon, 10 Nov 2008 21:07:39 +0000 (21:07 +0000)] 
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

16 years agoI got tired of saying this in every single bugnote referring to this file.
Tilghman Lesher [Mon, 10 Nov 2008 20:49:59 +0000 (20:49 +0000)] 
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

16 years agoUse static functions here instead of nested ones. This requires a small
Sean Bright [Sun, 9 Nov 2008 01:08:07 +0000 (01:08 +0000)] 
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

16 years agoClarify error message.
Tilghman Lesher [Fri, 7 Nov 2008 22:27:32 +0000 (22:27 +0000)] 
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

16 years agoThe documentation listed the ability to set 'maxmsg' per
Mark Michelson [Thu, 6 Nov 2008 19:45:52 +0000 (19:45 +0000)] 
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

16 years agoThe logic of a strcasecmp call was reversed
Mark Michelson [Wed, 5 Nov 2008 16:44:34 +0000 (16:44 +0000)] 
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

16 years agoThis fix was prompted by communication from user, who was seeing thousands of error...
Steve Murphy [Wed, 5 Nov 2008 16:06:53 +0000 (16:06 +0000)] 
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

16 years agoOn busy systems, it's possible for the values checked within a single line
Tilghman Lesher [Tue, 4 Nov 2008 20:49:33 +0000 (20:49 +0000)] 
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

16 years agoJIRA ABE-1703
Richard Mudgett [Tue, 4 Nov 2008 19:01:08 +0000 (19:01 +0000)] 
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

16 years agoMake the monitor thread non-detached, so it can be joined (suggested by Russell
Tilghman Lesher [Tue, 4 Nov 2008 18:58:05 +0000 (18:58 +0000)] 
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

16 years agoAttempting to expunge a mailbox when the mailstream is NULL will crash Asterisk.
Tilghman Lesher [Mon, 3 Nov 2008 22:27:10 +0000 (22:27 +0000)] 
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

16 years agoRemove the potential for a division by zero error.
Tilghman Lesher [Mon, 3 Nov 2008 21:48:21 +0000 (21:48 +0000)] 
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

16 years agosomehow missed a bunch of gcc 4.3.x warnings in this branch on the first pass
Kevin P. Fleming [Mon, 3 Nov 2008 13:01:18 +0000 (13:01 +0000)] 
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

17 years agofeatures.h depends on linkedlists.h, so include it
Russell Bryant [Sun, 2 Nov 2008 19:51:17 +0000 (19:51 +0000)] 
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

17 years agofix a bunch of potential problems found by gcc 4.3.x, primarily bare strings being...
Kevin P. Fleming [Sat, 1 Nov 2008 18:22:39 +0000 (18:22 +0000)] 
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

17 years agoAdd end_bridge_callback for app_follome and add AUTOLOOP flag to res_features
Terry Wilson [Fri, 31 Oct 2008 22:36:57 +0000 (22:36 +0000)] 
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

17 years agoTurn off qualify on uncached realtime peers.
Tilghman Lesher [Fri, 31 Oct 2008 16:30:32 +0000 (16:30 +0000)] 
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

17 years agoRecent CDR fixes moved execution of the 'h' exten into the bridging code, so variable...
Terry Wilson [Fri, 31 Oct 2008 15:45:29 +0000 (15:45 +0000)] 
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

17 years agoThe -I argument to aclocal needs a space before the include directory name.
Sean Bright [Thu, 30 Oct 2008 20:58:24 +0000 (20:58 +0000)] 
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

17 years agoCannot join detached threads. See http://www.opengroup.org/onlinepubs/000095399...
Tilghman Lesher [Thu, 30 Oct 2008 20:33:28 +0000 (20:33 +0000)] 
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

17 years agoUnlock before returning, when extension doesn't exist.
Tilghman Lesher [Thu, 30 Oct 2008 19:43:38 +0000 (19:43 +0000)] 
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

17 years agoinstead of comparing the string pointer to 0, let's compare the value that was actual...
Kevin P. Fleming [Thu, 30 Oct 2008 16:53:48 +0000 (16:53 +0000)] 
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

17 years agoFix an incorrect usage of sizeof()
Russell Bryant [Wed, 29 Oct 2008 05:23:51 +0000 (05:23 +0000)] 
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

17 years agoA little documentation cross-ref between features and
Steve Murphy [Wed, 29 Oct 2008 05:19:04 +0000 (05:19 +0000)] 
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

17 years agoThe magic trick to avoid this crash is not to
Steve Murphy [Wed, 29 Oct 2008 04:36:32 +0000 (04:36 +0000)] 
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

17 years agoQuoting in the wrong direction
Tilghman Lesher [Tue, 28 Oct 2008 22:32:34 +0000 (22:32 +0000)] 
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

17 years agoReset all DIAL variables back to blank, in case Dial is called multiple times
Tilghman Lesher [Tue, 28 Oct 2008 17:04:56 +0000 (17:04 +0000)] 
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

17 years agoBuffer policy setting for half is not needed.
Jeff Peeler [Mon, 27 Oct 2008 23:28:49 +0000 (23:28 +0000)] 
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

17 years agoInherit ALL elements of CallerID across a local channel.
Tilghman Lesher [Mon, 27 Oct 2008 21:32:00 +0000 (21:32 +0000)] 
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

17 years agoSince passing \0 as the second argument to strchr is valid (and will
Sean Bright [Sun, 26 Oct 2008 20:23:36 +0000 (20:23 +0000)] 
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

17 years agoMove AMI initialization to occur after loading modules. This prevents a
Russell Bryant [Sat, 25 Oct 2008 10:59:02 +0000 (10:59 +0000)] 
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

17 years agoBackport fix from 1.6.0 that allows you to set parkedcalltransfers=no|caller|callee...
Terry Wilson [Thu, 23 Oct 2008 16:04:42 +0000 (16:04 +0000)] 
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

17 years agorename this macro to properly reflect what it does
Kevin P. Fleming [Mon, 20 Oct 2008 04:57:33 +0000 (04:57 +0000)] 
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

17 years agobreak up acinclude.m4 into individual files, which will make it easier to maintain...
Kevin P. Fleming [Mon, 20 Oct 2008 04:45:56 +0000 (04:45 +0000)] 
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

17 years ago As per kpfleming's comments to the prior commit, I'm reverting some of the changes...
BJ Weschke [Sun, 19 Oct 2008 19:51:16 +0000 (19:51 +0000)] 
 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

17 years ago Fix the 1.4 branch compile again broken with r150557 when using with Zaptel and...
BJ Weschke [Sun, 19 Oct 2008 19:07:05 +0000 (19:07 +0000)] 
 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

17 years ago Using the GetVar handler in AMI is potentially dangerous (insta-crash [tm]) when...
BJ Weschke [Sat, 18 Oct 2008 01:42:23 +0000 (01:42 +0000)] 
 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

17 years agoInteresting crash. In this case, you exit the
Steve Murphy [Fri, 17 Oct 2008 17:18:31 +0000 (17:18 +0000)] 
Interesting crash. In this case, you exit the
bridge with peer completely GONE.

I moved the channel find call up to cover the
whole peer CDR reset code segment. This appears
to solve the crash without changing the logic
at all.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150637 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCorrectly allow chan_dahdi to compile against older versions of Zaptel.
Jason Parker [Fri, 17 Oct 2008 15:31:35 +0000 (15:31 +0000)] 
Correctly allow chan_dahdi to compile against older versions of Zaptel.
Don't always define HAVE_ZAPTEL_CHANALARMS (since we check if it's defined..)
Minor cleanup to make things clear.

(closes issue #13726)
Reported by: tzafrir
Patches:
      dahdi_def.diff uploaded by tzafrir (license 46)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150557 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoReverting changes from commits 150298 and 150301 since
Mark Michelson [Thu, 16 Oct 2008 23:40:54 +0000 (23:40 +0000)] 
Reverting changes from commits 150298 and 150301 since
I was mistakenly under the assumption that dialplan functions
*always* required that a channel be present. I need to go
home earlier, I think :)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150304 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAnd don't forget to return on the error condition
Mark Michelson [Thu, 16 Oct 2008 23:35:07 +0000 (23:35 +0000)] 
And don't forget to return on the error condition

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150301 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDon't try to call a dialplan function's read callback from
Mark Michelson [Thu, 16 Oct 2008 23:34:37 +0000 (23:34 +0000)] 
Don't try to call a dialplan function's read callback from
the manager's GetVar handler if an invalid channel has
been specified. Several dialplan functions, including
CHANNEL and SIP_HEADER, do not check for NULL-ness of
the channel being passed in.

(closes issue #13715)
Reported by: makoto

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150298 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix memory leak found by customer
Richard Mudgett [Thu, 16 Oct 2008 15:56:06 +0000 (15:56 +0000)] 
Fix memory leak found by customer

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150124 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoThis patch is relevant to:
Steve Murphy [Thu, 16 Oct 2008 15:26:10 +0000 (15:26 +0000)] 
This patch is relevant to:

ABE-1628 and RYM-150398 and AST-103 in internal Digium
bug trackers.

These fixes address a really subtle memory corruption
problem that would happen in machines heavily loaded
in production environments. The corruption would
always take the form of the STMT object getting
nulled out and one of the unixODBC calls would
crash trying to access statement->connection.

It isn't fully proven yet, but the server has
now been running 2.5 days without appreciable
memory growth, or any gain of %cpu, and no
crashes. Whether this is the problem or not
on that server, these fixes are still warranted.

As it turns out, **I** introduced these errors
unwittingly, when I corrected another crash earlier.
I had formed the build_query routine, and failed
to remove mutex_unlock calls in 3 places in the
transplanted code. These unlocks would only
happen in error situations, but unlocking the
mutex early set the code up for a catastrophic
failure, it appears. It would happen only once
every 100K-200K or more calls, under heavy load...
but that is enough.

If another crash occurs, with the same MO,
I'll come back and remove my confession from the log, and
we'll keep searching, but the fact that we
have Asterisk dying from an asynchronous
wiping of the STMT object, only on some connection
error, and that the server has lived for 2.5
days on this code without a crash, sure make
it look like this was the problem!

Also, in several points, Statement handles are
set to NULL after SQLFreeHandle. This was mainly
for insurance, to guarantee a crash. As it turns
out, the code does not appear to be attempting
to use these freed pointers.

Asterisk owes a debt of gratitude to Federico Alves
and Frediano Ziglio for their untiring efforts in
finding this bug, among others.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150056 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago Another documentation fix.
BJ Weschke [Wed, 15 Oct 2008 21:34:02 +0000 (21:34 +0000)] 
 Another documentation fix.
 (closes issue #13708)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149840 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago An update to the documentation/example of agents.conf.sample with the correct parame...
BJ Weschke [Wed, 15 Oct 2008 18:28:54 +0000 (18:28 +0000)] 
 An update to the documentation/example of agents.conf.sample with the correct parameter for this feature as defined in chan_agent.c
 (closes issue #13709)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149683 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofix some problems when parsing SIP messages that have the maximum number of headers...
Kevin P. Fleming [Wed, 15 Oct 2008 10:30:40 +0000 (10:30 +0000)] 
fix some problems when parsing SIP messages that have the maximum number of headers or body lines that we support

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149452 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoChange this warning to an error message. Suggestion
Mark Michelson [Tue, 14 Oct 2008 23:43:58 +0000 (23:43 +0000)] 
Change this warning to an error message. Suggestion
comes from Sean Bright. Thanks Sean!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149266 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCall register_peer_exten even in the case that the peer's
Mark Michelson [Tue, 14 Oct 2008 23:10:26 +0000 (23:10 +0000)] 
Call register_peer_exten even in the case that the peer's
IP/port does not change.

(closes issue #13309)
Reported by: dimas
Patches:
      v2-13309.patch uploaded by dimas (license 88)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149207 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd a tolerance period for sync-triggered audiohooks
Mark Michelson [Tue, 14 Oct 2008 23:00:01 +0000 (23:00 +0000)] 
Add a tolerance period for sync-triggered audiohooks
so that if packetization of audio is close (but not equal)
we don't end up flushing the audiohooks over small
inconsistencies in synchronization.

Related to issue #13005, and solves the issue
for most people who were experiencing the problem.
However, a small number of people are still experiencing
the problem on long calls, so I am not closing
the issue yet

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149204 65c4cc65-6c06-0410-ace0-fbb531ad65f3