Commit Graph

12001 Commits

Author SHA1 Message Date
Mark Michelson
ad89849308 Removing a debug message I accidentally just committed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 16:11:44 +00:00
Mark Michelson
eac09a0cd0 Fixing Portuguese syntax for saying dates and times. Also some coding guidelines cleanup.
(closes issue #11599, reported and patched by caio1982, coding guidelines cleanup by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 15:45:14 +00:00
Tilghman Lesher
2f24e1b1bf Fix for restart-as-user problem reported via the -dev list
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 15:07:42 +00:00
Russell Bryant
32c8a851c7 Merged revisions 94255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r94255 | russell | 2007-12-20 14:21:41 -0600 (Thu, 20 Dec 2007) | 5 lines

Fix another potential seg fault ...

(closes issue #11606)
Reported by: dimas

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 20:22:22 +00:00
Russell Bryant
b80002cc9f Fix a deadlock in d-channel handling in chan_zap.
This deadlock was introduced by the fix to ensure that channels are properly
locked when handling channel variables.  There were sections of this code where
the channel pvt was locked before the channel lock, when in fact it _must_ be
the other way around.

(closes issue #11582)
Reported by: bugi


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 20:08:42 +00:00
Russell Bryant
2fc3d3e903 Blocked revisions 94214 via svnmerge
........
r94214 | russell | 2007-12-20 11:29:11 -0600 (Thu, 20 Dec 2007) | 2 lines

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.4@94215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 17:30:29 +00:00
Mark Michelson
b0dd0e2a68 Sox versions 13.0.0 and newer do not have "soxmix" and instead use sox -m. res_monitor
needs to use this if the user does not have soxmix.

(closes issue #11589, reported by amessina, patch inspired by amessina but with a flourish from me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 23:02:22 +00:00
Russell Bryant
612d0b8f45 Check for the existence of the soxmix application on the target platform and have
the result available in autoconfig.h.
(part of issue #11589)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 22:48:48 +00:00
Joshua Colp
52527facc4 Make the 1.4 builders happy, ensure var is NULL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 17:29:20 +00:00
Tilghman Lesher
d1a1f4599b Avoid segfault in chan_iax when peer isn't defined
(Closes issue #11602)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 17:04:13 +00:00
Jason Parker
ff5ffd02cf FreeBSD also does not have byte swap functions.
Issue 11586, patch by sobomax.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 22:42:41 +00:00
Tilghman Lesher
28d4f2f5eb Blocked revisions 93675 via svnmerge
........
r93675 | tilghman | 2007-12-18 12:44:41 -0600 (Tue, 18 Dec 2007) | 2 lines

Oops, missed this one case

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:45:37 +00:00
Tilghman Lesher
be17d99712 Merged revisions 93667 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r93667 | tilghman | 2007-12-18 12:23:06 -0600 (Tue, 18 Dec 2007) | 2 lines

Fixing AST-2007-027 (Closes issue #11119)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:29:39 +00:00
Mark Michelson
62fa8dfbfa Rework deadlock avoidance used in ast_write, since it meant that agent channels which were being monitored
had one audio file recorded and one empty audio file saved.

(closes issue #11529, reported by atis patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 17:02:48 +00:00
Jason Parker
6fa23de8ac Missed a spot..
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 22:56:58 +00:00
Jason Parker
7e7db434e4 What was I thinking when I wrote this masterpiece?
-1 + 1 = 0..  who woulda thunk it?.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 22:45:57 +00:00
Joshua Colp
0a584613d6 Do not try to access information about a lock when printing out a trylock attempt. It is possible for the lock that it references to no longer be valid. This would have caused segfaults or deadlocks.
(issue #BE-263)
(closes issue #11080)
Reported by: callguy
(closes issue #11100)
Reported by: callguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 22:28:09 +00:00
Tilghman Lesher
8057fb41cb Today is tomorrow's yesterday, and yesterday's tomorrow is today, and
tomorrow's tomorrow is the day after tomorrow, so who cares if you
recycle anyway?

If this confuses you, that's nothing compared to what this fixes. ;-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93336 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 21:12:42 +00:00
Mark Michelson
2fa91746e3 We need to create the directory for a voicemail user even if they are using IMAP storage
since greetings are stored in the filesystem.

(closes issue #11388, reported by spditner, patch by me inspired by a patch by spditner)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 19:53:48 +00:00
Joshua Colp
48ae6172da If a call is received with a called number IE containing nothing go to the 's' extension.
(closes issue #9099)
Reported by: kb1_kanobe2
Patches:
      20070906__9099.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 18:05:55 +00:00
Kevin P. Fleming
fd1e942f53 fix some copy-and-paste leftovers
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:21:08 +00:00
Olle Johansson
517dacce70 Issue 11574: Add dependencies on res_monitor and res_features.
I wonder if Asterisk can run at all without res_features. My guess is that 
there's propably a lot of more modules and the core that depends on it.

Reported by: caio1982
(closes issue #11574)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:15:13 +00:00
Kevin P. Fleming
627f595c58 In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 06:44:51 +00:00
Russell Bryant
4965b39719 There are a lot of existing systems that #include non-existent files. So, to
make the transition to treating this as an error a bit less painless, just issue
a huge error message for now.  Then, later, we can reinstate the code that treats
it as a failure.

(Thanks to philippel for the feedback)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 17:36:08 +00:00
Joshua Colp
6a2c388e18 Up the length of the format on the SIP channel since it can now be rather long.
(closes issue #11552)
Reported by: francesco_r


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 15:16:15 +00:00
Christian Richter
876afa76de fixed the sequencing of WAITING_4DIGS state setting and overlap_task thread starting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 15:05:28 +00:00
Tilghman Lesher
804d837c7d Change help documentation to match actual behavior (FAILURE vs FAILED).
Reported by: angeloxx-sir
Patch by: tilghman
(Closes issue #11548)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 15:01:10 +00:00
Mark Michelson
c9f389a45d When compiling with DETECT_DEADLOCKS, don't spam the CLI with messages
about possible deadlocks. Instead just print the intended single message every
five seconds.

(closes issue 11537, reported and patched by dimas)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 01:24:06 +00:00
Tilghman Lesher
9d70e52611 Properly initialize polarity statuses, so that they are detected properly.
Reported by: julianjm
Patch by: julianjm
(Closes issue #10238)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 21:28:39 +00:00
Jason Parker
65cbfa5d0d Make application help text a little more clear about the use of extensions in a filename.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 20:13:48 +00:00
Mark Michelson
7f7cbe7f69 Prevent another potential fd leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 20:03:20 +00:00
Mark Michelson
fb077e33cb Prevent a possible fd leak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 19:49:55 +00:00
Jason Parker
8771f23fff If a typo is found in a config file, we previous continued on with what was already loaded.
We do not want to do this (see bug below for details).

This makes it so that if a [ is found without a ], the entire config will fail, and nothing in it will be loaded.

Isue #10690.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 00:11:09 +00:00
Kevin P. Fleming
1209386fe7 emit a warning message when we drop a G.729B CNG frame destined for the transcoder
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 22:00:39 +00:00
Jason Parker
4a869fa0c3 Don't increment user count until after name has been recorded (if enabled).
Issue 11048, tested by pep.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 21:15:45 +00:00
Russell Bryant
f4bb168b66 resolve compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 19:40:02 +00:00
Mark Michelson
097b9dc2cf Correctly detect where a dynamic feature was activated. Before this patch,
the channel which initiated the bridge was always assumed to have been the one
which activated the dynamic feature. This patch corrects this.

(closes issue #11529, reported and patched by nic_bellamy)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 17:46:14 +00:00
Tilghman Lesher
b4b34f080d Test directly for the API that fixed AST-2007-026, to ensure that older
versions of PostgreSQL are no longer acceptable.
(Closes issue #11526)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 16:52:56 +00:00
Mark Michelson
ef5f25b6c1 Removing an unused variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 16:08:55 +00:00
Joshua Colp
7a1b94082c Fix potential memory leak with the dialed interfaces list if another memory allocation fails.
(closes issue #11507)
Reported by: eliel
Patches:
      global_datastores.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11 19:51:40 +00:00
Mark Michelson
c8b5d2ea03 Fixing autofill to be more accurate. Specifically, if calls ahead of the current
caller were ringing members (but not yet bridged) there could be available members
and waiting callers who would not get matched up. The member availability checker
was correctly determining the number of available members in this scenario, but
the queue itself did not parallelly reflect this status on the pending calls. This
commit corrects the issue.

(closes issue #11459, reported by equissoftware, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11 17:42:25 +00:00
Joshua Colp
bff4a0aa3c Add G729A as another possible payload name for G729. Some devices use this instead of G729, which is perfectly normal since the payload number itself is defined and can't be used by anything else so the name doesn't matter that much.
(closes issue #11483)
Reported by: revolution
Patches:
      rtp.diff uploaded by revolution (license 346)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 16:36:15 +00:00
Mark Michelson
626053ac64 If there are no members in a queue, then the loop where the datastore for detecting
duplicate dialed numbers will be skipped, meaning the datastore isn't created. This means
that when we try to free it, there's a crash. This stops that crash from occurring.

(closes issue #11499, reported by slavon, patched by eliel)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 16:29:44 +00:00
Joshua Colp
6fcaf2bb4b It is possible for nativeformats to contain more then one codec, so print out multiple ones.
(closes issue #11366)
Reported by: ovi


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 16:13:43 +00:00
Olle Johansson
7efa6b1fe0 Avoid reinvite race situations with two Asterisks trying
to reinvite each other in 1.4 and trunk. 

This patch implements support for the 491 error code that
Asterisk 1.4 generates on situations where we get an 
incoming INVITE and already has one in progress.

Thanks to mavetju for reporting and to Raj Jain for an
excellent explanation of the problem.

Patch by myself. Tested with 8 Asterisk servers connected
to each other in a training network.

Closes issue #10481



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 14:04:44 +00:00
Jason Parker
16a03298e9 We need to make sure we free the input frame if we return a different frame in ast_dsp_process.
Issue 11273, pointed out by dimas, with a patch by eliel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 23:29:01 +00:00
Kevin P. Fleming
bcedcf5f8a even though Asterisk explicitly requests that endpoints using G.729 do *not* use Annex B (silence detection and comfort noise generation) some do anyway; the transcoder card interface does not currently work properly with CNG frames, so trim off the CNG before sending the data
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 22:30:59 +00:00
Russell Bryant
b5463cd8d3 Make the lock protecting each thread's list of locks it currently holds
recursive.  I think that this will fix the situation where some people have
said that "core show locks" locks up the CLI.
(related to issue #11080)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 21:24:33 +00:00
Russell Bryant
7be75dbbc9 Fix another bug in the DEBUG_THREADS code. The ast_mutex_init() function had
the mutex attribute object marked as static.  This means that multiple threads
initializing locks at the same time could step on each other and end up with
improperly initialized locks.
(found when tracking down locking issues related to issue #11080)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 21:17:24 +00:00
Russell Bryant
168a6bed5a I love fixing lock related errors in the lock debugging code. That's about as
ironic as it gets in Asterisk programming land.  Anyway, I spotted this bug while
trying to track down why systems are locking up and acting weird in issue #11080.
The mutex attribute object was marked as static in this function when it should
not have been.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 21:11:08 +00:00