]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
16 years agoRemove the test_for_thread_safety() function completely.
Russell Bryant [Tue, 9 Dec 2008 22:17:39 +0000 (22:17 +0000)] 
Remove the test_for_thread_safety() function completely.

The test is not valid.  Besides, if we actually suspected that recursive
mutexes were not working, we would get a ton of LOG_ERROR messages when
DEBUG_THREADS is turned on.

(inspired by a discussion on the asterisk-dev list)

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

16 years agoWe appear to have documented tz= in the [general] section of voicemail.conf,
Tilghman Lesher [Tue, 9 Dec 2008 21:53:25 +0000 (21:53 +0000)] 
We appear to have documented tz= in the [general] section of voicemail.conf,
without actually having implemented it.  Oops.
(Reported by Olivier on the -users list)

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

16 years agoAdd 'down' as a valid state for directed call pickup. This creeps up when we receive...
Joshua Colp [Tue, 9 Dec 2008 21:14:29 +0000 (21:14 +0000)] 
Add 'down' as a valid state for directed call pickup. This creeps up when we receive session progress when dialing a device and not ringing.
(closes issue #14005)
Reported by: ddl

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

16 years agoFix an issue where callers on an incoming call on an SLA trunk would not hear ringback.
Russell Bryant [Tue, 9 Dec 2008 20:57:35 +0000 (20:57 +0000)] 
Fix an issue where callers on an incoming call on an SLA trunk would not hear ringback.

We need to make sure that we don't start writing audio to the trunk channel until we're
actually ready to answer it.  Otherwise, the channel driver will treat it as inband
progress, even though all they are getting is silence.

(closes issue #12471)
Reported by: mthomasslo

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

16 years agoFix double declaration of 'x' on the PPC platform.
Joshua Colp [Tue, 9 Dec 2008 20:44:32 +0000 (20:44 +0000)] 
Fix double declaration of 'x' on the PPC platform.
(closes issue #14038)
Reported by: ffloimair

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

16 years agoIf we fail to start a thread for the pbx to run in, we need to
Mark Michelson [Tue, 9 Dec 2008 20:28:44 +0000 (20:28 +0000)] 
If we fail to start a thread for the pbx to run in, we need to
be sure to decrease the number of active calls on the system.

This fix may relate to ABE-1713, but it is not certain yet.

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

16 years agoIn discussion with seanbright on #asterisk-dev, I have added a default rule, and...
Steve Murphy [Tue, 9 Dec 2008 20:20:54 +0000 (20:20 +0000)] 
In discussion with seanbright on #asterisk-dev,  I have added a default rule, and an option to suppress the default rule from being generated in the flex output, for the sake of those OS's where they didn't tweak flex's ECHO macro, and the compiler doesn't like it. The regressions are OK with this.

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

16 years agoMake sure that the timestamp for DTMF is not the same as the previous voice frame...
Joshua Colp [Tue, 9 Dec 2008 19:47:07 +0000 (19:47 +0000)] 
Make sure that the timestamp for DTMF is not the same as the previous voice frame and do not send audio when transmitting DTMF as this confuses some equipment.
(closes issue #13209)
Reported by: ip-rob
Patches:
      13209.diff uploaded by file (license 11)
Tested by: ip-rob, bujones

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

16 years agoTake video into account when early bridging RTP.
Joshua Colp [Tue, 9 Dec 2008 19:06:14 +0000 (19:06 +0000)] 
Take video into account when early bridging RTP.
(closes issue #13535)
Reported by: davidw

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

16 years agoPrevious fix used ast_malloc and ast_copy_string and messed up the standalone stuff...
Steve Murphy [Tue, 9 Dec 2008 18:13:39 +0000 (18:13 +0000)] 
Previous fix used ast_malloc and ast_copy_string and messed up the standalone stuff. Fixed.

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

16 years agoFor some reason, after a distclean, gcc started returning
Tilghman Lesher [Tue, 9 Dec 2008 17:07:50 +0000 (17:07 +0000)] 
For some reason, after a distclean, gcc started returning
'value computed is not used'.  Fixing (for --enable-dev-mode).

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

16 years agoAllow DISA to handle extensions that start with #.
Russell Bryant [Tue, 9 Dec 2008 16:46:53 +0000 (16:46 +0000)] 
Allow DISA to handle extensions that start with #.

(closes issue #13330)
Reported by: jcovert

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

16 years ago(closes issue #14019)
Steve Murphy [Tue, 9 Dec 2008 16:31:55 +0000 (16:31 +0000)] 
(closes issue #14019)
Reported by: ckjohnsonme
Patches:
      14019.diff uploaded by murf (license 17)
Tested by: ckjohnsonme, murf

This crash was the result of a few small errors that
would combine in 64-bit land to result in a crash.

32-bit land might have seen these combine to mysteriously
drop the args to an application call, in certain
circumstances.

Also, in trying to find this bug, I spotted
a situation in the flex input, where, in passing
back a 'word' to the parser, it would allocate
a buffer larger than necessary. I changed the
usage in such situations, so that strdup was
not used, but rather, an ast_malloc, followed
by ast_copy_string.

I removed a field from the pval struct, in
u2, that was never getting used, and set in
one spot in the code. I believe it was an
artifact of a previous fix to make switch
cases work invisibly with extens.

And, for goto's I removed a '!' from
before a strcmp, that has been there
since the initial merging of AEL2, that
might prevent the proper target of a
goto from being found. This was pretty
harmless on its own, as it would just
louse up a consistency check for users.

Many thanks to ckjohnsonme for providing
a simplified and complete set of information
about the bug, that helped considerably in
finding and fixing the problem.

Now, to get aelparse up and running again
in trunk, and out of its "horribly broken" state,
so I can run the regression suite!

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

16 years agoFix a problem with GROUP() settings on a masquerade.
Russell Bryant [Tue, 9 Dec 2008 14:52:25 +0000 (14:52 +0000)] 
Fix a problem with GROUP() settings on a masquerade.

The previous code carried over group settings from the old channel to the new
one.  However, it did nothing with the group settings that were already on the
new channel.  This patch removes all group settings that already existed on the
new channel.

I have a more complicated version of this patch which addresses only the most
blatant problem with this, which is that a channel can end up with multiple
group settings in the same category.  However, I could not think of a use case
for keeping any of the group settings from the old channel, so I went this route
for now.

(closes AST-152)

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

17 years agoMake the usereqphone option work again.
Joshua Colp [Mon, 8 Dec 2008 17:52:10 +0000 (17:52 +0000)] 
Make the usereqphone option work again.
(closes issue #13474)
Reported by: mmaguire
Patches:
      20080912_bug13474.diff uploaded by mmaguire (license 571)

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

17 years agoMerged revisions 161421 via svnmerge from
Sean Bright [Fri, 5 Dec 2008 21:02:20 +0000 (21:02 +0000)] 
Merged revisions 161421 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r161421 | seanbright | 2008-12-05 15:50:23 -0500 (Fri, 05 Dec 2008) | 8 lines

  Fix build errors on FreeBSD (uint -> unsigned int).

  (closes issue #14006)
  Reported by: alphaque
  Patches:
        astobj2.h-patch uploaded by alphaque (license 259)
        (Slightly modified by seanbright)
........

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

17 years agokill a warning
Dwayne M. Hubbard [Fri, 5 Dec 2008 16:51:17 +0000 (16:51 +0000)] 
kill a warning

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

17 years agoFix a NULL format string warning found by buildbot.
Russell Bryant [Fri, 5 Dec 2008 14:12:14 +0000 (14:12 +0000)] 
Fix a NULL format string warning found by buildbot.

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

17 years ago(closes issue #13835)
Jeff Peeler [Thu, 4 Dec 2008 18:30:41 +0000 (18:30 +0000)] 
(closes issue #13835)
Reported by: matt_b
Tested by: jpeeler

This mirrors a check that was present in ast_rtp_read to also be in ast_rtp_raw_write to not schedule sending the receiver report if the remote RTCP endpoint address isn't present in the RTCP structure.

Closes AST-142.

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

17 years agoFix a callerid parsing issue. If someone formatted callerid like the
Mark Michelson [Thu, 4 Dec 2008 16:44:18 +0000 (16:44 +0000)] 
Fix a callerid parsing issue. If someone formatted callerid like the
following: "name <number>" (including the quotation marks), then the parts
would be parsed as

name: "name
number: number

This is because the closing quotation mark was not discovered since the number
and everything after was parsed out of the string earlier. Now, there is a check
to see if the closing quote occurs after the number, so that we can know if we
should strip off the opening quote on the name.

Closes AST-158

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

17 years agoSome compilers warn on null format strings; some don't (caught by buildbot)
Tilghman Lesher [Wed, 3 Dec 2008 21:54:07 +0000 (21:54 +0000)] 
Some compilers warn on null format strings; some don't (caught by buildbot)

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

17 years agoOnly show this warning when we want to show it.
Jason Parker [Wed, 3 Dec 2008 21:38:07 +0000 (21:38 +0000)] 
Only show this warning when we want to show it.

(closes issue #13982)
Reported by: coolmig
Patches:
      chan_agent.c.patch uploaded by coolmig (license 621)

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

17 years ago(closes issue #13597)
Steve Murphy [Wed, 3 Dec 2008 20:41:42 +0000 (20:41 +0000)] 
(closes issue #13597)
Reported by: john8675309
Patches:
      patch.13597 uploaded by murf (license 17)
Tested by: murf, john8675309

This patch causes the setcid func to update the CDR
clid after setting the channel field.

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

17 years agoDuring bridge code, the channel bridge may return a retry code, if a transfer
Tilghman Lesher [Wed, 3 Dec 2008 17:55:12 +0000 (17:55 +0000)] 
During bridge code, the channel bridge may return a retry code, if a transfer
was initiated but not yet completed.  If the bridge is immediately retried,
then we may send a storm of TXREQ packets, even though the first set is sent
reliably (retransmitted).  Fixes AST-137.

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

17 years agoIf an entry is added to the directory during a scan when another entry expires,
Tilghman Lesher [Wed, 3 Dec 2008 17:34:34 +0000 (17:34 +0000)] 
If an entry is added to the directory during a scan when another entry expires,
then that new entry will not be processed promptly, but must wait for either a
future entry to start or a current entry's retry to occur.  If no other entries
exist in the directory (other than the new entries) when a bunch expire, then
the new entries must wait until another new entry is added to be processed.
This was a rather weird race condition, really.  Fixes AST-147.

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

17 years agoDon't start scanning the directory until all modules are loaded, because some
Tilghman Lesher [Wed, 3 Dec 2008 16:58:34 +0000 (16:58 +0000)] 
Don't start scanning the directory until all modules are loaded, because some
required modules (channels, apps, functions) may not yet be in memory yet.
Fixes AST-149.

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

17 years agoJon Bonilla (Manwe) pointed out on the -dev list:
Tilghman Lesher [Wed, 3 Dec 2008 14:09:35 +0000 (14:09 +0000)] 
Jon Bonilla (Manwe) pointed out on the -dev list:
"I guess that having only ip-phones in mind is not a good approach. Since it is
possible to have a sip proxy connected to asterisk we could receive a 407
(unauthorized) or 483 (too many hops) as response and dialog ending would not be
a good behavior."
So modified.

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

17 years agoChannel is masqueraded, don't keep alive
Terry Wilson [Tue, 2 Dec 2008 23:58:08 +0000 (23:58 +0000)] 
Channel is masqueraded, don't keep alive

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

17 years agoA situation like A calls B, A builtin_atxfers B to C, C parks B would lead to a crash...
Terry Wilson [Tue, 2 Dec 2008 23:04:23 +0000 (23:04 +0000)] 
A situation like A calls B, A builtin_atxfers B to C, C parks B would lead to a crash.  Thanks to file for telling me how to fix it!

(closes issue #13854)
Reported by: Adam Lee
Tested by: otherwiseguy

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

17 years agoWhen the text does not match exactly (e.g. RTP/SAVP), then the %n conversion
Tilghman Lesher [Tue, 2 Dec 2008 17:42:09 +0000 (17:42 +0000)] 
When the text does not match exactly (e.g. RTP/SAVP), then the %n conversion
fails, and the resulting integer is garbage.  Thus, we must initialize the
integer and check it afterwards for success.
(closes issue #14000)
 Reported by: folke
 Patches:
       asterisk-sipbg-sscanf-1.4.22.diff uploaded by folke (license 626)
       asterisk-sipbg-sscanf-1.6.0.1.diff uploaded by folke (license 626)
       asterisk-sipbg-sscanf-trunk-r159896.diff uploaded by folke (license 626)

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

17 years agomake compile with dev mode and malloc debug
Terry Wilson [Tue, 2 Dec 2008 01:16:30 +0000 (01:16 +0000)] 
make compile with dev mode and malloc debug

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

17 years agoEnsure that Asterisk builds with --enable-dev-mode, even on the latest gcc
Tilghman Lesher [Tue, 2 Dec 2008 00:25:16 +0000 (00:25 +0000)] 
Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
and glibc.

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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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