Commit Graph

12543 Commits

Author SHA1 Message Date
Russell Bryant
e04052bfd4 Importing files for 1.4.20.1 release
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4.20.1
2008-05-21 20:31:18 +00:00
Russell Bryant
e68d7d0b0b merge main/asterisk.c portion of 117519
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:52:07 +00:00
Russell Bryant
feea2e6a82 merge gtk part of 117507
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:47:43 +00:00
Russell Bryant
d1e1ee2b00 merge 117479 from 1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:47:00 +00:00
Russell Bryant
ac1a692584 remove .version and ChangeLog
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:46:25 +00:00
Russell Bryant
2ab9c8e8e8 create 1.4.20.1 tag
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:44:04 +00:00
Russell Bryant
635570119f Importing files for 1.4.20.1 release
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:26:23 +00:00
Russell Bryant
338966da6f change .version, and remove the ChangeLog
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:24:07 +00:00
Russell Bryant
d0b0298ec5 Create 1.4.20.1 tag
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20.1@117510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:22:27 +00:00
Russell Bryant
7bca56d33c Change .version and ChangeLog
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20@117334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20 22:41:52 +00:00
Russell Bryant
c2768f9bf0 create 1.4.20 from 1.4.20-rc3
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20@117333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20 22:38:58 +00:00
Russell Bryant
509dda2726 Use autotagged externals
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20-rc3@116244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 14:40:18 +00:00
Russell Bryant
7e83df2579 Importing files for 1.4.20-rc3 release
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20-rc3@116243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 14:39:50 +00:00
Russell Bryant
3eb8db8577 Creating tag for the release of asterisk-1.4.20-rc3
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20-rc3@116242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 14:37:04 +00:00
Olle Johansson
59adcca238 Accept text messages even with
Content-Type: text/plain;charset=Södermanländska


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@116230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 12:51:06 +00:00
Mark Michelson
1167869a80 A change to the way channel locks are handled when DEBUG_CHANNEL_LOCKS is defined.
After debugging a deadlock, it was noticed that when DEBUG_CHANNEL_LOCKS
is enabled in menuselect, the actual origin of channel locks is obscured
by the fact that all channel locks appear to happen in the function
ast_channel_lock(). This code change redefines ast_channel_lock to be a
macro which maps to __ast_channel_lock(), which then relays the proper
file name, line number, and function name information to the core lock
functions so that this information will be displayed in the case that
there is some sort of locking error or core show locks is issued.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@116088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 23:47:49 +00:00
Russell Bryant
01de8fa419 Fix a deadlock involving channel autoservice and chan_local that was debugged
and fixed by mmichelson and me.

We observed a system that had a bunch of threads stuck in ast_autoservice_stop().
The reason these threads were waiting around is because this function waits to
ensure that the channel list in the autoservice thread gets rebuilt before the
stop() function returns.  However, the autoservice thread was also locked, so
the autoservice channel list was never getting rebuilt.

The autoservice thread was stuck waiting for the channel lock on a local channel.
However, the local channel was locked by a thread that was stuck in the autoservice
stop function.

It turned out that the issue came down to the local_queue_frame() function in
chan_local.  This function assumed that one of the channels passed in as an
argument was locked when called.  However, that was not always the case.  There
were multiple cases in which this channel was not locked when the function was
called.  We fixed up chan_local to indicate to this function whether this channel
was locked or not.  The previous assumption had caused local_queue_frame() to
improperly return with the channel locked, where it would then never get unlocked.

(closes issue #12584)
(related to issue #12603)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@116038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 21:17:23 +00:00
Russell Bryant
92ff649dd6 Fix an issue that I noticed in autoservice while mmichelson and I were debugging
a different problem.  I noticed that it was theoretically possible for two threads
to attempt to start the autoservice thread at the same time.  This change makes the
process of starting the autoservice thread, thread-safe.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 21:05:57 +00:00
Joshua Colp
48dd08e321 Use the right flag to open the audio in non-blocking.
(closes issue #12616)
Reported by: nicklewisdigiumuser


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 20:28:23 +00:00
Tilghman Lesher
2fc71fe563 If the socket dies (read returns 0=EOF), return immediately.
(Closes issue #12637)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 18:36:13 +00:00
Mark Michelson
f1696e2133 If a thread holds no locks, do not print any information on the thread when issuing
a core show locks command. This will help to de-clutter output somewhat.

Russell said it would be fine to place this improvement in the 1.4 branch, so that's
why it's going here too.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-12 17:51:14 +00:00
Russell Bryant
e61a5ea078 Use autotagged externals
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20@115612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-12 14:48:41 +00:00
Russell Bryant
b04b427a09 Importing files for 1.4.20 release
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20@115611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-12 14:48:30 +00:00
Russell Bryant
271cfebe5b Creating tag for the release of asterisk-1.4.20
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.4.20@115610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-12 14:47:12 +00:00
Joshua Colp
f0efe0d2b5 Improve res_ninit and res_ndestroy autoconf logic on the Darwin platform.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-09 16:34:08 +00:00
Russell Bryant
09c28afa6d Remove debug output.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 19:19:50 +00:00
Russell Bryant
03c5a410ad Merged revisions 115564 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r115564 | russell | 2008-05-08 14:14:04 -0500 (Thu, 08 May 2008) | 25 lines

Fix a race condition that bbryant just found while doing some IAX2 testing.
He was running Asterisk trunk running IAX2 calls through a few Asterisk boxes,
however, the audio was extremely choppy.  We looked at a packet trace and saw
a storm of INVAL and VNAK frames being sent from one box to another.

It turned out that what had happened was that one box tried to send a CONTROL
frame before the 3 way handshake had completed.  So, that frame did not include
the destination call number, because it didn't have it yet.  Part of our recent
work for security issues included an additional check to ensure that frames that
are supposed to include the destination call number have the correct one.  This
caused the frame to be rejected with an INVAL.  The frame would get retransmitted
for forever, rejected every time ...

This race condition exists in all versions that got the security changes,
in theory.  However, it is really only likely that this would cause a problem in
Asterisk trunk.  There was a control frame being sent (SRCUPDATE) at the _very_
beginning of the call, which does not exist in 1.2 or 1.4.  However, I am fixing
all versions that could potentially be affected by the introduced race condition.

These changes are what bbryant and I came up with to fix the issue.  Instead of
simply dropping control frames that get sent before the handshake is complete,
the code attempts to wait a little while, since in most cases, the handshake
will complete very quickly.  If it doesn't complete after yielding for a little
while, then the frame gets dropped.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 19:15:25 +00:00
Russell Bryant
442079ab0b Don't give up on attempting an outbound registration if we receive a 408 Timeout.
(closes issue #12323)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 16:11:33 +00:00
Russell Bryant
0353109ec1 remove postgres_cdr.sql, as the CDR schema is in realtime_pgsql.sql, as well
(closes issue #9676)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 15:37:49 +00:00
Russell Bryant
5e851ededb Don't exit the script if Asterisk is not running.
(closes issue #12611)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 15:32:08 +00:00
Russell Bryant
4a1081e590 Don't use a channel before checking for channel allocation failure.
(closes issue #12609)
Reported by: edantie


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 15:24:54 +00:00
Russell Bryant
1ae49dd240 Use the same method for executing Asterisk as the rest of the script.
(closes issue #12611)
Reported by: b_plessis


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 14:40:53 +00:00
Russell Bryant
f27d0168a2 Track peer references when stored in the sip_pvt struct as the peer related to
a qualify ping or a subscription.  This fixes some realtime related crashes.
(closes issue #12588)
(closes issue #12555)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-07 18:17:19 +00:00
Russell Bryant
e1c4c9e7b6 Merged revisions 115511 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r115511 | russell | 2008-05-07 11:22:49 -0500 (Wed, 07 May 2008) | 3 lines

Remove remnants of dlinkedlists.  I didn't actually use them in the final version
of my IAX2 improvements.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-07 16:24:09 +00:00
Jason Parker
38191b0908 Merged revisions 115421 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r115421 | qwell | 2008-05-06 14:54:57 -0500 (Tue, 06 May 2008) | 7 lines

read requires an argument on some non-bash shells

(closes issue #12593)
Reported by: bkruse
Patches:
      getilbc.sh_12593_v1.diff uploaded by bkruse (license 132)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 19:55:29 +00:00
Jason Parker
00415742a5 Switch to using ast_random() rather than just rand().
This does not fix the bug reported, but I believe it is correct.

(from issue #12446)
Patches:
      bug_12446.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 19:34:58 +00:00
Tilghman Lesher
273afe2080 Don't print the terminating NUL. (Closes issue #12589)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 19:31:39 +00:00
Joshua Colp
9c2bac0487 Add in missing argument.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 13:54:15 +00:00
Tilghman Lesher
869b7b2b4d Separate verbose output from CLI output, by using a preamble.
(closes issue #12402)
 Reported by: Corydon76
 Patches: 
       20080410__no_verbose_in_rx_output.diff.txt uploaded by Corydon76 (license 14)
       20080501__no_verbose_in_rx_output__1.4.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 22:50:31 +00:00
Joshua Colp
6e6849f1a0 Make sure that either the main speex library contains preprocess functions or that speexdsp does. If both fail then speex stuff can not be built.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 22:10:05 +00:00
Mark Michelson
1eee42a78a Don't consider a caller "handled" until the caller is bridged with
a queue member. There was too much of an opportunity for the member
to hang up (either during a delay, announcement, or overly long
agi) between the time that he answered the phone and the time when
he actually was bridged with the caller. The consequence of this
was that if the member hung up in that interval, then proper
abandonment details would not be noted in the queue log if the caller
were to hang up at any point after the member hangup.

(closes issue #12561)
Reported by: ablackthorn



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 21:41:34 +00:00
Tilghman Lesher
732e3bec3e Reverse order, such that user configs override default selections
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 20:17:55 +00:00
Tilghman Lesher
6142d1648c Err, the documentation on the return value of ast_odbc_backslash_is_escape is exactly backwards.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 19:55:55 +00:00
Russell Bryant
fbf07008d9 Avoid putting opaque="" in Digest authentication. This patch came from switchvox.
It fixes authentication with Primus in Canada, and has been in use for a very long
time without causing problems with any other providers.
(closes issue AST-36)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 19:49:25 +00:00
Russell Bryant
3cf37ba42e Blocked revisions 115296 via svnmerge
........
r115296 | russell | 2008-05-05 12:53:26 -0500 (Mon, 05 May 2008) | 28 lines

Merge changes from team/russell/iax2_find_callno_1.2

These changes address a critical performance issue introduced in the latest
release.  The fix for the latest security issue included a change that made
Asterisk randomly choose call numbers to make them more difficult to guess by
attackers.  However, due to some inefficient (this is by far, an understatement)
code, when Asterisk chose high call numbers, chan_iax2 became unusable after
just a small number of calls.  On a small embedded platform, it would not be
able to handle a single call.  On my Intel Core 2 Duo @ 2.33 GHz, I couldn't
run more than about 16 IAX2 channels.  Ouch.

These changes address some performance issues of the find_callno() function
that have bothered me for a very long time.  On every incoming media frame,
it iterated through every possible call number trying to find a matching
active call.  This involved a mutex lock and unlock for each call number
checked.  So, if the random call number chosen was 20000, then every media
frame would cause 20000 locks and unlocks.  Previously, this problem was
not as obvious since Asterisk always chose the lowest call number it could.

A second container for IAX2 pvt structs has been added.  It is an astobj2
hash table.  When we know the remote side's call number, the pvt goes into
the hash table with a hash value of the remote side's call number.  Then,
lookups for incoming media frames are a very fast hash lookup instead of an
absolutely insane array traversal.

In a quick test, I was able to get more than 3600% more IAX2 channels
on my machine with these changes.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 17:53:54 +00:00
Tilghman Lesher
70aedcea79 When starting Asterisk, bug out if Asterisk is already running.
(closes issue #12525)
 Reported by: explidous
 Patches: 
       20080428__bug12525.diff.txt uploaded by Corydon76 (license 14)
 Tested by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 03:22:25 +00:00
Joshua Colp
9ecb9277ad Expand the test function for GCC attributes so that more complex attributes are properly recognized.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-04 02:09:44 +00:00
Joshua Colp
a8c56a51d6 For my next trick I will make these work with what our autoconf header file gives us.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-04 01:50:59 +00:00
Joshua Colp
65e2b0a8fb Treat warnings as errors when checking if a GCC attribute exists. We have to do this as GCC will just ignore the attribute and pop up a warning, it won't actually fail to compile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-04 01:43:26 +00:00
Brett Bryant
61bee5aa54 Add new "pri show version" command to show the libpri version for support reasons.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-02 20:25:42 +00:00