asterisk/asterisk.git
11 years agoSet ORIGINATE_STATUS instead of OUTGOING_STATUS to match the documentation
Terry Wilson [Fri, 9 Jan 2009 01:15:43 +0000 (01:15 +0000)]
Set ORIGINATE_STATUS instead of OUTGOING_STATUS to match the documentation

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

11 years agoSet peer context and exten values so MACRO_EXTEN and MACRO_CONTEXT will be set
Terry Wilson [Fri, 9 Jan 2009 00:13:12 +0000 (00:13 +0000)]
Set peer context and exten values so MACRO_EXTEN and MACRO_CONTEXT will be set

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

11 years agoMerged revisions 167840 via svnmerge from
Tilghman Lesher [Thu, 8 Jan 2009 22:37:20 +0000 (22:37 +0000)]
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/trunk@167894 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRevert chan_sip changes which were accidentally committed
Mark Michelson [Thu, 8 Jan 2009 22:34:52 +0000 (22:34 +0000)]
Revert chan_sip changes which were accidentally committed
in revision 167792

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

11 years agoFix variables to comply with documentation changes
Tilghman Lesher [Thu, 8 Jan 2009 21:40:28 +0000 (21:40 +0000)]
Fix variables to comply with documentation changes

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

11 years agoTextual changes, consistency in status variable naming, and other minor bugs.
Tilghman Lesher [Thu, 8 Jan 2009 21:32:45 +0000 (21:32 +0000)]
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/trunk@167835 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd the average talk time for a queue
Mark Michelson [Thu, 8 Jan 2009 19:48:42 +0000 (19:48 +0000)]
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)

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

11 years agoConvert dialplan application DAHDISendCallreroutingFacility to use commas.
Tilghman Lesher [Thu, 8 Jan 2009 19:44:19 +0000 (19:44 +0000)]
Convert dialplan application DAHDISendCallreroutingFacility to use commas.
(closes issue #13836)
 Reported by: eliel
 Patches:
       chan_dahdi.c.patch uploaded by eliel (license 64)

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

11 years agoMerged revisions 167714 via svnmerge from
Kevin P. Fleming [Thu, 8 Jan 2009 17:26:03 +0000 (17:26 +0000)]
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/trunk@167720 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 167620 via svnmerge from
Kevin P. Fleming [Thu, 8 Jan 2009 16:43:26 +0000 (16:43 +0000)]
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/trunk@167700 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoOops... fix the fieldname I changed yesterday to be right.
Leif Madsen [Thu, 8 Jan 2009 14:27:53 +0000 (14:27 +0000)]
Oops... fix the fieldname I changed yesterday to be right.

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

11 years agoMerged revisions 167566 via svnmerge from
Russell Bryant [Wed, 7 Jan 2009 22:36:34 +0000 (22:36 +0000)]
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/trunk@167569 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 167554 via svnmerge from
Russell Bryant [Wed, 7 Jan 2009 22:27:23 +0000 (22:27 +0000)]
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/trunk@167555 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 167545 via svnmerge from
Russell Bryant [Wed, 7 Jan 2009 22:20:31 +0000 (22:20 +0000)]
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/trunk@167546 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 167541 via svnmerge from
Russell Bryant [Wed, 7 Jan 2009 22:05:29 +0000 (22:05 +0000)]
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/trunk@167542 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago Answer the channel if it has not already been answered and we've already found a...
BJ Weschke [Wed, 7 Jan 2009 18:20:31 +0000 (18:20 +0000)]
 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/trunk@167478 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoUpdate queues.conf.sample documentation.
Leif Madsen [Wed, 7 Jan 2009 18:18:45 +0000 (18:18 +0000)]
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/trunk@167477 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 167432 via svnmerge from
Russell Bryant [Wed, 7 Jan 2009 17:35:39 +0000 (17:35 +0000)]
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/trunk@167442 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoCleanup fsk spill if off hook is detected during mwi spill.
Doug Bailey [Wed, 7 Jan 2009 17:05:37 +0000 (17:05 +0000)]
Cleanup fsk spill if off hook is detected during mwi spill.
Correct logic error in handling events when sending mwi spill
(closes issue #14143)
Reported by: alecdavis
Patches:
      chan_dahdi.handle_init_event2.diff.txt uploaded by dbailey

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

11 years agoUpdate the sip-friends.sql file to use the non-deprecated 'defaultname' instead of...
Leif Madsen [Wed, 7 Jan 2009 14:26:19 +0000 (14:26 +0000)]
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/trunk@167373 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 167299 via svnmerge from
Mark Michelson [Tue, 6 Jan 2009 21:36:44 +0000 (21:36 +0000)]
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/trunk@167301 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 167260 via svnmerge from
Tilghman Lesher [Tue, 6 Jan 2009 21:02:33 +0000 (21:02 +0000)]
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/trunk@167265 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 167179 via svnmerge from
Mark Michelson [Mon, 5 Jan 2009 16:59:36 +0000 (16:59 +0000)]
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/trunk@167180 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMore clearly explain that quote marks are no longer necessary.
Tilghman Lesher [Mon, 5 Jan 2009 16:44:47 +0000 (16:44 +0000)]
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/trunk@167176 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoWhen parsing environment variable ASTERISK_PROMPT, make sure to proceed to the next...
Jeff Peeler [Sat, 3 Jan 2009 20:29:54 +0000 (20:29 +0000)]
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/trunk@167125 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMostly just whitespace, but also convert 'CVS' to 'SVN' in a couple
Sean Bright [Wed, 31 Dec 2008 23:07:14 +0000 (23:07 +0000)]
Mostly just whitespace, but also convert 'CVS' to 'SVN' in a couple
places and fix a few typos I found in the CODING_GUIDELINES.

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

11 years agoDon't forget to free typename
Terry Wilson [Wed, 31 Dec 2008 22:53:55 +0000 (22:53 +0000)]
Don't forget to free typename

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

11 years agoChange some incorrect syntax for pri set debug and correct
Mark Michelson [Wed, 31 Dec 2008 21:52:02 +0000 (21:52 +0000)]
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/trunk@167021 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoThat was weird...
Tilghman Lesher [Wed, 31 Dec 2008 19:39:05 +0000 (19:39 +0000)]
That was weird...

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

11 years agoMerged revisions 166953 via svnmerge from
Tilghman Lesher [Wed, 31 Dec 2008 19:34:28 +0000 (19:34 +0000)]
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/trunk@166954 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix some svn:keywords
Terry Wilson [Tue, 30 Dec 2008 20:50:05 +0000 (20:50 +0000)]
Fix some svn:keywords

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

11 years agoUpdate app_queue to deal with the removal of AST_PBX_KEEPALIVE
Mark Michelson [Mon, 29 Dec 2008 18:04:52 +0000 (18:04 +0000)]
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/trunk@166861 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix a typo in the XML documentation of the AUDIOHOOK_INHERIT dialplan function.
Eliel C. Sardanons [Sun, 28 Dec 2008 15:36:25 +0000 (15:36 +0000)]
Fix a typo in the XML documentation of the AUDIOHOOK_INHERIT dialplan function.

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

11 years agoMerged revisions 166772 via svnmerge from
Russell Bryant [Sun, 28 Dec 2008 15:15:14 +0000 (15:15 +0000)]
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/trunk@166773 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoThere is no section 22.2.2 in rfc 3261. I believe 26.2.2 is what was meant:
Terry Wilson [Wed, 24 Dec 2008 15:10:42 +0000 (15:10 +0000)]
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/trunk@166731 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAllow semicolons and extended characters in user-specified SIP headers.
Tilghman Lesher [Tue, 23 Dec 2008 20:47:08 +0000 (20:47 +0000)]
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/trunk@166696 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 166093 via svnmerge from
Steve Murphy [Tue, 23 Dec 2008 18:13:49 +0000 (18:13 +0000)]
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/trunk@166665 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix spelling error.
Russell Bryant [Tue, 23 Dec 2008 16:04:54 +0000 (16:04 +0000)]
Fix spelling error.

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

11 years agoBlocked revisions 166592 via svnmerge
Tilghman Lesher [Tue, 23 Dec 2008 15:41:42 +0000 (15:41 +0000)]
Blocked revisions 166592 via svnmerge

........
  r166592 | tilghman | 2008-12-23 09:35:38 -0600 (Tue, 23 Dec 2008) | 3 lines

  Compile, even if both DAHDI and Zaptel are not installed.
  (Closes issue #14120)
........

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

11 years agoMerged revisions 166568 via svnmerge from
Mark Michelson [Tue, 23 Dec 2008 15:17:54 +0000 (15:17 +0000)]
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/trunk@166569 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 166509 via svnmerge from
Tilghman Lesher [Tue, 23 Dec 2008 04:32:15 +0000 (04:32 +0000)]
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/trunk@166533 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAlways use the value of the AGISIGHUP when running an AGI.
Mark Michelson [Mon, 22 Dec 2008 23:25:34 +0000 (23:25 +0000)]
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/trunk@166470 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoCosmetic change - don't mix struct initializer styles.
Russell Bryant [Mon, 22 Dec 2008 21:45:28 +0000 (21:45 +0000)]
Cosmetic change - don't mix struct initializer styles.

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

11 years agoMerged revisions 166380 via svnmerge from
Mark Michelson [Mon, 22 Dec 2008 21:08:03 +0000 (21:08 +0000)]
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/trunk@166382 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix a bad typo.
Russell Bryant [Mon, 22 Dec 2008 20:26:48 +0000 (20:26 +0000)]
Fix a bad typo.

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

11 years agoRemove some error messages. This is the default handler that is valid to use.
Russell Bryant [Mon, 22 Dec 2008 17:44:23 +0000 (17:44 +0000)]
Remove some error messages.  This is the default handler that is valid to use.

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

11 years agoMerged revisions 166297 via svnmerge from
Russell Bryant [Mon, 22 Dec 2008 17:29:10 +0000 (17:29 +0000)]
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/trunk@166317 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoIntroduce ast_careful_fwrite() and use in AMI to prevent partial writes.
Russell Bryant [Mon, 22 Dec 2008 17:09:36 +0000 (17:09 +0000)]
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/trunk@166282 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRe-work ref count handling of MoH classes using astobj2 to resolve crashes.
Russell Bryant [Mon, 22 Dec 2008 16:10:40 +0000 (16:10 +0000)]
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/trunk@166273 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRecord the previous port in the temporary address structure so that the comparison...
Joshua Colp [Mon, 22 Dec 2008 16:08:13 +0000 (16:08 +0000)]
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/trunk@166268 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix a file playback crash and explicitly initialize values in func_timeout.c
Mark Michelson [Mon, 22 Dec 2008 16:07:59 +0000 (16:07 +0000)]
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/trunk@166267 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBlocked revisions 166262 via svnmerge
Russell Bryant [Mon, 22 Dec 2008 14:52:35 +0000 (14:52 +0000)]
Blocked revisions 166262 via svnmerge

........
r166262 | russell | 2008-12-22 08:45:27 -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/trunk@166263 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove AST_PBX_KEEPALIVE usage from res_agi.
Russell Bryant [Mon, 22 Dec 2008 14:16:54 +0000 (14:16 +0000)]
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/trunk@166258 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMake a note about formatting the review URL in commit messages
Russell Bryant [Sat, 20 Dec 2008 01:37:23 +0000 (01:37 +0000)]
Make a note about formatting the review URL in commit messages

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

11 years agoGet rid of an extra space.
Mark Michelson [Fri, 19 Dec 2008 23:45:00 +0000 (23:45 +0000)]
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/trunk@166162 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBlocked revisions 166157 via svnmerge
Mark Michelson [Fri, 19 Dec 2008 23:36:22 +0000 (23:36 +0000)]
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/trunk@166158 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove the verbatim tag from the author line
Mark Michelson [Fri, 19 Dec 2008 22:40:57 +0000 (22:40 +0000)]
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/trunk@166095 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdding a new dialplan function AUDIOHOOK_INHERIT
Mark Michelson [Fri, 19 Dec 2008 22:26:16 +0000 (22:26 +0000)]
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/

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

11 years agoAdd configuration support for half_full DAHDI buffer policy
Matthew Fredrickson [Fri, 19 Dec 2008 21:44:18 +0000 (21:44 +0000)]
Add configuration support for half_full DAHDI buffer policy

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

11 years agoBlocked revisions 165991 via svnmerge
Jeff Peeler [Fri, 19 Dec 2008 19:49:25 +0000 (19:49 +0000)]
Blocked revisions 165991 via svnmerge

........
r165991 | jpeeler | 2008-12-19 13:48:00 -0600 (Fri, 19 Dec 2008) | 15 lines

(closes issue #13480)
Reported by: tzafrir

Replace a bunch of if defined checks for Zaptel/DAHDI through several new defines in dahdi_compat.h. This removes a lot of code duplication. Example from bug:

#ifdef HAVE_ZAPTEL
  fd = open("/dev/zap/pseudo", O_RDWR);
#else
  fd = open("/dev/dahdi/pseudo", O_RDWR);
#endif

is replaced with:
  fd = open(DAHDI_FILE_PSEUDO, O_RDRW);

........

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

11 years agoFix the XML documentation for Record().
Eliel C. Sardanons [Fri, 19 Dec 2008 18:20:46 +0000 (18:20 +0000)]
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/trunk@165954 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMerged revisions 165889 via svnmerge from
Russell Bryant [Fri, 19 Dec 2008 15:05:09 +0000 (15:05 +0000)]
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/trunk@165890 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoDisable some automatic links generated by doxygen.
Russell Bryant [Fri, 19 Dec 2008 14:48:35 +0000 (14:48 +0000)]
Disable some automatic links generated by doxygen.

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

11 years agoIntroduce commit message formatting guidelines.
Russell Bryant [Fri, 19 Dec 2008 14:42:51 +0000 (14:42 +0000)]
Introduce commit message formatting guidelines.

This documents the recommended outline to use for commit message.  It also
covers information on special tags that can be used in commit messages, as well
as the template functionality that is available on bugs.digium.com.

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

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

11 years agoMerged revisions 165796 via svnmerge from
Russell Bryant [Thu, 18 Dec 2008 21:44:47 +0000 (21:44 +0000)]
Merged revisions 165796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165796 | russell | 2008-12-18 15:39:25 -0600 (Thu, 18 Dec 2008) | 11 lines

Make ast_carefulwrite() be more careful.

This patch handles some additional cases that could result in partial writes
to the file description.  This was done to address complaints about partial
writes on AMI.

(issue #13546) (more changes needed to address potential problems in 1.6)
Reported by: srt
Tested by: russell
Review: http://reviewboard.digium.com/r/99/

........

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

11 years ago(closes issue #13993)
Jeff Peeler [Thu, 18 Dec 2008 21:43:17 +0000 (21:43 +0000)]
(closes issue #13993)
Reported by: mika

Add ActionID response to ping if sent with request.

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

11 years agoMerged revisions 165767 via svnmerge from
Tilghman Lesher [Thu, 18 Dec 2008 21:41:02 +0000 (21:41 +0000)]
Merged revisions 165767 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r165767 | tilghman | 2008-12-18 15:14:47 -0600 (Thu, 18 Dec 2008) | 8 lines

  Add mutexes around accesses to the IMAP library interface.  This prevents
  certain crashes, especially when shared mailboxes are used.
  (closes issue #13653)
   Reported by: howardwilkinson
   Patches:
         asterisk-1.4.21.2-appvoicemail-sharedimap-lock.patch uploaded by howardwilkinson (license 590)
   Tested by: jpeeler
........

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

11 years agoNumerous documentation updates.
Joshua Colp [Thu, 18 Dec 2008 21:21:44 +0000 (21:21 +0000)]
Numerous documentation updates.
(closes issue #13970)
Reported by: pkempgen
Patches:
      __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)

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

11 years agoFix crashes in res_odbc.
Mark Michelson [Thu, 18 Dec 2008 19:34:33 +0000 (19:34 +0000)]
Fix crashes in res_odbc.

The variable "class" was being set NULL just prior to
being dereferenced in an ao2_link call. I have moved
the setting of the variable to NULL until after the
ao2_link call.

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

11 years agoRemove the need for AST_PBX_KEEPALIVE with the GoSub option from Dial.
Russell Bryant [Thu, 18 Dec 2008 19:33:42 +0000 (19:33 +0000)]
Remove the need for AST_PBX_KEEPALIVE with the GoSub option from Dial.

This is part of an effort to completely remove AST_PBX_KEEPALIVE and other
similar return codes from the source.  While this usage was perfectly safe,
there are others that are problematic.  Since we know ahead of time that
we do not want to PBX to destroy the channel, the PBX API has been changed
so that information can be provided as an argument, instead, thus removing
the need for the KEEPALIVE return value.

Further changes to get rid of KEEPALIVE and related code is being done by
murf.  There is a patch up for that on review 29.

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

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

11 years agoMerged revisions 165661 via svnmerge from
Russell Bryant [Thu, 18 Dec 2008 18:54:47 +0000 (18:54 +0000)]
Merged revisions 165661 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165661 | russell | 2008-12-18 12:52:18 -0600 (Thu, 18 Dec 2008) | 7 lines

Set the process group ID on the MOH process so that all children will get killed

(closes issue #14099)
Reported by: caspy
Patches:
      res_musiconhold.c.patch.killpg.try2 uploaded by caspy (license 645)

........

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

11 years agoFix 2 resource leaks and fix another pipe-to-comma conversion
Tilghman Lesher [Thu, 18 Dec 2008 18:36:48 +0000 (18:36 +0000)]
Fix 2 resource leaks and fix another pipe-to-comma conversion

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

11 years agoMerged revisions 165591 via svnmerge from
Joshua Colp [Thu, 18 Dec 2008 17:13:32 +0000 (17:13 +0000)]
Merged revisions 165591 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r165591 | file | 2008-12-18 13:11:42 -0400 (Thu, 18 Dec 2008) | 4 lines

  Only care about a compatible codec for early bridging if we are actually bridging to another channel. If we are not we actually want to bring the audio back to us.
  (closes issue #13545)
  Reported by: davidw
........

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

11 years agoFix reference counts of the class and add an assertion to the end.
Tilghman Lesher [Thu, 18 Dec 2008 16:36:48 +0000 (16:36 +0000)]
Fix reference counts of the class and add an assertion to the end.

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

11 years agoBlocked revisions 165537 via svnmerge
Joshua Colp [Thu, 18 Dec 2008 16:11:08 +0000 (16:11 +0000)]
Blocked revisions 165537 via svnmerge

........
  r165537 | file | 2008-12-18 12:07:37 -0400 (Thu, 18 Dec 2008) | 6 lines

  Do not crash if we are not passed in a followme id.
  (closes issue #14106)
  Reported by: ys
  Patches:
        app_followme.c.2.diff uploaded by ys (license 281)
........

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

11 years agoRemove duplicate code from the ast_str API. We now use __AST_STR_* to
Eliel C. Sardanons [Thu, 18 Dec 2008 15:25:15 +0000 (15:25 +0000)]
Remove duplicate code from the ast_str API. We now use __AST_STR_* to
access 'struct ast_str' members, but this must only be used inside the API implementation.

(closes issue #14098)
Reported by: eliel
Patches:
      ast_str.patch uploaded by eliel (license 64)

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

11 years agoAdd a \todo note for app_originate.
Russell Bryant [Thu, 18 Dec 2008 14:23:22 +0000 (14:23 +0000)]
Add a \todo note for app_originate.

Jared Smith suggested that we add a way to be able to set variables
and functions on the outbound channel.  I think that it's a great idea, so I
have added it as a todo so that it gets done at some point.

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

11 years agoAdd a new application, Originate.
Russell Bryant [Thu, 18 Dec 2008 13:33:34 +0000 (13:33 +0000)]
Add a new application, Originate.

(closes issue #14075)
Reported by: rcasas
Patches:
      app_originate.c uploaded by rcasas (license 641), heavily modified by me
Tested by: russell
Review: http://reviewboard.digium.com/r/95/

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

11 years agoAdd RECORD_STATUS variable, as requested on the -users list.
Tilghman Lesher [Wed, 17 Dec 2008 23:39:48 +0000 (23:39 +0000)]
Add RECORD_STATUS variable, as requested on the -users list.
Patch by me (license 14)

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

11 years agoFix a refcount leak in res_odbc
Mark Michelson [Wed, 17 Dec 2008 21:46:19 +0000 (21:46 +0000)]
Fix a refcount leak in res_odbc

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

11 years agoFix the build
Mark Michelson [Wed, 17 Dec 2008 21:29:30 +0000 (21:29 +0000)]
Fix the build

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

11 years agoOops, broke trunk
Tilghman Lesher [Wed, 17 Dec 2008 21:28:51 +0000 (21:28 +0000)]
Oops, broke trunk

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

11 years agoMerged revisions 165317 via svnmerge from
Tilghman Lesher [Wed, 17 Dec 2008 21:18:57 +0000 (21:18 +0000)]
Merged revisions 165317 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r165317 | tilghman | 2008-12-17 15:14:37 -0600 (Wed, 17 Dec 2008) | 4 lines

  Reverse the fix from issue #6176 and add proper handling for that issue.
  (Closes issue #13962, closes issue #13363)
  Fixed by myself (license 14)
........

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

11 years agoMerged revisions 165255 via svnmerge from
Mark Michelson [Wed, 17 Dec 2008 21:17:20 +0000 (21:17 +0000)]
Merged revisions 165255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines

Fix some memory leaks found while looking at how realtime
configs are handled.

Also cleaned up some coding guidelines violations in app_realtime.c,
mostly related to spacing

........

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

11 years agoThis patch is here committed to satisfy the
Steve Murphy [Wed, 17 Dec 2008 20:50:19 +0000 (20:50 +0000)]
This patch is here committed to satisfy the
buildbot, who has a problem with the const.

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

11 years agoPolycom phones close the connection after reading a little bit of the firmware files...
Terry Wilson [Wed, 17 Dec 2008 19:55:10 +0000 (19:55 +0000)]
Polycom phones close the connection after reading a little bit of the firmware files, we should stop sending in that case. Also, make that case print out a debug statement instead of a scary WARNING.

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

11 years agoCall proxy_update so that the IP address gets populated. Sending stuff to 0.0.0.0...
Joshua Colp [Wed, 17 Dec 2008 19:52:40 +0000 (19:52 +0000)]
Call proxy_update so that the IP address gets populated. Sending stuff to 0.0.0.0 is silly!
(closes issue #14055)
Reported by: chris-mac

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

11 years agoThis patch adds a new 'ignoresdpversion' option to sip.conf. When this is
Matthew Nicholson [Wed, 17 Dec 2008 18:49:12 +0000 (18:49 +0000)]
This patch adds a new 'ignoresdpversion' option to sip.conf.  When this is
enabled (either globally or for a specific peer), chan_sip will treat any SDP
data it receives as new data and update the media stream accordingly.  By
default, Asterisk will only modify the media stream if the SDP session version
received is different from the current SDP session version.  This option is
required to interoperate with devices that have non-standard SDP session
version implementations (observed by toc on the bug tracker with Microsoft OCS
which always uses 0 as the session version).

http://reviewboard.digium.com/r/94/
(closes issue #13958)
Reported by: toc
Tested by: toc

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

11 years agoargsep is used as an attribute for an argument, as well
Russell Bryant [Wed, 17 Dec 2008 17:56:25 +0000 (17:56 +0000)]
argsep is used as an attribute for an argument, as well

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

11 years agoAnd actually assign the function to a pointer...
Mark Michelson [Wed, 17 Dec 2008 17:53:37 +0000 (17:53 +0000)]
And actually assign the function to a pointer...

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

11 years agoUse the create_vm_state_from_user function in a place where
Mark Michelson [Wed, 17 Dec 2008 17:52:50 +0000 (17:52 +0000)]
Use the create_vm_state_from_user function in a place where
it was not being used before. Also, I've moved the urgent
folder check in messagecount() up a bit so that the flow is
a bit better.

This was something I noticed while taking a look at issue
#13973, although I don't think this is the underlying cause
of the issue.

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

11 years agoignore this copied file
Kevin P. Fleming [Wed, 17 Dec 2008 16:41:18 +0000 (16:41 +0000)]
ignore this copied file

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

11 years agoA possibly "horrible fix" for a "horribly broken"
Steve Murphy [Wed, 17 Dec 2008 05:04:56 +0000 (05:04 +0000)]
A possibly "horrible fix" for a "horribly broken"
situation.

As stuff shifts around in the asterisk code, the
miscellaneous inclusions from the standalone stuff
gets broken. There's no easy fix for this situation.

I made sure that everything in utils builds without
problem ***AND*** that aelparse runs the regressions
correctly with the following make menuselect options
both on and off:

DONT_OPTIMIZE
DEBUG_THREADS
DEBUG_CHANNEL_LOCKS
MALLOC_DEBUG
MTX_PROFILE
DEBUG_SCHEDULER
DEBUG_THREADLOCALS
DETECT_DEADLOCKS
CHANNEL_TRACE

I think from now on, I'm going to #undef
all these features in the various utils native
files; I guess I could do the same for the
copied-in files, surrounded by STANDALONE ifdef.

A standalone isn't going to care about threads,
mutexes, etc.

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

11 years agofixed the regressions
Steve Murphy [Wed, 17 Dec 2008 02:32:58 +0000 (02:32 +0000)]
fixed the regressions

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

11 years agoMerged revisions 164977 via svnmerge from
Mark Michelson [Tue, 16 Dec 2008 23:06:04 +0000 (23:06 +0000)]
Merged revisions 164977 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164977 | mmichelson | 2008-12-16 17:04:27 -0600 (Tue, 16 Dec 2008) | 7 lines

After looking through SIP registration code most of the day, this
is one of the few things I could find that was just plain wrong.
Even though it probably isn't possible for it to happen, it seems weird
to have code that checks if a pointer is NULL and then immediately dereferences
that pointer if it was NULL.

........

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

11 years agoAdd timezone to the possible fields in a timespec.
Tilghman Lesher [Tue, 16 Dec 2008 22:57:17 +0000 (22:57 +0000)]
Add timezone to the possible fields in a timespec.
(closes issue #14028)
 Reported by: mostyn
 Patches:
       timezone-v2.patch uploaded by mostyn (license 398)
       (with additional code guideline fixes and a memory leak fix by me - license 14)

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

11 years ago(closes issue #13669)
Jeff Peeler [Tue, 16 Dec 2008 22:45:39 +0000 (22:45 +0000)]
(closes issue #13669)
Reported by: pj

Delete file recording if recording terminated from a hangup.

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

11 years agoMake a note of the feature request in bug #11157 as per the reporter and oej, and...
Terry Wilson [Tue, 16 Dec 2008 22:31:47 +0000 (22:31 +0000)]
Make a note of the feature request in bug #11157 as per the reporter and oej, and suspend the bug since no one seems to be keen on implementing it any time soon.

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

11 years agoMerged revisions 164881 via svnmerge from
Russell Bryant [Tue, 16 Dec 2008 21:39:15 +0000 (21:39 +0000)]
Merged revisions 164881 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164881 | russell | 2008-12-16 15:38:29 -0600 (Tue, 16 Dec 2008) | 9 lines

Fix an issue where DEBUG_THREADS may erroneously report that a thread
is exiting while holding a lock.

If the last lock attempt was a trylock, and it failed, it will still be in the
list of locks so that it can be reported.

(closes issue #13219)
Reported by: pj

........

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

11 years agoMerged revisions 164876 via svnmerge from
Russell Bryant [Tue, 16 Dec 2008 21:12:49 +0000 (21:12 +0000)]
Merged revisions 164876 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164876 | russell | 2008-12-16 15:10:44 -0600 (Tue, 16 Dec 2008) | 6 lines

Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.

This is a bug I noticed while looking at the code for app_macro.  This return code
means that another thread has assumed ownership of the channel and it can no longer
be touched.  (I hate this return code with a passion, by the way.)

........

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