Commit Graph

986 Commits

Author SHA1 Message Date
Tilghman Lesher
a032456cb8 Compatibility fix for PPC64
(closes issue #12081)
 Reported by: jcollie
 Patches: 
       asterisk-1.4.18-funcdesc.patch uploaded by jcollie (license 412)
 Tested by: jcollie, Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 00:05:06 +00:00
Mark Michelson
55b49506fa Two fixes:
1. Make the list of ast_dial_channels a lockable list. This is because in some cases,
   the ast_dial may exist in multiple threads due to asynchronous execution of its application, and
   I found some cases where race conditions could exist.

2. Check in ast_dial_join to be sure that the channel still exists before attempting to lock it, since
   it could have gotten hung up but the is_running_app flag on the ast_dial_channel may not have been
   cleared yet.

(closes issue #12038)
Reported by: jvandal
Patches:
      12038v2.patch uploaded by putnopvut (license 60)
Tested by: jvandal



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 21:49:20 +00:00
Mark Michelson
45079917ec Bump a couple of more buffers up by 2 so that annoying warnings aren't generated
like crazy on every fileexists_core call.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 20:36:26 +00:00
Tilghman Lesher
11550c7be6 Ensure the session ID can't be 0.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 18:15:10 +00:00
Joshua Colp
451ee5b1d4 Bump up the buffer by 2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:41:40 +00:00
Joshua Colp
97869f4771 Use the lock (which already existed, it just wasn't used) on the updaters list to protect the contents instead of the overall module list lock.
(closes issue #12080)
Reported by: ChaseVenters


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:07:33 +00:00
Kevin P. Fleming
8a9e7e213b fallback to standard English prompts properly when using new prompt directory layout
(closes issue #11831)
Reported by: IgorG
Patches:
      fallbacken.v1.diff uploaded by IgorG (license 20) (modified by me to improve code and conform rest of function to coding guidelines)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 16:53:06 +00:00
Russell Bryant
ac15754e9a Improve the lock tracking code a bit so that a bunch of old locks that threads
failed to lock don't sit around in the history.  When a lock is first locked,
this checks to see if the last lock in the list was one that was failed to be
locked.  If it is, then that was a lock that we're no longer sitting in a trylock
loop trying to lock, so just remove it.
(inspired by issue #11712)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 23:19:05 +00:00
Jason Parker
e1fb43d32a Allow the use of #include and #exec in situations where the max include depth was only 1.
Specifically, this fixes using #include and #exec in extconfig.conf.

This was basically caused because the config file itself raises the include level to 1.

I opted not to raise the include limit, because recursion here could cause very bizarre behavior.

Pointed out, and tested by jmls

(closes issue #12064)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 20:49:42 +00:00
Kevin P. Fleming
d105ba22fa reduce the likelihood that HTTP Manager session ids will consist of primarily '1' bits
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-21 14:33:51 +00:00
Tilghman Lesher
494aeb94ac Compat fix for Solaris
(closes issue #12022)
 Reported by: asgaroth
 Patches: 
       20080219__bug12022.diff.txt uploaded by Corydon76 (license 14)
 Tested by: asgaroth


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 17:53:00 +00:00
Joshua Colp
0433ee65ae Ensure that emulated DTMFs do not get interrupted by another begin frame.
(closes issue #11740)
Reported by: gserra
Patches:
      v1-11740.patch uploaded by dimas (license 88)
(closes issue #11955)
Reported by: tsearle
(closes issue #10530)
Reported by: xmarksthespot


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 23:56:48 +00:00
Mark Michelson
1726d5ef4e There was an invalid assumption when calculating the duration of a file that the filestream in question
was created properly. Unfortunately this led to a segfault in the situation where an unknown format was
specified in voicemail.conf and a voicemail was recorded. Now, we first check to be sure that the stream
was written correctly or else assume a zero duration.

(closes issue #12021)
Reported by: jakep
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 20:52:09 +00:00
Tilghman Lesher
4306df31b1 When a SIP channel is being auto-destroyed, it's possible for it to still be
in bridge code.  When that happens, we crash.  Delay the RTP destruction until
the bridge is ended.
(closes issue #11960)
 Reported by: norman
 Patches: 
       20080215__bug11960__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: norman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 17:31:52 +00:00
Joshua Colp
ba72af8c11 Backport fix from issue #9325.
(closes issue #11980)
Reported by: rbrunka


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 16:11:51 +00:00
Russell Bryant
468e53a6de In the case that you try to directly reload a module has returned
AST_MODULE_LOAD_DECLINE, log a message indicating that the module is not fully
initialized and must be initialized using "module load".


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 19:50:11 +00:00
Russell Bryant
97bf3c5ace Don't attempt to execute the reload callback for a module that returned
AST_MODULE_LOAD_DECLINE.  This fixes a crash that was reported against
chan_console in trunk.

(closes issue #11953, reported by junky, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 18:33:29 +00:00
Jason Parker
335e583040 revert accidental change from last commit. oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 22:24:03 +00:00
Jason Parker
3bc94a27ca Remove condition that was impossible.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-12 22:22:54 +00:00
Joshua Colp
82db5adb94 Add missing header file and ASTERISK_FILE_VERSION usage.
(closes issue #11936)
Reported by: snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-06 15:43:38 +00:00
Tilghman Lesher
0dafcac660 Cross-platform fix: OS X now deprecates the use of the daemon(3) API.
(closes issue #11908)
 Reported by: oej
 Patches: 
       20080204__bug11908.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-04 21:06:09 +00:00
Tilghman Lesher
df1dc7741d Compatibility fix for OpenWRT (reported by Brian Capouch via the mailing list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 15:55:58 +00:00
Russell Bryant
e4ee2274a1 Fix a couple of places where ast_frfree() was not called on a frame that came
from a translator.  This showed itself by g729 decoders not getting released.
Since the flag inside the translator frame never got unset by freeing the frame
to indicate it was no longer in use, the translators never got destroyed, and
thus the g729 licenses were not released.

(closes issue #11892)
Reported by: xrg
Patches:
      11892.diff uploaded by russell (license 2)
Tested by: xrg, russell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 23:10:06 +00:00
Steve Murphy
595ab7340d closes issue #11845; that's the one where there's a 1004 byte cdr leak with every AMI Redirect to a zap channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 19:30:37 +00:00
Joshua Colp
7b31f51cf9 Fix an issue where if a frame of higher sample size preceeded a frame of lower sample size and ast_slinfactory_read was called with a sample size of the combined values or higher a crash would happen.
(closes issue #11878)
Reported by: stuarth


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 15:41:04 +00:00
Russell Bryant
f8c69c7d92 Fix the last couple of issues related to building from a path that contains spaces.
(closes issue #11834)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 17:43:41 +00:00
Tilghman Lesher
44cdbc7d00 WaitExten didn't handle AbsoluteTimeout properly (went to 't' instead of 'T')
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 21:02:02 +00:00
Russell Bryant
ef78f25e8a Make some deadlock related fixes. These bugs were discovered and reported
internally at Digium by Steve Pitts.
 - Fix up chan_local to ensure that the channel lock is held before the local
   pvt lock.
 - Don't hold the channel lock when executing the timing function, as it can
   cause a deadlock when using chan_local.  This actually changes the code back
   to be how it was before the change for issue #10765.  But, I added some other
   locking that I think will prevent the problem reported there, as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 17:15:41 +00:00
Tilghman Lesher
7060a6888d When deleting a task from the scheduler, ignoring the return value could
possibly cause memory to be accessed after it is freed, which causes all
sorts of random memory corruption.  Instead, if a deletion fails, wait a
bit and try again (noting that another thread could change our taskid
value).
(closes issue #11386)
 Reported by: flujan
 Patches: 
       20080124__bug11386.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, flujan, stuarth`


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-27 21:59:53 +00:00
Russell Bryant
8f27d3ce7c Update main Asterisk copyright info to 2008
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 17:22:09 +00:00
Jason Parker
9bc4c3e533 Fix compilation on Solaris.
(closes issue #11832)
Patches:
      bug-11832.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-24 16:41:29 +00:00
Tilghman Lesher
d9f3861f72 Just confirmed that all current platforms need this header file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 00:56:06 +00:00
Tilghman Lesher
fa20a738d7 Fix the defines for OS X (and Solaris, too)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 20:34:55 +00:00
Tilghman Lesher
a0608084a9 Ensure that we can get an address even when we don't have a default route.
(closes issue #9225)
 Reported by: junky
 Patches: 
       20080122__bug9225.diff.txt uploaded by Corydon76 (license 14)
 Tested by: oej, loloski, sergee


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 16:54:06 +00:00
Russell Bryant
a6b9a0e774 Fix a couple of memory leaks with frame handling. Specifically,
ast_frame_free() needed to be called on the frame that came from the translator
to signed linear.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-19 10:05:27 +00:00
Russell Bryant
06d3c61a2e Revert adding the packed attribute, as it really doesn't make sense why that
would do any good.  Fix the real bug, which is to do the check to see if the
frame came from a translator at the beginning of ast_frame_free(), instead of
at the end.  This ensures that it always gets checked, even if none of the
parts of the frame are malloc'd, and also ensures that we aren't looking at
free'd memory in the case that it is a malloc'd frame.

(closes issue #11792, reported by explidous, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-18 21:37:21 +00:00
Pari Nannapaneni
f7eae72a2e missed that one while reverting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 23:23:25 +00:00
Pari Nannapaneni
0fed0a955f reverting 99001 - We need the Max-Age for extending the life of cookie mansession_id
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 23:09:53 +00:00
Russell Bryant
6d0ee62540 Have IAX2 optimize the codec translation path just like chan_sip does it. If
the caller's codec is in our codec list, move it to the top to avoid transcoding.

(closes issue #10500)
Reported by: stevedavies
Patches:
      iax-prefer-current-codec.patch uploaded by stevedavies (license 184)
      iax-prefer-current-codec.1.4.patch uploaded by stevedavies (license 184)
Tested by: stevedavies, pj, sheldonh


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 22:37:22 +00:00
Kevin P. Fleming
af7670bca8 we should only send the Set-Cookie header to the browser on the first response after creating a manager session, not on every response (doing so causes the browser to clear any local cookies it may have associated with the session)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 21:31:56 +00:00
Joshua Colp
fa640604de Replace current spy architecture with backport of audiohooks. This should take care of current known spy issues.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 20:33:47 +00:00
Joshua Colp
a93c14cbfe Introduce a lock into the dialing API that protects it when destroying the structure.
(closes issue #11687)
Reported by: callguy
Patches:
      11687.diff uploaded by file (license 11)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 15:08:24 +00:00
Joshua Colp
1379764f4c Add two more SDP names for ulaw and alaw.
(closes issue #11777)
Reported by: tootai


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 15:03:14 +00:00
Russell Bryant
7a007060bd Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.

The issue here is that it is possible for an instance of a translator to get
destroyed while the frame allocated as a part of the translator is still being
processed.  Specifically, this is possible anywhere between a call to ast_read()
and ast_frame_free(), which is _a lot_ of places in the code.  The reason this
happens is that the channel might get masqueraded during this time.  During a
masquerade, existing translation paths get destroyed.

So, this patch fixes the issue in an API and ABI compatible way.  (This one is
 for you, paravoid!)

It changes an int in ast_frame to be used as flag bits.  The 1 bit is still used
to indicate that the frame contains timing information.  Also, a second flag has
been added to indicate that the frame came from a translator.  When a frame with
this flag gets released and has this flag, a function is called in translate.c to
let it know that this frame is doing being processed.  At this point, the flag gets
cleared.  Also, if the translator was requested to be destroyed while its internal
frame still had this flag set, its destruction has been deffered until it finds out
that the frame is no longer being processed.

Admittedly, this feels like a hack.  But, it does fix the issue, and I was not able 
to think of a better solution ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:26:52 +00:00
Russell Bryant
9a241dd2b9 Revert a change that introduces an unacceptable performance hit and is causing
memory leaks ... (from rev 97973)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 17:38:38 +00:00
Pari Nannapaneni
ee32b1246d Comment explaining how to force browser to always read some html files from server.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 21:28:48 +00:00
Joshua Colp
aa95b890ea If the incoming RTP stream changes codec force the bridge to break if the other side does not support it.
(closes issue #11729)
Reported by: tsearle
Patches:
      new_codec_patch_udiff.patch uploaded by tsearle (license 373)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:51:10 +00:00
Mark Michelson
d97e842d55 Properly report the hangup cause as no answer when someone does not answer
(closes issue #10574, reported by boch, patched by moy)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 19:10:57 +00:00
Russell Bryant
45f3890926 Backport the ability to set the ToS bits on Linux when not running as root.
Normally, we would not backport features into 1.4, but, I was convinced by the
justification supplied by the supplier of this patch.  He pointed out that this
patch removes a requirement for running as root, thus reducing the potential
impacts of security issues.

(closes issue #11742)
Reported by: paravoid
Patches:
      libcap.diff uploaded by paravoid (license 200)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 18:25:30 +00:00
Russell Bryant
f826e84059 Fix samples vs. length calculations for g722
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 03:39:33 +00:00