]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
17 years agoFix a race condition that bbryant just found while doing some IAX2 testing.
Russell Bryant [Thu, 8 May 2008 19:14:04 +0000 (19:14 +0000)] 
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.2@115564 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoRemove remnants of dlinkedlists. I didn't actually use them in the final version
Russell Bryant [Wed, 7 May 2008 16:22:49 +0000 (16:22 +0000)] 
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.2@115511 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoread requires an argument on some non-bash shells
Jason Parker [Tue, 6 May 2008 19:54:57 +0000 (19:54 +0000)] 
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.2@115421 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMerge changes from team/russell/iax2_find_callno_1.2
Russell Bryant [Mon, 5 May 2008 17:53:26 +0000 (17:53 +0000)] 
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.2@115296 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agostop script from appending source code if run multiple times
Kevin P. Fleming [Tue, 29 Apr 2008 12:52:32 +0000 (12:52 +0000)] 
stop script from appending source code if run multiple times

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

17 years agoWhen we receive a full frame that is supposed to contain our call number,
Russell Bryant [Tue, 22 Apr 2008 22:20:35 +0000 (22:20 +0000)] 
When we receive a full frame that is supposed to contain our call number,
ensure that it has the correct one.
(closes issue #10078)
(AST-2008-006)

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

17 years agoupdate UPGRADE notes to document usage of the script
Kevin P. Fleming [Wed, 26 Mar 2008 19:49:30 +0000 (19:49 +0000)] 
update UPGRADE notes to document usage of the script

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

17 years agoadd a script to make getting the iLBC source code simple for end users
Kevin P. Fleming [Wed, 26 Mar 2008 18:58:37 +0000 (18:58 +0000)] 
add a script to make getting the iLBC source code simple for end users

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

17 years agodue to licensing restrictions, we cannot distribute the source code for iLBC encoding...
Kevin P. Fleming [Wed, 26 Mar 2008 15:53:46 +0000 (15:53 +0000)] 
due to licensing restrictions, we cannot distribute the source code for iLBC encoding and decoding... so remove it, and add instructions on how the user can obtain it themselves

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

17 years agoFix some very broken code that was introduced in 1.2.26 as a part of the security
Russell Bryant [Thu, 20 Mar 2008 21:53:27 +0000 (21:53 +0000)] 
Fix some very broken code that was introduced in 1.2.26 as a part of the security
fix.  The dnsmgr is not appropriate here.  The dnsmgr takes a pointer to an address
structure that a background thread continuously updates.  However, in these cases,
a stack variable was passed.  That means that the dnsmgr thread would be continuously
writing to bogus memory.

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

17 years agoFix character string being treated as format string
Terry Wilson [Tue, 18 Mar 2008 16:27:04 +0000 (16:27 +0000)] 
Fix character string being treated as format string

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

17 years agoDo not return with a successful authentication if the From header ends up empty.
Jason Parker [Tue, 18 Mar 2008 15:08:41 +0000 (15:08 +0000)] 
Do not return with a successful authentication if the From header ends up empty.
(AST-2008-003)

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

17 years agoChange misery.digium.com to pbx.digium.com
Russell Bryant [Mon, 7 Jan 2008 20:46:22 +0000 (20:46 +0000)] 
Change misery.digium.com to pbx.digium.com

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

17 years agoFix for fix for security fix (third time's the charm?)
Tilghman Lesher [Sun, 23 Dec 2007 01:30:42 +0000 (01:30 +0000)] 
Fix for fix for security fix (third time's the charm?)

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

17 years agoFix another potential seg fault ...
Russell Bryant [Thu, 20 Dec 2007 20:21:41 +0000 (20:21 +0000)] 
Fix another potential seg fault ...

(closes issue #11606)
Reported by: dimas

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

17 years agoFix a couple of places where it's possible to dereference a NULL pointer.
Russell Bryant [Thu, 20 Dec 2007 17:29:11 +0000 (17:29 +0000)] 
Fix a couple of places where it's possible to dereference a NULL pointer.

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

17 years agoOops, missed this one case
Tilghman Lesher [Tue, 18 Dec 2007 18:44:41 +0000 (18:44 +0000)] 
Oops, missed this one case

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

17 years agoFixing AST-2007-027 (Closes issue #11119)
Tilghman Lesher [Tue, 18 Dec 2007 18:23:06 +0000 (18:23 +0000)] 
Fixing AST-2007-027 (Closes issue #11119)

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

17 years agoProperly escape src and dst fields (Fixes AST-2007-026)
Tilghman Lesher [Thu, 29 Nov 2007 21:10:45 +0000 (21:10 +0000)] 
Properly escape src and dst fields (Fixes AST-2007-026)

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

17 years agoclarify the OpenSSL and OpenH323 license exceptions
Kevin P. Fleming [Thu, 13 Sep 2007 18:10:12 +0000 (18:10 +0000)] 
clarify the OpenSSL and OpenH323 license exceptions

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

18 years agoRevert patch committed for issue #9660. It broke E&M trunks.
Russell Bryant [Tue, 7 Aug 2007 17:44:04 +0000 (17:44 +0000)] 
Revert patch committed for issue #9660.  It broke E&M trunks.
(closes issue #10360)
(closes issue #10364)

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

18 years agoThis patch hopefully solves 10141; The user is running with it, and it doesn't appear...
Steve Murphy [Thu, 2 Aug 2007 17:56:37 +0000 (17:56 +0000)] 
This patch hopefully solves 10141; The user is running with it, and it doesn't appear to harm asterisk's operation, and may prevent a crash. I'll store it in 1.2, as we have shut down support on 1.2, but since I developed the patch before support finished, and it might affect 1.4 and trunk, I'm going ahead with it.

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

18 years agoThis probably isn't super-general, but it's a first stab at using kill -11 to generat...
Steve Murphy [Tue, 31 Jul 2007 19:19:35 +0000 (19:19 +0000)] 
This probably isn't super-general, but it's a first stab at using kill -11 to generate a core file instead of gcore.

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

18 years agoRevert change in revision 71656, even though it fixed a bug, because many people...
Tilghman Lesher [Mon, 30 Jul 2007 18:40:54 +0000 (18:40 +0000)] 
Revert change in revision 71656, even though it fixed a bug, because many people were depending upon the (broken) behavior.

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

18 years ago(closes issue #10334)
Joshua Colp [Mon, 30 Jul 2007 14:50:02 +0000 (14:50 +0000)] 
(closes issue #10334)
Reported by: ramonpeek
Pass through the return value from macro_exec through the MacroIf application.

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

18 years agothis fixes bug 10293, where the error message because defaultzone or loadzone was...
Steve Murphy [Wed, 25 Jul 2007 00:07:24 +0000 (00:07 +0000)] 
this fixes bug 10293, where the error message because defaultzone or loadzone was not defined was confusing

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

18 years agoOops, res contains the error code, not errno. I was wondering why a mutex was report...
Tilghman Lesher [Tue, 24 Jul 2007 22:11:33 +0000 (22:11 +0000)] 
Oops, res contains the error code, not errno.  I was wondering why a mutex was reporting "No such file or directory"...

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

18 years agoDon't create the Asterisk channel until we are starting the PBX on it.
Jason Parker [Tue, 24 Jul 2007 16:32:04 +0000 (16:32 +0000)] 
Don't create the Asterisk channel until we are starting the PBX on it.
(ASA-2007-018)

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

18 years ago(closes issue #5866)
Joshua Colp [Mon, 23 Jul 2007 18:28:13 +0000 (18:28 +0000)] 
(closes issue #5866)
Reported by: tyler
Do not force channel format changes when a generator is present. The generator may have changed the formats itself and changing them back would cause issues.

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

18 years ago(closes issue #10236)
Joshua Colp [Mon, 23 Jul 2007 14:32:07 +0000 (14:32 +0000)] 
(closes issue #10236)
Reported by: homesick
Patches:
      rpid_1.4_75840.patch uploaded by homesick (license 91)
Accept Remote Party ID on guest calls.

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

18 years agoWe should not use C++ reserved words in API headers (closes issue #10266)
Tilghman Lesher [Sun, 22 Jul 2007 21:39:55 +0000 (21:39 +0000)] 
We should not use C++ reserved words in API headers (closes issue #10266)

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

18 years agoBackport a fix for a memory leak that was fixed in trunk in reivision 76221
Russell Bryant [Sat, 21 Jul 2007 02:01:46 +0000 (02:01 +0000)] 
Backport a fix for a memory leak that was fixed in trunk in reivision 76221
by rizzo.  The memory used for the localaddr list was not freed during a
configuration reload.

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

18 years ago(closes issue #10247)
Joshua Colp [Fri, 20 Jul 2007 17:16:48 +0000 (17:16 +0000)] 
(closes issue #10247)
Reported by: fkasumovic
Patches:
      chan_sip.patch uploaded by fkasumovic (license #101)
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.

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

18 years agoWhen processing full frames, take sequence number wraparound into account when
Russell Bryant [Thu, 19 Jul 2007 15:49:42 +0000 (15:49 +0000)] 
When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)

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

18 years agoWhen traversing the queue of frames for possible retransmission after
Russell Bryant [Wed, 18 Jul 2007 21:09:13 +0000 (21:09 +0000)] 
When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)

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

18 years agoStore prior to copy (closes issue #10193)
Tilghman Lesher [Wed, 18 Jul 2007 20:31:36 +0000 (20:31 +0000)] 
Store prior to copy (closes issue #10193)

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

18 years agoremoved the word 'pissed' from ast_log(...) function call for BE-90
Dwayne M. Hubbard [Wed, 18 Jul 2007 17:48:33 +0000 (17:48 +0000)] 
removed the word 'pissed' from ast_log(...) function call for BE-90

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

18 years agoProperly check for the length in the skinny packet to prevent an invalid memcpy.
Russell Bryant [Tue, 17 Jul 2007 20:57:09 +0000 (20:57 +0000)] 
Properly check for the length in the skinny packet to prevent an invalid memcpy.
(ASA-2007-016)

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

18 years agoEnsure that when encoding the contents of an ast_frame into an iax_frame, that
Russell Bryant [Tue, 17 Jul 2007 20:45:27 +0000 (20:45 +0000)] 
Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)

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

18 years agoAfter parsing information elements in IAX frames, set the data length to zero,
Russell Bryant [Tue, 17 Jul 2007 20:41:41 +0000 (20:41 +0000)] 
After parsing information elements in IAX frames, set the data length to zero,
so that code later on does not think it has data to copy.
(ASA-2007-015)

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

18 years agoprovide proper copyright/license attribution for this structure that was copied from...
Kevin P. Fleming [Mon, 16 Jul 2007 20:46:58 +0000 (20:46 +0000)] 
provide proper copyright/license attribution for this structure that was copied from a BSD-licensed header file long, long ago...

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

18 years agoinstall the LICENSE file along with the music files
Kevin P. Fleming [Mon, 16 Jul 2007 18:33:02 +0000 (18:33 +0000)] 
install the LICENSE file along with the music files

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

18 years agomove FreePlayMusic files into a subdirectory, and include a license statement for...
Kevin P. Fleming [Mon, 16 Jul 2007 18:10:40 +0000 (18:10 +0000)] 
move FreePlayMusic files into a subdirectory, and include a license statement for them

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

18 years agoFix a couple potential minor memory leaks. load_moh_classes() could return
Russell Bryant [Fri, 13 Jul 2007 20:35:22 +0000 (20:35 +0000)] 
Fix a couple potential minor memory leaks.  load_moh_classes() could return
without destroying the loaded configuration.

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

18 years agoFixed an issue where chanspy flags were uninitialized if no options were passed.
Mark Michelson [Fri, 13 Jul 2007 20:10:39 +0000 (20:10 +0000)] 
Fixed an issue where chanspy flags were uninitialized if no options were passed.
What triggered this investigation was an IRC chat where some people's quiet flags were
set while others' weren't even though none of them had specified the q option.

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

18 years agoEnsure that adding a user to the list of users of a specific music on hold
Russell Bryant [Fri, 13 Jul 2007 20:07:21 +0000 (20:07 +0000)] 
Ensure that adding a user to the list of users of a specific music on hold
class is not done at the same time as any of the other operations on this list
to prevent list corruption.  Using the global moh_data lock for this is not
ideal, but it is what is used to protect these lists everywhere else in the
module, and I am only changing what is necessary to fix the bug.

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

18 years ago(closes issue #9660)
Russell Bryant [Fri, 13 Jul 2007 19:10:00 +0000 (19:10 +0000)] 
(closes issue #9660)
Reported by: mmacvicar
Patches submitted by: bbryant, russell
Tested by: mmacvicar, marco, arcivanov, jmhunter, explidous

When using a TDM400P (and probably other analog cards) there was a chance that
you could hang up and pick the phone back up where it has been long enough to
be not considered a flash hook, but too soon such that the device reports that
it is busy and the person on the phone will only hear silence.  This patch
makes chan_zap more tolerant of this and gives the device a couple of seconds
to succeed so the person on the phone happily gets their dialtone.

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

18 years agoOnly print out a warning for situations where it is actually helpful. (issue #10187...
Joshua Colp [Thu, 12 Jul 2007 15:51:24 +0000 (15:51 +0000)] 
Only print out a warning for situations where it is actually helpful. (issue #10187 reported by denke)

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

18 years agoThe function make_trunk() can fail and return -1 instead of a valid new call
Russell Bryant [Wed, 11 Jul 2007 22:53:26 +0000 (22:53 +0000)] 
The function make_trunk() can fail and return -1 instead of a valid new call
number.  Fix the uses of this function to handle this instead of treating it
as the new call number.  This would cause a deadlock and memory corruption.
(possible cause of issue #9614 and others, patch by me)

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

18 years agoThe cli command "agent logoff Agent/x soft" did not work...at all. Now it does.
Mark Michelson [Wed, 11 Jul 2007 21:12:30 +0000 (21:12 +0000)] 
The cli command "agent logoff Agent/x soft" did not work...at all. Now it does.

(closes issue #10178, reported and patched by makoto, with slight modification for 1.4 and trunk by me)

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

18 years agoMake sure that the ESCAPE immediately follows the condition that uses LIKE.
Russell Bryant [Wed, 11 Jul 2007 18:33:23 +0000 (18:33 +0000)] 
Make sure that the ESCAPE immediately follows the condition that uses LIKE.
This fixes realtime extensions with ODBC.
(closes issue #10175, reported by stuarth, patch by me)

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

18 years agoUse some Makefile magic to determine if linux/compiler.h is present. (issue #10174...
Joshua Colp [Wed, 11 Jul 2007 17:15:11 +0000 (17:15 +0000)] 
Use some Makefile magic to determine if linux/compiler.h is present. (issue #10174 reported by francesco_r)

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

18 years agoFix an issue where it was possible to have a service level of over 100%
Jason Parker [Tue, 10 Jul 2007 19:57:20 +0000 (19:57 +0000)] 
Fix an issue where it was possible to have a service level of over 100%
Between the time recalc_holdtime and update_queue was called, it was possible that the call could have been hungup.
Move both additions to the same place, so this won't happen.

Issue 10158, initial patch by makoto, modified by me.

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

18 years agoFix an issue with wrapuptime not working when using AgentLogin.
Jason Parker [Tue, 10 Jul 2007 19:03:45 +0000 (19:03 +0000)] 
Fix an issue with wrapuptime not working when using AgentLogin.

Issue 10169, patch by makoto, with a minor mod by me to not re-break issue 9618

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

18 years agoUse res_ndestroy on systems that have it. Otherwise, use res_nclose.
Jason Parker [Tue, 10 Jul 2007 18:37:23 +0000 (18:37 +0000)] 
Use res_ndestroy on systems that have it.  Otherwise, use res_nclose.
This prevents a memleak on NetBSD - and possibly others.

Issue 10133, patch by me, reported and tested by scw

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

18 years agoFix a small typo in description in of Voicemail() application.
Jason Parker [Tue, 10 Jul 2007 15:37:54 +0000 (15:37 +0000)] 
Fix a small typo in description in of Voicemail() application.

Issue 10170, patch by casper.

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

18 years agoOnly use ESCAPE when LIKE is used.
Russell Bryant [Tue, 10 Jul 2007 15:30:20 +0000 (15:30 +0000)] 
Only use ESCAPE when LIKE is used.
(issue #10075, this part reported by jmls on IRC, patch by me)

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

18 years agoEnsure the group information category exists before trying to do a string comparison...
Joshua Colp [Tue, 10 Jul 2007 14:48:00 +0000 (14:48 +0000)] 
Ensure the group information category exists before trying to do a string comparison with it. (issue #10171 reported by mlegas)

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

18 years agoWhen the specified class isn't found, properly fall back to the channel's music
Russell Bryant [Mon, 9 Jul 2007 21:00:17 +0000 (21:00 +0000)] 
When the specified class isn't found, properly fall back to the channel's music
class or the default.
(issue #10123, reported by blitzrage, patches from juggie, qwell, and me)

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

18 years agoSeveral chan_zap options were not working on reload because they were arbitrarily
Jason Parker [Mon, 9 Jul 2007 20:18:15 +0000 (20:18 +0000)] 
Several chan_zap options were not working on reload because they were arbitrarily
 disallowed when reloading some/most PRI options (such as signalling) was disallowed.

Options such as polarityonanswerdelay and answeronpolarityswitch can safely be changed on a reload.
This corrects that behavior.

Issue 9186, patch by tzafrir.

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

18 years agoIf a sip_pvt struct has already registered an extension state callback,
Russell Bryant [Fri, 6 Jul 2007 23:01:22 +0000 (23:01 +0000)] 
If a sip_pvt struct has already registered an extension state callback,
remove the old one before adding a new one.  If this isn't done, Asterisk
will crash.  (issue #10120)

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

18 years ago(closes issue #10075)
Russell Bryant [Fri, 6 Jul 2007 16:06:27 +0000 (16:06 +0000)] 
(closes issue #10075)
Reported by: apsaras
Patches submitted by: Corydon76
Tested by: apsaras

Fix a problem with MSSQL 2005 by explicitly stating that '\' is being used as
an escape character.

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

18 years ago(closes issue #10125)
Russell Bryant [Fri, 6 Jul 2007 15:55:41 +0000 (15:55 +0000)] 
(closes issue #10125)
Reported by: makoto
Patches submitted by: makoto

This fixes a crash in chan_sip that happens when the bindaddr setting is not
valid on Asterisk startup, gets fixed, and then a reload gets issued.

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

18 years agoFixed a bug wherein agents get stuck busy. (issue 9618, reported by jiddings, patched...
Mark Michelson [Fri, 6 Jul 2007 15:26:40 +0000 (15:26 +0000)] 
Fixed a bug wherein agents get stuck busy. (issue 9618, reported by jiddings, patched by moi)

closes issue #9618

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

18 years agowe shouldn't allow G.723.1 endpoints to use VAD, just like we don't support it for...
Kevin P. Fleming [Thu, 5 Jul 2007 22:11:51 +0000 (22:11 +0000)] 
we shouldn't allow G.723.1 endpoints to use VAD, just like we don't support it for G.729

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

18 years agoCopy language information to the dialog structure when calling a peer for situations...
Joshua Colp [Thu, 5 Jul 2007 19:15:18 +0000 (19:15 +0000)] 
Copy language information to the dialog structure when calling a peer for situations where a PBX may be started on the dialed channel. (issue #10121 reported by clegall_proformatique)

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

18 years agoTweak spy locking. (issue #9951 reported by welles)
Joshua Colp [Thu, 5 Jul 2007 14:19:14 +0000 (14:19 +0000)] 
Tweak spy locking. (issue #9951 reported by welles)

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

18 years agoActually check to make sure a PBX was started on one of the Local channels instead...
Joshua Colp [Thu, 5 Jul 2007 13:26:02 +0000 (13:26 +0000)] 
Actually check to make sure a PBX was started on one of the Local channels instead of blindly assuming it was. (issue #10112 reported by makoto)

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

18 years agoReset ServicelevelPerf variable back to 0 if we are unable to calculate it each time...
Joshua Colp [Thu, 5 Jul 2007 13:19:17 +0000 (13:19 +0000)] 
Reset ServicelevelPerf variable back to 0 if we are unable to calculate it each time... otherwise we will get previous values. (issue #10117 reported by noriyuki)

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

18 years agobchannel configurations like echocancel and volume control, need to be setuped on...
Christian Richter [Wed, 4 Jul 2007 14:50:58 +0000 (14:50 +0000)] 
bchannel configurations like echocancel and volume control, need to be setuped on inbound calls too.

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

18 years agobad bug in overlapdial case, we called start_pbx multiple times, because the state...
Christian Richter [Wed, 4 Jul 2007 08:20:54 +0000 (08:20 +0000)] 
bad bug in overlapdial case, we called start_pbx multiple times, because the state wasn't changed..

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

18 years agoRetryDial should accept a 0 argument, but it does not, because atoi does not distingu...
Tilghman Lesher [Tue, 3 Jul 2007 12:34:14 +0000 (12:34 +0000)] 
RetryDial should accept a 0 argument, but it does not, because atoi does not distinguish between 0 and error (closes issue #10106)

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

18 years agofixed issue, that misdn_l2l1_check could only be called from mISDN Source channels...
Christian Richter [Tue, 3 Jul 2007 08:04:35 +0000 (08:04 +0000)] 
fixed issue, that misdn_l2l1_check could only be called from mISDN Source channels.. #9449

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

18 years agoFix an issue with playing "oclock" multiple times in French with 24 hour time format.
Jason Parker [Mon, 2 Jul 2007 17:58:25 +0000 (17:58 +0000)] 
Fix an issue with playing "oclock" multiple times in French with 24 hour time format.

Issue 10101

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

18 years agoWhen appending lines to call files to keep track of retries, write a leading
Russell Bryant [Sun, 1 Jul 2007 23:51:34 +0000 (23:51 +0000)] 
When appending lines to call files to keep track of retries, write a leading
newline just in case the original call file did not have a newline at the end.
This fix is in response to a problem I saw reported on the asterisk-users
mailing list.

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

18 years agoBackport changes that make chan_iax2 not start the PBX on an incoming channel
Russell Bryant [Fri, 29 Jun 2007 16:30:56 +0000 (16:30 +0000)] 
Backport changes that make chan_iax2 not start the PBX on an incoming channel
until the three-way call setup is completed.  These changes are already in 1.4
and trunk.

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

18 years agocheck if the bchannel stack id is already used, if so don't use it a second time...
Christian Richter [Fri, 29 Jun 2007 13:08:26 +0000 (13:08 +0000)] 
check if the bchannel stack id is already used, if so don't use it a second time. Also added a release_chan lock, so that the same chan_list object cannot be freed twice. chan_misdn does not crash anymore on heavy load with these changes.

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

18 years agoUpdate documentation to clarify variable usage with MixMonitor. (issue #9494 reported...
Joshua Colp [Wed, 27 Jun 2007 23:24:01 +0000 (23:24 +0000)] 
Update documentation to clarify variable usage with MixMonitor. (issue #9494 reported by netoguy)

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

18 years agoReinstating patch. This actually fixes the problem, however I was running a developme...
Brett Bryant [Wed, 27 Jun 2007 23:22:13 +0000 (23:22 +0000)] 
Reinstating patch. This actually fixes the problem, however I was running a development branch without it and mistakenly thought it wasn't fixed.
Fixes issue #10010, and #9654: 100% CPU usage caused by an asterisk console losing it's controlling terminal.

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

18 years agoReverted changes for earlier revisions 72259 to 72261. Issue #9654, #10010
Brett Bryant [Wed, 27 Jun 2007 22:58:53 +0000 (22:58 +0000)] 
Reverted changes for earlier revisions 72259 to 72261. Issue #9654, #10010

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

18 years agoFix issue where queue log events might be missing. (issue #7765 reported by mtryfoss)
Joshua Colp [Wed, 27 Jun 2007 22:43:11 +0000 (22:43 +0000)] 
Fix issue where queue log events might be missing. (issue #7765 reported by mtryfoss)

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

18 years agoFix a minor issue with parsing the priority number. You could have as much
Russell Bryant [Wed, 27 Jun 2007 21:06:45 +0000 (21:06 +0000)] 
Fix a minor issue with parsing the priority number.  You could have as much
whitespace as you want around a numeric priority, but you couldn't have any
whitespace around a special priority like "n" or "hint".
(issue #10039, reported by mitheloc, fixed by me)

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

18 years agoFixes 100% load when controlling terminal disappears.
Brett Bryant [Wed, 27 Jun 2007 20:43:53 +0000 (20:43 +0000)] 
Fixes 100% load when controlling terminal disappears.

Issue #9654, #10010

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

18 years agoI may possibly get shot for doing this... but... defer CDR processing until after...
Joshua Colp [Wed, 27 Jun 2007 20:23:24 +0000 (20:23 +0000)] 
I may possibly get shot for doing this... but... defer CDR processing until after the channel has been dealt with. This should eliminate all of the issues with channels going funky (SIP/PRI) when you are posting CDRs to a database that is either slow or unavailable and do not want to enable batching.

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

18 years agoFix another problem in voicemail with missing symbols.
Jason Parker [Wed, 27 Jun 2007 18:40:15 +0000 (18:40 +0000)] 
Fix another problem in voicemail with missing symbols.

Issue 10074, patch by kryptolus, extended to include #if 0'd blocks (just in case)

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

18 years agosimplified generation for dummy bchannels, also we mark them as dummies, so they...
Christian Richter [Wed, 27 Jun 2007 13:22:37 +0000 (13:22 +0000)] 
simplified generation for dummy bchannels, also we mark them as dummies, so they are not used later as real-bchannels, optimized the RESTART mechanisms, we block a channel now on cause:44, and send out a RESTART automatically, then on reception of RESTART_ACKNOWLEDGE we unblock the channel again.

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

18 years agosimplified channel finding and locking a lot. removed unnecessary #ifdefed areas.
Christian Richter [Wed, 27 Jun 2007 09:26:53 +0000 (09:26 +0000)] 
simplified channel finding and locking a lot. removed unnecessary #ifdefed areas.

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

18 years agoisdn_lib.c didn't compile
Christian Richter [Wed, 27 Jun 2007 07:54:30 +0000 (07:54 +0000)] 
isdn_lib.c didn't compile

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

18 years agofor inbound TE calls, we setup the bchannel when we get the CONNECT_ACKNOWLEDGE,...
Christian Richter [Wed, 27 Jun 2007 07:49:27 +0000 (07:49 +0000)] 
for inbound TE calls, we setup the bchannel when we get the CONNECT_ACKNOWLEDGE, to make sure mISDN has everything ready. removed some #if 0 areas which weren't used anymore.

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

18 years agoDon't try to install an init script that doesn't exist.
Jason Parker [Tue, 26 Jun 2007 17:49:14 +0000 (17:49 +0000)] 
Don't try to install an init script that doesn't exist.

Reported to me on #asterisk on Freenode IRC.

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

18 years agoIssue 10062 - Trying to move a message without selecting one first results in memory...
Tilghman Lesher [Tue, 26 Jun 2007 12:25:58 +0000 (12:25 +0000)] 
Issue 10062 - Trying to move a message without selecting one first results in memory corruption

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

18 years agoIssue 10035 - handle_exec returns a result inconsistent with all of the other AGI...
Tilghman Lesher [Mon, 25 Jun 2007 18:12:37 +0000 (18:12 +0000)] 
Issue 10035 - handle_exec returns a result inconsistent with all of the other AGI commands

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

18 years agoIgnore other URIs after the first in a 300 Multiple Choice response. (issue #10041...
Joshua Colp [Mon, 25 Jun 2007 01:02:49 +0000 (01:02 +0000)] 
Ignore other URIs after the first in a 300 Multiple Choice response. (issue #10041 reported by homesick)

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

18 years agoRevert the patch from issue 9654 due to an unexpected side effect
Russell Bryant [Sun, 24 Jun 2007 20:04:21 +0000 (20:04 +0000)] 
Revert the patch from issue 9654 due to an unexpected side effect

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

18 years agoIssue 10043 - There is a legitimate need to be able to set variables to the empty...
Tilghman Lesher [Sun, 24 Jun 2007 17:32:21 +0000 (17:32 +0000)] 
Issue 10043 - There is a legitimate need to be able to set variables to the empty string.

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

18 years agoSend an unhold indication when going off hold. (issue #10036 reported by speedy)
Joshua Colp [Fri, 22 Jun 2007 16:02:40 +0000 (16:02 +0000)] 
Send an unhold indication when going off hold. (issue #10036 reported by speedy)

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

18 years agoFix a few silly usages of ast_playstream() - it only ever returns 0...
Jason Parker [Fri, 22 Jun 2007 14:52:18 +0000 (14:52 +0000)] 
Fix a few silly usages of ast_playstream() - it only ever returns 0...

Issue 10035

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

18 years agoFixed infinite loop when controlling terminal was lost
Brett Bryant [Fri, 22 Jun 2007 14:39:34 +0000 (14:39 +0000)] 
Fixed infinite loop when controlling terminal was lost
and return value of input function wasn't checked for
errors. This would cause 100% cpu to be taken up.

(closes issue #9654, issue #10010)
Reported by: mnicholson, and eserra

Idea for the patch from mnicholson, patched by me

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

18 years agoThis little fix is in response to bug 10016, but may not cure it. The code is wrong...
Steve Murphy [Thu, 21 Jun 2007 22:29:50 +0000 (22:29 +0000)] 
This little fix is in response to bug 10016, but may not cure it. The code is wrong, clearly. In a situation where you set the CDR's amaflags, and then ForkCDR, and then set the new CDR's amaflags to some other value, you will see that all CDRs have had their amaflags changed. This is not good. So I fixed it.

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

18 years agoDon't explode if the gain option is specified without a value. (issue #9274 reported...
Joshua Colp [Thu, 21 Jun 2007 21:37:55 +0000 (21:37 +0000)] 
Don't explode if the gain option is specified without a value. (issue #9274 reported by mfarver)

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