]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
17 years agoMerged revisions 110335 via svnmerge from
Russell Bryant [Thu, 20 Mar 2008 21:54:58 +0000 (21:54 +0000)] 
Merged revisions 110335 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r110335 | russell | 2008-03-20 16:53:27 -0500 (Thu, 20 Mar 2008) | 6 lines

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.4@110336 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix a bug where when calls on the trunk side hang up while on hold, the state
Russell Bryant [Wed, 19 Mar 2008 22:57:59 +0000 (22:57 +0000)] 
Fix a bug where when calls on the trunk side hang up while on hold, the state
is not properly reflected.

(closes issue #11990, reported by anakaoka, patched by me)

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

17 years agoAdd a missing unlock in the case that memory allocation fails in app_chanspy.
Mark Michelson [Wed, 19 Mar 2008 20:33:03 +0000 (20:33 +0000)] 
Add a missing unlock in the case that memory allocation fails in app_chanspy.
Thanks to Russell for confirming that this was an issue.

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

17 years agoAdd sanity checking for position resuming. We *have* to make sure that the position...
Joshua Colp [Wed, 19 Mar 2008 19:11:33 +0000 (19:11 +0000)] 
Add sanity checking for position resuming. We *have* to make sure that the position does not exceed the total number of files present, and we have to make sure that the position's filename is the same as previous. These values can change if a music class is reloaded and give unpredictable behavior.
(closes issue #11663)
Reported by: junky

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

17 years agoMake sure that the mark bit does not incorrectly cause video frame timestamps to...
Joshua Colp [Wed, 19 Mar 2008 18:20:28 +0000 (18:20 +0000)] 
Make sure that the mark bit does not incorrectly cause video frame timestamps to be calculated as if they are audio frames.
(closes issue #11429)
Reported by: sperreault
Patches:
      11429-frametype.diff uploaded by qwell (license 4)

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

17 years agoPeople report bugs about Asterisk crashing with DO_CRASH enabled was getting a little...
Jason Parker [Wed, 19 Mar 2008 17:12:52 +0000 (17:12 +0000)] 
People report bugs about Asterisk crashing with DO_CRASH enabled was getting a little silly...

Now we only show certain cflags when you run configure with --enable-dev-mode
(corresponding menuselect change to follow)

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

17 years ago(closes issue #11442)
Steve Murphy [Wed, 19 Mar 2008 15:41:13 +0000 (15:41 +0000)] 
(closes issue #11442)
Reported by: tzafrir
Patches:
      11442.patch uploaded by murf (license 17)
Tested by: murf

I didn't give tzafrir very much time to test this, but if he does
still have remaining issues, he is welcome to
re-open this bug, and we'll do what is called for.

I reproduced the problem, and tested the fix, so I hope I
am not jumping by just going ahead and committing the fix.

The problem was with what file_save does with templates;
firstly, it tended to print out multiple options:

[my_category](!)(templateref)

instead of

[my_category](!,templateref)

which is fixed by this patch.

Nextly, the code to suppress output of duplicate declarations
that would occur because the reader copies inherited declarations
down the hierarchy, was not working. Thus:

 [master-template](!)
 mastervar = bar

 [template](!,master-template)
 tvar = value

 [cat](template)
 catvar = val

would be rewritten as:

 ;!
 ;! Automatically generated configuration file
 ;! Filename: experiment.conf (/etc/asterisk/experiment.conf)
 ;! Generator: Manager
 ;! Creation Date: Tue Mar 18 23:17:46 2008
 ;!

 [master-template](!)
 mastervar = bar

 [template](!,master-template)
 mastervar = bar
 tvar = value

 [cat](template)
 mastervar = bar
 tvar = value
 catvar = val

This has been fixed. Since the config reader 'explodes' inherited
vars into the category, users may, in certain circumstances, see
output different from what they originally entered, but it should
be both correct and equivalent.

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

17 years agoTweak spacing in a recent change because I'm very picky.
Russell Bryant [Wed, 19 Mar 2008 04:06:05 +0000 (04:06 +0000)] 
Tweak spacing in a recent change because I'm very picky.

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

17 years agoFix one place where the chanspy datastore isn't removed from a channel.
Russell Bryant [Tue, 18 Mar 2008 22:34:42 +0000 (22:34 +0000)] 
Fix one place where the chanspy datastore isn't removed from a channel.
(issue #12243, reported by atis, patch by me)

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

17 years agoThis patch makes it so that all queue member status changes are handled through devic...
Mark Michelson [Tue, 18 Mar 2008 20:52:15 +0000 (20:52 +0000)] 
This patch makes it so that all queue member status changes are handled through device state
code. This removes several problems people were seeing where their queue members would get into
an "unknown" state. Huge props go to atis on this one since he was the one who found the code
section that was causing the problem and proposed the solution. I just wrote what he suggested :)

(closes issue #12127)
Reported by: atis
Patches:
      12127v3.patch uploaded by putnopvut (license 60)
Tested by: atis, jvandal

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

17 years agoAllow codecs that use log2comp (g726) to compile correctly on x86 with gcc4 optimizat...
Jason Parker [Tue, 18 Mar 2008 19:23:44 +0000 (19:23 +0000)] 
Allow codecs that use log2comp (g726) to compile correctly on x86 with gcc4 optimizations.

(closes issue #12253)
Reported by: fossil
Patches:
      log2comp.patch uploaded by fossil (license 140)

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

17 years agoMake sure an agent doesn't try to send dtmf to a NULL channel
Mark Michelson [Tue, 18 Mar 2008 17:58:11 +0000 (17:58 +0000)] 
Make sure an agent doesn't try to send dtmf to a NULL channel

closes issue #12242
Reported by Yourname

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

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

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

17 years agoMerged revisions 109391 via svnmerge from
Jason Parker [Tue, 18 Mar 2008 15:10:16 +0000 (15:10 +0000)] 
Merged revisions 109391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r109391 | qwell | 2008-03-18 10:08:41 -0500 (Tue, 18 Mar 2008) | 3 lines

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.4@109393 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoPut a maximum limit on the number of payloads accepted, and also make sure a given...
Joshua Colp [Tue, 18 Mar 2008 14:58:39 +0000 (14:58 +0000)] 
Put a maximum limit on the number of payloads accepted, and also make sure a given payload does not exceed our maximum value.
(AST-2008-002)

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

17 years ago(closes issue #11903)
Steve Murphy [Tue, 18 Mar 2008 06:37:15 +0000 (06:37 +0000)] 
(closes issue #11903)
Reported by: atis

Many thanks to atis for spotting this problem and reporting it.
The fix was to straighten out how items are placed on and removed
from the file stack. Regressions as well as the provided test case
helped to straighten out all code paths. valgrind was used to make
sure all memory allocated was freed.

Sorry for not solving this earlier. I got distracted.

Added the ntest23 regression test, which is mainly a copy of ntest22,
but with a few juicy errors thrown in, to replicate the kind of
error that atis spotted.

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

17 years agoFix a logic flaw in the code that stores lock info which is displayed
Mark Michelson [Mon, 17 Mar 2008 22:05:49 +0000 (22:05 +0000)] 
Fix a logic flaw in the code that stores lock info which is displayed
via the "core show locks" command. The idea behind this section of code was
to remove the previous lock from the list if it was a trylock that had failed.
Unfortunately, instead of checking the status of the previous lock, we were referencing
the index immediately following the previous lock in the lock_info->locks array.
The result of this problem, under the right circumstances, was that the lock which
we currently in the process of attempting to acquire could "overwrite" the previous lock
which was acquired. While this does not in any way affect typical operation, it *could*
lead to misleading "core show locks" output.

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

17 years agoUpdate the directory of placed calls on skinny phones
Michiel van Baak [Mon, 17 Mar 2008 17:55:06 +0000 (17:55 +0000)] 
Update the directory of placed calls on skinny phones
when dialing a channel that does not provide progress (analog ZAP lines)

The phone does handle the double update on calls to channels that do
provide progress and wont insert duplicate items

(closes issue #12239)
Reported by: DEA
Patches:
      chan_skinny-call-log.txt uploaded by DEA (license 3)

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

17 years ago200 OKs in response to a reinvite need to be sent reliably. If the remote side does...
Joshua Colp [Mon, 17 Mar 2008 16:24:29 +0000 (16:24 +0000)] 
200 OKs in response to a reinvite need to be sent reliably. If the remote side does not receive one the dialog will be torn down.
(closes issue #12208)
Reported by: atrash

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

17 years agoBackport revision 106439 from trunk. I didn't realize this was broken in 1.4 as...
Jason Parker [Mon, 17 Mar 2008 15:15:56 +0000 (15:15 +0000)] 
Backport revision 106439 from trunk.  I didn't realize this was broken in 1.4 as well.

Closes issue #12222.

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

17 years agoMake sure that we release the lock on the spyee channel if the spyee or spy has hung up
Mark Michelson [Mon, 17 Mar 2008 14:18:26 +0000 (14:18 +0000)] 
Make sure that we release the lock on the spyee channel if the spyee or spy has hung up

(closes issue #12232)
Reported by: atis

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

17 years agoadd missing break to case AST_CONTROL_SRCUPDATE
Michiel van Baak [Sun, 16 Mar 2008 21:47:10 +0000 (21:47 +0000)] 
add missing break to case AST_CONTROL_SRCUPDATE

(closes issue #12228)
Reported by: andrew
Patches:
      SRC.patch uploaded by andrew (license 240)

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

17 years agoFix a channel name issue. chan_oss registers the "Console" channel type,
Russell Bryant [Fri, 14 Mar 2008 20:09:22 +0000 (20:09 +0000)] 
Fix a channel name issue.  chan_oss registers the "Console" channel type,
but it created channels with an "OSS" prefix.

(closes issue #12194, reported by davidw, patched by me)

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

17 years agoUpdate the SuSE init script to start networking before asterisk, as well.
Russell Bryant [Fri, 14 Mar 2008 20:04:35 +0000 (20:04 +0000)] 
Update the SuSE init script to start networking before asterisk, as well.

(closes issue #12200, reported by and change suggested by reinerotto)

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

17 years agoFix a race condition in the SIP packet scheduler which could cause a crash.
Mark Michelson [Fri, 14 Mar 2008 16:44:08 +0000 (16:44 +0000)] 
Fix a race condition in the SIP packet scheduler which could cause a crash.

chan_sip uses the scheduler API in order to schedule retransmission of reliable
packets (such as INVITES). If a retransmission of a packet is occurring, then the
packet is removed from the scheduler and retrans_pkt is called. Meanwhile, if
a response is received from the packet as previously transmitted, then when we
ACK the response, we will remove the packet from the scheduler and free the packet.

The problem is that both the ACK function and retrans_pkt attempt to acquire the
same lock at the beginning of the function call. This means that if the ACK function
acquires the lock first, then it will free the packet which retrans_pkt is about to
read from and write to. The result is a crash.

The solution:

1. If the ACK function fails to remove the packet from the scheduler and the retransmit
   id of the packet is not -1 (meaning that we have not reached the maximum number of
   retransmissions) then release the lock and yield so that retrans_pkt may acquire the
   lock and operate.

2. Make absolutely certain that the ACK function does not recursively lock the lock in
   question. If it does, then releasing the lock will do no good, since retrans_pkt will
   still be unable to acquire the lock.

(closes issue #12098)
Reported by: wegbert
(closes issue #12089)
Reported by: PTorres
Patches:
      12098-putnopvutv3.patch uploaded by putnopvut (license 60)
Tested by: jvandal

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

17 years agoFix a potential segfault if chan (or chan->music_state) is NULL.
Jason Parker [Fri, 14 Mar 2008 14:29:05 +0000 (14:29 +0000)] 
Fix a potential segfault if chan (or chan->music_state) is NULL.

Closes issue #12210, credit to edantie for pointing this out.

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

17 years agoFix another issue that was causing crashes in chanspy. This introduces a new
Russell Bryant [Thu, 13 Mar 2008 21:38:16 +0000 (21:38 +0000)] 
Fix another issue that was causing crashes in chanspy.  This introduces a new
datastore callback, called chan_fixup().  The concept is exactly like the
fixup callback that is used in the channel technology interface.  This callback
gets called when the owning channel changes due to a masquerade.  Before this
was introduced, if a masquerade happened on a channel being spyed on, the
channel pointer in the datastore became invalid.

(closes issue #12187)
(reported by, and lots of testing from atis)
(props to file for the help with ideas)

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

17 years agoMake a tweak that gets the LEDs on polycom phones to blink when an extension that
Russell Bryant [Thu, 13 Mar 2008 21:06:33 +0000 (21:06 +0000)] 
Make a tweak that gets the LEDs on polycom phones to blink when an extension that
has been subscribed to goes on hold.  Otherwise, they just stay on like it does
when an extension is in use.

(closes issue #11263)
Reported by: russell
Patches:
      notify_hold.rev1.txt uploaded by russell (license 2)
Tested by: russell

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

17 years agoFix a couple uses of sprintf. The second one could actually cause an overflow
Russell Bryant [Thu, 13 Mar 2008 20:26:28 +0000 (20:26 +0000)] 
Fix a couple uses of sprintf.  The second one could actually cause an overflow
of a stack buffer.  It's not a security issue though, it only depends on your
configuration.

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

17 years agoChange AST_SCHED_DEL use to ast_sched_del for autocongestion in chan_sip.
Mark Michelson [Wed, 12 Mar 2008 21:53:46 +0000 (21:53 +0000)] 
Change AST_SCHED_DEL use to ast_sched_del for autocongestion in chan_sip.

The scheduler callback will always return 0. This means that this id
is never rescheduled, so it makes no sense to loop trying to delete
the id from the scheduler queue. If we fail to remove the item from the
queue once, it will fail every single time.

(Yes I realize that in this case, the macro would exit early because the
id is set to -1 in the callback, but it still makes no sense to use
that macro in favor of calling ast_sched_del once and being done with it)

This is the first of potentially several such fixes.

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

17 years agoAdded a large comment before the AST_SCHED_DEL macro to explain its purpose as well...
Mark Michelson [Wed, 12 Mar 2008 21:16:28 +0000 (21:16 +0000)] 
Added a large comment before the AST_SCHED_DEL macro to explain its purpose as well as when
it is appropriate and when it is not appropriate to use it.

I also removed the part of the debug message that mentions that this is probably a bug because
there are some perfectly legitimate places where ast_sched_del may fail to delete an entry (e.g.
when the scheduler callback manually reschedules with a new id instead of returning non-zero to
tell the scheduler to reschedule with the same idea). I also raised the debug level of the debug
message in AST_SCHED_DEL since it seems like it could come up quite frequently since the macro
is probably being used in several places where it shouldn't be. Also removed the redundant line,
file, and function information since that is provided by ast_log.

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

17 years ago(closes issue #12187, reported by atis, fixed by me after some brainstorming
Russell Bryant [Wed, 12 Mar 2008 19:57:42 +0000 (19:57 +0000)] 
(closes issue #12187, reported by atis, fixed by me after some brainstorming
 on the issue with mmichelson)

- Update copyright info on app_chanspy.

- Fix a race condition that caused app_chanspy to crash.  The issue was that
  the chanspy datastore magic that was used to ensure that spyee channels did
  not disappear out from under the code did not completely solve the problem.
  It was actually possible for chanspy to acquire a channel reference out of
  its datastore to a channel that was in the middle of being destroyed.  That
  was because datastore destruction in ast_channel_free() was done near the
  end.  So, this left the code in app_chanspy accessing a channel that was
  partially, or completely invalid because it was in the process of being free'd
  by another thread.  The following sort of shows the code path where the race
  occurred:

  =============================================================================
  Thread 1 (PBX thread for spyee chan)  ||   Thread 2 (chanspy)
  --------------------------------------||-------------------------------------
  ast_channel_free()                    ||
    - remove channel from channel list  ||
    - lock/unlock the channel to ensure ||
      that no references retrieved from ||
      the channel list exist.           ||
  --------------------------------------||-------------------------------------
                                        || channel_spy()
    - destroy some channel data         ||  - Lock chanspy datastore
                                        ||  - Retrieve reference to channel
                                        ||  - lock channel
                                        ||  - Unlock chanspy datastore
  --------------------------------------||-------------------------------------
     - destroy channel datastores       ||
        - call chanspy datastore d'tor  ||
          which NULL's out the ds'      ||  - Operate on the channel ...
          reference to the channel      ||
                                        ||
    - free the channel                  ||
                                        ||
                                        ||  - unlock the channel
  --------------------------------------||-------------------------------------
  =============================================================================

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

17 years agoif we receive an INVITE with a Content-Length that is not a valid number, or is zero...
Kevin P. Fleming [Wed, 12 Mar 2008 19:16:07 +0000 (19:16 +0000)] 
if we receive an INVITE with a Content-Length that is not a valid number, or is zero, then don't process the rest of the message body looking for an SDP

closes issue #11475
Reported by: andrebarbosa

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

17 years agoAdd a trigger mode that triggers on both read and write. The actual function that...
Joshua Colp [Wed, 12 Mar 2008 18:26:37 +0000 (18:26 +0000)] 
Add a trigger mode that triggers on both read and write. The actual function that returns the combined audio frame though will wait until both sides have fed in audio, or until one side stops (such as the case when you call Wait).
(closes issue #11945)
Reported by: xheliox

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

17 years agoDestroy the channel lock after the channel datastores.
Russell Bryant [Wed, 12 Mar 2008 16:59:07 +0000 (16:59 +0000)] 
Destroy the channel lock after the channel datastores.

(inspired by issue #12187)

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

17 years agoDocument all of the possible realtime fields
Tilghman Lesher [Wed, 12 Mar 2008 01:52:40 +0000 (01:52 +0000)] 
Document all of the possible realtime fields

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

17 years agoUpdate documentation for pgsql ODBC voicemail.
Jason Parker [Tue, 11 Mar 2008 23:37:05 +0000 (23:37 +0000)] 
Update documentation for pgsql ODBC voicemail.

(closes issue #12186)
Reported by: jsmith
Patches:
      vm_pgsql_doc_update.patch uploaded by jsmith (license 15)

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

17 years agoCopy voicemail dependency logic for res_adsi to chan_gtalk (for jabber).
Jason Parker [Tue, 11 Mar 2008 20:49:56 +0000 (20:49 +0000)] 
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

17 years agoget chan_vpb to build properly in dev mode
Kevin P. Fleming [Tue, 11 Mar 2008 20:48:58 +0000 (20:48 +0000)] 
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

17 years agoAdd a newline on a log
Jason Parker [Tue, 11 Mar 2008 20:47:53 +0000 (20:47 +0000)] 
Add a newline on a log

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

17 years agoMake sure the visible indication is on the right channel so when the masquerade happe...
Joshua Colp [Tue, 11 Mar 2008 19:20:01 +0000 (19:20 +0000)] 
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

17 years agoAdd an additional check for setting conference parameter when using the marked user...
Joshua Colp [Tue, 11 Mar 2008 18:47:33 +0000 (18:47 +0000)] 
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

17 years agoFix a minor spelling error.
Joshua Colp [Tue, 11 Mar 2008 17:32:17 +0000 (17:32 +0000)] 
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

17 years agobackport a fix from trunk
Kevin P. Fleming [Tue, 11 Mar 2008 15:18:45 +0000 (15:18 +0000)] 
backport a fix from trunk

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

17 years agofix various other problems found by gcc 4.3
Kevin P. Fleming [Tue, 11 Mar 2008 14:53:03 +0000 (14:53 +0000)] 
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

17 years agostop checking for mktime() in the configure script... we don't use it, and the test...
Kevin P. Fleming [Tue, 11 Mar 2008 14:33:45 +0000 (14:33 +0000)] 
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

17 years agocheck for compiler support for -fno-strict-overflow before using it (tested with...
Kevin P. Fleming [Tue, 11 Mar 2008 14:07:59 +0000 (14:07 +0000)] 
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

17 years agofix small bug in IMAP toolkit testing
Kevin P. Fleming [Tue, 11 Mar 2008 13:57:08 +0000 (13:57 +0000)] 
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

17 years agofix up various compiler warnings found with gcc-4.3:
Kevin P. Fleming [Tue, 11 Mar 2008 11:04:29 +0000 (11:04 +0000)] 
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

17 years agoIf we fail to alloc a channel, we should re-lock the pvt structure before returning.
Terry Wilson [Tue, 11 Mar 2008 00:59:18 +0000 (00:59 +0000)] 
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

17 years agoUse non-global storage for eswitch
Tilghman Lesher [Mon, 10 Mar 2008 21:32:24 +0000 (21:32 +0000)] 
Use non-global storage for eswitch

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

17 years agoMake sure to reenable echo can after a "failed" (canceled, etc) three-way call.
Jason Parker [Mon, 10 Mar 2008 20:27:08 +0000 (20:27 +0000)] 
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

17 years agoFix another bug specifically related to asynchronous call origination. Once the
Russell Bryant [Mon, 10 Mar 2008 20:17:11 +0000 (20:17 +0000)] 
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

17 years agoFix some bugs related to originating calls. If the code failed to start a PBX
Russell Bryant [Mon, 10 Mar 2008 20:04:27 +0000 (20:04 +0000)] 
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

17 years agoResolve a compiler warning.
Russell Bryant [Mon, 10 Mar 2008 17:13:17 +0000 (17:13 +0000)] 
Resolve a compiler warning.

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

17 years agoFix a race condition where the generator can go away
Russell Bryant [Mon, 10 Mar 2008 16:58:57 +0000 (16:58 +0000)] 
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

17 years agoMove where unanswered CDRs are dropped to the CDR core, not everything uses app_dial.
Joshua Colp [Mon, 10 Mar 2008 14:33:02 +0000 (14:33 +0000)] 
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

17 years agodon't generate D-Channel "up" and "down" messages unless the channel state is actuall...
Kevin P. Fleming [Sat, 8 Mar 2008 15:59:42 +0000 (15:59 +0000)] 
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

17 years agoOnly start the SLA thread if SLA has actually been configured.
Russell Bryant [Fri, 7 Mar 2008 22:51:23 +0000 (22:51 +0000)] 
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

17 years agoFix hardcoded grep in editline, were GNU grep is required.
Jason Parker [Fri, 7 Mar 2008 22:14:45 +0000 (22:14 +0000)] 
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

17 years agoIgnore source update control frame.
Joshua Colp [Fri, 7 Mar 2008 19:32:00 +0000 (19:32 +0000)] 
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

17 years agoChange a warning message to a debug message. This is happening quite frequently,
Russell Bryant [Fri, 7 Mar 2008 17:16:58 +0000 (17:16 +0000)] 
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

17 years agoWarn the user when a temporary greeting exists
Tilghman Lesher [Fri, 7 Mar 2008 16:22:11 +0000 (16:22 +0000)] 
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

17 years agoProperly initialize rtp->schedid
Tilghman Lesher [Fri, 7 Mar 2008 15:20:52 +0000 (15:20 +0000)] 
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

17 years agoSafely use the strncat() function.
Tilghman Lesher [Fri, 7 Mar 2008 06:36:33 +0000 (06:36 +0000)] 
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

17 years agoQuell an annoying message that is likely to print every single time that
Mark Michelson [Thu, 6 Mar 2008 22:10:07 +0000 (22:10 +0000)] 
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

17 years agoUpgrade to the next release of sounds
Tilghman Lesher [Thu, 6 Mar 2008 04:40:06 +0000 (04:40 +0000)] 
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

17 years agoFix a potential deadlock and a few different potential crashes.
Russell Bryant [Wed, 5 Mar 2008 22:37:09 +0000 (22:37 +0000)] 
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

17 years agoAdd a control frame to indicate the source of media has changed. Depending on the...
Joshua Colp [Wed, 5 Mar 2008 22:32:10 +0000 (22:32 +0000)] 
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

17 years agodocument var_metric so no bugreports will come in when it's actually a configuration...
Michiel van Baak [Wed, 5 Mar 2008 21:12:36 +0000 (21:12 +0000)] 
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

17 years agowhen a PRI call must be moved to a different B channel at the request of the other...
Kevin P. Fleming [Wed, 5 Mar 2008 15:32:35 +0000 (15:32 +0000)] 
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

17 years agoCorrectly initialize retransid in SIP, and ensure that the warning when failing to...
Tilghman Lesher [Wed, 5 Mar 2008 15:17:16 +0000 (15:17 +0000)] 
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

17 years agoFix a bug that I just noticed in the RTP code. The calculation for setting the
Russell Bryant [Wed, 5 Mar 2008 01:52:18 +0000 (01:52 +0000)] 
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

17 years agoIn addition to setting the marker bit let's change our ssrc so they know for sure...
Joshua Colp [Tue, 4 Mar 2008 18:10:34 +0000 (18:10 +0000)] 
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

17 years agoWhen a new source of audio comes in (such as music on hold) make sure the marker...
Joshua Colp [Tue, 4 Mar 2008 18:05:28 +0000 (18:05 +0000)] 
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

17 years agoBackport a minor bug fix from trunk that I found while doing random code
Russell Bryant [Tue, 4 Mar 2008 04:31:29 +0000 (04:31 +0000)] 
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

17 years agoFix type for astNumChannels.
Jason Parker [Mon, 3 Mar 2008 18:06:52 +0000 (18:06 +0000)] 
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

17 years agoIn the case of an ast_channel allocation failure, take the local_pvt out of the
Russell Bryant [Mon, 3 Mar 2008 17:16:53 +0000 (17:16 +0000)] 
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

17 years agoFix a potential memory leak of the local_pvt struct when ast_channel allocation
Russell Bryant [Mon, 3 Mar 2008 17:05:16 +0000 (17:05 +0000)] 
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

17 years agoUpdate the copyright information for autoservice. Most of the code in this file
Russell Bryant [Mon, 3 Mar 2008 16:01:50 +0000 (16:01 +0000)] 
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

17 years agoMerge in some changes from team/russell/autoservice-nochans-1.4
Russell Bryant [Mon, 3 Mar 2008 15:50:43 +0000 (15:50 +0000)] 
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

17 years agoIt is possible for no audio to pass between the current digit and next digit so expan...
Joshua Colp [Mon, 3 Mar 2008 15:28:59 +0000 (15:28 +0000)] 
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

17 years agoAdd a comment to describe some logic.
Joshua Colp [Mon, 3 Mar 2008 15:15:39 +0000 (15:15 +0000)] 
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

17 years agoFix a major bug in autoservice. There was a race condition in the handling of
Russell Bryant [Fri, 29 Feb 2008 23:34:32 +0000 (23:34 +0000)] 
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

17 years agoFix a potential memory leak
Philippe Sultan [Fri, 29 Feb 2008 14:47:10 +0000 (14:47 +0000)] 
Fix a potential memory leak

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

17 years agoIf the message file does not exist, just return harmlessly, instead of crashing.
Tilghman Lesher [Fri, 29 Feb 2008 14:34:34 +0000 (14:34 +0000)] 
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

17 years agoBump up the size of the uniqueid variable.
Joshua Colp [Fri, 29 Feb 2008 13:48:13 +0000 (13:48 +0000)] 
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

17 years agoAutomatically create new buddy upon reception of a presence stanza of
Philippe Sultan [Fri, 29 Feb 2008 13:05:15 +0000 (13:05 +0000)] 
Automatically create new buddy upon reception of a presence stanza of
type subscribed.

(closes issue #12066)
Reported by: ffadaie
Patches:
      branch-1.4-12066-1.diff uploaded by phsultan (license 73)
      trunk-12066-1.diff uploaded by phsultan (license 73)
Tested by: ffadaie, phsultan

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

17 years agoFix a bug in the lock tracking code that was discovered by mmichelson. The issue
Russell Bryant [Thu, 28 Feb 2008 22:23:05 +0000 (22:23 +0000)] 
Fix a bug in the lock tracking code that was discovered by mmichelson.  The issue
is that if the lock history array was full, then the functions to mark a lock as
acquired or not would adjust the stats for whatever lock is at the end of the array,
which may not be itself.  So, do a sanity check to make sure that we're updating
lock info for the proper lock.

(This explains the bizarre stats on lock #63 in BE-396, thanks Mark!)

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

17 years agoUpdate init script for LSB compat
Tilghman Lesher [Thu, 28 Feb 2008 21:56:54 +0000 (21:56 +0000)] 
Update init script for LSB compat
(closes issue #9843)
 Reported by: ibc
 Patches:
       rc.debian.asterisk.patch uploaded by ibc (license 211)
 Tested by: paravoid

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

17 years agoWhen using autofill, members who are in use should be counted towards the
Mark Michelson [Thu, 28 Feb 2008 20:11:57 +0000 (20:11 +0000)] 
When using autofill, members who are in use should be counted towards the
number of available members to call if ringinuse is set to yes.

Thanks to jmls who brought this issue up on IRC

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

17 years agoMake pbx_exec pass an empty string into applications, if we get NULL.
Jason Parker [Thu, 28 Feb 2008 19:20:10 +0000 (19:20 +0000)] 
Make pbx_exec pass an empty string into applications, if we get NULL.
This protects against possible segfaults in applications that may try
 to use data before checking length (ast_strdupa'ing it, for example)

(closes issue #12100)
Reported by: foxfire
Patches:
      12100-nullappargs.diff uploaded by qwell (license 4)

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

17 years agoAccording to a video at www.cisco.com, the 7921G supports 6 line appearances.
Jason Parker [Thu, 28 Feb 2008 04:31:21 +0000 (04:31 +0000)] 
According to a video at www.cisco.com, the 7921G supports 6 line appearances.

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

17 years agoCompatibility fix for PPC64
Tilghman Lesher [Thu, 28 Feb 2008 00:05:06 +0000 (00:05 +0000)] 
Compatibility fix for PPC64
(closes issue #12081)
 Reported by: jcollie
 Patches:
       asterisk-1.4.18-funcdesc.patch uploaded by jcollie (license 412)
 Tested by: jcollie, Corydon76

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

17 years agoTwo fixes:
Mark Michelson [Wed, 27 Feb 2008 21:49:20 +0000 (21:49 +0000)] 
Two fixes:

1. Make the list of ast_dial_channels a lockable list. This is because in some cases,
   the ast_dial may exist in multiple threads due to asynchronous execution of its application, and
   I found some cases where race conditions could exist.

2. Check in ast_dial_join to be sure that the channel still exists before attempting to lock it, since
   it could have gotten hung up but the is_running_app flag on the ast_dial_channel may not have been
   cleared yet.

(closes issue #12038)
Reported by: jvandal
Patches:
      12038v2.patch uploaded by putnopvut (license 60)
Tested by: jvandal

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

17 years agoDon't loop around infinitely trying to spy on our own channel, and don't forget to...
Joshua Colp [Wed, 27 Feb 2008 20:56:23 +0000 (20:56 +0000)] 
Don't loop around infinitely trying to spy on our own channel, and don't forget to free/detach the datastore upon hangup of the spy.

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

17 years agoBump a couple of more buffers up by 2 so that annoying warnings aren't generated
Mark Michelson [Wed, 27 Feb 2008 20:36:26 +0000 (20:36 +0000)] 
Bump a couple of more buffers up by 2 so that annoying warnings aren't generated
like crazy on every fileexists_core call.

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

17 years agoEnsure the session ID can't be 0.
Tilghman Lesher [Wed, 27 Feb 2008 18:15:10 +0000 (18:15 +0000)] 
Ensure the session ID can't be 0.

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

17 years agoBump up the buffer by 2.
Joshua Colp [Wed, 27 Feb 2008 17:41:40 +0000 (17:41 +0000)] 
Bump up the buffer by 2.

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

17 years agoFix a problem in ChanSpy where it could get stuck in an infinite loop without
Russell Bryant [Wed, 27 Feb 2008 17:33:04 +0000 (17:33 +0000)] 
Fix a problem in ChanSpy where it could get stuck in an infinite loop without
being able to detect that the calling channel hung up.
(closes issue #12076, reported by junky, patched by me)

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