Commit Graph

14922 Commits

Author SHA1 Message Date
Terry Wilson
9a4405a7e5 Merged revisions 109229 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r109229 | twilson | 2008-03-17 17:10:06 -0500 (Mon, 17 Mar 2008) | 5 lines

Replace minimime with superior GMime library so that the entire contents of an http post are not read into memory.
This does introduce a dependency on the GMime library for handling HTTP POSTs, but it is available in most distros.

If the library is present, then the compile flag for ENABLE_UPLOADS is enabled by default in menuselect.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@109254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 22:24:46 +00:00
Mark Michelson
cbdd59040c Merged revisions 109227 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r109227 | mmichelson | 2008-03-17 17:06:44 -0500 (Mon, 17 Mar 2008) | 20 lines

Merged revisions 109226 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109226 | mmichelson | 2008-03-17 17:05:49 -0500 (Mon, 17 Mar 2008) | 12 lines

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.6.0@109228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 22:07:29 +00:00
Michiel van Baak
f58d1ed4c3 Merged revisions 109168 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r109168 | mvanbaak | 2008-03-17 18:43:46 +0100 (Mon, 17 Mar 2008) | 11 lines

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.6.0@109175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 18:11:19 +00:00
Kevin P. Fleming
cc5d6ba88d Merged revisions 109166 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r109166 | kpfleming | 2008-03-17 12:31:46 -0500 (Mon, 17 Mar 2008) | 3 lines

don't define Zaptel features as libraries, they aren't, and we don't want '--with-zaptel-<foo>' configure options for them
also some minor cleanups

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@109167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 17:42:20 +00:00
Joshua Colp
32ec8b7b15 Blocked revisions 109113 via svnmerge
........
r109113 | file | 2008-03-17 13:47:02 -0300 (Mon, 17 Mar 2008) | 2 lines

Remove something that is never ever used.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@109114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 16:47:46 +00:00
Joshua Colp
2d567f7434 Merged revisions 109108 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r109108 | file | 2008-03-17 13:26:36 -0300 (Mon, 17 Mar 2008) | 12 lines

Merged revisions 109107 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109107 | file | 2008-03-17 13:24:29 -0300 (Mon, 17 Mar 2008) | 4 lines

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.6.0@109109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 16:28:01 +00:00
Mark Michelson
e59eb16daa Merged revisions 109024 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r109024 | mmichelson | 2008-03-17 09:21:14 -0500 (Mon, 17 Mar 2008) | 14 lines

Merged revisions 109012 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109012 | mmichelson | 2008-03-17 09:18:26 -0500 (Mon, 17 Mar 2008) | 6 lines

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.6.0@109027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 14:21:48 +00:00
Russell Bryant
6b057dcbe9 Blocked revisions 108929 via svnmerge
........
r108929 | russell | 2008-03-16 12:55:53 -0500 (Sun, 16 Mar 2008) | 2 lines

Remove an unnecessary thread attribute instance

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 17:56:11 +00:00
Russell Bryant
4b5da21ef2 Merged revisions 108927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108927 | russell | 2008-03-16 12:53:46 -0500 (Sun, 16 Mar 2008) | 7 lines

Fix polling for mailbox changes in mailboxes that are not in the default vm context.

(closes issue #12223)
Reported by: DEA
Patches: 
      vm-polled-imap.txt uploaded by DEA (license 3)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 17:54:13 +00:00
Russell Bryant
7e74bd7557 Blocked revisions 108894 via svnmerge
........
r108894 | russell | 2008-03-15 11:21:04 -0500 (Sat, 15 Mar 2008) | 8 lines

Remove a double write lock of the contexts lock in ast_wrlock_contexts().
How did this ever work?

(closes issue #12219)
Reported by: ys
Patches: 
      pbx.c.diff uploaded by ys (license 281)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-15 16:21:50 +00:00
Russell Bryant
a36eb6597e Merged revisions 108799 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108799 | russell | 2008-03-14 15:14:06 -0500 (Fri, 14 Mar 2008) | 8 lines

Make sure configure is run before menuselect on a clean checkout

(closes issue #12197)
Reported by: juggie
Patches:
      12197.diff uploaded by juggie (license 24)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 20:14:46 +00:00
Russell Bryant
3120fe50ba Merged revisions 108797 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108797 | russell | 2008-03-14 15:09:37 -0500 (Fri, 14 Mar 2008) | 13 lines

Merged revisions 108796 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108796 | russell | 2008-03-14 15:09:22 -0500 (Fri, 14 Mar 2008) | 5 lines

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.6.0@108798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 20:09:53 +00:00
Russell Bryant
a5cc1f0552 Blocked revisions 108404,108439,108523,108639 via svnmerge
........
r108404 | jpeeler | 2008-03-13 13:59:04 -0500 (Thu, 13 Mar 2008) | 6 lines

(closes issue #11827)
Reported by: ctooley
Patches:
      eivr_tcp_generic.patch uploaded by jpeeler (license 325)
This change adds the ability to communicate over a TCP socket instead of forking a child process.

........
r108439 | russell | 2008-03-13 14:54:44 -0500 (Thu, 13 Mar 2008) | 8 lines

Merge changes from team/jamesgolovich/chan_sip-ast_str

This set of changes removes the hard coded maximum packet size of 4kB from chan_sip.
It now starts by allocating 1kB, and growing the buffer as needed to accommodate large
packets.

(closes issue #8556, reported by mikma, patch by jamesgolovich)

........
r108523 | jpeeler | 2008-03-13 15:38:56 -0500 (Thu, 13 Mar 2008) | 1 line

set variable to NULL to prevent uninitialized warning
........
r108639 | jpeeler | 2008-03-13 18:12:59 -0500 (Thu, 13 Mar 2008) | 1 line

documenting changes as a result of adding TCP functionality to ExternalIVR
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 20:06:31 +00:00
Russell Bryant
c1aa9978a0 Merged revisions 108793 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108793 | russell | 2008-03-14 15:04:56 -0500 (Fri, 14 Mar 2008) | 12 lines

Merged revisions 108792 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108792 | russell | 2008-03-14 15:04:35 -0500 (Fri, 14 Mar 2008) | 4 lines

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.6.0@108794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 20:05:23 +00:00
Russell Bryant
220d0a17cc Merged revisions 108740 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108740 | russell | 2008-03-14 12:05:11 -0500 (Fri, 14 Mar 2008) | 5 lines

Do a link test in AST_EXT_TOOL_CHECK() to ensure we have all the required libs
reported by the tool.

(closes issue #12067, reported by Juggie, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 17:05:47 +00:00
Mark Michelson
2c71d8fa63 Merged revisions 108738 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108738 | mmichelson | 2008-03-14 11:52:51 -0500 (Fri, 14 Mar 2008) | 41 lines

Merged revisions 108737 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108737 | mmichelson | 2008-03-14 11:44:08 -0500 (Fri, 14 Mar 2008) | 33 lines

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.6.0@108739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 16:54:36 +00:00
Jason Parker
c6a0820063 Merged revisions 108683 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108683 | qwell | 2008-03-14 09:32:55 -0500 (Fri, 14 Mar 2008) | 12 lines

Merged revisions 108682 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108682 | qwell | 2008-03-14 09:29:05 -0500 (Fri, 14 Mar 2008) | 4 lines

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.6.0@108684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-14 14:33:33 +00:00
Mark Michelson
180bdba9e5 Merged revisions 108586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108586 | mmichelson | 2008-03-13 16:47:55 -0500 (Thu, 13 Mar 2008) | 3 lines

Make this compile


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:48:38 +00:00
Russell Bryant
e2d7bed99a Merged revisions 108584 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108584 | russell | 2008-03-13 16:40:43 -0500 (Thu, 13 Mar 2008) | 19 lines

Merged revisions 108583 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108583 | russell | 2008-03-13 16:38:16 -0500 (Thu, 13 Mar 2008) | 11 lines

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.6.0@108585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:41:14 +00:00
Mark Michelson
27803e8d3e Merged revisions 108529 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108529 | mmichelson | 2008-03-13 15:59:00 -0500 (Thu, 13 Mar 2008) | 11 lines

Fixing a potential buffer overflow in the manager command ModuleCheck.

Though this overflow is exploitable remotely, we are NOT issuing a security
advisory for this since in order to exploit the overflow, the attacker would
have to establish an authenticated manager session AND have the system privilege.
By gaining this privilege, the attacker already has more powerful weapons at his
disposal than overflowing a buffer with a malformed manager header, so the vulnerability
in this case really lies with the authentication method that allowed the attacker to 
gain the system privilege in the first place.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:31:44 +00:00
Russell Bryant
bcdaa03501 Merged revisions 108531 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108531 | russell | 2008-03-13 16:06:52 -0500 (Thu, 13 Mar 2008) | 18 lines

Merged revisions 108530 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108530 | russell | 2008-03-13 16:06:33 -0500 (Thu, 13 Mar 2008) | 10 lines

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.6.0@108532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:07:14 +00:00
Russell Bryant
a75ec6f0ba Merged revisions 108508 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108508 | russell | 2008-03-13 15:35:28 -0500 (Thu, 13 Mar 2008) | 2 lines

Fix a place where configuration values could cause an overflow of a buffer.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 20:36:11 +00:00
Russell Bryant
42a70f149d Merged revisions 108472 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108472 | russell | 2008-03-13 15:26:59 -0500 (Thu, 13 Mar 2008) | 12 lines

Merged revisions 108469 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108469 | russell | 2008-03-13 15:26:28 -0500 (Thu, 13 Mar 2008) | 4 lines

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.6.0@108474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 20:27:24 +00:00
Russell Bryant
53f827fd60 Blocked revisions 107721,107787,107790,107928,108034 via svnmerge
........
r107721 | tilghman | 2008-03-11 15:58:42 -0500 (Tue, 11 Mar 2008) | 2 lines

Add contributed script for separation of database access from Asterisk

........
r107787 | russell | 2008-03-11 17:21:19 -0500 (Tue, 11 Mar 2008) | 6 lines

Add a trivial new dialplan function, AST_CONFIG(), which allows you to access
a variable from an Asterisk configuration file in the dialplan, or anywhere
else where dialplan functions can be used.

(Inspired by a discussion with Tilghman and Pari)

........
r107790 | russell | 2008-03-11 17:54:25 -0500 (Tue, 11 Mar 2008) | 2 lines

remove documentation of an argument that i did not implement

........
r107928 | tilghman | 2008-03-11 21:53:21 -0500 (Tue, 11 Mar 2008) | 2 lines

Cache config files, when possible, for speed

........
r108034 | russell | 2008-03-12 12:06:37 -0500 (Wed, 12 Mar 2008) | 4 lines

 - Add Tilghman to the copyright info ... he wrote the hard part :)
 - Remove some magic in unload_module that isn't needed.  Module use counts
   already ensure that the function isn't going to be in use at this point.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:55:30 +00:00
Russell Bryant
9fa7595e11 Blocked revisions 107719 via svnmerge
........
r107719 | russell | 2008-03-11 15:54:32 -0500 (Tue, 11 Mar 2008) | 8 lines

This patch adds support for extended help prompts in voicemail.  These prompts
are in the 1.4.9 sounds release.

(closes issue #11705)
Reported by: jaroth
Patches:
      helpprompts.patch uploaded by jaroth (license 50)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:54:26 +00:00
Russell Bryant
688c69c0d3 Blocked revisions 107551 via svnmerge
........
r107551 | tilghman | 2008-03-11 11:28:03 -0500 (Tue, 11 Mar 2008) | 2 lines

Whitespace changes only

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:54:06 +00:00
Russell Bryant
4732160860 Blocked revisions 107475 via svnmerge
........
r107475 | kpfleming | 2008-03-11 10:19:05 -0500 (Tue, 11 Mar 2008) | 2 lines

block fix that is already here

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:53:46 +00:00
Russell Bryant
68ebba346c Merged revisions 107465 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r107465 | file | 2008-03-11 10:05:17 -0500 (Tue, 11 Mar 2008) | 4 lines

Clarify comment about masquerading and playback of the parking slot.
(closes issue #12180)
Reported by: davidw

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:53:24 +00:00
Russell Bryant
82922e116c Merged revisions 107157 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r107157 | file | 2008-03-10 15:00:21 -0500 (Mon, 10 Mar 2008) | 4 lines

If we receive a 488 on a T38 request reinvite back to audio. As well reinvite across a bridge back to audio if one side doesn't negotiate to T38.
(closes issue #8677)
Reported by: alex-911

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:52:58 +00:00
Russell Bryant
871cb71a98 Merged revisions 106892 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r106892 | mattf | 2008-03-07 16:36:49 -0600 (Fri, 07 Mar 2008) | 1 line

Make sure we don't start a call when we have already done so in response to a COT message
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:52:33 +00:00
Russell Bryant
8332692806 Merged revisions 106843 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r106843 | qwell | 2008-03-07 16:15:20 -0600 (Fri, 07 Mar 2008) | 13 lines

Merged revisions 106842 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106842 | qwell | 2008-03-07 16:14:45 -0600 (Fri, 07 Mar 2008) | 5 lines

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.6.0@108352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:52:07 +00:00
Russell Bryant
732df2cbdb Blocked revisions 106757 via svnmerge
........
r106757 | murf | 2008-03-07 12:57:57 -0600 (Fri, 07 Mar 2008) | 126 lines

(closes issue #6002)
Reported by: rizzo
Tested by: murf

Proposal of the changes to be made, and then an announcement of how they were accomplished:

http://lists.digium.com/pipermail/asterisk-dev/2008-February/032065.html

and:

http://lists.digium.com/pipermail/asterisk-dev/2008-March/032124.html

Here is a recap, file by file, of what I have done:

pbx/pbx_config.c
pbx/pbx_ael.c

All funcs that were passed a ptr to the context list, now will ALSO be passed a hashtab ptr to the same set.
Why? because (for the time being), the dialplan is stored in both, to facilitate a quick, low-cost move to
hash-tables to speed up dialplan processing. If it was deemed necessary to pass the context LIST, well, it
is just as necessary to have the TABLE available. This is because the list/table in question might not be
the global one, but temporary ones we would use to stage the dialplan on, and then swap into the global
position when things are ready.

We now have one external function for apps to use, "ast_context_find_or_create()" instead of the pre-existing
"find" and "create", as all existing usages used both in tandem anyway.

pbx_config, and pbx_ael, will stage the reloaded dialplan into local lists and tables, and 
then call merge_contexts_and_delete, which will merge (now) existing contexts and 
priorities from other registrars into this local set by copying them. Then, merge_contexts_and_delete will
lock down the contexts, swap the lists and tables, and unlock (real quick), and then 
destroy the old dialplan.



chan_sip.c
chan_iax.c
chan_skinny.c

All the channel drivers that would add regcontexts now use the ast_context_find_or_create now.

chan_sip also includes a small fix to get rid of warnings about removing priorities that never got entered.


apps/app_meetme.c
apps/app_dial.c
apps/app_queue.c

All the apps that added a context/exten/priority were also modified to use ast_context_find_or_create instead.


include/asterisk/pbx.h

ast_context_create() is removed. Find_or_create_ is the new method.
ast_context_find_or_create()  interface gets the hashtab added.
ast_merge_contexts_and_delete() gets the local hashtab arg added.
ast_wrlock_contexts_version() is added so you can detect if someone else got a writelock between your readlocking and writelocking.
ast_hashtab_compare_contexts was made public for use in pbx_config/pbx_ael
ast_hashtab_hash_contexts was in like fashion make public.


include/asterisk/pval.h

ast_compile_ael2() interface changed to include the local hashtab table ptr.


main/features.c

For the sake of the parking context, we use ast_context_find_or_create().



main/pbx.c

I changed all the "tree" names to "table" instead. That's because the original
implementation was based on binary trees. (had a free library). Then I moved
to hashtabs. Now, the names move forward too.

refcount field added to contexts, so you can keep track of how many modules
wanted this context to exist.

Some log messages that are warnings were inflated from LOG_NOTICE to LOG_WARNING.

Added some calls to ast_verb(3,...) for debug messages

Lots of little mods to ast_context_remove_extension2, which is now excersized in ways
it was not previously; one definite bug fixed.

find_or_create was upgraded to handle both local lists/tables as well as the globals.

context_merge() was added to do the per-context merging of the old/present contexts/extens/prios into the new/proposed local list/tables

ast_merge_contexts_and_delete() was heavily modified.

ast_add_extension2() was also upgraded to handle changes. 

the context_destroy() code was re-engineered to handle the new way of doing things,
by exten/prio instead of by context.



res/ael/pval.c
res/ael/ael.tab.c
res/ael/ael.tab.h
res/ael/ael.y
res/ael/ael_lex.c
res/ael/ael.flex
utils/ael_main.c
utils/extconf.c
utils/conf2ael.c
utils/Makefile

Had to change the interface to ast_compile_ael2(), to include the hashtab ptr.
This ended up involving several external apps.  The main gotcha was I had to 
include lock.h and hashtab.h in several places.


As a side note, I tested this stuff pretty thoroughly, I replicated the problems
originally reported by Luigi, and made triply sure that reloads worked, and everything
worked thru "stop gracefully". I found a and fixed a few bugs as I was merging into
trunk, that did not appear in my tests of bug6002.

How's this for verbose commit messages?



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:51:38 +00:00
Russell Bryant
50de1f9043 Blocked revisions 108226 via svnmerge
........
r108226 | file | 2008-03-12 16:06:50 -0500 (Wed, 12 Mar 2008) | 2 lines

Doxygenify slinfactory a bit.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:51:03 +00:00
Russell Bryant
cc9f77eef9 Blocked revisions 108286 via svnmerge
........
r108286 | kpfleming | 2008-03-12 16:37:40 -0500 (Wed, 12 Mar 2008) | 13 lines

add support for named sections in zapata.conf, and fix a few bugs in config file parsing

(closes issue #9503)
Reported by: tzafrir
Patches:
      fix_cleanups uploaded by tzafrir (license 46)
      zapata_sections uploaded by tzafrir (license 46)
      skipchannel_options uploaded by tzafrir (license 46)
      conf_sample uploaded by tzafrir (license 46)

patches updated by me to better conform to coding guidelines and fix some problems


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:50:45 +00:00
Russell Bryant
967d9d2c40 Merged revisions 108295 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108295 | russell | 2008-03-12 17:13:18 -0500 (Wed, 12 Mar 2008) | 3 lines

Rename ast_tcptls_server_instance to session_instance, since this pertains to
server and client usage.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:50:14 +00:00
Russell Bryant
64a69c1348 Merged revisions 108346 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108346 | russell | 2008-03-12 17:49:26 -0500 (Wed, 12 Mar 2008) | 4 lines

Make the default prefix empty, like it was in Asterisk 1.4.

(closes issue #12198, reported by bkruse, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:49:47 +00:00
Mark Michelson
78e9f784f1 Merged revisions 108293 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108293 | mmichelson | 2008-03-12 17:09:52 -0500 (Wed, 12 Mar 2008) | 3 lines

Let's get this to compile


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 22:10:20 +00:00
Mark Michelson
e3af4b3632 Merged revisions 108289 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108289 | mmichelson | 2008-03-12 16:57:41 -0500 (Wed, 12 Mar 2008) | 22 lines

Merged revisions 108288 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108288 | mmichelson | 2008-03-12 16:53:46 -0500 (Wed, 12 Mar 2008) | 14 lines

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.6.0@108290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 21:58:29 +00:00
Mark Michelson
2b948919be Merged revisions 108238 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108238 | mmichelson | 2008-03-12 16:19:30 -0500 (Wed, 12 Mar 2008) | 20 lines

Merged revisions 108227 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108227 | mmichelson | 2008-03-12 16:16:28 -0500 (Wed, 12 Mar 2008) | 12 lines

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.6.0@108246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 21:21:02 +00:00
Kevin P. Fleming
3592c06d29 Merged revisions 108191 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108191 | kpfleming | 2008-03-12 15:27:01 -0500 (Wed, 12 Mar 2008) | 14 lines

Merged revisions 108086 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108086 | kpfleming | 2008-03-12 14:16:07 -0500 (Wed, 12 Mar 2008) | 6 lines

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.6.0@108205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 20:29:50 +00:00
Russell Bryant
45de934e14 Merged revisions 108137 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108137 | russell | 2008-03-12 14:59:05 -0500 (Wed, 12 Mar 2008) | 48 lines

Merged revisions 108135 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108135 | russell | 2008-03-12 14:57:42 -0500 (Wed, 12 Mar 2008) | 40 lines

(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.6.0@108138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 19:59:24 +00:00
Joshua Colp
de10acaa07 Merged revisions 108084 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108084 | file | 2008-03-12 15:29:33 -0300 (Wed, 12 Mar 2008) | 12 lines

Merged revisions 108083 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108083 | file | 2008-03-12 15:26:37 -0300 (Wed, 12 Mar 2008) | 4 lines

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.6.0@108085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 18:31:07 +00:00
Russell Bryant
3e717dce36 Merged revisions 108032 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r108032 | russell | 2008-03-12 12:02:57 -0500 (Wed, 12 Mar 2008) | 12 lines

Merged revisions 108031 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108031 | russell | 2008-03-12 11:59:07 -0500 (Wed, 12 Mar 2008) | 4 lines

Destroy the channel lock after the channel datastores.

(inspired by issue #12187)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@108033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 17:03:18 +00:00
Tilghman Lesher
a92dc508ec Merged revisions 107998 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r107998 | tilghman | 2008-03-12 02:43:03 -0500 (Wed, 12 Mar 2008) | 7 lines

Deadlock fixes
(closes issue #12143)
 Reported by: kactus
 Patches: 
       20080312__bug12143__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: kactus

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@107999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 07:44:28 +00:00
Tilghman Lesher
02519b9df1 Merged revisions 107960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r107960 | tilghman | 2008-03-12 00:46:39 -0500 (Wed, 12 Mar 2008) | 4 lines

Revert several changes from revision 102525, as the changes were not
compatible, and, in fact, introduced regressions.
(Closes issue #12190)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@107961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 05:47:37 +00:00
Tilghman Lesher
4206a8f4f6 Merged revisions 107878 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r107878 | tilghman | 2008-03-11 20:54:00 -0500 (Tue, 11 Mar 2008) | 10 lines

Merged revisions 107877 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107877 | tilghman | 2008-03-11 20:52:40 -0500 (Tue, 11 Mar 2008) | 2 lines

Document all of the possible realtime fields

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@107879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 01:55:41 +00:00
Jason Parker
007b33e9c6 Merged revisions 107827 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r107827 | qwell | 2008-03-11 18:38:00 -0500 (Tue, 11 Mar 2008) | 15 lines

Merged revisions 107826 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107826 | qwell | 2008-03-11 18:37:05 -0500 (Tue, 11 Mar 2008) | 7 lines

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.6.0@107828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 23:38:31 +00:00
Tilghman Lesher
0d5ad6e21c Merged revisions 107791 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r107791 | tilghman | 2008-03-11 17:55:16 -0500 (Tue, 11 Mar 2008) | 5 lines

An offhand comment from Russell made me realize that the configuration file
caching would not work properly for users.conf and any other file read from
more than one place.  I needed to add the filename which requested the config
file to get it to work properly.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@107793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 22:59:52 +00:00
Tilghman Lesher
082e13ee49 Blocked revisions 107722 via svnmerge
........
r107722 | tilghman | 2008-03-11 16:10:45 -0500 (Tue, 11 Mar 2008) | 7 lines

Convert prepare_and_execute to direct_execute for speed
(closes issue #11935)
 Reported by: falves11
 Patches: 
       20080208__bug11935.diff.txt uploaded by Corydon76 (license 14)
 Tested by: falves11, Corydon76

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@107723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 21:11:31 +00:00
Jason Parker
2b1b649a97 Merged revisions 107718 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r107718 | qwell | 2008-03-11 15:53:48 -0500 (Tue, 11 Mar 2008) | 13 lines

Merged revisions 107714 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107714 | qwell | 2008-03-11 15:49:56 -0500 (Tue, 11 Mar 2008) | 5 lines

Copy voicemail dependency logic for res_adsi to chan_gtalk and chan_jingle (for jabber).

(closes issue #12014)
Reported by: junky

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@107720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:54:38 +00:00