asterisk/asterisk.git
13 years agoFix a bug where receiving a control frame of subclass -1 would cause certain channels...
Joshua Colp [Sun, 10 May 2009 17:07:46 +0000 (17:07 +0000)]
Fix a bug where receiving a control frame of subclass -1 would cause certain channels to get hung up.

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

13 years agoMinor documentation update for ast_event_queue().
Russell Bryant [Sat, 9 May 2009 11:33:09 +0000 (11:33 +0000)]
Minor documentation update for ast_event_queue().

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

13 years agoDeclare private data as static.
Russell Bryant [Sat, 9 May 2009 11:30:15 +0000 (11:30 +0000)]
Declare private data as static.

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

13 years agoTCP not matching valid peer.
David Vossel [Fri, 8 May 2009 20:32:51 +0000 (20:32 +0000)]
TCP not matching valid peer.

find_peer() does not find a valid peer when using pvt->recv as the sockaddr_in argument.  Because of the way TCP works, the port number in pvt->recv is not what we're looking for at all.  There is currently only one place that find_peer searches for a peer using the sockaddr_in argument.  If the peer is not found after using pvt->recv (works for UDP since the port number will be correct), a temp sockaddr_in struct is made using the Contact header in the sip_request.  This has the correct port number in it.

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

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

13 years agoReset the members' call counts when resetting queue statistics.
Mark Michelson [Fri, 8 May 2009 19:50:44 +0000 (19:50 +0000)]
Reset the members' call counts when resetting queue statistics.

This helps to prevent odd scenarios where a queue will claim to have
taken 0 calls, but the members appear to have taken a non-zero amount.

(closes issue #15068)
Reported by: sum
Patches:
      patchreset.patch uploaded by sum (license 766)
Tested by: sum

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

13 years agoFix the spelling of UNAVAILABLE in func_devstate CLI completion.
Sean Bright [Fri, 8 May 2009 15:18:40 +0000 (15:18 +0000)]
Fix the spelling of UNAVAILABLE in func_devstate CLI completion.

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

13 years agoMerged revisions 193262 via svnmerge from
David Vossel [Fri, 8 May 2009 14:52:19 +0000 (14:52 +0000)]
Merged revisions 193262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines

  "misdn show config" segfaults asterisk, if no MSN lists

  (closes issue #14976)
  Reported by: alecdavis
  Patches:
        misdn_config.diff.txt uploaded by alecdavis (license 585)
  Tested by: alecdavis, FabienToune
........

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

13 years agoMerged revisions 193193 via svnmerge from
Kevin P. Fleming [Fri, 8 May 2009 14:06:15 +0000 (14:06 +0000)]
Merged revisions 193193 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193193 | kpfleming | 2009-05-08 09:03:28 -0500 (Fri, 08 May 2009) | 7 lines

  Make absolute paths for logger channels work properly

  (Note: This is not a new feature, it was previously undocumented and broken.)

  The Asterisk logger has a feature to support absolute pathnames for logger channels, but the code implementing the feature was broken. This has been fixed, and the absolute path feature is now documented in the sample logger.conf.
........

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

13 years agoMerged revisions 193119 via svnmerge from
Tilghman Lesher [Thu, 7 May 2009 23:42:28 +0000 (23:42 +0000)]
Merged revisions 193119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193119 | tilghman | 2009-05-07 18:41:11 -0500 (Thu, 07 May 2009) | 19 lines

  Fix Background within a Macro for FreePBX.
  If the single digit DTMF is an extension in the specified context, then
  go there and signal no DTMF.  Otherwise, we should exit with that DTMF.
  If we're in Macro, we'll exit and seek that DTMF as the beginning of an
  extension in the Macro's calling context.  If we're not in Macro, then
  we'll simply seek that extension in the calling context.  Previously,
  someone complained about the behavior as it related to the interior of a
  Gosub routine, and the fix (#14011) inadvertently broke FreePBX
  (#14940).  This change should fix both of these situations, but with the
  possible incompatibility that if a single digit extension does not exist
  (but a longer extension COULD have matched), it would have previously
  gone immediately to the "i" extension, but will now need to wait for a
  timeout.
  (closes issue #14940)
   Reported by: p_lindheimer
   Patches:
         20090420__bug14940.diff.txt uploaded by tilghman (license 14)
   Tested by: p_lindheimer
........

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

13 years agoMerged revisions 193050 via svnmerge from
Richard Mudgett [Thu, 7 May 2009 22:24:04 +0000 (22:24 +0000)]
Merged revisions 193050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193050 | rmudgett | 2009-05-07 17:17:06 -0500 (Thu, 07 May 2009) | 5 lines

  Give a more helpful message when an incoming call's dialed extension does not match.

  Added the dialed extension and context to the chan_misdn messages warning
  that the dialed number cannot be matched in the dialplan.
........

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

13 years agoSecond result should not contain data from the first result.
Tilghman Lesher [Thu, 7 May 2009 17:51:13 +0000 (17:51 +0000)]
Second result should not contain data from the first result.
(closes issue #15039)
 Reported by: jims
 Patches:
       20090506__issue15039.diff.txt uploaded by tilghman (license 14)
 Tested by: jims

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

13 years agoSend DTMF frame before playing back audio.
Tilghman Lesher [Thu, 7 May 2009 17:13:36 +0000 (17:13 +0000)]
Send DTMF frame before playing back audio.
(closes issue #14858)
 Reported by: barryf
 Patches:
       20090507__bug14858.diff.txt uploaded by tilghman (license 14)

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

13 years agoMerged revisions 192932 via svnmerge from
Tilghman Lesher [Thu, 7 May 2009 16:43:56 +0000 (16:43 +0000)]
Merged revisions 192932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192932 | tilghman | 2009-05-07 11:29:08 -0500 (Thu, 07 May 2009) | 10 lines

  Eliminate repetition of fullcontact during reconstruction.
  If the fullcontact field appears in both the sippeers and the
  sipregs table, then during reconstruction of the field, it will
  otherwise be doubled.
  (closes issue #14754)
   Reported by: Alexei Gradinari
   Patches:
         20090506__bug14754.diff.txt uploaded by tilghman (license 14)
   Tested by: lmadsen
........

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

13 years agoMerged revisions 192858 via svnmerge from
Jeff Peeler [Wed, 6 May 2009 22:17:27 +0000 (22:17 +0000)]
Merged revisions 192858 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192858 | jpeeler | 2009-05-06 17:15:19 -0500 (Wed, 06 May 2009) | 10 lines

  Make ParkedCall application stop execution of the dialplan after hang up

  Just changed park_exec to always return non-zero. I really wasn't entirely sure
  at first if this was a bug. Decided it was since it would be surprising when
  not using ParkedCall in the dialplan to hang up and have dialplan execution
  continue.

  (closes issue #14555)
  Reported by: francesco_r
........

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

13 years agoIf no extension was found in the pattern tree, don't crash.
Jeff Peeler [Wed, 6 May 2009 22:02:46 +0000 (22:02 +0000)]
If no extension was found in the pattern tree, don't crash.

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

13 years agoFix a bug where a timer would be created but not acknowledged.
Joshua Colp [Wed, 6 May 2009 17:38:51 +0000 (17:38 +0000)]
Fix a bug where a timer would be created but not acknowledged.

This scenario crept up if chan_iax2 was loaded with no configuration file present.
It would create a timer and tell it to go at an interval but the thread that normally
acknowledges it would not be created because no configuration file was present. The timer
will now be closed if no configuration file is present.

(closes issue #15014)
Reported by: madkins

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

13 years agoAdd numbers in Urdu, the national language of Pakistan
Tilghman Lesher [Wed, 6 May 2009 16:28:02 +0000 (16:28 +0000)]
Add numbers in Urdu, the national language of Pakistan
(closes issue #15034)
 Reported by: nasirq
 Patches:
       ast_say_number_full_ur-patch.c uploaded by nasirq (license 772)
       urdu.ods uploaded by nasirq (license 772)

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

13 years agoMake the code that prevents an infinite loop from happening into a case insensitive...
Joshua Colp [Wed, 6 May 2009 16:09:27 +0000 (16:09 +0000)]
Make the code that prevents an infinite loop from happening into a case insensitive check.

(thanks eliel)

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

13 years agoFix an infinite loop with tab completion of CLI aliases that reference themselves.
Joshua Colp [Wed, 6 May 2009 14:35:47 +0000 (14:35 +0000)]
Fix an infinite loop with tab completion of CLI aliases that reference themselves.

(closes issue #15020)
Reported by: junky

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

13 years agoMerged revisions 192633 via svnmerge from
Joshua Colp [Wed, 6 May 2009 13:34:35 +0000 (13:34 +0000)]
Merged revisions 192633 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192633 | file | 2009-05-06 10:30:51 -0300 (Wed, 06 May 2009) | 7 lines

  Update some old logic to stop both begin and end DTMF frames from reaching the core if rfc2833 is not enabled.

  (closes issue #15036)
  Reported by: dimas
  Patches:
        v1-15036.patch uploaded by dimas (license 88)
........

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

13 years agoFixed crashes from issue8824 review board channel locking changes.
Richard Mudgett [Tue, 5 May 2009 20:54:07 +0000 (20:54 +0000)]
Fixed crashes from issue8824 review board channel locking changes.

The local struct ast_party_connected_line connected_caller variable
was uninitialized when the copy function was called.

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

13 years agoMerged revisions 192524 via svnmerge from
Sean Bright [Tue, 5 May 2009 19:57:49 +0000 (19:57 +0000)]
Merged revisions 192524 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192524 | seanbright | 2009-05-05 15:56:11 -0400 (Tue, 05 May 2009) | 11 lines

  Fix Javascript error when using astman.js in Internet Explorer.

  Internet Explorer (tested with 7.0) does not like trailing commas on constructs
  like object initializers, so get rid of them to avoid some errors.

  (closes issue #15026)
  Reported by: rajnishgiri
  Patches:
        bug15026.patch uploaded by seanbright (license 71)
  Tested by: seanbright
........

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

13 years agoMerged revisions 192454 via svnmerge from
Joshua Colp [Tue, 5 May 2009 18:23:58 +0000 (18:23 +0000)]
Merged revisions 192454 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192454 | file | 2009-05-05 15:22:27 -0300 (Tue, 05 May 2009) | 8 lines

  Fix an incorrect assumption that certain values on the channel will always exist when they may not.

  The CDR code involved with bridges wrongly assumed that the currently executing application and data
  values will always exist. It is possible for this to be false when call forwarding is involved.

  (closes issue #14984)
  Reported by: gincantalupo
........

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

13 years agoMerged revisions 192429 via svnmerge from
Joshua Colp [Tue, 5 May 2009 17:46:51 +0000 (17:46 +0000)]
Merged revisions 192429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192429 | file | 2009-05-05 14:43:30 -0300 (Tue, 05 May 2009) | 5 lines

  Fix a bug where the followme application would continue trying numbers after the caller hung up.

  (closes issue #13624)
  Reported by: sgenyuk
........

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

13 years agoRevert CPC patch for now, until I decide whether or not it all should be merged into...
Matthew Fredrickson [Tue, 5 May 2009 17:33:42 +0000 (17:33 +0000)]
Revert CPC patch for now, until I decide whether or not it all should be merged into libss7/1.0 (It's still in the bug13495 branch and in libss7/trunk)

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

13 years agoFix a bug with setting t38pt_udptl at the user or peer level.
Joshua Colp [Tue, 5 May 2009 14:22:47 +0000 (14:22 +0000)]
Fix a bug with setting t38pt_udptl at the user or peer level.

If an incoming call authenticated as a user or peer and t38pt_udptl was
not set to yes in general then no UDPTL session would be present and any
T38 related things would fail. This commit changes it so that if after
authenticating T38 is enabled but no UDPTL session is present one will be
created.

(issue AST-215)

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

13 years agoAdd a more efficient way of allocating structures that use stringfields
Kevin P. Fleming [Tue, 5 May 2009 14:17:18 +0000 (14:17 +0000)]
Add a more efficient way of allocating structures that use stringfields

This commit adds an API call that can be used to allocate a structure along with this stringfield storage in a single allocation.

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

13 years agoCorrect some flaws in the memory accounting code for stringfields and ao2 objects
Kevin P. Fleming [Tue, 5 May 2009 13:18:21 +0000 (13:18 +0000)]
Correct some flaws in the memory accounting code for stringfields and ao2 objects

Under some conditions, the memory allocation for stringfields and ao2 objects would not have supplied valid file/function names for MALLOC_DEBUG tracking, so this commit corrects that.

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

13 years agoProperly account for memory allocated for channels and datastores
Kevin P. Fleming [Tue, 5 May 2009 10:34:19 +0000 (10:34 +0000)]
Properly account for memory allocated for channels and datastores

As in previous commits, when channels are allocated (with ast_channel_alloc) or datastores are allocated (with ast_datastore_alloc) properly account for the memory being owned by the caller, instead of the allocator function itself.

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

13 years agoEnsure that string pools allocated to hold stringfields are properly accounted in...
Kevin P. Fleming [Tue, 5 May 2009 08:51:06 +0000 (08:51 +0000)]
Ensure that string pools allocated to hold stringfields are properly accounted in MALLOC_DEBUG mode

This commit modifies the stringfield pool allocator to remember the 'owner' of the stringfield manager the pool is being allocated for, and ensures that pools allocated in the future when fields are populated are owned by that file/function.

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

13 years agoMerged revisions 192213 via svnmerge from
David Vossel [Mon, 4 May 2009 22:44:51 +0000 (22:44 +0000)]
Merged revisions 192213 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192213 | dvossel | 2009-05-04 17:37:31 -0500 (Mon, 04 May 2009) | 11 lines

  global mohinterpret setting is ignored

  mohinterpret and mohsuggest global variables were not copied over during build_users and build_peers.

  (closes issue #14728)
  Reported by: dimas
  Patches:
        v1-14728.patch uploaded by dimas (license 88)
  Tested by: dimas, dvossel
........

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

13 years agoRestore 'asyncagi break' command to 1.6.1 and higher.
Tilghman Lesher [Mon, 4 May 2009 19:29:13 +0000 (19:29 +0000)]
Restore 'asyncagi break' command to 1.6.1 and higher.
(closes issue #14985)
 Reported by: nikkk
 Patches:
       20090428__bug14985.diff.txt uploaded by tilghman (license 14)
       20090429__bug14985__1.6.1.diff.txt uploaded by tilghman (license 14)
 Tested by: nikkk

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

13 years agoPass libraries in LIBS, not LDFLAGS.
Tilghman Lesher [Mon, 4 May 2009 18:42:56 +0000 (18:42 +0000)]
Pass libraries in LIBS, not LDFLAGS.
(closes issue #14671)
 Reported by: Chainsaw
 Patches:
       asterisk-1.6.0.6-toolcheck-libs-not-ldflags.patch uploaded by Chainsaw (license 723)

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

13 years agoCommit documentation changes related to issue #14801.
Leif Madsen [Mon, 4 May 2009 17:42:56 +0000 (17:42 +0000)]
Commit documentation changes related to issue #14801.

(issue #14801)

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

13 years agoEnsure that astobj2 memory allocations are properly accounted for when MALLOC_DEBUG...
Kevin P. Fleming [Mon, 4 May 2009 16:24:16 +0000 (16:24 +0000)]
Ensure that astobj2 memory allocations are properly accounted for when MALLOC_DEBUG is used

This commit ensures that all astobj2 allocated objects are properly accounted for in MALLOC_DEBUG mode by passing down the file/function/line information from the module/function that actually called the astobj2 allocation function.

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

13 years agoDo not re-define _POSIX_C_SOURCE if it was already defined.
Eliel C. Sardanons [Mon, 4 May 2009 15:35:35 +0000 (15:35 +0000)]
Do not re-define _POSIX_C_SOURCE if it was already defined.

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

13 years agoMinor changes in test modules
Kevin P. Fleming [Mon, 4 May 2009 12:52:44 +0000 (12:52 +0000)]
Minor changes in test modules

Correct command description in test_sched.c and include asterisk/cli.h in test_skel.c, since it's highly unlikely that a test module will *not* want to provide CLI commands to execute the tests

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

13 years agoEnsure that by default only one console channel driver is loaded
Kevin P. Fleming [Mon, 4 May 2009 09:57:36 +0000 (09:57 +0000)]
Ensure that by default only one console channel driver is loaded

This configuration file was changed to ensure that only one console channel driver
(chan_oss) is loaded by default, but the change would only work if chan_console
was not built. Now it will work as expected; if chan_alsa or chan_console are built
and installed, they will not be loaded unless explicity requested.

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

13 years agoAdd 'bitflags'-style information elements to event framework
Kevin P. Fleming [Sun, 3 May 2009 14:28:59 +0000 (14:28 +0000)]
Add 'bitflags'-style information elements to event framework

This patch add a new payload type for information elements, a set
of bit flags. The payload is transported as a 32-bit unsigned integer
but when matching is performed between events and subscribers,
the matching is done by using a bitwise AND instead of numeric value
comparison.

Review: http://reviewboard.asterisk.org/r/242/

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

13 years agoRemove unnecessary compiler flag
Russell Bryant [Sun, 3 May 2009 14:05:10 +0000 (14:05 +0000)]
Remove unnecessary compiler flag

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

13 years agoDo a bit of code cleanup.
Russell Bryant [Sat, 2 May 2009 21:15:18 +0000 (21:15 +0000)]
Do a bit of code cleanup.

 - convert handling of IE PLTYPEs to switch statements
 - add braces to various small blocks
 - remove a bit of trailing whitespace
 - remove a couple of unnecessary ast_strdupa() uses

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

13 years agoRemove rarely-used event_log/LOG_EVENT support
Kevin P. Fleming [Sat, 2 May 2009 19:02:22 +0000 (19:02 +0000)]
Remove rarely-used event_log/LOG_EVENT support

In discussions today at the Europe Asterisk Developer Meet-Up, we determined that
the event_log was used in only 9 places in the entire tree, and really was not needed
at all. The users have been converted to use LOG_NOTICE, or the messages have been
removed since other messages were already in place that provided the same information.

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

13 years agoBlocked revisions 191778 via svnmerge
Mark Michelson [Sat, 2 May 2009 18:54:52 +0000 (18:54 +0000)]
Blocked revisions 191778 via svnmerge

........
  r191778 | mmichelson | 2009-05-02 13:48:20 -0500 (Sat, 02 May 2009) | 11 lines

  Fix a bug which resulted from the Hebrew voicemail commit.

  This fixes a case where a certain message could get played twice.

  (closes issue #13155)
  Reported by: greenfieldtech
  Patches:
        app_voicemail.c.multi-lang-patch uploaded by greenfieldtech (license 369)
  Tested by: greenfieldtech
........

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

13 years agoFix an error in queue_log file rotation optimization code
Kevin P. Fleming [Sat, 2 May 2009 18:39:48 +0000 (18:39 +0000)]
Fix an error in queue_log file rotation optimization code

This code was copy-and-pasted without properly changing references to event_rotate into queue_rotate, so under some conditions the log rotation would rotate queue_log even though it was not necessary.

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

13 years agoConditional include ioctl's to change EC policy based on DAHDI caps.
Sean Bright [Sat, 2 May 2009 16:43:59 +0000 (16:43 +0000)]
Conditional include ioctl's to change EC policy based on DAHDI caps.

This feels like a sane change (wouldn't compile without this addition), but I'm
not intimately familiar with this code.

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

13 years agoUpdate copyright year to 2009
Sean Bright [Sat, 2 May 2009 15:45:07 +0000 (15:45 +0000)]
Update copyright year to 2009

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

13 years agoBlocked revisions 191628-191629 via svnmerge
Mark Michelson [Sat, 2 May 2009 10:46:02 +0000 (10:46 +0000)]
Blocked revisions 191628-191629 via svnmerge

........
  r191628 | mmichelson | 2009-05-02 05:21:00 -0500 (Sat, 02 May 2009) | 8 lines

  Move static buffers to outside for loops in app_chanspy.

  Similar to seanbright's commit 191422, this moves some static buffers
  to be defined outside of for loops since it is undefined if memory
  will be re-used or if the stack will grow with each iteration of the
  loop.
........
  r191629 | mmichelson | 2009-05-02 05:45:24 -0500 (Sat, 02 May 2009) | 3 lines

  Kevin has informed me that thi sort of thing is not necessary.
........

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

13 years agoMerged revisions 191559 via svnmerge from
Tilghman Lesher [Fri, 1 May 2009 20:01:21 +0000 (20:01 +0000)]
Merged revisions 191559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r191559 | tilghman | 2009-05-01 15:00:23 -0500 (Fri, 01 May 2009) | 6 lines

  SIP Response 410 maps to cause code 22 (or 23), not 1.
  (closes issue #14993)
   Reported by: BigJimmy
   Patches:
         causepatch uploaded by BigJimmy (license 371)
........

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

13 years agoSet debug message back to DEBUG level.
Tilghman Lesher [Fri, 1 May 2009 18:18:00 +0000 (18:18 +0000)]
Set debug message back to DEBUG level.
(closes issue #15007)
 Reported by: hulber

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

13 years agoMerged revisions 191488 via svnmerge from
Jeff Peeler [Fri, 1 May 2009 18:09:23 +0000 (18:09 +0000)]
Merged revisions 191488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r191488 | jpeeler | 2009-05-01 12:40:46 -0500 (Fri, 01 May 2009) | 9 lines

  Fix DTMF not being sent to other side after a partial feature match

  This fixes a regression from commit 176701. The issue was that
  ast_generic_bridge never exited after the feature digit timeout had elapsed,
  which prevented the queued DTMF from being sent to the other side.

  This issue was reported to me directly.
........

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

13 years agoBlocked revisions 191041,191422 via svnmerge
Sean Bright [Fri, 1 May 2009 15:46:39 +0000 (15:46 +0000)]
Blocked revisions 191041,191422 via svnmerge

........
  r191041 | seanbright | 2009-04-29 11:23:07 -0400 (Wed, 29 Apr 2009) | 6 lines

  Fix a crash in app_queue with very long member lists.

  A user reported via #asterisk that with very long lists of members, a crash
  occurs in ast_strdupa, so just use a single buffer and ast_copy_string instead
  of stack allocating copys of each interface name.
........
  r191422 | seanbright | 2009-05-01 11:42:48 -0400 (Fri, 01 May 2009) | 7 lines

  Move the defintion of the a couple arrays out of loops.

  According to Kevin, it is unspecified as to whether a variable defined inside
  a block is allocated once by the compiler or for each pass through the block
  (loops being the only interesting case), so just define these before we get
  into our loop to be sure.
........

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

13 years agoDrop my IRC nickname.
Joshua Colp [Fri, 1 May 2009 14:58:59 +0000 (14:58 +0000)]
Drop my IRC nickname.

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

13 years agoMade security features optional.
TransNexus OSP Development [Fri, 1 May 2009 09:50:11 +0000 (09:50 +0000)]
Made security features optional.

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

13 years agoAdd buffer and echo canceller control to CHANNEL() dialplan function for DAHDI channels
Kevin P. Fleming [Thu, 30 Apr 2009 21:42:35 +0000 (21:42 +0000)]
Add buffer and echo canceller control to CHANNEL() dialplan function for DAHDI channels

Adds ability for CHANNEL() dialplan function, when used on DAHDI channels,
to temporarily change the number of buffers and/or the buffer policy, and also
to enable, disable, or switch the echo canceller between FAX/data and voice
modes.

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

13 years agoDetect eaccess (or euidaccess) before using it.
Tilghman Lesher [Thu, 30 Apr 2009 17:40:58 +0000 (17:40 +0000)]
Detect eaccess (or euidaccess) before using it.
Reported by Andrew Lindh via the -dev list.

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

13 years agoAdded routing number support.
TransNexus OSP Development [Thu, 30 Apr 2009 09:11:23 +0000 (09:11 +0000)]
Added routing number support.

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

13 years agoFixed not report source network ID and not export destination network ID issues.
TransNexus OSP Development [Thu, 30 Apr 2009 07:20:59 +0000 (07:20 +0000)]
Fixed not report source network ID and not export destination network ID issues.

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

13 years agoChange working directory to / under certain conditions.
Tilghman Lesher [Thu, 30 Apr 2009 06:47:13 +0000 (06:47 +0000)]
Change working directory to / under certain conditions.
If backgrounding and no core will be produced, then changing the directory
won't break anything; likewise, if the CWD isn't accessible by the current
user, then a core wasn't possible anyway.
(closes issue #14831)
 Reported by: chris-mac
 Patches:
       20090428__bug14831.diff.txt uploaded by tilghman (license 14)
       20090430__bug14831.diff.txt uploaded by tilghman (license 14)
 Tested by: chris-mac

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

13 years agoRecorded merge of revisions 191220 via svnmerge from
Tilghman Lesher [Wed, 29 Apr 2009 23:12:19 +0000 (23:12 +0000)]
Recorded merge of revisions 191220 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r191220 | tilghman | 2009-04-29 18:10:54 -0500 (Wed, 29 Apr 2009) | 2 lines

  Allow H.323 to compile with FDLEAK checking enabled.
........

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

13 years agoMake H.323 compile with FDLEAK detection code enabled
Tilghman Lesher [Wed, 29 Apr 2009 23:06:56 +0000 (23:06 +0000)]
Make H.323 compile with FDLEAK detection code enabled

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

13 years agofix typos
Jeff Peeler [Wed, 29 Apr 2009 22:56:55 +0000 (22:56 +0000)]
fix typos

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

13 years agoPart of the merge did not happen correctly, which resulted in a compile error
Tilghman Lesher [Wed, 29 Apr 2009 22:23:27 +0000 (22:23 +0000)]
Part of the merge did not happen correctly, which resulted in a compile error

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

13 years agoSIP option to specify outbound TLS/SSL client protocol.
David Vossel [Wed, 29 Apr 2009 21:13:43 +0000 (21:13 +0000)]
SIP option to specify outbound TLS/SSL client protocol.

chan_sip allows for outbound TLS connections, but does not allow the user to specify what protocol to use (default was SSLv2, and still is if this new option is not specified).  This patch lets the user pick the SSL/TLS client method for outbound connections in sip.

(closes issue #14770)
Reported by: TheOldSaint

(closes issue #14768)
Reported by: TheOldSaint

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

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

13 years agoOutgoing PTP redirected calls did not wait for the COLR from the redirected-to party.
Richard Mudgett [Wed, 29 Apr 2009 21:07:06 +0000 (21:07 +0000)]
Outgoing PTP redirected calls did not wait for the COLR from the redirected-to party.

For outgoing PTP redirected calls, you now need to use the inhibit(i)
option on all of the REDIRECTING statements before dialing the redirected-to
party.  You still have to set the REDIRECTING(to-xxx,i) and the
REDIRECTING(from-xxx,i) values.  The PTP call will update the redirecting-to
presentation when it becomes available and queue the redirecting update to
the calling channel.

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

13 years agoMerge str_substitution branch.
Tilghman Lesher [Wed, 29 Apr 2009 18:53:01 +0000 (18:53 +0000)]
Merge str_substitution branch.
This branch adds additional methods to dialplan functions, whereby the result
buffers are now dynamic buffers, which can be expanded to the size of any
result.  No longer are variable substitutions limited to 4095 bytes of data.
In addition, the common case of needing buffers much smaller than that will
enable substitution to only take up the amount of memory actually needed.
The existing variable substitution routines are still available, but users
of those API calls should transition to using the dynamic-buffer APIs.
Reviewboard: http://reviewboard.digium.com/r/174/

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

13 years agoRemoving crufty code that is no longer necessary. Code cleanup.
David Brooks [Wed, 29 Apr 2009 18:32:58 +0000 (18:32 +0000)]
Removing crufty code that is no longer necessary. Code cleanup.

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

13 years agoBlocked revisions 191096 via svnmerge
David Brooks [Wed, 29 Apr 2009 18:22:24 +0000 (18:22 +0000)]
Blocked revisions 191096 via svnmerge

........
  r191096 | dbrooks | 2009-04-29 13:07:59 -0500 (Wed, 29 Apr 2009) | 8 lines

  Patch to fix tab-completion crash on "remove extension"

  This patch simply removes some old code back before Asterisk used editline.
  This fixes the crash that occurred when tab-completing "remove extension".

  (closes issue #14689)
  Reported by: isaacgal
........

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

13 years agoConsistent SSL/TLS options across conf files
David Vossel [Wed, 29 Apr 2009 14:39:48 +0000 (14:39 +0000)]
Consistent SSL/TLS options across conf files

ast_tls_read_conf() is a new api call for handling SSL/TLS options across all conf files.  Before this change, SSL/TLS options were not consistent.  http.conf and manager.conf required the 'ssl' prefix while sip.conf used options with the 'tls' prefix.  While the options had different names in different conf files, they all did the exact same thing.  Now, instead of mixing 'ssl' or 'tls' prefixes to do the same thing depending on what conf file you're in, all SSL/TLS options use the 'tls' prefix.  For example.  'sslenable' in http.conf and manager.conf is now 'tlsenable' which matches what already existed in sip.conf. Since this has the potential to break backwards compatibility, previous options containing the 'ssl' prefix still work, but they are no longer documented in the sample.conf files.  The change is noted in the CHANGES file though.

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

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

13 years agoLog an error message if indications.conf is not found.
Russell Bryant [Wed, 29 Apr 2009 08:58:39 +0000 (08:58 +0000)]
Log an error message if indications.conf is not found.

(closes issue #14990)
Reported by: tzafrir
Patches:
      indications_err.diff uploaded by tzafrir (license 46)

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

13 years agoFix app_queue XML documentation.
Russell Bryant [Wed, 29 Apr 2009 08:56:13 +0000 (08:56 +0000)]
Fix app_queue XML documentation.

I think it would behoove us to force "make validate-docs" to be run after the
XML documentation has been generated if dev-mode is enabled.

(closes issue #14989)
Reported by: tzafrir
Patches:
      app_queue_xml.diff uploaded by tzafrir (license 46)

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

13 years agoResolve Solaris build issues and add some API documentation.
Russell Bryant [Wed, 29 Apr 2009 08:51:21 +0000 (08:51 +0000)]
Resolve Solaris build issues and add some API documentation.

(issue #14981)
Reported by: snuffy

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

13 years agoAdd support setting CPC from channel variable
Matthew Fredrickson [Tue, 28 Apr 2009 22:07:24 +0000 (22:07 +0000)]
Add support setting CPC from channel variable

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

13 years agoMake sure that we do not clear the down flag on the BRI during PTMP link transients
Matthew Fredrickson [Tue, 28 Apr 2009 22:05:05 +0000 (22:05 +0000)]
Make sure that we do not clear the down flag on the BRI during PTMP link transients

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

13 years agoUniqueID column has a maximum size of 150
Tilghman Lesher [Tue, 28 Apr 2009 17:31:43 +0000 (17:31 +0000)]
UniqueID column has a maximum size of 150

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

13 years agoBuild XML documention from *only* the source files that have docs in them
Kevin P. Fleming [Tue, 28 Apr 2009 14:15:47 +0000 (14:15 +0000)]
Build XML documention from *only* the source files that have docs in them

Change the build process so that doc/core-en_US.xml is dependent solely on the source files that have documentation in them, not on all source files.

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

13 years agoRemove Makefile rules for bison and flex sources
Kevin P. Fleming [Tue, 28 Apr 2009 14:12:09 +0000 (14:12 +0000)]
Remove Makefile rules for bison and flex sources

We never, ever want these files to processed automatically, because we store the output files in Subversion and users should never need to rebuild them.

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

13 years agoUpdated for OSP Toolkit 3.5.
TransNexus OSP Development [Tue, 28 Apr 2009 09:10:42 +0000 (09:10 +0000)]
Updated for OSP Toolkit 3.5.

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

13 years agoFix a small memory leak on error in ast_channel_alloc().
Richard Mudgett [Mon, 27 Apr 2009 21:22:17 +0000 (21:22 +0000)]
Fix a small memory leak on error in ast_channel_alloc().

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

13 years agoMake PTP DivertingLegInformation3 message behavior closer to the specifications.
Richard Mudgett [Mon, 27 Apr 2009 20:03:49 +0000 (20:03 +0000)]
Make PTP DivertingLegInformation3 message behavior closer to the specifications.

*  Wait for a DivertingLegInformation3 message after receiving a
DivertingLegInformation1 message to complete the redirecting-to information
before queuing a redirecting update to the other channel.

*  A DivertingLegInformation2 message should be responded to with a
DivertingLegInformation3 when the COLR is determined.  If the call
could or does experience another redirection, you should manually
determine the COLR to send to the switch by setting REDIRECTING(to-pres)
to the COLR and setting REDIRECTING(to-num) = ${EXTEN}.

*  A DivertingLegInformation2 message must have an original called number
if the redirection count is greater than one.  Since Asterisk does
not keep track of this information, we can only indicate that the
number is not available due to interworking.

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

13 years agoDon't warn on pipe in the System call.
Tilghman Lesher [Mon, 27 Apr 2009 19:34:48 +0000 (19:34 +0000)]
Don't warn on pipe in the System call.
(closes issue #14979)
 Reported by: pj

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

13 years agoMerged revisions 190721 via svnmerge from
Kevin P. Fleming [Mon, 27 Apr 2009 19:30:54 +0000 (19:30 +0000)]
Merged revisions 190721 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r190721 | kpfleming | 2009-04-27 14:29:46 -0500 (Mon, 27 Apr 2009) | 7 lines

  Fix 'inconsistent line endings' when autoconf 2.63 is used

  Attempt to make configure script regeneration 'safe' using autoconf 2.63, which embeds a bare CR into the script, thus making Subversion complain about inconsistent line endings

  This commit changes the MIME type of the configure script to be 'binary' thus making Subversion no longer inspect line endings, and as a bonus 'svn diff' will no longer try to generate diff output for it, which is not generally useful anyway.
........

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

13 years agoMerged revisions 190661-190662 via svnmerge from
Russell Bryant [Mon, 27 Apr 2009 19:08:12 +0000 (19:08 +0000)]
Merged revisions 190661-190662 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r190661 | russell | 2009-04-27 14:00:54 -0500 (Mon, 27 Apr 2009) | 9 lines

Resolve a crash in res_smdi when used with chan_dahdi.

When chan_dahdi goes to get an SMDI message, it provides no search criteria.
It just grabs the next message that arrives.  This code was written with the
SMDI dialplan functions in mind, since that is now the preferred method of
using SMDI.  However, this broke support of it being used from chan_dahdi.

(closes AST-212)

........
r190662 | russell | 2009-04-27 14:03:59 -0500 (Mon, 27 Apr 2009) | 2 lines

Fix a typo from 190661.

........

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

13 years agoAllow for a position to be specified when entering a queue.
Mark Michelson [Mon, 27 Apr 2009 16:37:51 +0000 (16:37 +0000)]
Allow for a position to be specified when entering a queue.

This would allow for one to add a caller to a specific place in the
queue instead of just placing the caller in the back every time. To help
facilitate some interesting manipulations, a new channel variable called
QUEUEPOSITION has been added. When a caller is removed from a queue, his
position in that queue is stored in the QUEUEPOSITION variable. One such
strategy an administrator can employ is to allow for the removal of a caller
from one queue followed by the insertion of the same caller into a separate
queue in the same position.

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

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

13 years agoUpdate warning message to not have pipes and contain all options.
Mark Michelson [Mon, 27 Apr 2009 16:26:14 +0000 (16:26 +0000)]
Update warning message to not have pipes and contain all options.

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

13 years agoFix a bug where we tried to send events out when no sessions container was present.
Joshua Colp [Mon, 27 Apr 2009 15:18:47 +0000 (15:18 +0000)]
Fix a bug where we tried to send events out when no sessions container was present.

This commit stops a warning message (user_data is NULL) from getting output when
manager events get sent before manager is initialized. This happens because manager
is initialized *after* modules are loaded and the act of loading modules triggers
manager events.

(issue #14974)
Reported by: pj

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

13 years agoRemove nonexistent option from sip.conf.sample.
Mark Michelson [Mon, 27 Apr 2009 14:46:14 +0000 (14:46 +0000)]
Remove nonexistent option from sip.conf.sample.

The option to choose which connected line header to
use is not 'rpid_header' but 'sendrpid'

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

13 years agoTLS/SSL private key option
David Vossel [Fri, 24 Apr 2009 21:22:31 +0000 (21:22 +0000)]
TLS/SSL private key option

Adds option to specify a private key .pem file when configuring TLS or SSL in AMI, HTTP, and SIP.  Before this, the certificate file was used for both the public and private key.  It is possible for this file to hold both, but most configurations allow for a separate private key file to be specified.  Clarified in .conf files how these options are to be used.  The current conf files do not explain how the private key is handled at all, so without knowledge of Asterisk's TLS implementation, it would be hard to know for sure what was going on or how to set it up.

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

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

13 years agoThere is no need to use the struct ast_party_connected_line.source update values.
Richard Mudgett [Fri, 24 Apr 2009 17:59:01 +0000 (17:59 +0000)]
There is no need to use the struct ast_party_connected_line.source update values.

The messages sent by a technology when a connected line update is received
are best determined by the current call state of the channel.  The struct
ast_party_connected_line.source value is really only useful as a possible
tracing aid.

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

13 years agoUpdate comment.
Richard Mudgett [Fri, 24 Apr 2009 17:33:08 +0000 (17:33 +0000)]
Update comment.

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

13 years agoAdd \since tag for new API calls.
Russell Bryant [Fri, 24 Apr 2009 15:26:10 +0000 (15:26 +0000)]
Add \since tag for new API calls.

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

13 years agoFix a build error.
Russell Bryant [Fri, 24 Apr 2009 15:17:38 +0000 (15:17 +0000)]
Fix a build error.

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

13 years agoBlocked revisions 190187 via svnmerge
Olle Johansson [Fri, 24 Apr 2009 15:16:48 +0000 (15:16 +0000)]
Blocked revisions 190187 via svnmerge

........
r190187 | oej | 2009-04-23 12:07:26 +0200 (Tor, 23 Apr 2009) | 3 lines

unistd.h is required for usleep() on Darwin. It will not hurt to include it always
on other platforms either.

........

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

13 years agoConvert the ast_channel data structure over to the astobj2 framework.
Russell Bryant [Fri, 24 Apr 2009 14:04:26 +0000 (14:04 +0000)]
Convert the ast_channel data structure over to the astobj2 framework.

There is a lot that could be said about this, but the patch is a big
improvement for performance, stability, code maintainability,
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container
for channels is an astobj2 hash table.  All of the code related to searching
for channels or iterating active channels has been rewritten.  Let n be
the number of active channels.  Iterating the channel list has gone from
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).
Searching for a channel by extension is still O(n), but uses a new method
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits
here are plentiful.  Some benefits directly related to issues in the
previous code include:

1) When threads other than the channel thread owning a channel wanted
   access to a channel, it had to hold the lock on it to ensure that it didn't
   go away.  This is no longer a requirement.  Holding a reference is
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods
   of time.

4) There are places where dealing with more than one channel at a time becomes
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count
handling can be found in channel.h, where a new section has been added that
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it
much easier to deal with holding on to a channel pointer for an extended period
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David
did the conversion of the DAHDIScan application by making it become a wrapper
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

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

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

13 years agoFix nat setting on RTP instances.
Joshua Colp [Fri, 24 Apr 2009 13:49:03 +0000 (13:49 +0000)]
Fix nat setting on RTP instances.

(closes issue #14827)
Reported by: pj

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

13 years agoMerged revisions 190356 via svnmerge from
Russell Bryant [Thu, 23 Apr 2009 21:13:07 +0000 (21:13 +0000)]
Merged revisions 190356 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r190356 | russell | 2009-04-23 16:07:07 -0500 (Thu, 23 Apr 2009) | 2 lines

Remove a bogus ast_channel_unlock().

........

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

13 years agoLabels are sometimes (most of the time?) NULL for extensions.
Tilghman Lesher [Thu, 23 Apr 2009 20:42:11 +0000 (20:42 +0000)]
Labels are sometimes (most of the time?) NULL for extensions.
(closes issue #14895)
 Reported by: chris-mac
 Patches:
       20090423__bug14895__2.diff.txt uploaded by tilghman (license 14)
 Tested by: lmadsen

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

13 years agoSupport HTTP digest authentication for the http manager interface.
Tilghman Lesher [Thu, 23 Apr 2009 20:36:35 +0000 (20:36 +0000)]
Support HTTP digest authentication for the http manager interface.
(closes issue #10961)
 Reported by: ys
 Patches:
       digest_auth_r148468_v5.diff uploaded by ys (license 281)
       SVN branch http://svn.digium.com/svn/asterisk/team/group/manager_http_auth
 Tested by: ys, twilson, tilghman
 Review: http://reviewboard.digium.com/r/223/
 Reviewed by: tilghman,russellb,mmichelson

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

13 years agoMerged revisions 190286 via svnmerge from
Joshua Colp [Thu, 23 Apr 2009 19:15:30 +0000 (19:15 +0000)]
Merged revisions 190286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r190286 | file | 2009-04-23 16:13:18 -0300 (Thu, 23 Apr 2009) | 6 lines

  Fix a bug in chan_local glare hangup detection.

  If both sides of a Local channel were hung up at around the same time it was
  possible for one thread to destroy the local private structure and have the other thread
  immediately try to remove the already freed structure from the local channel list.
........

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

13 years agoFix reversed behavior of leavewhenempty option in queues.conf.
Mark Michelson [Thu, 23 Apr 2009 17:45:35 +0000 (17:45 +0000)]
Fix reversed behavior of leavewhenempty option in queues.conf.

(closes issue #14650)
Reported by: alecdavis
Patches:
      14650.patch uploaded by mmichelson (license 60)
Tested by: mmichelson, lmadsen

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

13 years agoFix a double free issue with the Pickup dialplan application.
Joshua Colp [Thu, 23 Apr 2009 16:55:48 +0000 (16:55 +0000)]
Fix a double free issue with the Pickup dialplan application.

As part of the pickup process the connected line information is updated.
Part of this process does a shallow copy of the target channel's connected line
information to a local structure. Once complete the structure contents are freed.
As a result any information in the target channel's connected line information
structure is no longer valid. This change will now set the contents back to a clean
state so that the freeing of the target channel's connected line information structure
when the channel is destroyed will no longer try to double free things.

(closes issue #14839)
Reported by: lmsteffan

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