Commit Graph

16952 Commits

Author SHA1 Message Date
Tilghman Lesher
f91ed59190 Merged revisions 167894 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r167894 | tilghman | 2009-01-08 16:37:20 -0600 (Thu, 08 Jan 2009) | 13 lines
  
  Merged revisions 167840 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r167840 | tilghman | 2009-01-08 16:08:56 -0600 (Thu, 08 Jan 2009) | 6 lines
    
    Don't truncate database results at 255 chars.
    (closes issue #14069)
     Reported by: evandro
     Patches: 
           20081214__bug14069.diff.txt uploaded by Corydon76 (license 14)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 22:45:36 +00:00
Mark Michelson
dae0c0060d Blocked revisions 167792,167888 via svnmerge
........
r167792 | mmichelson | 2009-01-08 13:48:42 -0600 (Thu, 08 Jan 2009) | 15 lines

Add the average talk time for a queue

This patch adds the functionality to app_queue of calculating
the average amount of time that channels are bridged for a
queue. The algorithm used to calculate the average is the same
exponential average currently used to calculate the average holdtime.
See the CHANGES file to see the methods you may use to view this
information.

(closes issue #13960)
Reported by: coolmig
Patches:
      app_queue.c.diff.trunk-r158840 uploaded by coolmig (license 621)


........
r167888 | mmichelson | 2009-01-08 16:34:52 -0600 (Thu, 08 Jan 2009) | 4 lines

Revert chan_sip changes which were accidentally committed
in revision 167792


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 22:37:02 +00:00
Tilghman Lesher
77bf104602 Blocked revisions 167837 via svnmerge
........
  r167837 | tilghman | 2009-01-08 15:40:28 -0600 (Thu, 08 Jan 2009) | 2 lines
  
  Fix variables to comply with documentation changes
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 21:41:02 +00:00
Tilghman Lesher
361d76c1eb Merged revisions 167835 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r167835 | tilghman | 2009-01-08 15:32:45 -0600 (Thu, 08 Jan 2009) | 6 lines
  
  Textual changes, consistency in status variable naming, and other minor bugs.
  (closes issue #13943)
   Reported by: Marquis
   Patches: 
         minivm_trunk_fixes3.patch uploaded by Marquis (license 32)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 21:39:31 +00:00
Kevin P. Fleming
b205a18a8d Merged revisions 167720 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r167720 | kpfleming | 2009-01-08 11:26:03 -0600 (Thu, 08 Jan 2009) | 9 lines
  
  Merged revisions 167714 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r167714 | kpfleming | 2009-01-08 11:24:21 -0600 (Thu, 08 Jan 2009) | 1 line
    
    remove an unnecessary argument to queue_request()
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 17:28:42 +00:00
Kevin P. Fleming
4f2b0aa24c Merged revisions 167700 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r167700 | kpfleming | 2009-01-08 10:43:26 -0600 (Thu, 08 Jan 2009) | 12 lines
  
  Merged revisions 167620 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r167620 | kpfleming | 2009-01-07 17:32:21 -0600 (Wed, 07 Jan 2009) | 5 lines
    
    When a SIP request or response arrives for a dialog with an associated Asterisk channel, and the lock on that channel cannot be obtained because it is held by another thread, instead of dropping the request/response, queue it for later processing when the channel lock becomes available.
    
    http://reviewboard.digium.com/r/123/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 16:59:07 +00:00
Leif Madsen
39f02645de Merged revisions 167662 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r167662 | lmadsen | 2009-01-08 09:27:53 -0500 (Thu, 08 Jan 2009) | 1 line
  
  Oops... fix the fieldname I changed yesterday to be right.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 14:30:54 +00:00
Russell Bryant
424dc6af48 Merged revisions 167569 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r167569 | russell | 2009-01-07 16:36:34 -0600 (Wed, 07 Jan 2009) | 10 lines

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

........
r167566 | russell | 2009-01-07 16:35:36 -0600 (Wed, 07 Jan 2009) | 2 lines

Fix the last couple of places where free() was improperly used directly.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:37:54 +00:00
Russell Bryant
e0d2263f33 Merged revisions 167555 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r167555 | russell | 2009-01-07 16:27:23 -0600 (Wed, 07 Jan 2009) | 10 lines

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

........
r167554 | russell | 2009-01-07 16:26:42 -0600 (Wed, 07 Jan 2009) | 2 lines

Don't fclose() the file early, the filestream destructor will handle it.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:28:09 +00:00
Russell Bryant
fcca2ae242 Merged revisions 167546 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r167546 | russell | 2009-01-07 16:20:31 -0600 (Wed, 07 Jan 2009) | 10 lines

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

........
r167545 | russell | 2009-01-07 16:19:47 -0600 (Wed, 07 Jan 2009) | 2 lines

Only try to close the file if one was actually opened

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:21:40 +00:00
Russell Bryant
e09314f28c Merged revisions 167542 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r167542 | russell | 2009-01-07 16:05:29 -0600 (Wed, 07 Jan 2009) | 12 lines

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

........
r167541 | russell | 2009-01-07 16:03:59 -0600 (Wed, 07 Jan 2009) | 4 lines

Don't use free() directly.  This caused a crash since ast_filestream is now an ao2 object.

Reported by JunK-Y on IRC, #asterisk-dev

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:07:00 +00:00
BJ Weschke
32be29070a Merged revisions 167478 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r167478 | bweschke | 2009-01-07 13:20:31 -0500 (Wed, 07 Jan 2009) | 7 lines
  
   Answer the channel if it has not already been answered and we've already found a valid profile for followme. 
   (closes issue #14140)
   Reported by: dimas
   Patches:
         14140.patch uploaded by dimas
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 18:32:52 +00:00
Leif Madsen
12d06b75b4 Merged revisions 167477 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r167477 | lmadsen | 2009-01-07 13:18:45 -0500 (Wed, 07 Jan 2009) | 8 lines
  
  Update queues.conf.sample documentation.
  
  Update the queues.conf.sample documentation to mention that you need to preload chan_local.so as well if you plan on using Local channels for queue members, and you're preloading pbx_config.so.
  
  
  (closes issue #14179)
  Reported by: CrashHD
  Tested by: CrashHD
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 18:27:35 +00:00
Russell Bryant
b7d3a078c3 Merged revisions 167442 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r167442 | russell | 2009-01-07 11:35:39 -0600 (Wed, 07 Jan 2009) | 12 lines

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

........
r167432 | russell | 2009-01-07 11:29:53 -0600 (Wed, 07 Jan 2009) | 4 lines

Treat an empty string the same way as a NULL country argument.

In passing, simplify the handling of returning a default tone zone.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 17:46:02 +00:00
Leif Madsen
091e03e136 Merged revisions 167373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r167373 | lmadsen | 2009-01-07 09:26:19 -0500 (Wed, 07 Jan 2009) | 1 line
  
  Update the sip-friends.sql file to use the non-deprecated 'defaultname' instead of 'username' and remove an extra comma that would cause the script to fail as-is
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 14:41:14 +00:00
Mark Michelson
ee8553caa6 Merged revisions 167301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r167301 | mmichelson | 2009-01-06 15:36:44 -0600 (Tue, 06 Jan 2009) | 16 lines

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

........
r167299 | mmichelson | 2009-01-06 15:35:57 -0600 (Tue, 06 Jan 2009) | 8 lines

Use the correct variable when creating the format string

(closes issue #14177)
Reported by: nic_bellamy
Patches:
      asterisk-trunk-svn-r167242-ast_db_gettree.patch uploaded by nic (license 299)


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 21:38:45 +00:00
Tilghman Lesher
c7add836c6 Merged revisions 167265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r167265 | tilghman | 2009-01-06 15:02:33 -0600 (Tue, 06 Jan 2009) | 16 lines
  
  Merged revisions 167260 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ................
    r167260 | tilghman | 2009-01-06 14:48:05 -0600 (Tue, 06 Jan 2009) | 9 lines
    
    Merged revisions 167259 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.2
    
    ........
      r167259 | tilghman | 2009-01-06 14:44:03 -0600 (Tue, 06 Jan 2009) | 2 lines
      
      Security fix AST-2009-001.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 21:10:53 +00:00
Mark Michelson
0e408f80fe Merged revisions 167180 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r167180 | mmichelson | 2009-01-05 10:59:36 -0600 (Mon, 05 Jan 2009) | 49 lines

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

........
r167179 | mmichelson | 2009-01-05 10:51:59 -0600 (Mon, 05 Jan 2009) | 41 lines

A couple of changes to T.38 SDP attribute handling

There are some boolean attributes for T.38 such
as T38FaxFillBitRemoval, T38FaxTranscodingMMR, and
T38FaxTranscodingJBIG. By simply being present, we
should treat these as a "true" value. The current
code, however, was requiring a 1 or 0 as the value
of the attribute in order to parse it. This is due
to the fact that there are some T.38 endpoints and
gateways that also transmit this information
incorrectly. This patch follows the "be liberal in
what you accept and strict in what you send"
philosophy by accepting both the correctly- and 
incorrectly-formatted attributes, but only sending
information as it is supposed to be sent.

It was also discovered that a particular type of 
T.38 gateway sends some non-standard T.38 SDP
attributes. Instead of using T38FaxMaxDatagram
and T38MaxBitRate, it used T38MaxDatagram and
T38FaxMaxRate respectively. We now will properly
accept these attributes as well.

Note that there are a lot of patches cited in
the below commit message template. This is
because the person who submitted these patches is
an awesome person and wrote 1.4, 1.6.0, and 1.6.1
variants.

(closes issue #13976)
Reported by: linulin
Patches:
     chan_sip.c.1.4-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.0-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.1-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.4-relaxedT38_update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.0-relaxedT38_update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.1-relaxedT38_update1.diff uploaded by arcivanov (license 648)
Tested by: arcivanov


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-05 17:10:08 +00:00
Tilghman Lesher
cfd27e5c80 Merged revisions 167176 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r167176 | tilghman | 2009-01-05 10:44:47 -0600 (Mon, 05 Jan 2009) | 7 lines
  
  More clearly explain that quote marks are no longer necessary.
  (closes issue #13718)
   Reported by: davidw
   Patches: 
         20081020__bug13718.diff.txt uploaded by Corydon76 (license 14)
   Tested by: blitzrage
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-05 16:46:28 +00:00
Jeff Peeler
3190dfc8c4 Blocked revisions 167125 via svnmerge
........
r167125 | jpeeler | 2009-01-03 14:29:54 -0600 (Sat, 03 Jan 2009) | 3 lines

When parsing environment variable ASTERISK_PROMPT, make sure to proceed to the next character when a non format specifier is used (no %). Otherwise, the while loop looking for the null byte will never exit.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-03 20:32:35 +00:00
Terry Wilson
978a8ed0ac Blocked revisions 167057 via svnmerge
........
  r167057 | twilson | 2008-12-31 16:53:55 -0600 (Wed, 31 Dec 2008) | 2 lines
  
  Don't forget to free typename
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31 22:55:11 +00:00
Mark Michelson
08d772b888 Blocked revisions 167021 via svnmerge
........
r167021 | mmichelson | 2008-12-31 15:52:02 -0600 (Wed, 31 Dec 2008) | 4 lines

Change some incorrect syntax for pri set debug and correct
an off-by-one error in ss7 set debug command


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@167023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31 21:54:33 +00:00
Tilghman Lesher
27c0f99cb4 Merged revisions 166954 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r166954 | tilghman | 2008-12-31 13:34:28 -0600 (Wed, 31 Dec 2008) | 12 lines
  
  Merged revisions 166953 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r166953 | tilghman | 2008-12-31 13:20:35 -0600 (Wed, 31 Dec 2008) | 5 lines
    
    Also inherit the musiconhold class.
    (Closes #14153)
    Reported by: Jerry Geis, via the users list.
    Patch by: me (license 14)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31 19:38:10 +00:00
Terry Wilson
1c84ecad28 Merged revisions 166908 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r166908 | twilson | 2008-12-30 14:50:05 -0600 (Tue, 30 Dec 2008) | 2 lines
  
  Fix some svn:keywords
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-30 20:57:15 +00:00
Mark Michelson
45ac5e6838 Merged revisions 166861 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166861 | mmichelson | 2008-12-29 12:04:52 -0600 (Mon, 29 Dec 2008) | 14 lines

Update app_queue to deal with the removal of AST_PBX_KEEPALIVE

When placing a call to a queue which ran a gosub on the member's
channel, Asterisk would crash every time, stemming from the fact
that the member's channel was being hung up unexpectedly when the
Gosub completed. The necessary change was pretty much copied and
pasted from app_dial's similar changes made last week.

I also took the opportunity to change a LOG_DEBUG message in
app_dial to use ast_debug. I am guessing this was due to a direct
merge from 1.4 that was not corrected to use trunk's preferred
syntax.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-29 18:16:10 +00:00
Joshua Colp
75d4f7e1c2 Per kpfleming add a note describing why you must never change the first element of peer_finding_info.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-29 14:52:22 +00:00
Eliel C. Sardanons
f2a3836106 Blocked revisions 166823 via svnmerge
........
  r166823 | eliel | 2008-12-28 10:36:25 -0500 (Sun, 28 Dec 2008) | 3 lines
  
  Fix a typo in the XML documentation of the AUDIOHOOK_INHERIT dialplan function.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-28 15:41:44 +00:00
Russell Bryant
941a82916a Merged revisions 166773 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r166773 | russell | 2008-12-28 09:15:14 -0600 (Sun, 28 Dec 2008) | 12 lines

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

........
r166772 | russell | 2008-12-28 09:13:48 -0600 (Sun, 28 Dec 2008) | 4 lines

Use strncat() instead of an sprintf() in which source and target buffers overlap

http://lists.digium.com/pipermail/asterisk-dev/2008-December/035919.html

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-28 15:16:11 +00:00
Terry Wilson
869388718f Blocked revisions 166731 via svnmerge
........
  r166731 | twilson | 2008-12-24 09:10:42 -0600 (Wed, 24 Dec 2008) | 10 lines
  
  There is no section 22.2.2 in rfc 3261.  I believe 26.2.2 is what was meant:
  
        Note that in the SIPS URI scheme, transport is independent of TLS,
        and thus "sips:alice@atlanta.com;transport=tcp" and
        "sips:alice@atlanta.com;transport=sctp" are both valid (although
        note that UDP is not a valid transport for SIPS).  The use of
        "transport=tls" has consequently been deprecated, partly because
        it was specific to a single hop of the request.  This is a change
        since RFC 2543.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-24 15:19:33 +00:00
Steve Murphy
a7aeaf341b Merged revisions 166665 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

This merged from trunk with no conflicts. I tested
mostly the 'tired' cases, and for the most part
ignored the tests for reconnecting and dialing in
to fetch a parked call, after the first case.

................
  r166665 | murf | 2008-12-23 11:13:49 -0700 (Tue, 23 Dec 2008) | 153 lines
  
  Merged revisions 166093 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  In order to merge this 1.4 patch into trunk,
  I had to resolve some conflicts and wait for
  Russell to make some changes to res_agi.
  I re-ran all the tests; 39 calls in all, and
  made fairly careful notes and comparisons: I
  don't want this to blow up some aspect of 
  asterisk; I completely removed the KEEPALIVE
  from the pbx.h decls. The first 3 scenarios
  involving feature park; feature xfer to 700;
  hookflash park to Park() app call all behave
  the same, don't appear to leave hung channels,
  and no crashes.
  
  ........
    r166093 | murf | 2008-12-19 15:30:32 -0700 (Fri, 19 Dec 2008) | 131 lines
    
    This merges the masqpark branch into 1.4
    
    These changes eliminate the need for (and use of)
    the KEEPALIVE return code in res_features.c;
    There are other places that use this result code
    for similar purposes at a higher level, these appear
    to be left alone in 1.4, but attacked in trunk.
    
    The reason these changes are being made in 1.4, is
    that parking ends a channel's life, in some situations,
    and the code in the bridge (and some other places),
    was not checking the result code properly, and dereferencing
    the channel pointer, which could lead to memory corruption
    and crashes.
    
    Calling the masq_park function eliminates this danger 
    in higher levels.
    
    A series of previous commits have replaced some parking calls
    with masq_park, but this patch puts them ALL to rest,
    (except one, purposely left alone because a masquerade
    is done anyway), and gets rid of the code that tests
    the KEEPALIVE result, and the NOHANGUP_PEER result codes.
    
    While bug 13820 inspired this work, this patch does
    not solve all the problems mentioned there.
    
    I have tested this patch (again) to make sure I have
    not introduced regressions. 
    
    Crashes that occurred when a parked party hung up
    while the parking party was listening to the numbers
    of the parking stall being assigned, is eliminated.
    
    These are the cases where parking code may be activated:
    
    1. Feature one touch (eg. *3)
    2. Feature blind xfer to parking lot (eg ##700)
    3. Run Park() app from dialplan (eg sip xfer to 700)
       (eg. dahdi hookflash xfer to 700)
    4. Run Park via manager.
    
    The interesting testing cases for parking are:
    I. A calls B, A parks B
        a. B hangs up while A is getting the numbers announced.
        b. B hangs up after A gets the announcement, but 
           before the parking time expires
        c. B waits, time expires, A is redialed,
           A answers, B and A are connected, after
           which, B hangs up.
        d. C picks up B while still in parking lot.
    
    II. A calls B, B parks A
        a. A hangs up while B is getting the numbers announced.
        b. A hangs up after B gets the announcement, but 
           before the parking time expires
        c. A waits, time expires, B is redialed,
           B answers, A and B are connected, after
           which, A hangs up.
        d. C picks up A while still in parking lot.
    
    Testing this throroughly involves acting all the permutations
    of I and II, in situations 1,2,3, and 4.
    
    Since I added a few more changes (ALL references to KEEPALIVE in the bridge
    code eliimated (I missed one earlier), I retested
    most of the above cases, and no crashes.
    
    H-extension weirdness.
    
    Current h-extension execution is not completely
    correct for several of the cases.
    
    For the case where A calls B, and A parks B, the
    'h' exten is run on A's channel as soon as the park
    is accomplished. This is expected behavior.
    
    But when A calls B, and B parks A, this will be
    current behavior:
    
    After B parks A, B is hung up by the system, and
    the 'h' (hangup) exten gets run, but the channel
    mentioned will be a derivative of A's...
    
    Thus, if A is DAHDI/1, and B is DAHDI/2,
    the h-extension will be run on channel
    Parked/DAHDI/1-1<ZOMBIE>, and the 
    start/answer/end info will be those 
    relating to Channel A.
    
    And, in the case where A is reconnected to
    B after the park time expires, when both parties
    hang up after the joyful reunion, no h-exten
    will be run at all.
    
    In the case where C picks up A from the 
    parking lot, when either A or C hang up,
    the h-exten will be run for the C channel.
    
    CDR's are a separate issue, and not addressed
    here.
    
    As to WHY this strange behavior occurs, 
    the answer lies in the procedure followed
    to accomplish handing over the channel
    to the parking manager thread. This procedure
    is called masquerading. In the process,
    a duplicate copy of the channel is created,
    and most of the active data is given to the
    new copy. The original channel gets its name
    changed to XXX<ZOMBIE> and keeps the PBX
    information for the sake of the original
    thread (preserving its role as a call 
    originator, if it had this role to begin
    with), while the new channel is without
    this info and becomes a call target (a
    "peer").
    
    In this case, the parking lot manager
    thread is handed the new (masqueraded)
    channel. It will not run an h-exten
    on the channel if it hangs up while
    in the parking lot. The h exten will
    be run on the original channel instead,
    in the original thread, after the bridge
    completes.
    
    See bug 13820 for our intentions as
    to how to clean up the h exten behavior.
  
  Review: http://reviewboard.digium.com/r/29/
  
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-24 01:15:43 +00:00
Tilghman Lesher
827f655dac Merged revisions 166696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r166696 | tilghman | 2008-12-23 14:47:08 -0600 (Tue, 23 Dec 2008) | 7 lines
  
  Allow semicolons and extended characters in user-specified SIP headers.
  (closes issue #14110)
   Reported by: gork
   Patches: 
         20081222__bug14110__2.diff.txt uploaded by Corydon76 (license 14)
   Tested by: gork, putnopvut
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 20:56:10 +00:00
Mark Michelson
63f2d52453 Merged revisions 166569 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r166569 | mmichelson | 2008-12-23 09:17:54 -0600 (Tue, 23 Dec 2008) | 20 lines

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

........
r166568 | mmichelson | 2008-12-23 09:16:26 -0600 (Tue, 23 Dec 2008) | 12 lines

Fix a crash resulting from a datastore with inheritance but no duplicate callback

The fix for this is to simply set the newly created datastore's data pointer
to NULL if it is inherited but has no duplicate callback.

(closes issue #14113)
Reported by: francesco_r
Patches:
      14113.patch uploaded by putnopvut (license 60)
Tested by: francesco_r


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 15:20:15 +00:00
Tilghman Lesher
9981739dd1 Merged revisions 166533 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r166533 | tilghman | 2008-12-22 22:32:15 -0600 (Mon, 22 Dec 2008) | 11 lines
  
  Merged revisions 166509 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r166509 | tilghman | 2008-12-22 22:05:25 -0600 (Mon, 22 Dec 2008) | 4 lines
    
    Use the integer form of condition for integer comparisons.
    (closes issue #14127)
     Reported by: andrew
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 04:34:13 +00:00
Mark Michelson
2ff6f18737 Merged revisions 166470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166470 | mmichelson | 2008-12-22 17:25:34 -0600 (Mon, 22 Dec 2008) | 11 lines

Always use the value of the AGISIGHUP when running an AGI.

Prior to this patch, the value of AGISIGUP was not always
honored when set on a channel.

(closes issue #13711)
Reported by: fmueller
Patches:
      13711.patch uploaded by putnopvut (license 60)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 23:27:37 +00:00
Mark Michelson
25342b814f Merged revisions 166382 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r166382 | mmichelson | 2008-12-22 15:08:03 -0600 (Mon, 22 Dec 2008) | 44 lines

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

........
r166380 | mmichelson | 2008-12-22 14:56:29 -0600 (Mon, 22 Dec 2008) | 36 lines

Fix a deadlock relating to channel locks and autoservice

It has been discovered that if a channel is locked prior
to a call to ast_autoservice_stop, then it is likely that
a deadlock will occur. The reason is that the call to 
ast_autoservice_stop has a check built into it to be sure
that the thread running autoservice is not currently trying
to manipulate the channel we are about to pull out of 
autoservice.

The autoservice thread, however, cannot advance beyond where
it currently is, though, because it is trying to acquire
the lock of the channel for which autoservice is attempting
to be stopped.

The gist of all this is that a channel MUST NOT be locked
when attempting to stop autoservice on the channel.

In this particular case, the channel was locked by a call
to ast_read. A call to ast_exists_extension led to autoservice
being started and stopped due to the existence of dialplan
switches.

It may be that there are future commits which handle the same
symptoms but in a different location, but based on my looks through
the code, it is very rare to see a construct such as this one.

(closes issue #14057)
Reported by: rtrauntvein
Patches:
      14057v3.patch uploaded by putnopvut (license 60)
Tested by: rtrauntvein

Review: http://reviewboard.digium.com/r/107/


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 21:56:36 +00:00
Russell Bryant
80159b17cc Merged revisions 166436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166436 | russell | 2008-12-22 15:45:28 -0600 (Mon, 22 Dec 2008) | 2 lines

Cosmetic change - don't mix struct initializer styles.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 21:46:53 +00:00
Russell Bryant
4df667e276 Merged revisions 166377 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166377 | russell | 2008-12-22 14:26:48 -0600 (Mon, 22 Dec 2008) | 2 lines

Fix a bad typo.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 20:28:12 +00:00
Russell Bryant
511692bc3d Merged revisions 166342 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166342 | russell | 2008-12-22 11:44:23 -0600 (Mon, 22 Dec 2008) | 2 lines

Remove some error messages.  This is the default handler that is valid to use.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 17:46:05 +00:00
Russell Bryant
3d6899f584 Merged revisions 166317 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r166317 | russell | 2008-12-22 11:29:10 -0600 (Mon, 22 Dec 2008) | 10 lines

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

........
r166297 | russell | 2008-12-22 11:22:56 -0600 (Mon, 22 Dec 2008) | 2 lines

Fix up timeout handling in ast_carefulwrite().

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 17:32:14 +00:00
Russell Bryant
3db74e5bd7 Merged revisions 166282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166282 | russell | 2008-12-22 11:09:36 -0600 (Mon, 22 Dec 2008) | 12 lines

Introduce ast_careful_fwrite() and use in AMI to prevent partial writes.

This patch introduces a function to do careful writes on a file stream which
will handle timeouts and partial writes.  It is currently used in AMI to
address the issue that has been reported.  However, there are probably a few
other places where this could be used.

(closes issue #13546)
Reported by: srt
Tested by: russell
http://reviewboard.digium.com/r/104/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 17:19:05 +00:00
Russell Bryant
0bfcfd0848 Merged revisions 166273 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166273 | russell | 2008-12-22 10:10:40 -0600 (Mon, 22 Dec 2008) | 7 lines

Re-work ref count handling of MoH classes using astobj2 to resolve crashes.

(closes issue #13566)
Reported by: igorcarneiro
Tested by: russell
Review: http://reviewboard.digium.com/r/106/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 16:21:07 +00:00
Mark Michelson
198eedad1f Merged revisions 166267 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166267 | mmichelson | 2008-12-22 10:07:59 -0600 (Mon, 22 Dec 2008) | 17 lines

Fix a file playback crash and explicitly initialize values in func_timeout.c

A crash was brought up on the bugtracker. The first run through valgrind
was full of legitimate complaints of uninitialized values in func_timeout when
setting a response timeout. These were fixed but the crash persisted.

A second run through showed the real problem. The reference counting used
for filestreams was incorrect because there were some missing increments
when a frame was read from a format module.

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


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 16:17:17 +00:00
Joshua Colp
69c484879f Merged revisions 166268 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r166268 | file | 2008-12-22 12:08:13 -0400 (Mon, 22 Dec 2008) | 7 lines
  
  Record the previous port in the temporary address structure so that the comparison does not treat the host as having changed even if it did not. This would have been uninitialized before and would have led to a baddddd port.
  (closes issue #13628)
  Reported by: pananix
  Patches:
        bug13628.patch uploaded by jpeeler (license 325)
  Tested by: file, blitzrage
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 16:10:22 +00:00
Russell Bryant
e8952a420c Merged revisions 166258 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166258 | russell | 2008-12-22 08:16:54 -0600 (Mon, 22 Dec 2008) | 26 lines

Remove AST_PBX_KEEPALIVE usage from res_agi.

This patch removes the usage of AST_PBX_KEEPALIVE from res_agi.  The only usage
was for the AGI command, "asyncagi break".  This patch removes this feature.
Normally, a feature would not be removed like this.  However, this code is
broken and usage of it will result in a memory leak.

Usage of this feature will make the AGI code return a result of 
AST_PBX_KEEPALIVE.  The PBX handler assumes that another thread has assumed
ownership of the channel.  The channel thread will exit without destroying the
channel.  Unfortunately, _no_ thread has ownership of the channel at this
point.  There are a couple of serious problems here:

1) The only way to recover the caller is to issue a channel redirect.  This
   will work, but this will be done with a masquerade, and the old ast_channel
   structure will be lost.

2) Until the channel redirect happens, there is no code servicing the channel.
   That means nothing is reading audio or handling events coming from the
   channel.  This is very bad.

The recommended way to get this same "break" functionality is to issue the
redirect while the channel is still being handled by the AGI code.  That way,
there will be no memory leak, and there will be no period of time that the
channel is not being serviced.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 14:19:06 +00:00
Mark Michelson
732fd97b6b Merged revisions 166162 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166162 | mmichelson | 2008-12-19 17:45:00 -0600 (Fri, 19 Dec 2008) | 6 lines

Get rid of an extra space.

I don't know how this crept back in when I had already
fixed it earlier


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 23:45:59 +00:00
Mark Michelson
4bb7e35704 Switch documentation formats for func_audiohookinherit.c
1.6.1 does not have xml documentation, so I reverted
to the old way here.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 23:43:35 +00:00
Mark Michelson
c665735e2e Blocked revisions 166158 via svnmerge
................
r166158 | mmichelson | 2008-12-19 17:36:22 -0600 (Fri, 19 Dec 2008) | 16 lines

Blocked revisions 166157 via svnmerge

........
r166157 | mmichelson | 2008-12-19 17:34:57 -0600 (Fri, 19 Dec 2008) | 9 lines

Backport of AUDIOHOOK_INHERIT for Asterisk 1.4

(closes issue #13538)
Reported by: mbit
Patches:
      13538.patch uploaded by putnopvut (license 60)
Tested by: putnopvut


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 23:36:47 +00:00
Mark Michelson
7ed70a7a3f Merged revisions 166092,166095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r166092 | mmichelson | 2008-12-19 16:26:16 -0600 (Fri, 19 Dec 2008) | 28 lines

Adding a new dialplan function AUDIOHOOK_INHERIT

This function is being added as a method to allow for
an audiohook to move to a new channel during a channel
masquerade. The most obvious use for such a facility is
for MixMonitor when a transfer is performed. Prior to
the addition of this functionality, if a channel 
running MixMonitor was transferred by another party, then
the recording would stop once the transfer had completed.
By using AUDIOHOOK_INHERIT, you can make MixMonitor 
continue recording the call even after the transfer
has completed.

It has also been determined that since this is seen
by most as a bug fix and is not an invasive change,
this functionality will also be backported to 1.4 and
merged into the 1.6.0 branches, even though they are
feature-frozen.

(closes issue #13538)
Reported by: mbit
Patches:
      13538.patch uploaded by putnopvut (license 60)
	  Tested by: putnopvut

Review: http://reviewboard.digium.com/r/102/


........
r166095 | mmichelson | 2008-12-19 16:40:57 -0600 (Fri, 19 Dec 2008) | 5 lines

Remove the verbatim tag from the author line

I could have sworn I already did that before, though...


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@166098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 23:07:33 +00:00
Eliel C. Sardanons
8e78d8ebd4 Blocked revisions 165954 via svnmerge
........
  r165954 | eliel | 2008-12-19 16:20:46 -0200 (Fri, 19 Dec 2008) | 4 lines
  
  Fix the XML documentation for Record().
  <value> tags inside <variable> elements must have CDATA and no
  another XML node.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@165955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 18:22:37 +00:00
Russell Bryant
e3f0577bda Merged revisions 165890 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r165890 | russell | 2008-12-19 09:05:09 -0600 (Fri, 19 Dec 2008) | 17 lines

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

........
r165889 | russell | 2008-12-19 09:03:02 -0600 (Fri, 19 Dec 2008) | 9 lines

Ensure that the chanspy datastore is fully initialized.

This patch resolved some random crash issues observed by a user on a BSD system

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

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@165892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 15:08:59 +00:00