Commit Graph

12324 Commits

Author SHA1 Message Date
Jason Parker
ea47c2d0b7 Copy voicemail dependency logic for res_adsi to chan_gtalk (for jabber).
(closes issue #12014)
Reported by: junky


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:49:56 +00:00
Kevin P. Fleming
d6b2cb9efb get chan_vpb to build properly in dev mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:48:58 +00:00
Jason Parker
48523e3596 Add a newline on a log
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:47:53 +00:00
Joshua Colp
8f65ef8264 Make sure the visible indication is on the right channel so when the masquerade happens the proper indication is enacted.
(closes issue #11707)
Reported by: iam


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 19:20:01 +00:00
Joshua Colp
d9e83f85a6 Add an additional check for setting conference parameter when using the marked user options. It was possible for it to return to a no listen/no talk state if a masquerade happened.
(closes issue #12136)
Reported by: aragon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 18:47:33 +00:00
Joshua Colp
d6d14a3694 Fix a minor spelling error.
(closes issue #12183)
Reported by: darrylc


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 17:32:17 +00:00
Kevin P. Fleming
f201a2b11b backport a fix from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 15:18:45 +00:00
Kevin P. Fleming
428a560d33 fix various other problems found by gcc 4.3
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 14:53:03 +00:00
Kevin P. Fleming
9569d74df5 stop checking for mktime() in the configure script... we don't use it, and the test is buggy under gcc 4.3
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 14:33:45 +00:00
Kevin P. Fleming
9f2d2cea4b check for compiler support for -fno-strict-overflow before using it (tested with Debian's gcc 4.3, 4.1 and 3.4)
(closes issue #12179)
Reported by: Netview


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 14:07:59 +00:00
Kevin P. Fleming
2bfb158faf fix small bug in IMAP toolkit testing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 13:57:08 +00:00
Kevin P. Fleming
553070456b fix up various compiler warnings found with gcc-4.3:
- the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function)

- main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement

- main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur

- main/editline/readline.c had an unused variable



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 11:04:29 +00:00
Terry Wilson
28423c15fc If we fail to alloc a channel, we should re-lock the pvt structure before returning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 00:59:18 +00:00
Tilghman Lesher
e1bccfc3fe Use non-global storage for eswitch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 21:32:24 +00:00
Jason Parker
be8690e9a8 Make sure to reenable echo can after a "failed" (canceled, etc) three-way call.
(closes issue #11335)
Reported by: rebuild


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 20:27:08 +00:00
Russell Bryant
42caaed426 Fix another bug specifically related to asynchronous call origination. Once the
PBX is started on the channel using ast_pbx_start(), then the ownership of the
channel has been passed on to another thread.  We can no longer access it in this
code.  If the channel gets hung up very quickly, it is possible that we could
access a channel that has been free'd.

(inspired by BE-386)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 20:17:11 +00:00
Russell Bryant
0a4fc5b8c6 Fix some bugs related to originating calls. If the code failed to start a PBX
on the channel (such as if you set a call limit based on the system's load
average), then there were cases where a channel that has already been free'd
using ast_hangup() got accessed.  This caused weird memory corruption and
crashes to occur.

(fixes issue BE-386)
(much debugging credit goes to twilson, final patch written by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 20:04:27 +00:00
Russell Bryant
7a47679898 Resolve a compiler warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 17:13:17 +00:00
Russell Bryant
72e4729ad5 Fix a race condition where the generator can go away
(closes issue #12175, reported by edantie, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 16:58:57 +00:00
Joshua Colp
2bf8f9fca3 Move where unanswered CDRs are dropped to the CDR core, not everything uses app_dial.
(closes issue #11516)
Reported by: ys
Patches:
      branch_1.4_cdr.diff uploaded by ys (license 281)
Tested by: anest, jcapp, dartvader


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 14:33:02 +00:00
Kevin P. Fleming
57eaf9dd8f don't generate D-Channel "up" and "down" messages unless the channel state is actually changing; also, generate the "up" message when an implicit "up" occurs due to reception of a normal event when we thought the channel was "down"
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-08 15:59:42 +00:00
Russell Bryant
a04b584272 Only start the SLA thread if SLA has actually been configured.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 22:51:23 +00:00
Jason Parker
06ba2df183 Fix hardcoded grep in editline, were GNU grep is required.
(closes issue #12124)
Reported by: dmartin


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 22:14:45 +00:00
Joshua Colp
28c66694d3 Ignore source update control frame.
(closes issue #12168)
Reported by: plack


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 19:32:00 +00:00
Russell Bryant
bfed30d5dd Change a warning message to a debug message. This is happening quite frequently,
and it is not worth spamming users with these messages unless we are pretty confident
that it should never happen.  As it stands today, it _will_ and _does_ happen and
until that gets cleaned up a reasonable amount on the development side, let's not
spam the logs of everyone else.

(closes issue #12154)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 17:16:58 +00:00
Tilghman Lesher
417e8fc754 Warn the user when a temporary greeting exists
(Closes issue #11409)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 16:22:11 +00:00
Tilghman Lesher
072171ef5d Properly initialize rtp->schedid
(Closes issue #12154)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 15:20:52 +00:00
Tilghman Lesher
56e908b787 Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches: 
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:36:33 +00:00
Mark Michelson
24ca0899c2 Quell an annoying message that is likely to print every single time that
ast_pbx_outgoing_app is called. The reason is that __ast_request_and_dial
allocates the cdr for the channel, so it should be expected that the channel
will have a cdr on it.

Thanks to joetester on IRC for pointing this out



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-06 22:10:07 +00:00
Tilghman Lesher
e0bc9fcf77 Upgrade to the next release of sounds
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-06 04:40:06 +00:00
Russell Bryant
9479a831f0 Fix a potential deadlock and a few different potential crashes.
(closes issue #12145, reported by thiagarcia, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:37:09 +00:00
Joshua Colp
cd703523db Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:32:10 +00:00
Michiel van Baak
ba6b7abe61 document var_metric so no bugreports will come in when it's actually a configuration issue.
(issue #12151)
Reported and patched by: caio1982
1.4 patch by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 21:12:36 +00:00
Kevin P. Fleming
461e3fea79 when a PRI call must be moved to a different B channel at the request of the other endpoint, ensure that any DSP active on the original channel is moved to the new one
(closes issue #11917)
Reported by: mavetju
Tested by: mavetju



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 15:32:35 +00:00
Tilghman Lesher
b350a97937 Correctly initialize retransid in SIP, and ensure that the warning when failing to delete a schedule entry can actually hit the log.
(closes issue #12140)
 Reported by: slavon
 Patches: 
       sch2.patch uploaded by slavon (license 288)
(Patch slightly modified by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 15:17:16 +00:00
Russell Bryant
d564404d73 Fix a bug that I just noticed in the RTP code. The calculation for setting the
len field in an ast_frame of audio was wrong when G.722 is in use.  The len field
represents the number of ms of audio that the frame contains.  It would have
set the value to be twice what it should be.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 01:52:18 +00:00
Joshua Colp
be005c60d6 In addition to setting the marker bit let's change our ssrc so they know for sure it is a different source.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 18:10:34 +00:00
Joshua Colp
36bb1f9d46 When a new source of audio comes in (such as music on hold) make sure the marker bit gets set.
(closes issue #10355)
Reported by: wdecarne
Patches:
      10355.diff uploaded by file (license 11)
(closes issue #11491)
Reported by: kanderson


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 18:05:28 +00:00
Russell Bryant
40425a24bf Backport a minor bug fix from trunk that I found while doing random code
cleanup.  Properly break out of the loop when a context isn't found when
verify that includes are valid.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 04:31:29 +00:00
Jason Parker
47f33c87f4 Fix type for astNumChannels.
(closes issue #12114)
Reported by: jeffg
Patches:
      12114.patch uploaded by jeffg (license 192)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 18:06:52 +00:00
Russell Bryant
7f7dbcb11f In the case of an ast_channel allocation failure, take the local_pvt out of the
pvt list before destroying it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 17:16:53 +00:00
Russell Bryant
b3c0e042d4 Fix a potential memory leak of the local_pvt struct when ast_channel allocation
fails.  Also, in passing, centralize the code necessary to destroy a local_pvt.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 17:05:16 +00:00
Russell Bryant
9c5af082ca Update the copyright information for autoservice. Most of the code in this file
now is stuff that I have written recently ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 16:01:50 +00:00
Russell Bryant
547ac9f501 Merge in some changes from team/russell/autoservice-nochans-1.4
These changes fix up some dubious code that I came across while auditing what
happens in the autoservice thread when there are no channels currently in
autoservice.

1) Change it so that autoservice thread doesn't keep looping around calling
   ast_waitfor_n() on 0 channels twice a second.  Instead, use a thread condition
   so that the thread properly goes to sleep and does not wake up until a
   channel is put into autoservice.

   This actually fixes an interesting bug, as well.  If the autoservice thread
   is already running (almost always is the case), then when the thread goes
   from having 0 channels to have 1 channel to autoservice, that channel would
   have to wait for up to 1/2 of a second to have the first frame read from it.

2) Fix up the code in ast_waitfor_nandfds() for when it gets called with no
   channels and no fds to poll() on, such as was the case with the previous code
   for the autoservice thread.  In this case, the code would call alloca(0), and
   pass the result as the first argument to poll().  In this case, the 2nd
   argument to poll() specified that there were no fds, so this invalid pointer
   shouldn't actually get dereferenced, but, this code makes it explicit and
   ensures the pointers are NULL unless we have valid data to put there.

(related to issue #12116)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:50:43 +00:00
Joshua Colp
5bfdc9818d It is possible for no audio to pass between the current digit and next digit so expand logic that clears emulation to AST_FRAME_NULL.
(closes issue #11911)
Reported by: edgreenberg
Patches:
      v1-11911.patch uploaded by dimas (license 88)
Tested by: tbsky


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:28:59 +00:00
Joshua Colp
70d43ff1d2 Add a comment to describe some logic.
(closes issue #12120)
Reported by: flefoll
Patches:
      chan_sip.c.br14.patch-just-a-comment uploaded by flefoll (license 244)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-03 15:15:39 +00:00
Russell Bryant
679cc09b1d Fix a major bug in autoservice. There was a race condition in the handling of
the list of channels in autoservice.  The problem was that it was possible for
a channel to get removed from autoservice and destroyed, while the autoservice
thread was still messing with the channel.  This led to memory corruption, and
caused crashes.  This explains multiple backtraces I have seen that have
references to autoservice, but do to the nature of the issue (memory corruption),
could cause crashes in a number of areas.

(fixes the crash in BE-386)
(closes issue #11694)
(closes issue #11940)

The following issues could be related.  If you are the reporter of one of these,
please update to include this fix and try again.

(potentially fixes issue #11189)
(potentially fixes issue #12107)
(potentially fixes issue #11573)
(potentially fixes issue #12008)
(potentially fixes issue #11189)
(potentially fixes issue #11993)
(potentially fixes issue #11791)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 23:34:32 +00:00
Philippe Sultan
899ce48345 Fix a potential memory leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 14:47:10 +00:00
Tilghman Lesher
8bf705f519 If the message file does not exist, just return harmlessly, instead of crashing.
(Closes issue #12108)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 14:34:34 +00:00
Joshua Colp
837d4676dd Bump up the size of the uniqueid variable.
(closes issue #12107)
Reported by: asgaroth


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 13:48:13 +00:00