dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

2519 Commits

Author SHA1 Message Date
eliel 7549f5d79a Do not avoid loading the XML documentation if not XInclude substitution is done.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@195075 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-18 13:30:34 +00:00
eliel 1de32a5a62 Allow to include sections of other parts of the xml documentation.
Avoid duplicating xml documentation by allowing to include other parts of
the xml documentation using XInclude.
Example:
   <xi:include xpointer="xpointer(/docs/function[@name='CHANNEL']/synopsis)" />
(Insert this line to include the synopsis of the CHANNEL function xml
documentation).

It is also possible to include documentation from other files in the
'documentation/' directory using the href="" attribute inside a xinclude
element.

(closes issue #15107)
Reported by: lmadsen

(issue #14444)
Reported by: ewieling



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194982 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-16 20:01:22 +00:00
eliel 5bc9af6bb3 Fix a missing unlock in case of error, and a missing free().
Always free the allocated memory for a string field, because
we are always using it (not only when xmldocs are enabled).
Also if there is an error allocating memory for the string field
remember to unlock the list of registered applications, before returning.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194945 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-16 18:32:11 +00:00
eliel f2fc79c88e Allow to specify an enumlist inside an enum.
It was not possible to use an enumlist inside an enum:
<enumlist>
   <enum name="aa">
      <enumlist>
         ...
      </enumlist>
   </enum>
</enumlist>
Now we will be able to insert as many levels as we want.

(closes issue #15112)
Reported by: lmadsen



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194635 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-15 13:23:37 +00:00
kpfleming 45f9cd17df Add ability for modules to dynamically register logger levels
This patch adds the ability for modules to dynamically create logger levels for their own use; these are named levels just like the built-in levels, and can be directed to any destination that the logger can send any level to, by including their names in logger.conf.

Review: https://reviewboard.asterisk.org/r/244/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194610 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-15 13:13:47 +00:00
russell b32864c769 Fix a typo where an equality check should be an assignment.
(closes issue #15103)
Reported by: lmsteffan
Patches:
      transfer_crash.patch uploaded by lmsteffan (license 779)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194477 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-14 21:24:17 +00:00
tilghman d228a64c00 If the timing ended on a zero, then we would loop forever.
(closes issue #14983)
 Reported by: teox
 Patches: 
       20090513__issue14983.diff.txt uploaded by tilghman (license 14)
 Tested by: teox


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194430 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-14 16:22:14 +00:00
eliel 1c263e2da8 Do not lock the 'sessions' container, lock the allocated 'session'.
There was a typo in the structure being locked, and we were locking the
'sessions' container instead of the 'session' structure thar we are modifying.
Reported by seanbright on #asterisk-dev, thanks!



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194283 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-13 15:02:10 +00:00
tilghman 8191b1aea1 Merged revisions 194137 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194137 | tilghman | 2009-05-12 19:52:03 -0500 (Tue, 12 May 2009) | 7 lines
  
  Fix logic for how to proceed with a single digit extension.
  (closes issue #15091)
   Reported by: andrew
   Patches: 
         20090512__issue15091.diff.txt uploaded by tilghman (license 14)
   Tested by: andrew
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194138 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-13 00:52:49 +00:00
tilghman 177ddeb1bd Two fixes found while debugging with ast_backtrace():
1) If MALLOC_DEBUG is used when concurrently using ast_backtrace, the free()
used in that routine will trigger an error, because the memory was allocated
internally to libc, where we could not intercept that call to wrap it.
Therefore, it's not memory we knew about, and the free is reported as an
error.

2) Now that channels are objects, the old hack of initializing a channel
to all zeroes no longer works, since we may try to call something like
ast_channel_lock() within a function on that reference.  In that case, it's
reported as an error, because the pointer isn't an object reference.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194101 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-13 00:13:43 +00:00
eliel e496282bb8 Fix a crash when logging out from the AMI and avoid astobj2 warning messages.
When the user logout the session was being destroyed twice and the file
descriptor was being closed twice. The sessions reference counter wasn't
used in a proper way.
The 'mansession' structure was being treated as an astobj2 and we were
calling ao2_lock/ao2_unlock causing astobj2 report a warning message and
not locking the structure.
Also we were using an ugly naming convention 'destroy_session',
'session_destroy', 'free_session', ... all this "duplicated" code was merged.

(closes issue #14974)
Reported by: pj
Patches:
      manager.diff2 uploaded by eliel (license 64)
      Tested by: dhubbard, eliel, mnicholson

(closes issue #15088)
Reported by: eliel

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194060 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-12 22:49:13 +00:00
kpfleming f58bc31e46 add 'const' qualifiers in various places where they should have been
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193832 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-12 13:59:35 +00:00
file 8328699729 Fix a bug where receiving a control frame of subclass -1 would cause certain channels to get hung up.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193502 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-10 17:07:46 +00:00
russell cc1864f8ef Declare private data as static.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193459 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-09 11:30:15 +00:00
kpfleming 09d972a643 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: http://svn.digium.com/svn/asterisk/trunk@193194 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-08 14:06:15 +00:00
tilghman c748661f2f 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: http://svn.digium.com/svn/asterisk/trunk@193120 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-07 23:42:28 +00:00
jpeeler 215732da8d 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: http://svn.digium.com/svn/asterisk/trunk@192861 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-06 22:17:27 +00:00
jpeeler 8de2b68b6b If no extension was found in the pattern tree, don't crash.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@192853 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-06 22:02:46 +00:00
tilghman fe8d8008ef 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: http://svn.digium.com/svn/asterisk/trunk@192772 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-06 16:28:02 +00:00
rmudgett 28fb3d8a7d 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: http://svn.digium.com/svn/asterisk/trunk@192590 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-05 20:54:07 +00:00
file c739ee5ec0 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: http://svn.digium.com/svn/asterisk/trunk@192462 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-05 18:23:58 +00:00
kpfleming 4437971545 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: http://svn.digium.com/svn/asterisk/trunk@192362 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-05 14:17:18 +00:00
kpfleming 1188fb17fc 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: http://svn.digium.com/svn/asterisk/trunk@192357 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-05 13:18:21 +00:00
kpfleming 58a6c47655 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: http://svn.digium.com/svn/asterisk/trunk@192318 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-05 10:34:19 +00:00
kpfleming 23b19461f0 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: http://svn.digium.com/svn/asterisk/trunk@192279 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-05 08:51:06 +00:00
kpfleming fc3f02bbbe 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: http://svn.digium.com/svn/asterisk/trunk@192059 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-04 16:24:16 +00:00
eliel 672ee1f58e Do not re-define _POSIX_C_SOURCE if it was already defined.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@192032 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-04 15:35:35 +00:00
kpfleming df4e87f651 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: http://svn.digium.com/svn/asterisk/trunk@191919 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-03 14:28:59 +00:00
russell 3abb6b345e 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: http://svn.digium.com/svn/asterisk/trunk@191848 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-02 21:15:18 +00:00
kpfleming 546cc0e698 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: http://svn.digium.com/svn/asterisk/trunk@191785 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-02 19:02:22 +00:00
kpfleming bb9f8b38a2 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: http://svn.digium.com/svn/asterisk/trunk@191775 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-02 18:39:48 +00:00
seanbright e9bae8401b Update copyright year to 2009
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191700 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-02 15:45:07 +00:00
jpeeler 9f994ec588 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: http://svn.digium.com/svn/asterisk/trunk@191489 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-01 18:09:23 +00:00
file 8077e3d45e Drop my IRC nickname.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191419 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-01 14:58:59 +00:00
tilghman 8c68287e96 Detect eaccess (or euidaccess) before using it.
Reported by Andrew Lindh via the -dev list.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191367 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-30 17:40:58 +00:00
tilghman 9f78d08fa2 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: http://svn.digium.com/svn/asterisk/trunk@191283 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-30 06:47:13 +00:00
tilghman bb29c42b4e Part of the merge did not happen correctly, which resulted in a compile error
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191211 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 22:23:27 +00:00
dvossel 0f6a1e66b9 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: http://svn.digium.com/svn/asterisk/trunk@191177 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 21:13:43 +00:00
tilghman 8fc2c0f724 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: http://svn.digium.com/svn/asterisk/trunk@191140 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 18:53:01 +00:00
dvossel cfa021cb17 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: http://svn.digium.com/svn/asterisk/trunk@191028 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 14:39:48 +00:00
russell 0ad875b34e 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: http://svn.digium.com/svn/asterisk/trunk@190993 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 08:58:39 +00:00
russell 336c0408ef Resolve Solaris build issues and add some API documentation.
(issue #14981)
Reported by: snuffy


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190989 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 08:51:21 +00:00
rmudgett ca3d2396c9 Fix a small memory leak on error in ast_channel_alloc().
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190797 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-27 21:22:17 +00:00
tilghman 3cc822709b Don't warn on pipe in the System call.
(closes issue #14979)
 Reported by: pj


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190726 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-27 19:34:48 +00:00
file 7f6257feb8 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: http://svn.digium.com/svn/asterisk/trunk@190586 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-27 15:18:47 +00:00
dvossel 1d52218463 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: http://svn.digium.com/svn/asterisk/trunk@190545 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-24 21:22:31 +00:00
russell 89175b7e04 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: http://svn.digium.com/svn/asterisk/trunk@190423 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-24 14:04:26 +00:00
tilghman 9b4f75d2e7 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: http://svn.digium.com/svn/asterisk/trunk@190352 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-23 20:42:11 +00:00
tilghman 23d5f93d74 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: http://svn.digium.com/svn/asterisk/trunk@190349 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-23 20:36:35 +00:00
jpeeler f3943d3662 Fix building of chan_h323 with gcc-3.3
There seems to be a bug with old versions of g++ that doesn't allow a structure
member to use the name list. Rename list member to group_list in ast_group_info
and change the few places it is used.

(closes issue #14790)
Reported by: stuarth


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190057 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-22 21:15:55 +00:00
russell 87855cc6cd Fix call parking callback. Pipes -> Commas.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@189951 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-22 16:56:43 +00:00
tilghman 0c2ed9560d Use nanosleep instead of poll.
This is not just because mmichelson suggested it, but also because Mac OS X puked on my poll().


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@189539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-20 22:10:25 +00:00
dbailey a20fffa38d Merged revisions 189391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189391 | dbailey | 2009-04-20 14:10:56 -0500 (Mon, 20 Apr 2009) | 4 lines
  
  Clean up problem with manager implementation of mmap where it was not testing against MAP_FAILED response.
  Got rid of shadowed variable used in processign the mmap results. 
  Change test of mmap results to compare against MAP_FAILED
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@189419 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-20 19:28:16 +00:00
mmichelson 0667e14420 Merged revisions 189277 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189277 | mmichelson | 2009-04-20 09:04:41 -0500 (Mon, 20 Apr 2009) | 12 lines
  
  Move the check for chan->fdno == -1 to after the zombie/hangup check.
  
  Many users were finding that their hung up channels were staying up and
  causing 100% CPU usage.
  
  (issue #14723)
  Reported by: seadweller
  Patches:
        14723_1-4-tip.patch uploaded by mmichelson (license 60)
  Tested by: falves11, bamby
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@189278 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-20 14:05:27 +00:00
seanbright cc842203dd Fix copy/paste error with 'transmit silence' flag.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@189077 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17 19:36:38 +00:00
mnicholson 6d45df1b72 Merged revisions 189009 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189009 | mnicholson | 2009-04-17 10:43:09 -0500 (Fri, 17 Apr 2009) | 5 lines
  
  Make Busy() application set the CDR disposition to BUSY.
  
  (closes issue #14306)
  Reported by: cristiandimache
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@189010 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17 15:44:18 +00:00
mmichelson d04a6de3c7 Fix a spacing issue that I claimed I would when I committed this code.
Nothing major though.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@188942 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17 14:33:50 +00:00
mmichelson 3387634797 Several fixes to the extenpatternmatchnew logic.
1. Differentiate between literal characters in an extension
and characters that should be treated as a pattern match. Prior to
these fixes, an extension such as NNN would be treated as a pattern,
rather than a literal string of N's.

2. Fixed the logic used when matching an extension with a bracketed
expression, such as 2[5-7]6.

3. Removed all areas of code that were executed when NOT_NOW was
#defined. The code in these areas had the potential to crash, for
one thing, and the actual intent of these blocks seemed counterproductive.

4. Fixed many many coding guidelines problems I encountered while looking
through the corresponding code.

5. Added failure cases and warning messages for when duplicate extensions
are encountered.

6. Miscellaneous fixes to incorrect or redundant statements.

(closes issue #14615)
Reported by: steinwej
Tested by: mmichelson

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@188901 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-17 13:29:33 +00:00
mmichelson 343a0e2502 Merged revisions 188582 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r188582 | mmichelson | 2009-04-15 15:04:20 -0500 (Wed, 15 Apr 2009) | 7 lines
  
  Update ast_readvideo_callback to match ast_readaudio_callback.
  
  This fixes potential refcount errors that may occur on ast_filestreams.
  
  AST-208
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@188585 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-15 20:17:33 +00:00
oej fc171ca2df Making sure we have references to external libraries.
Note: Update h.323 with the recent changes too


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@188283 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-14 14:20:10 +00:00
tilghman 6ba9bf6f7a As suggested by Russell, warn users when their dialplan arguments contain pipes, but not commas.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@188210 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-14 05:45:13 +00:00
file 90e787d30c Change how we set the local and remote address.
The code will now only change the address and port. It will not overwrite any other values.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187773 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10 18:14:47 +00:00
file f52aa65700 Fix some uninitialized memory notices that appeared under valgrind.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187772 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10 18:02:44 +00:00
mmichelson 37f2471e2b Don't let ast_channel_alloc fail if explicitly passed NULL cid_name or cid_number.
This also fixes a small memory leak.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187680 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10 16:06:22 +00:00
kpfleming d011662b17 revert addition of LOG_SECURITY log channel; after further discussion, a much better solution will be used
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187636 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10 15:11:16 +00:00
tilghman ab22019265 Modify headers and macros, according to Russell's suggestions on the -dev list
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187599 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10 03:55:27 +00:00
jpeeler 0553909c65 Add ability for dialplan execution to continue when caller hangs up.
The F option to app_dial has been modified to accept no parameters and perform
the above functionality. I don't see anywhere else that is doing function
overloading, but this really is the best place for this operation because:

- It makes it close to the 'g' option in the argument list which provides
similar functionality.
- The existing code to support the current F option provides a very
convienient location to add this new feature.

(closes issue #12381)
Reported by: michael-fig



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187491 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09 19:10:02 +00:00
tilghman fefac6b6c0 Merged revisions 187428 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r187428 | tilghman | 2009-04-09 13:08:20 -0500 (Thu, 09 Apr 2009) | 8 lines
  
  Race condition between ast_cli_command() and 'module unload' could cause a deadlock.
  Add lock timeouts to avoid this potential deadlock.
  (closes issue #14705)
   Reported by: jamessan
   Patches: 
         20090320__bug14705.diff.txt uploaded by tilghman (license 14)
   Tested by: jamessan
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187483 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09 18:40:01 +00:00
file 0728169c6a Add support for allowing the channel driver to handle transcoding.
This was accomplished using a set of options and the setoption channel callback.
The core calls into the channel driver using these options and the channel driver
either returns success or failure.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187360 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09 16:19:35 +00:00
tilghman 4dd6e6e2f7 Merged revisions 187300-187301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r187300 | tilghman | 2009-04-08 23:31:38 -0500 (Wed, 08 Apr 2009) | 3 lines
  
  Add debugging mode for diagnosing file descriptor leaks.
  (Related to issue #14625)
........
  r187301 | tilghman | 2009-04-08 23:32:40 -0500 (Wed, 08 Apr 2009) | 2 lines
  
  Oops, missed this file in the last commit.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187302 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09 04:59:05 +00:00
kpfleming ad6c07010d add a dedicated log channel for modules to be able report security-related events, so that they can be fed into external processes for analysis and possible mitigation efforts
(inspired by this evening's Toronto Asterisk Users Group meeting and previous dicussions amongst various community members)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187269 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-09 02:44:27 +00:00
jpeeler 91ed7a2ff8 Add timer for features so that backup bridge config can go away
The biggest change done here was elimination of the backup_config for use with
features. Previously, the bridging code upon detecting a feature would set the
start time of the bridge to the start time of the feature. Then after the 
feature had either expired or timed out the start time would be reset to the
true bridge start time from the backup_config. Now, the time differences are
calculated with respect to the newly added feature_start_time timeval instead.

There should be no behavior changes from the previous functionality aside from
the bridge timing being unaffected by either valid or partial feature matches.
Previously the timing would be increased by the length of time configured for
featuredigittimeout, which was probably never noticed.

(closes issue #14503)
Reported by: KNK
Tested by: jpeeler

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187211 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08 21:00:39 +00:00
file a81a0d84a7 Fix a bug where we would native bridge when we did not want to.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187108 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08 18:12:28 +00:00
file eca1ae36e1 Turn a warning message into a debug message and do not treat two situations as errors when they are not.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187036 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08 16:27:36 +00:00
mmichelson 5773c5982d Merged revisions 186984 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186984 | mmichelson | 2009-04-08 10:26:46 -0500 (Wed, 08 Apr 2009) | 24 lines
  
  Make a couple of changes with regards to a new message printed in ast_read().
  
  "ast_read() called with no recorded file descriptor" is a new message added
  after a bug was discovered. Unfortunately, it seems there are a bunch of places
  that potentially make such calls to ast_read() and trigger this error message
  to be displayed. This commit does two things to help to make this message appear
  less.
  
  First, the message has been downgraded to a debug level message if dev mode is
  not enabled. The message means a lot more to developers than it does to end users,
  and so developers should take an effort to be sure to call ast_read only when
  a channel is ready to be read from. However, since this doesn't actually cause an
  error in operation and is not something a user can easily fix, we should not spam
  their console with these messages.
  
  Second, the message has been moved to after the check for any pending masquerades.
  ast_read() being called with no recorded file descriptor should not interfere with
  a masquerade taking place.
  
  This could be seen as a simple way of resolving issue #14723. However, I still want
  to try to clear out the existing ways of triggering this message, since I feel that
  would be a better resolution for the issue.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186985 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08 15:27:41 +00:00
russell 96781f975f Start splitting up miscellaneous doxygen documentation into separate files.
doxyref.h was created to hold miscellaneous documentation that was not specific
to a part of the code.  This file has grown quite a bit so I decided to start
splitting parts of it out into new files.  Now, you can drop a new file into
include/asterisk/doxygen/ and it will be processed by doxygen.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186953 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08 13:24:48 +00:00
mmichelson 683b53c339 Merged revisions 186832 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186832 | mmichelson | 2009-04-07 18:49:49 -0500 (Tue, 07 Apr 2009) | 8 lines
  
  Set the AST_FEATURE_WARNING_ACTIVE flag when a p2p bridge returns AST_BRIDGE_RETRY.
  
  Without this flag set, warning sounds will not be properly played to either party
  of the bridge.
  
  (closes issue #14845)
  Reported by: adomjan
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186833 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-07 23:50:56 +00:00
mmichelson 6b599919b1 Merged revisions 186719 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186719 | mmichelson | 2009-04-07 15:43:49 -0500 (Tue, 07 Apr 2009) | 6 lines
  
  Ensure that \r\n is printed after the ActionID in an OriginateResponse.
  
  (closes issue #14847)
  Reported by: kobaz
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186720 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-07 20:46:18 +00:00
file c1a373b82e Pass the correct value to sizeof when copying address information.
(issue #14827)
Reported by: pj
Patches:
      14827.diff uploaded by file (license 11)
Tested by: pj


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186563 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-06 13:23:12 +00:00
mmichelson f00656db9e This commit introduces COLP/CONP and Redirecting party information into Asterisk.
The channel drivers which have been most heavily tested with these enhancements are
chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be
introduced in a later commit. chan_skinny has code added to it here, but according
to user pj, the support on chan_skinny is not working as of now. This will be fixed in
a later commit.

A special thanks goes out to bugtracker user gareth for getting the ball rolling and
providing the initial support for this work. Without his initial work on this, this would
not have been nearly as painless as it was.

This functionality has been tested by Digium's product quality department, as well as a
customer site running thousands of calls every day. In addition, many many many many bugtracker
users have tested this, too.

(closes issue #8824)
Reported by: gareth

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186525 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03 22:41:46 +00:00
file 27b4657d60 Add better support for relaying success or failure of the ast_transfer() API call.
This API call now waits for a special frame from the underlying channel driver to
indicate success or failure. This allows the return value to truly convey whether
the transfer worked or not. In the case of the Transfer() dialplan application this
means the value of the TRANSFERSTATUS dialplan variable is actually true.

(closes issue #12713)
Reported by: davidw
Tested by: file


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186382 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03 16:47:27 +00:00
dvossel 80bd42b29c audio_audiohook_write_list() did not correctly update sample size after ast_translate.
audio_audiohook_write_list() did not take into account that the sample size may change after translation depending on if the original frame is is 8khz or 16khz.  the sample size is now updated after translating to reflect this possibility.  This caused the audio on the receiving end to sound terrible.  Thanks to jcolp and mmichelson for helping me work this out.

(issue AST-197)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186379 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03 16:29:47 +00:00
tilghman 9b13236912 Compatibility fix for glibc 2.4
(Closes issue #14820)
Reported by: phsultan


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186297 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03 15:18:28 +00:00
file 0eb1480fe0 Merge in the RTP engine API.
This API provides a generic way for multiple RTP stacks to be
integrated into Asterisk. Right now there is only one present, res_rtp_asterisk,
which is the existing Asterisk RTP stack. Functionality wise this commit
performs the same as previously. API documentation can be viewed in the
rtp_engine.h header file.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186078 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-02 17:20:52 +00:00
tilghman 6cfe6e2588 Missed a common case for needing to extend the buffer.
(closes issue #14716)
 Reported by: sum
 Patches: 
       20090402__bug14716.diff.txt uploaded by tilghman (license 14)
 Tested by: sum


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186021 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-02 15:14:22 +00:00
tilghman 2dfad9bd0e Merge changes from str_substitution that are unrelated to that branch.
Included is a small bugfix to an ast_str helper, but most of these changes
are simply doxygen fixes.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@185912 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-01 20:13:28 +00:00
mmichelson 290dd07a13 Address Russell's comments regarding rev 185704.
Use ast_debug and ast_softhangup_nolock.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@185777 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-01 13:59:34 +00:00
russell d1768bd106 Merged revisions 185771 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r185771 | russell | 2009-04-01 08:47:30 -0500 (Wed, 01 Apr 2009) | 6 lines

Fix a case where DTMF could bypass audiohooks.

This change fixes a situation where an audiohook that wants DTMF would not
actually get it.  This is in the code path where we end DTMF digit length
emulation while handling a NULL frame.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@185772 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-01 13:48:26 +00:00
mmichelson 0e97d64540 Allow the AMI Hangup command to accept a Cause header.
(closes issue #14695)
Reported by: mneuhauser
Patches:
      cause-for-hangup-manager-action.patch uploaded by mneuhauser (license 425)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@185704 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-01 00:39:01 +00:00
kpfleming 44a7c6c6f0 Optimizations to the stringfields API
This patch provides a number of optimizations to the stringfields API, focused around saving (not wasting) memory whenever possible. Thanks to Mark Michelson for inspiring this work and coming up with the first two optimizations that are represented here:

Changes:

- Cleanup of some code, fix incorrect doxygen comments

- When a field is emptied or replaced with a new allocation, decrease the amount of 'active' space in the pool it was held in; if that pool reaches zero active space, and is not the current pool, then free it as it is no longer in use

- When allocating a pool, try to allocate a size that will fit in a 'standard' malloc() allocation without wasting space

- When allocating space for a field, store the amount of space in the two bytes immediately preceding the field; this eliminates the need to call strlen() on the field when overwriting it, and more importantly it 'remembers' the amount of space the field has available, even if a shorter string has been stored in it since it was allocated

- Don't automatically double the size of each successive pool allocated; it's wasteful

http://reviewboard.digium.com/r/165/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@185581 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31 21:29:50 +00:00
file 4096874863 Merged revisions 185196 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r185196 | file | 2009-03-31 11:06:39 -0300 (Tue, 31 Mar 2009) | 8 lines
  
  Fix crash when moving audiohooks between channels.
  
  Handle the scenario where we are called to move audiohooks between channels
  and the source channel does not actually have any on it.
  
  (closes issue #14734)
  Reported by: corruptor
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@185197 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31 14:07:36 +00:00
kpfleming 4a40e0ec6f Improve timing interface to remember which provider provided a timer
The ability to load/unload timing interfaces is nice, but it means that when a timer is allocated, it may come from provider A, but later provider B becomes the 'preferred' provider. If this happens, all timer API calls on the timer that was provided by provider A will actually be handed to provider B, which will say WTF and return an error.

This patch changes the timer API to include a pointer to the provider of the timer handle so that future operations on the timer will be forwarded to the proper provider.

(closes issue #14697)
Reported by: moy

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184762 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27 19:10:32 +00:00
russell 34087ec576 Use ast_random() instead of rand() to ensure we use the best RNG available.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184726 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27 18:04:43 +00:00
russell 4bc54633d7 Change global_app_buf to ast_str_thread_global_buf.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184693 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27 16:21:10 +00:00
russell 1ae3284012 Change g_eid to ast_eid_default.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184630 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27 14:00:18 +00:00
russell dba9d18b47 Don't act surprised if we get a -1 indication.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184515 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27 01:40:28 +00:00
russell d8dbfb1cb1 Pass more useful information through to lock tracking when DEBUG_THREADS is on.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184512 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27 01:35:56 +00:00
russell d5a43c815a Remove unneeded AST_LIST_ENTRY() and comment on the purpose of ast_event_ref.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184344 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25 22:11:35 +00:00
russell f89c5f7e6c Improve performance of the ast_event cache functionality.
This code comes from svn/asterisk/team/russell/event_performance/.

Here is a summary of the changes that have been made, in order of both
invasiveness and performance impact, from smallest to largest.

1) Asterisk 1.6.1 introduces some additional logic to be able to handle
   distributed device state.  This functionality comes at a cost.
   One relatively minor change in this patch is that the extra processing
   required for distributed device state is now completely bypassed if
   it's not needed.

2) One of the things that I noticed when profiling this code was that a
   _lot_ of time was spent doing string comparisons.  I changed the way
   strings are represented in an event to include a hash value at the front.
   So, before doing a string comparison, we do an integer comparison on the
   hash.

3) Finally, the code that handles the event cache has been re-written.
   I tried to do this in a such a way that it had minimal impact on the API.
   I did have to change one API call, though - ast_event_queue_and_cache().
   However, the way it works now is nicer, IMO.  Each type of event that
   can be cached (MWI, device state) has its own hash table and rules for
   hashing and comparing objects.  This by far made the biggest impact on
   performance.

For additional details regarding this code and how it was tested, please see the
review request.

(closes issue #14738)
Reported by: russell

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184339 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25 21:57:19 +00:00
eliel ea9869bd3d Merged revisions 184188 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r184188 | eliel | 2009-03-25 10:12:54 -0400 (Wed, 25 Mar 2009) | 13 lines
  
  Avoid destroying the CLI line when moving the cursor backward and trying to autocomplete.
  
  When moving the cursor backward and pressing TAB to autocomplete, a NULL is put
  in the line and we are loosing what we have already wrote after the actual
  cursor position.
  
  (closes issue #14373)
  Reported by: eliel
  Patches:
        asterisk.c.patch uploaded by eliel (license 64)
        Tested by: lmadsen
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184220 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25 14:38:19 +00:00
russell 118472c881 Include poll-compat.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184219 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25 14:33:32 +00:00
russell db54da02eb Change poll() to ast_poll().
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184151 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-25 02:03:13 +00:00
russell 32e6443471 Put siren7 and siren14 in ast_best_codec() just so they're in there somewhere.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184043 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-24 22:00:58 +00:00
tilghman 5352872fe6 Allow browsers to cache images and other static content.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183865 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-23 23:28:20 +00:00
file c4904c68f2 Fix a minor logic flaw with the bridge generic thread.
We only want to move the channel pointers that are actually present.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183652 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-22 21:00:28 +00:00
mmichelson 05cd25cfcf Remove symbols I just added to main/asterisk.exports and instead rename the functions.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183554 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-20 16:24:20 +00:00
mmichelson be5ed166f1 Add some missing symbols to main/asterisk.exports
Hey! chan_sip.so loads now!



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183553 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-20 16:19:53 +00:00
dvossel 00a31b1c96 Merged revisions 183386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183386 | dvossel | 2009-03-19 14:40:07 -0500 (Thu, 19 Mar 2009) | 6 lines
  
  Cleaning up a few things in detect disconnect patch
  
  Initialized ast_call_feature in detect_disconnect to avoid accessing uninitialized memory.  Cleaned up /param tags in features.h.  No longer send dynamic features in ast_feature_detect. 
  
  issue #11583
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183436 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19 20:30:39 +00:00
qwell 4621c7567e Merged revisions 183291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183291 | qwell | 2009-03-19 13:28:16 -0500 (Thu, 19 Mar 2009) | 1 line
  
  Export some more required symbols.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183312 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19 18:34:11 +00:00
russell ed49842057 Merged revisions 183241 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183241 | russell | 2009-03-19 12:52:52 -0500 (Thu, 19 Mar 2009) | 2 lines

Remove the use of RTLD_NOLOAD, as it is not behaving like expected.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183242 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19 18:00:15 +00:00
russell 4ca2f82302 Merged revisions 183238 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183238 | russell | 2009-03-19 12:41:39 -0500 (Thu, 19 Mar 2009) | 1 line

Allow the AES API to work.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183239 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19 17:42:06 +00:00
dvossel 92a2f9411f Merged revisions 183126 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183126 | dvossel | 2009-03-19 11:15:16 -0500 (Thu, 19 Mar 2009) | 17 lines
  
  Allow disconnect feature before a call is bridged
  
  feature.conf has a disconnect option.  By default this option is set to '*', but it could be anything.  If a user wishes to disconnect a call before the other side answers, only '*' will work, regardless if the disconnect option is set to something else.  This is because features are unavailable until bridging takes place.  The default disconnect option, '*', was hardcoded in app_dial, which doesn't make any sense from a user perspective since they may expect it to be something different.  This patch allows features to be detected from outside of the bridge, but not operated on.  In this case, the disconnect feature can be detected before briding and handled outside of features.c.
  
  (closes issue #11583)
  Reported by: sobomax
  Patches:
  	patch-apps__app_dial.c uploaded by sobomax (license 359)
  	11583.latest-patch uploaded by murf (license 17)
  	detect_disconnect.diff uploaded by dvossel (license 671)
  Tested by: sobomax, dvossel
  Review: http://reviewboard.digium.com/r/195/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183172 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19 16:28:33 +00:00
russell d79fd6d613 Merged revisions 183145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183145 | russell | 2009-03-19 11:21:56 -0500 (Thu, 19 Mar 2009) | 1 line

Add missing semicolon in exports script.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183148 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19 16:22:27 +00:00
russell f24fdadbe0 Merged revisions 183123 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183123 | russell | 2009-03-19 11:13:18 -0500 (Thu, 19 Mar 2009) | 2 lines

Allow the CallerID API to work again.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183124 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19 16:14:06 +00:00
file e2ac5e8bd0 Fix an issue where a T38 control frame would get dropped.
If two channels were bridged together using a generic bridge the T38
control frame would get passed up instead of being indicated on the
other channel.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183057 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18 22:22:56 +00:00
tilghman 17c65d7dcd Fixing a lost symbol in manager.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182960 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18 19:41:57 +00:00
kpfleming 1af379d0ec Merged revisions 182882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182882 | kpfleming | 2009-03-18 06:31:41 -0500 (Wed, 18 Mar 2009) | 3 lines
  
  fix another symbol namespace issue (reported by Andrew on asterisk-dev)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182883 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18 11:40:11 +00:00
russell b48669aa8f Merged revisions 182810 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines

Fix cases where the internal poll() was not being used when it needed to be.

We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182847 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18 02:28:55 +00:00
kpfleming 870bfecfe6 Merged revisions 182808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182808 | kpfleming | 2009-03-17 20:55:22 -0500 (Tue, 17 Mar 2009) | 5 lines
  
  Improve the build system to *properly* remove unnecessary symbols from the runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix.
  
  With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example).
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182826 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18 02:21:23 +00:00
russell d38c147e98 Tweak the handling of the frame list inside of ast_answer().
This does not change any behavior, but moves the frames from the local frame
list back to the channel read queue using an O(n) algorithm instead of O(n^2).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182553 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17 15:22:12 +00:00
kpfleming 4385e0c2be correct logic flaw in ast_answer() changes in r182525
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182530 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17 14:59:33 +00:00
kpfleming 5b52c7bb4d Improve behavior of ast_answer() to not lose incoming frames
ast_answer(), when supplied a delay before returning to the caller, use ast_safe_sleep() to implement the delay. Unfortunately during this time any incoming frames are discarded, which is problematic for T.38 re-INVITES and other sorts of channel operations.

When a delay is not passed to ast_answer(), it still delays for up to 500 milliseconds, waiting for media to arrive. Again, though, it discards any control frames, or non-voice media frames.

This patch rectifies this situation, by storing all incoming frames during the delay period on a list, and then requeuing them onto the channel before returning to the caller.

http://reviewboard.digium.com/r/196/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182525 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17 14:38:11 +00:00
tilghman a275cafa20 Merged revisions 182449 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182449 | tilghman | 2009-03-17 00:50:52 -0500 (Tue, 17 Mar 2009) | 7 lines
  
  Fix race in astdb
  The underlying db1 implementation does not fully isolate the pages retrieved
  from astdb, so the lock protecting accesses needs to be extended until the
  copy from the shared memory structure is done.
  (closes issue #14682)
   Reported by: makoto
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182450 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17 05:51:54 +00:00
file c30a81ffe1 Fix a memory leak in the ast_answer / __ast_answer API call.
For a channel that is not yet answered this API call will wait
until a voice frame is received on the channel before returning.
It does this by waiting for frames on the channel and reading them
in. The frames read in were not freed when they should have been.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182171 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-16 13:58:24 +00:00
mmichelson a87d4b8fb9 Remove ast_ prefix from functions which are not public.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182071 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-13 17:49:01 +00:00
mmichelson 6d62a059a8 Merged revisions 181990 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r181990 | mmichelson | 2009-03-13 12:12:32 -0500 (Fri, 13 Mar 2009) | 35 lines
  
  Check the DYNAMIC_FEATURES of both the chan and peer when interpreting DTMF.
  
  Dynamic features defined in the applicationmap section of features.conf allow
  one to specify whether the caller, callee, or both have the ability to use the
  feature. The documentation in the features.conf.sample file could be interpreted
  to mean that one only needs to set the DYNAMIC_FEATURES channel variable on the
  calling channel in order to allow for the callee to be able to use the features
  which he should have permission to use. However, the DYNAMIC_FEATURES variable
  would only be read from the channel of the participant that pressed the DTMF
  sequence to activate the feature. The result of this was that the callee was
  unable to use dynamic features unless the dialplan writer had taken measures
  to be sure that the DYNAMIC_FEATURES variable was set on the callee's channel.
  
  This commit changes the behavior of ast_feature_interpret to concatenate the
  values of DYNAMIC_FEATURES from both parties involved in the bridge. The features
  themselves determine who has permission to use them, so there is no reason to believe
  that one side of the bridge could gain the ability to perform an action that they
  should not have the ability to perform.
  
  Kevin Fleming pointed out on the asterisk-users list that the typical way that this
  was worked around in the past was by setting _DYNAMIC_FEATURES on the calling channel
  so that the value would be inherited by the called channel. While this works, the
  documentation alone is not enough to figure out why this is necessary for the callee
  to be able to use dynamic features. In this particular case, changing the code to match
  the documentation is safe, easy, and will generally make things easier for people for
  future installations.
  
  This bug was originally reported on the asterisk-users list by David Ruggles.
  
  (closes issue #14657)
  Reported by: mmichelson
  Patches:
        14657.patch uploaded by mmichelson (license 60)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182029 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-13 17:26:43 +00:00
tilghman 60a45693b7 Adjust translation table column widths based upon the translation times.
Previously, only 5 columns were displayed, and if a translation time exceeded
99,999 useconds, it would be displayed as 0, instead of its actual time.
(closes issue #14532)
 Reported by: pj
 Patches: 
       20090311__bug14532.diff.txt uploaded by tilghman (license 14)
 Tested by: pj


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181731 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-12 17:32:13 +00:00
russell 148ff40f66 Make handling of the BRIDGE_PLAY_SOUND variable thread-safe.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181465 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11 22:25:57 +00:00
russell 6935aa38e4 Make handling of the BRIDGEPVTCALLID variable thread-safe.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181428 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11 22:14:55 +00:00
russell 6d42dc76b2 Merged revisions 181423 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r181423 | russell | 2009-03-11 16:42:58 -0500 (Wed, 11 Mar 2009) | 9 lines

Make code that updates BRIDGEPEER variable thread-safe.

It is not safe to read the name field of an ast_channel without the channel
locked.  This patch fixes some places in channel.c where this was being done,
and lead to crashes related to masquerades.

(closes issue #14623)
Reported by: guillecabeza

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181424 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11 21:49:29 +00:00
jpeeler 7e7a32a4ed Fix malloc debug macros to work properly with h323.
The main problem here was that cstdlib was undefining free thereby causing the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue. 

A few other issues were addressed:
- There were a few instances of functions improperly passing ast_free instead
of ast_free_ptr.
- Some clean up was done to avoid the debug macros intentionally being redefined.
(copied below from Kevin's commit, appreciate the help)
- disable astmm.h from doing anything when STANDALONE is defined, which is used
by the tools in the utils/ directory that use parts of Asterisk header files in
hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are
compiled with STANDALONE defined.

(closes issue #13593)
Reported by: pj



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181135 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11 04:06:44 +00:00
tilghman a914fe0511 Add MALLOC_DEBUG to various utility APIs, so that memory leaks can be tracked back to their source.
(related to issue #14636)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181028 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11 00:29:59 +00:00
tilghman 78ae846440 Spacing changes only
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181027 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11 00:28:28 +00:00
file 2d937baa0d Reset the thread local string buffer when handling the UserEvent action.
(closes issue #14593)
Reported by: JimDickenson


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180800 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-10 14:40:38 +00:00
jpeeler 5a0a55b7a4 Add Doxygen documentation for API changes from 1.6.0 to 1.6.1
Copied from my review board description:
This is a continuation of the API changes documentation started for describing
changes between releases. Most of the API changes were pretty simple needing
only to be brought to attention via the new "Asterisk API Changes" list.
However, if you see anything that needs further explanation feel free to
supplement what is there. The current method of documenting is to add (in the
header file): \version <ver number> <description of changes> and then to add
the function to the change list in doxyref.h on the AstAPIChanges page. I also
made sure all the functions that were newly added were tagged with \since
1.6.1. I think this is a good habit to start both for the historical aspect as
well as for the future ability to easily add a "New Asterisk API" page.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180719 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-09 20:58:17 +00:00
dvossel 37af22206f Merged revisions 180532 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r180532 | dvossel | 2009-03-06 11:19:55 -0600 (Fri, 06 Mar 2009) | 9 lines
  
  Fix handling of backreferences for ENUM lookups
  
  enum.c did not handle regex backtraces correctly.  The '\1' in the regex is a backreference that requires a pattern match to be inserted.  The way the code used to work is that it would find the backreference and insert the entire input string minus the '+'.  This is incorrect.  The regexec() function takes in a variable called pmatch which is an array of structs containing the start and end indexes for each backreference substring.  The original code actually passed the pmatch array pointer into regexec but never did anything with it.  Now when a backtrace is found, the backtrace number is looked up in the pmatch array and the correct substring is inserted.
  
  (closes issue #14576)
  Reported by: chris-mac
  Review: http://reviewboard.digium.com/r/187/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180534 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-06 17:26:38 +00:00
kpfleming 5d5eb54ba7 Merged revisions 180372 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r180372 | kpfleming | 2009-03-05 12:22:16 -0600 (Thu, 05 Mar 2009) | 9 lines
  
  Fix problems when RTP packet frame size is changed
  
  During some code analysis, I found that calling ast_rtp_codec_setpref() on an ast_rtp session does not work as expected; it does not adjust the smoother that may on the RTP session, in fact it summarily drops it, even if it has data in it, even if the current format's framing size has not changed. This is not good.
  
  This patch changes this behavior, so that if the packetization size for the current format changes, any existing smoother is safely updated to use the new size, and if no smoother was present, one is created. A new API call for smoothers, ast_smoother_reconfigure(), was required to implement these changes.
  
  Review: http://reviewboard.digium.com/r/184/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180373 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-05 18:29:38 +00:00
file 78d18e52a4 Merge phase 1 support for the new bridging architecture.
This commit brings in the bridging core, bridging technologies,
and the ConfBridge application.

For usage information on the ConfBridge application please see
the output of "core show application ConfBridge" from the CLI.

For API documentation please see the doxygen page describing the
architecture and the documentation for each API call.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180369 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-05 18:18:27 +00:00
tilghman e2aa86b3e0 Spacing changes only
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180259 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-04 20:48:42 +00:00
file 529951d632 Merged revisions 180194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r180194 | file | 2009-03-04 15:22:50 -0400 (Wed, 04 Mar 2009) | 4 lines
  
  Look for the number in a callerid string starting from the end. This way a value using <> can exist in the name portion.
  
  (issue #AST-194)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180195 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-04 19:24:59 +00:00
dvossel 58c677376b app_read does not break from prompt loop with user terminated empty string
In app.c, ast_app_getdata is called to stream the prompts and receive DTMF input.  If ast_app_getdata() receives an empty string caused by the user inputing the end of string character, in this case '#', it should break from the prompt loop and return to app_read, but instead it cycles through all the prompts.  I've added a return value for this special case in ast_readstring() which uses an enum I've delcared in apps.h.  This enum is now used as a return value for ast_app_getdata().

(closes issue #14279)
Reported by: Marquis
Patches:
	fix_app_read.patch uploaded by Marquis (license 32)
	read-ampersanmd.patch2 uploaded by dvossel (license 671)
Tested by: Marquis, dvossel
Review: http://reviewboard.digium.com/r/177/




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180032 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 23:21:18 +00:00
murf 3d188dd5c6 Merged revisions 179807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

I had some work to do to port these changes to trunk; the 
check_expr stuff hasn't been updated here for quite some
time, it appears. I added some more tests to the check_expr2
suite. I had to play around with the makefile a bit, etc.

I added STANDALONE2 #ifdefs to ast_expr2.y so as not to
conflict structure with aelparse.

........
  r179807 | murf | 2009-03-03 11:11:34 -0700 (Tue, 03 Mar 2009) | 19 lines
  
  These changes allow AEL to better check ${} constructs within $[...], that are concatenated with text.
  
  I modified and added rules in ast_expr2.fl to better handle
  the concatenations.
  
  I added some default routines to ast_expr2.y so the standalone would
  compile. It also looks like I haven't run this thru bison since 2.1, so
  it's good to get this updated.
  
  The Makefile has comments added now for check_expr2 and check_expr to
  explain what they are for, and how to run them. 
  
  The testexpr2s stuff has been removed, in favor of check_expr2.
  
  expr2.testinput has been updated to include the two expressions
  that inspired these changes (from mcnobody on #asterisk this morning)
  The regression has been run and all looks well.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179973 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 22:12:02 +00:00
file 53cadeca53 Merged revisions 179840 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r179840 | file | 2009-03-03 14:27:09 -0400 (Tue, 03 Mar 2009) | 9 lines
  
  Do not assume that the bridge_cdr is still attached to the channel when the 'h' exten is finished executing.
  
  It is possible for a masquerade operation to occur when the 'h' exten is operating. This operation moves
  the CDR records around causing the bridge_cdr to no longer exist on the channel where it is expected to.
  We can not safely modify it afterwards because of this, so don't even try.
  
  (closes issue #14564)
  Reported by: meric
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179841 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 18:28:46 +00:00
russell 065dbfa6d6 Merged revisions 179741 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r179741 | russell | 2009-03-03 10:45:46 -0600 (Tue, 03 Mar 2009) | 6 lines

Ensure chan->fdno always gets reset to -1 after handling a channel fd event.

Since setting fdno to -1 had to be moved, a couple of other code paths that
do process an fd event return early and do not pass through the code path
where it was moved to.  So, set it to -1 in a few other places, too.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179742 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 16:47:28 +00:00
file 4298d14a2d Merged revisions 179671 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r179671 | file | 2009-03-03 10:38:09 -0400 (Tue, 03 Mar 2009) | 3 lines
  
  Move where fdno is set to the default value to *after* the read callback of the channel driver is called.
  We have to do this as the underlying channel driver may need the fdno value to determine what to read.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179672 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 14:40:04 +00:00
russell 8e1cefe510 Merged revisions 179608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r179608 | russell | 2009-03-03 07:53:52 -0600 (Tue, 03 Mar 2009) | 9 lines

Make it easier to detect an improper call to ast_read().

When you call ast_waitfor() on a channel, the index into the channel fds array
that holds the file descriptor that poll() determines has input available is
stored in fdno.  This patch clears out this value after a call to ast_read()
and also reports errors if ast_read() is called without an fdno set.

From a discussion on the asterisk-dev list.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179609 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 13:54:41 +00:00
jpeeler 1da516c8d4 Merged revisions 179536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r179536 | jpeeler | 2009-03-02 17:54:39 -0600 (Mon, 02 Mar 2009) | 15 lines
  
  Fix bridging regression from commit 176701
  
  This fixes a bad regression where the bridge would exit after an attended
  transfer was made. The problem was due to nexteventts getting set after the
  masquerade which caused the bridge to return AST_BRIDGE_COMPLETE.
  
  (closes issue #14315)
  Reported by: tim_ringenbach
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179537 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 00:01:51 +00:00
tilghman 8bae79780d Merged revisions 179468 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r179468 | tilghman | 2009-03-02 17:09:01 -0600 (Mon, 02 Mar 2009) | 10 lines
  
  When ending a recording with silence detection, remember to reduce the duration.
  The end of the recording is correspondingly trimmed, but the duration was not
  trimmed by the number of seconds trimmed, so the saved duration was necessarily
  longer than the actual soundfile duration.
  (closes issue #14406)
   Reported by: sasargen
   Patches: 
         20090226__bug14406.diff.txt uploaded by tilghman (license 14)
   Tested by: sasargen
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179469 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02 23:10:18 +00:00
russell 5f009f0b93 Merged revisions 179461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r179461 | russell | 2009-03-02 16:58:18 -0600 (Mon, 02 Mar 2009) | 8 lines

Ensure that only one thread is calling ast_settimeout() on a channel at a time.

For example, with an IAX2 channel, you can have both the channel thread and the
chan_iax2 processing threads calling this function, and doing so twice at the
same time is a bad thing.

(Found in a debugging session with dvossel and mmichelson)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179462 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02 23:00:30 +00:00
qwell 1b3a252266 Merged revisions 179395 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r179395 | qwell | 2009-03-02 14:14:57 -0600 (Mon, 02 Mar 2009) | 1 line
  
  Remove several silly warnings in editline.  One about a broken preprocessor directive, and another about strlcpy/strlcat.

  (closes issue #14264)
  Reported by: dimas
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179396 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02 20:16:51 +00:00
file b415a38ac4 Fix issue where changing the volume of both directions of audio did not work.
(closes issue #14574)
Reported by: KNK
Patches:
      audiohook_volume_fix.diff uploaded by KNK (license 545)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179291 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02 14:13:45 +00:00
murf 16ad12fa05 Merged revisions 178956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

In this case, it's just a matter of reducing the default timeouts from 2000
to 1000 msec, as the max def feature digit timeout is no longer halved.

........
  r178956 | murf | 2009-02-26 14:27:32 -0700 (Thu, 26 Feb 2009) | 18 lines
  
  This change moves the default feature digit timeout to 1000 ms from the previous default of 500.
  
  As per bug 14515, a dev discussion arrived at a "mediated concensus" 
  of a default feature digit timeout of 1.0 sec. Some voted for 1300;
  ctooley thought 1500 for distracted phone users in phone booths; 
  kpfleming put his foot down at 1.0 sec. 
  
  Users who found the previous default max delay of 250 msec perfect,
  are welcome to override the new default. Notice that I said that
  250 msec was the default; wait a minute, you might say, the config
  file said it was 500 msec!; well, because of the bug fix for 14515,
  we found that 500 msec was actually enforcing a max of 250. The bug
  fix would restore 500 msec, but we felt even that was a bit tight
  for most users... 2000 msec was pushed earlier by mmichelson, so
  that reduces to 1000 msec after the bug fix. Enjoy!
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178986 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-27 03:45:58 +00:00
tilghman 9ceb929389 Sound confirmation of call pickup success.
(closes issue #13826)
 Reported by: azielke
 Patches: 
       pickupsound2-trunk.patch uploaded by azielke (license 548)
       __20081124_bug_13826_updated.patch uploaded by lmadsen (license 10)
 Tested by: lmadsen


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178919 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26 18:41:28 +00:00
murf 2c570b15f4 Merged revisions 178804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r178804 | murf | 2009-02-26 10:09:03 -0700 (Thu, 26 Feb 2009) | 28 lines
  
  This patch prevents the feature detection timeout from being cut in half.
  
  Because the ast_channel_bridge() call will return 0 and pass
  a frame pointer for both DTMF_BEGIN and DTMF_END, the feature_timer
  field in hte config struct is getting decremented twice, which 
  effectively cuts the digittimeout in half. I added conditions
  to the if statement to only let DTMF_END frames to flow thru,
  which solved the problem. Also, when the frame pointer is null,
  let control flow thru-- this usually happens on timeouts. I added
  a comment to the code to explain what's going on and why.
  
  Many thanks to sodom for reporting this problem. Personnally, it always seemed
  like something was wrong with the featuredigittimeout, but I never
  could quite decide what... and was too busy to investigate.
  This bug forced the issue, and now we know.
  
  Sodom had other issues in 14515, but I couldn't reproduce them. If
  he still has problems, and wants to get them solved, he is welcome
  to reopen 14515.
  
  
  (closes issue #14515)
  Reported by: sodom
  Patches:
        14515.patch uploaded by murf (license 17)
  Tested by: murf, sodom
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178828 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26 17:22:11 +00:00
file 4f574bf0bb Fix an issue where the timer for file playback would not be stopped if DAHDI was not installed.
(closes issue #14541)
Reported by: grant


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178801 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26 16:42:36 +00:00
file f61c8a92bc Ensure there is a valid tone part before trying to play tones.
(closes issue #14558)
Reported by: alecdavis


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178764 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26 15:40:10 +00:00
tilghman 88044f7747 Picky, picky buildbots
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178607 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-25 19:49:46 +00:00
tilghman 82a4dd2ed8 Use notification when timezone files change and re-scan then.
(closes issue #14300)
 Reported by: jamessan
 Patches: 
       20090127__bug14300.diff.txt uploaded by tilghman (license 14)
       20090224__bug14300.diff uploaded by jamessan (license 246)
 Tested by: jamessan
 Review: http://reviewboard.digium.com/r/136/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178605 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-25 19:24:44 +00:00
russell f60156b9b5 Merged revisions 178508 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r178508 | russell | 2009-02-25 06:43:36 -0600 (Wed, 25 Feb 2009) | 2 lines

Update the copyright year for the main page of the doxygen documentation.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178509 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-25 12:45:30 +00:00
tilghman 4c2dbfdee6 Apparently, a void cast doesn't override warn_unused_result.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178381 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-24 20:52:44 +00:00
tilghman 1a9efbc5d4 The 3 possible errors with pipe(2) are all impossible in this situation.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178375 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-24 20:40:02 +00:00
russell 199e3fd427 Merged revisions 178373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r178373 | russell | 2009-02-24 14:36:19 -0600 (Tue, 24 Feb 2009) | 6 lines

Only set dtmfcount on BEGIN, and ensure it gets reset to 0 properly.

(issue #14460)
Reported by: moliveras
Tested by: russell

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178374 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-24 20:39:57 +00:00
tilghman 90004ef794 Use a SIGPIPE to kill the process, instead of depending upon the astcanary process being inherited by init.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178342 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-24 20:06:48 +00:00
russell 25c63fb708 Merged revisions 178141 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r178141 | russell | 2009-02-23 17:09:01 -0600 (Mon, 23 Feb 2009) | 14 lines

Fix infinite DTMF when a BEGIN is received without an END.

This commit is related to rev 175124 of 1.4 where a previous attempt was made
to fix this problem.  The problem with the previous patch was that the inserted
code needed to go _before_ setting the lastrxts to the current timestamp.
Because those were the same, the dtmfcount variable was never decremented, and
so the END was never sent.

In passing, I removed the dtmfsamples variable which was completed unused.  I
also removed a redundant setting of the lastrxts variable.

(closes issue #14460)
Reported by: moliveras

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178142 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-23 23:11:37 +00:00
russell 22813ed533 Fix a regression in scheduler entry ordering, and add a regression test for it.
(closes issue #14522)
Reported by: pj
Tested by: russell


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178022 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-23 17:29:16 +00:00
mvanbaak 1de0e3bb95 add extra check for sysinfo/sysctl
(closes issue #14513)
Reported by: snuffy
Patches:
      bug14513_fixsysinfo.diff uploaded by snuffy (license 35)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177913 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-21 14:37:04 +00:00
seanbright fd686d9901 Trailing whitespace, minor coding guideline fixes, and start beefing up the
hashtab documentation a bit.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177884 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-21 14:16:44 +00:00
tilghman a8f46f7772 Merged revisions 177786 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r177786 | tilghman | 2009-02-20 16:59:52 -0600 (Fri, 20 Feb 2009) | 9 lines
  
  Don't print the CR-NL combination when we aren't outputting to the manager.
  
  An embedded CR-NL in a CLI command screws up several AMI parsers that don't
  expect to see that combination in the middle of output.
  
  (Closes issue #14305)
  Reported by: martins
  Patch by: tilghman
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177787 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-20 23:02:35 +00:00
tilghman 8d625b91bc Allow semicolons to be escaped, when passing arguments to the System command.
(closes issue #14231)
 Reported by: jcovert
 Patches: 
       20090113__bug14231__2.diff.txt uploaded by Corydon76 (license 14)
       corrected_20090113__bug14231__2.diff.txt uploaded by jcovert (license 551)
 Tested by: jcovert


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177664 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-20 17:29:51 +00:00
murf 904ff8985a Merged revisions 177540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

Trunk was already pretty 8-bit clean; but I'm still
removing the --full from the flex command so everything
is uniform.

........
  r177540 | murf | 2009-02-19 15:51:37 -0700 (Thu, 19 Feb 2009) | 21 lines
  
  This patch fixes a problem with 8-bit input to the ast_expr2 scanner.
  
  The real culprit was the --full argument to flex
  in the Makefile! This causes a 7-bit scanner to be
  generated.
  
  I reviewed the rules and found one rule where I needed
  to specifically include 8-bit chars for a token.
  
  I tested against the text supplied by ibercom, and 
  all looks very well.
  
  This has been there a surprisingly long time!
  
  
  (closes issue #14498)
  Reported by: ibercom
  Patches:
        14498.patch uploaded by murf (license 17)
  Tested by: murf
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177595 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-19 23:56:50 +00:00
jpeeler 375af5f7be Fix mismerge from revision 176708 pointed out by Kaloyan Kovachev on the
asterisk-dev mailing list. Thanks!



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177356 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-19 15:56:31 +00:00
tilghman def540499c Handle negative length and eliminate a condition that is always true.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177287 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 23:51:35 +00:00
kpfleming adc45d1fce fix two very minor bugs: if anyone ever uses SLINEAR16 as a format in RTP, ensure that the samples are byte-swapped to network order if needed. also, when a smoother is operating on a format that has a sample rate other than 8000 samples per second, use the proper sample rate for computing delivery timestamps.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177229 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 23:09:58 +00:00
dvossel fd069d66d7 Locking issue in action_bridge and bridge_exec
action_bridge() and bridge_exec() both search for the channels to bridge to, and then immediately drop the lock.  Instead, they should hold the lock until the masquerade is complete.  This will guarantee the channel remains and prevent any other weirdness from occurring.  In action_bridge() some more weirdness comes into play.  Both channels are needlessly locked at the same time and perform the exact same logic.  It makes sense from a coding organizational standpoint, but could cause a theoretical deadlock so I split the code up.  There is an issue associated with this, but since its a rather complicated thing to reproduce I'm not certain this alone will close it.

issue# 14296
Review: http://reviewboard.digium.com/r/167/




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177226 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 22:51:38 +00:00
dbailey fba5c1dadd Fixed error where a check for an zero length, terminated string was needed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177035 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 17:24:07 +00:00
dbailey a206b541a2 Need to take into account the \0 terminator of the old string to determine the amount available.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176948 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 16:09:12 +00:00
murf 3462b9fd21 This patch fixes merge_contexts_and_delete so it does not deadlock when hints are present.
Reason: when I re-engineered the merge_and_delete func to
reduce its lock time, I failed to notice that the 
functions it calls still also do locking as before.
This leads to deadlocks on dialplan reloads, when
there are actually living, subscribed hints registered
in the system.

While the reporter come across this problem while using
AEL, I might note that these deadlocks should also happen
if extensions.conf were used.

Here I added these routines to pbx.c:

ast_add_extension_nolock
add_pri_lockopt
ast_add_extension2_lockopt
find_context
add_hint_nolock

All of the above routines are static and restricted
to be used only within pbx.c, and more specifically
within the merge_contexts_and_delete routine.

They are pretty much the same as their counterparts
except they don't lock contexts or hints.

Most of them now do the real work of their
name-alike, with optional locking via extra arguments,
and are called by their name-alike. The goal was to
have the original functions so they would behave
exactly as before.

Both PJ and I tested these fixes, and the deadlocking
problem is no longer encountered.

(closes issue #14357)
Reported by: pj
Patches:
      14357.diff uploaded by murf (license 17)
Tested by: pj, murf



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176943 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 15:35:26 +00:00
russell f9fa6f0e29 Fix a number of incorrect uses of strncpy().
The big problem here is that the 3rd argument provided in these uses of strncpy()
did not reserve a byte for the null terminator, leaving the potential for writing
one byte past the end of the buffer.

Aside from this, there were coding guidelines violations with regards to spacing,
as well as hard coded lengths being used instead of sizeof().


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176901 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 06:00:40 +00:00
kpfleming 2d8a9c69b5 suppress smoothers for Siren codecs as well as Speex and G.723.1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176841 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 02:02:54 +00:00
jpeeler fa3ebc7f2c Merged revisions 176701 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r176701 | jpeeler | 2009-02-17 15:54:34 -0600 (Tue, 17 Feb 2009) | 17 lines
  
  Modify bridging to properly evaluate DTMF after first warning is played
  
  The main problem is currently if the Dial flag L is used with a warning sound,
  DTMF is not evaluated after the first warning sound. To fix this, a flag has 
  been added in ast_generic_bridge for playing the warning which ensures that if
  a scheduled warning is missed, multiple warrnings are not played back (due to a
  feature evaluation or waiting for digits). ast_channel_bridge was modified to
  store the nexteventts in the ast_bridge_config structure as that information
  was lost every time ast_channel_bridge was reentered, causing a hangup due to
  incorrect time calculations.
  
  (closes issue #14315)
  Reported by: tim_ringenbach
 
  Reviewed on reviewboard:
  http://reviewboard.digium.com/r/163/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176708 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 22:08:00 +00:00
russell 590d768106 Update the timing API to have better support for multiple timing interfaces.
1) Add module use count handling so that timing modules can be unloaded.

2) Implement unload_module() functions for the timing interface modules.

3) Allow multiple timing modules to be loaded, and use the one with the
   highest priority value.

4) Report which timing module is being use in the "timing test" CLI command.

(closes issue #14489)
Reported by: russell

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176666 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 21:22:40 +00:00
russell 488748dd1f Significantly improve scheduler performance under high load.
This patch changes the scheduler to use a max-heap to store pending scheduler
entries instead of a fully sorted doubly linked list.  When the number of
entries in the scheduler gets large, this will perform much better.  For much
more detailed information on this change, see the review request.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176639 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 21:04:08 +00:00
russell 18f52ab1e7 Add an implementation of the heap data structure.
A heap is a convenient data structure for implementing a priority queue.

Code from svn/asterisk/team/russell/heap/.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176632 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 20:51:10 +00:00
russell 1f57cd4e51 Merge a large set of updates to the Asterisk indications API.
This patch includes a number of changes to the indications API.  The primary
motivation for this work was to improve stability.  The object management
in this API was significantly flawed, and a number of trivial situations could
cause crashes.

The changes included are:

1) Remove the module res_indications.  This included the critical functionality
   that actually loaded the indications configuration.  I have seen many people
   have Asterisk problems because they accidentally did not have an
   indications.conf present and loaded.  Now, this code is in the core,
   and Asterisk will fail to start without indications configuration.

   There was one part of res_indications, the dialplan applications, which did
   belong in a module, and have been moved to a new module, app_playtones.

2) Object management has been significantly changed.  Tone zones are now
   managed using astobj2, and it is no longer possible to crash Asterisk by
   issuing a reload that destroys tone zones while they are in use.

3) The API documentation has been filled out.

4) The API has been updated to follow our naming conventions.

5) Various bits of code throughout the tree have been updated to account
   for the API update.

6) Configuration parsing has been mostly re-written.

7) "Code cleanup"

The code is from svn/asterisk/team/russell/indications/.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176627 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 20:41:24 +00:00
russell b6cc1075c4 Fix a race condition that caused device states to become incorrect for hints.
The problem here is that the hint processing code was subscribed to the wrong
event type.  So, it started processing state for a hint too soon, before the
device state cache had been updated.

Also, fix a similar bug in app_queue, as it was also subscribed to the wrong
event type.

(closes issue #14461)
Reported by: alecdavis


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176557 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 17:33:38 +00:00
oej d1a0761768 If there are no realtime engines, there's no reason to check for realtime families
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176513 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17 15:18:55 +00:00
tilghman 27c4fd2856 Might want to update the buffer pointer after a realloc (or we crash)
(closes issue #14485)
 Reported by: davevg


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176360 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16 23:48:54 +00:00
kpfleming 26faefc9a2 Merged revisions 176216 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r176216 | kpfleming | 2009-02-16 15:10:38 -0600 (Mon, 16 Feb 2009) | 3 lines
  
  fix a flaw in the ast_string_field_build() family of API calls; these functions made no attempt to reuse the space already allocated to a field, so every time the field was written it would allocate new space, leading to what appeared to be a memory leak.
........
  r176254 | kpfleming | 2009-02-16 15:41:46 -0600 (Mon, 16 Feb 2009) | 3 lines

  correct a logic error in the last stringfields commit... don't mark additional space as allocated if the string was built using already-allocated space
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176255 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16 21:45:54 +00:00
mmichelson d79076e9c2 Assist proper thread synchronization when stopping the logger thread.
I was finding that on my dev box, occasionally attempting to "stop now" in
trunk would cause Asterisk to hang. I traced this to the fact that the logger
thread was waiting on a condition which had already been signalled. The logger
thread also need to be sure to check the value of the close_logger_thread variable.

The close_logger_thread variable is only checked when the list of logmessages is empty.
This allows for the logger thread to print and free any pending messages before exiting.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176174 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16 18:25:57 +00:00
russell c9c7f06a74 Make the causes array static, and remove the type name as it is not needed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175983 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16 02:54:42 +00:00
russell a67e27326e Make ast_sched_report() and ast_sched_dump() thread safe.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175882 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-15 21:27:33 +00:00
russell 3714d9820f Fix a number of problems with ast_sched_report().
1) It had numerous coding guidelines violations with regards to formatting.

2) It allocated memory using ast_calloc() that was never freed.

3) It didn't check for failure from the allocation.

4) It used sprintf() and strcat() to build the result, doing zero checking to
   prevent writing past the end of the provided buffer.

The function also lacks API documentation, but that has not been addressed in
this commit.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175829 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-15 20:56:27 +00:00
russell 5056fae5b7 add missing </para>
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175623 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-13 20:23:39 +00:00
kpfleming a46dd55034 Add basic (passthrough, playback, record) support for ITU G.722.1 and G.722.1C (also known as Siren7 and Siren14)
This patch adds passthrough, file recording and file playback support for the codecs listed above, with negotiation over SIP/SDP supported. Due to Asterisk's current limitation of treating a codec/bitrate combination as a unique codec, only G.722.1 at 32 kbps and G.722.1C at 48 kbps are supported.

Along the way, some related work was done:

1) The rtpPayloadType structure definition, used as a return result for an API call in rtp.h, was moved from rtp.c to rtp.h so that the API call was actually usable. The only previous used of the API all was chan_h323.c, which had a duplicate of the structure definition instead of doing it the right way.

2) The hardcoded SDP sample rates for various codecs in chan_sip.c were removed, in favor of storing these sample rates in rtp.c along with the codec definitions there. A new API call was added to allow retrieval of the sample rate for a given codec.

3) Some basic 'a=fmtp' parsing for SDP was added to chan_sip, because chan_sip *must* decline any media streams offered for these codecs that are not at the bitrates that we support (otherwise Bad Things (TM) would result).

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175508 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-13 13:35:24 +00:00
tilghman 7a733c01fc Merged revisions 175311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r175311 | tilghman | 2009-02-12 15:19:40 -0600 (Thu, 12 Feb 2009) | 9 lines
  
  Fix crashes when receiving certain T.38 packets.  Also, increase the maximum
  size of T.38 packets and warn users when they try to set the limits above those
  maximums.
  (closes issue #13050)
   Reported by: schern
   Patches: 
         20090212__bug13050.diff.txt uploaded by Corydon76 (license 14)
   Tested by: schern
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175334 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12 21:25:14 +00:00
jpeeler 1e73e209df Merged revisions 175294 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r175294 | jpeeler | 2009-02-12 14:34:36 -0600 (Thu, 12 Feb 2009) | 9 lines
  
  Fix ParkedCall event information for From field in the case of a blind transfer
  
  If the parker information can not be obtained from the peer, try and see if
  the BLINDTRANSFER channel variable has been set. Previously, a blind transfer
  to the ParkAndAnnounce app would return nothing for the From.
  
  Closes AST-189
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175298 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12 20:48:56 +00:00
jpeeler 6fab487003 Merged revisions 175187 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r175187 | jpeeler | 2009-02-12 11:57:10 -0600 (Thu, 12 Feb 2009) | 6 lines
  
  Fix crash in event of failed attempt to transfer to parking
  
  The peer may not necessarily exist, such as in the case of a transfer to 
  ParkAndAnnounce. In this case don't try to play a sound to it.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175188 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12 18:00:11 +00:00
russell f43e089695 Merged revisions 175124 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r175124 | russell | 2009-02-12 10:51:13 -0600 (Thu, 12 Feb 2009) | 27 lines

Don't send DTMF for infinite time if we do not receive an END event.

I thought that this was going to end up being a pretty gnarly fix, but it turns
out that there was actually already a configuration option in rtp.conf, 
dtmftimeout, that was intended to handle this situation.  However, in between 
Asterisk 1.2 and Asterisk 1.4, the code that processed the option got lost.
So, this commit brings it back to life.

The default timeout is 3 seconds.  However, it is worth noting that having
this be configurable at all is not really the recommended behavior in RFC 2833.
From Section 3.5 of RFC 2833:

      Limiting the time period of extending the tone is necessary
      to avoid that a tone "gets stuck". Regardless of the
      algorithm used, the tone SHOULD NOT be extended by more than
      three packet interarrival times. A slight extension of tone
      durations and shortening of pauses is generally harmless.

Three seconds will pretty much _always_ be far more than three packet 
interarrival times.  However, that behavior is not required, so I'm going to
leave it with our legacy behavior for now.

Code from svn/asterisk/team/russell/issue_14460

(closes issue #14460)
Reported by: moliveras

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175125 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12 16:57:25 +00:00
mmichelson 84a9682d1f Make lock information for ao2_trylock be more useful and gnarly
Core show locks information involving an ao2_trylock did not
show the function that called ao2_trylock, but would instead
show ao2_trylock as the source of the lock. This is not useful
when trying to debug locking issues.

One bizarre note is that this logic is already in 1.4 but somehow
did not get merged to trunk or the 1.6.X branches.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175121 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12 16:28:06 +00:00
mmichelson f251215c27 Fix 'd' option for app_dial and add new option to Answer application
The 'd' option would not work for channel types which use RTP to transport
DTMF digits. The only way to allow for this to work was to answer the channel
if we saw that this option was enabled.

I realized that this may cause issues with CDRs, specifically with giving false
dispositions and answer times. I therefore modified ast_answer to take another
parameter which would tell if the CDR should be marked answered.

I also extended this to the Answer application so that the channel may be answered
but not CDRified if desired.

I also modified app_dictate and app_waitforsilence to only answer the channel if it
is not already up, to help not allow for faulty CDR answer times.

All of these changes are going into Asterisk trunk. For 1.6.0 and 1.6.1, however, all
the changes except for the change to the Answer application will go in since we do
not introduce new features into stable branches

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

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174945 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-11 22:41:01 +00:00
file 086b1e3d7e Tell the device state core a change happened when a channel is freed but not a specific state.
We need to do this because while we know that the freeing of the channel may cause something to become
not in use we do not know this for sure. There may be another channel that is still up which would cause
it to be in use.
(closes issue #13238)
Reported by: kowalma
Patches:
      20090121__bug13238.diff.txt uploaded by Corydon76 (license 14)
Tested by: alecdavis


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174844 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-11 14:44:47 +00:00
mmichelson 960ba29f0e Fix an fd leak that would occur in HTTP AMI sessions
The explanation behind this fix is a bit complicated, and I've already
typed it up in the code as a huge comment inside of manager.c, so I'll
give the abridged version here.

We needed a way to separate action-specific data from session-specific data.
Unfortunately, the only way to maintain API compatibility and to not have to
change every single manager action was to rename the current mansession structure
and wrap it inside a new mansession structure which actually contains action-
specific data.

(closes issue #14364)
Reported by: awk
Patches:
      14364_better.patch uploaded by putnopvut (license 60)
Tested by: putnopvut

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174764 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-10 21:45:14 +00:00
kpfleming 446fe9d067 improve slinfactory API to remove implicit sample rate and require explicit sample rate selection by creator of the slinfactory
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174705 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-10 19:38:26 +00:00
mnicholson 631397bd7e Merged revisions 174583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r174583 | mnicholson | 2009-02-10 11:52:42 -0600 (Tue, 10 Feb 2009) | 18 lines
  
  Improve behavior of jitterbuffer when maxjitterbuffer is set.
  
  This change improves the way the jitterbuffer handles maxjitterbuffer and
  dramatically reduces the number of frames dropped when maxjitterbuffer is
  exceeded.  In the previous jitterbuffer, when maxjitterbuffer was exceeded, all
  new frames were dropped until the jitterbuffer is empty.  This change modifies
  the code to only drop frames until maxjitterbuffer is no longer exceeded.
  
  Also, previously when maxjitterbuffer was exceeded, dropped frames were not
  tracked causing stats for dropped frames to be incorrect, this change also
  addresses that problem.
  
  (closes issue #14044)
  Patches:
        bug14044-1.diff uploaded by mnicholson (license 96)
  Tested by: mnicholson
  Review: http://reviewboard.digium.com/r/144/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174584 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-10 18:16:31 +00:00
file daf0032d06 Always detach and destroy the whisper and barge audiohooks. Additionally also allow an audiohook to be detached if it has not been attached.
(closes issue #14414)
Reported by: bluecrow76


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173902 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-06 15:59:17 +00:00
russell 65e7ac9ff3 Add a common implementation of a scheduler context with a dedicated thread.
This commit expands the Asterisk scheduler API to include a common implementation
of a scheduler context being processed by a dedicated thread.  chan_iax2 has been
updated to use this new code.  Also, as a result, this resolves some race
conditions related to the previous chan_iax2 scheduler handling.

Related to rev 171452 which resolved the same issues in 1.4.

Code from team/russell/sched_thread2

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173858 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-06 10:55:35 +00:00
russell 5994e82077 Resolve a memory leak that would occur on an invalid channel given to Action: Status
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173848 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-06 10:25:09 +00:00
jpeeler c9c18ea1da Merged revisions 173211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173211 | jpeeler | 2009-02-03 15:57:01 -0600 (Tue, 03 Feb 2009) | 17 lines
  
  Parking attempts made to one end of a bridge no longer will hang up due to a
  parking failure.
  
  Parking attempts made using either one-touch, or doing either a blind or 
  assisted transfer to the parking extension now keep up the bridge instead of
  hanging up the attempted parked party. Normal causes for the parking attempt
  to fail includes the specific specified extension (via PARKINGEXTEN) not being 
  available or if all the parking spaces are currently in use. To avoid having
  to reverse a masquerade park_space_reserve was made to provide foresight if
  a parking attempt will succeed and if so reserve the parking space.
  
  (closes issue #13494)
  Reported by: mdu113
  
  Reviewed by Russell: http://reviewboard.digium.com/r/133/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173500 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04 21:17:53 +00:00
tilghman 82c1e379ca When using a socket as a FILE *, the stdio functions will sometimes try to do
an fseek() on the stream, which is an invalid operation for a socket.  Turning
off buffering explicitly lets the stdio functions know they cannot do this,
thus avoiding a potential error.
(closes issue #14400)
 Reported by: fnordian
 Patches: 
       tcptls.patch uploaded by fnordian (license 110)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173458 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04 18:48:06 +00:00
mmichelson 46b019ae09 Fix a problem where file playback would cause fds to remain open forever
The problem came from the fact that a frame read from a format interpreter
was not freed. Adding a call to ast_frfree fixed this. The explanation for
why this caused the problem is a bit complex, but here goes:

There was a problem in all versions of Asterisk where the embedded frame
of a filestream structure was referenced after the filestream was freed. This
was fixed by adding reference counting to the filestream structure. The refcount
would increase every time that a filestream's frame pointer was pointing to an
actual frame of data. When the frame was freed, the refcount would decrease. Once
the refcount reached 0, the filestream was freed, and as part of the operation,
the open files were closed as well.

Thus it becomes more clear why a missing ast_frfree would cause a reference leak
and cause the files to not be closed. You may ask then if there was a frame leak
before this patch. The answer to that is actually no! The filestream code was
"smart" enough to know that since the frame we received came from a format interpreter,
the frame had no malloced data and thus didn't need to be freed. Now, however, there
is cleanup that needs to be done when we finish with the frame, so we do need to
call ast_frfree on the frame to be sure that the refcount for the filestream is
decremented appropriately.

(closes issue #14384)
Reported by: fiddur
Patches:
      14384.patch uploaded by putnopvut (license 60)
Tested by: fiddur, putnopvut



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173354 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04 15:30:12 +00:00
tilghman 8d8777416e Ensure that commas placed in the middle of extension character classes do not
interfere with correct parsing of the extension.  Also, if an unterminated
character class DOES make its way into the pbx core (through some other
method), ensure that it does not crash Asterisk.
(closes issue #14362)
 Reported by: Nick_Lewis
 Patches: 
       20090129__bug14362.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173311 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04 00:43:52 +00:00
tilghman 494821a071 1. Make OS X compile cleanly with app_stack.
2. Use curl to download sound files, as curl is installed natively on OS X,
whereas wget and fetch are not.
(closes issue #14332)
 Reported by: oej
 Tested by: Corydon76


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173130 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-03 00:29:49 +00:00
twilson d088b43c05 Merged revisions 173066 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173066 | twilson | 2009-02-02 17:48:06 -0600 (Mon, 02 Feb 2009) | 2 lines
  
  Fix a feature inheritance bug I added after code review
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173067 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-02 23:57:25 +00:00
mmichelson c6f0d3482e Reverting commit number 173028 as there are some
potential issues



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173047 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-02 23:21:33 +00:00
mmichelson cdc296ee61 Add a CLI command to log out a manager user
(closes issue #13877)
Reported by: eliel
Patches:
      cli_manager_logout.patch.txt uploaded by eliel (license 64)
Tested by: eliel, putnopvut



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173028 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-02 23:10:47 +00:00
murf 9764d18ab1 This reverts the changes I made for 11583; will
reviewboard this before committing again...
reopened 11583 until all Russell's issues are
resolved.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172929 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-02 19:02:24 +00:00
murf 0fb5a8a2ff This change allows the disconnect feature (as in "one-touch" in features.c)
to be used within the dial app, before a call is bridged.

Many thanks to sobomax for submitting this patch. 

Quoting from bug 11582:

  "So the goal of the patch was to use the user configured feature code during the 
   call setup phase. The original ast_feature_interpret() function is not well suited 
   for this purpose as it uses much call bridge specific data and doesn't separate a 
   detection of feature from a feature handler call. So a new function ast_feature_detect() 
   has been extracted off the ast_feature_interpret() function but keeping the original 
   logic intact except some insignificant changes to locking.

  "Having created the ast_feature_detect() function the possibility to use feature detection 
   in almost any place of the asterisk code. So a call to this function has been added to 
   wait_for_answer() function of app_dial.so module. This code doesn't call the feature handler 
   however and uses old call leg disconnect logic to make the changes as small and simple as 
   possible to prevent unexpected problems. A disconnect feature currently is the only one 
   supported during call setup as other features as call parking and call transfer don't make much 
   sense during call setup. However if need in some of the features would arise it is much easier to 
   implement as the infrastructure changes are already in place with this patch."

I have cleaned up the patch somewhat, and verified that the existing functionality is not
harmed, and that the new functionality works. Terry has committed his stuff, and there were
no conflicts (see 14274).

(closes issue #11583)
Reported by: sobomax
Patches:
      patch-apps__app_dial.c uploaded by sobomax (license 359)
      patch-include__asterisk__features.h uploaded by sobomax (license 359)
      patch-res__res_features.c uploaded by sobomax (license 359)
      enable-features-during-call-setup.diff uploaded by sobomax (license 359)
      11583.newdiff uploaded by murf (license 17)
      enable-features-during-call-setup-1.diff uploaded by sobomax (license 359)
      11583.latest-patch uploaded by murf (license 17)
Tested by: sobomax, murf




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172890 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-02 17:37:15 +00:00
twilson 3ecca39de5 Merged revisions 172517 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172517 | twilson | 2009-01-30 11:47:41 -0600 (Fri, 30 Jan 2009) | 37 lines
  
  Fix feature inheritance with builtin features
  
  When using builtin features like parking and transfers, the AST_FEATURE_* flags
  would not be set correctly for all instances when either performing a builtin
  attended transfer, or parking a call and getting the timeout callback.  Also,
  there was no way on a per-call basis to specify what features someone should
  have on picking up a parked call (since that doesn't involve the Dial() command).
  There was a global option for setting whether or not all users who pickup a
  parked call should have AST_FEATURE_REDIRECT set, but nothing for DISCONNECT,
  AUTOMON, or PARKCALL.
  
  This patch:
  1) adds the BRIDGE_FEATURES dialplan variable which can be set either in the
  dialplan or with setvar in channels that support it.  This variable can be set
  to any combination of 't', 'k', 'w', and 'h' (case insensitive matching of the
  equivalent dial options), to set what features should be activated on this
  channel.  The patch moves the setting of the features datastores into the
  bridging code instead of app_dial to help facilitate this.
  
  2) adds global options parkedcallparking, parkedcallhangup, and
  parkedcallrecording to be similar to the parkedcalltransfers option for
  globally setting features.
  
  3) has builtin_atxfer call builtin_parkcall if being transfered to the parking
  extension since tracking everything through multiple masquerades, etc. is
  difficult and error-prone
  
  4) attempts to fix all cases of return calls from parking and completed builtin
  transfers not having the correct permissions
  (closes issue #14274)
  Reported by: aragon
  Patches: 
        fix_feature_inheritence.diff.txt uploaded by otherwiseguy (license 396)
  Tested by: aragon, otherwiseguy
  
  Review http://reviewboard.digium.com/r/138/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-30 21:29:12 +00:00
tilghman 68c38c68fb Merged revisions 172438 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172438 | tilghman | 2009-01-29 16:54:29 -0600 (Thu, 29 Jan 2009) | 9 lines
  
  Lose the CAP_NET_ADMIN at every fork, instead of at startup.  Otherwise, if
  Asterisk runs as a non-root user and the administrator does a 'restart now',
  Asterisk loses the ability to set QOS on packets.
  (closes issue #14004)
   Reported by: nemo
   Patches: 
         20090105__bug14004.diff.txt uploaded by Corydon76 (license 14)
   Tested by: Corydon76
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172441 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-29 23:15:40 +00:00
rmudgett 6f805da8ab Remove tabs from comment
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172440 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-29 23:15:20 +00:00
oej 7ad1a935c8 - Make sure we set setvar= variables on outbound calls too, not only inbound calls.
- Also, change a function in app.c to return a userful value instead of always returning 0.

Patch by fnordian, changed by Corydon76 and myself.

This does not close the bug report, as fnordian had an additional change we're still discussing.

(related to issue #14059)
Reported by: fnordian
Patches: 
      chan_sip_hfield.patch uploaded by fnordian (license 110)
      20090116__bug14059.diff.txt uploaded by Corydon76 (license 14)
Tested by: fnordian, Corydon76, oej



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172268 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-29 13:21:31 +00:00
murf a0d8bf45f5 Merged revisions 172030 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172030 | murf | 2009-01-28 11:51:16 -0700 (Wed, 28 Jan 2009) | 46 lines
  
  This patch fixes h-exten running misbehavior in manager-redirected 
  situations.
  
  What it does:
  1. A new Flag value is defined in include/asterisk/channel.h,
   AST_FLAG_BRIDGE_HANGUP_DONT, which used as a messenge to the
   bridge hangup exten code not to run the h-exten there (nor
   publish the bridge cdr there). It will done at the pbx-loop
   level instead.
  2. In the manager Redirect code, I set this flag on the channel
   if the channel has a non-null pbx pointer. I did the same for the
   second (chan2) channel, which gets run if name2 is set...
   and the first succeeds.
  3. I restored the ending of the cdr for the pbx loop h-exten
   running code. Don't know why it was removed in the first place.
  4. The first attempt at the fix for this bug was to place code
     directly in the async_goto routine, which was called from a
     large number of places, and could affect a large number of
     cases, so I tested that fix against a fair number of transfer
     scenarios, both with and without the patch. In the process,
     I saw that putting the fix in async_goto seemed not to affect
     any of the blind or attended scenarios, but still, I was
     was highly concerned that some other scenarios I had not tested
     might be negatively impacted, so I refined the patch to 
     its current scope, and jmls tested both. In the process, tho,
     I saw that blind xfers in one situation, when the one-touch
     blind-xfer feature is used by the peer, we got strange 
     h-exten behavior.  So, I  inserted code to swap CDRs and
     to set the HANGUP_DONT field, to get uniform behavior.
  5. I added code to the bridge to obey the HANGUP_DONT flag,
     skipping both publishing the bridge CDR, and running
     the h-exten; they will be done at the pbx-loop (higher)
     level instead.
  6. I removed all the debug logs from the patch before committing.
  7. I moved the AUTOLOOP set/reset in the h-exten code in res_features
     so it's only done if the h-exten is going to be run. A very
     minor performance improvement, but technically correct.
  
  
  (closes issue #14241)
  Reported by: jmls
  Patches:
        14241_redirect_no_bridgeCDR_or_h_exten_via_transfer uploaded by murf (license 17)
  Tested by: murf, jmls
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172063 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-28 20:31:06 +00:00
mmichelson 06391f7859 Merged revisions 171621 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r171621 | mmichelson | 2009-01-27 14:06:01 -0600 (Tue, 27 Jan 2009) | 18 lines

Prevent a crash from occurring when a jitter buffer interpolated frame is
removed from a slinfactory

slinfactory used the "samples" field of an ast_frame in order to determine
the amount of data contained within the frame. In certain cases, such as
jitter buffer interpolated frames, the frame would have a non-zero value for
"samples" but have NULL "data"

This caused a problem when a memcpy call in ast_slinfactory_read would attempt
to access invalid memory. The solution in use here is to never feed frames into
the slinfactory if they have NULL "data"

(closes issue #13116)
Reported by: aragon
Patches:
      13116.diff uploaded by putnopvut (license 60)


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171622 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-27 20:11:30 +00:00
oej 0b25b62125 Add extensions and context on manager event when new channel is created.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171263 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-26 12:32:30 +00:00
file 6ebd191e00 Merged revisions 170648 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170648 | file | 2009-01-23 16:16:39 -0400 (Fri, 23 Jan 2009) | 4 lines
  
  When a channel is answered make sure any indications currently playing stop. Usually the phone would do this but if the channel was already answered then they are being generated by Asterisk and we darn well need to stop them.
  (closes issue #14249)
  Reported by: RadicAlish
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170652 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-23 20:18:05 +00:00
mmichelson 7969c5e1db Merged revisions 170392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r170392 | mmichelson | 2009-01-23 09:40:39 -0600 (Fri, 23 Jan 2009) | 28 lines

Fix broken call pickup

There was a subtle change in ast_do_masquerade which
resulted in failed attempts to pickup calls. The problem
was that the value of the AST_FLAG_OUTGOING flag was
copied from the clone to the original channel. In the case
of call pickup, this meant that the AST_FLAG_OUTGOING flag
ended up being cleared on the channel that was attempting
to execute the pickup.

Because this flag was not set, when ast_read came across
an answer frame, it ignored it. The result of this was that
the calling channel was never properly answered.

This fix changes the behavior in ast_do_masquerade to set
the flags on the original channel to the union of the flags
on the clone channel. This way, if the AST_FLAG_OUTGOING
flag is set on either of the two channels involved in the
masquerade, the resulting channel will have the flag set
as well.

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


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170393 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-23 15:44:27 +00:00
tilghman 5bb40c4b51 Create logfile safely.
(closes issue #14160)
 Reported by: tzafrir
 Patches: 
       20090104__bug14160.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170307 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22 21:25:46 +00:00
file a7a8d39773 Merged revisions 170239 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170239 | file | 2009-01-22 16:02:35 -0400 (Thu, 22 Jan 2009) | 7 lines
  
  Don't crash if RTCP is not enabled on an RTP structure but statistics are output.
  (closes issue #14234)
  Reported by: jcovert
  Patches:
        rtp.c.patch-1.6.0.3 uploaded by jcovert (license 551)
        rtp.c.patch-svn-165599 uploaded by jcovert (license 551)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170240 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22 20:04:39 +00:00
file 15239e0d46 Merged revisions 170050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170050 | file | 2009-01-22 11:13:56 -0400 (Thu, 22 Jan 2009) | 6 lines
  
  Do a string comparison instead of pointer comparison since some people specify the context they are actually in as an argument to get around some funkiness.
  (closes issue #14011)
  Reported by: dveiga
  Patches:
        pbx.c.patch uploaded by dveiga (license 665)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170051 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22 15:14:50 +00:00
file 18765d9b28 Merged revisions 169867 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r169867 | file | 2009-01-21 19:20:47 -0400 (Wed, 21 Jan 2009) | 4 lines
  
  Read lock the contexts to maintain the locking order when we are notified that the state of a device has changed.
  (closes issue #13839)
  Reported by: mcallist
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169869 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-21 23:25:27 +00:00
mmichelson 4c6eeea773 Fix a crash when saying certain numbers in Chinese
This commit fixes a crash that was occurring when attempting to
say a number between 10000 and 100000 due to dividing by 0.

This also removes some places where a "zero" is spoken when it
should not be.


(closes issue #14291)
Reported by: dant
Patches:
      say.c-14291.diff uploaded by dant (license 670)
Tested by: dant




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169794 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-21 22:10:02 +00:00
tilghman f33bb24776 Merged revisions 169722 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r169722 | tilghman | 2009-01-21 15:02:32 -0600 (Wed, 21 Jan 2009) | 8 lines
  
  Extra NULLs in the output cause some terminal types to abort in the middle of
  a color code, causing terminal weirdness.
  (closes issue #14130)
   Reported by: coolmig
   Patches: 
         20090121__bug14130.diff.txt uploaded by Corydon76 (license 14)
   Tested by: Corydon76, coolmig
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169723 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-21 21:03:40 +00:00
russell d5caf2765c Fix a regression in TCP support.
This patch fixes a problem that caused chan_sip to think that every open TCP session
was to a remote address of 0.0.0.0:0.

(closes issue #14287)
Reported by: jamesgolovich
Patches:
      bug-14287.diff.txt uploaded by jamesgolovich (license 176)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-21 10:26:07 +00:00
twilson c46d21d8c9 Make a proper builtin attended transfer to parking work
This is an ugly hack from 1.4 that allows the timeout callback from a parked
call to use the right channel name for the callback when the park is done with
a builtin attended transfer (that isn't completed early).  This hasn't ever
worked in trunk and no one has complained yet, so eh.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169510 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-20 19:22:24 +00:00
twilson 999065fc08 Merged revisions 169485 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r169485 | twilson | 2009-01-20 12:40:56 -0600 (Tue, 20 Jan 2009) | 6 lines
  
  Don't play audio to the channel if we've masqueraded
  
  (closes issue #14066)
  Reported by: bluefox
  Tested by: otherwiseguy, bluefox
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169486 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-20 18:48:14 +00:00
mvanbaak 1bd2376769 fix assignment in swapmode plug.
Spotted and fix provided by ys

(closes issue #14129)
Reported by: ys
Tested by: ys


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169369 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-19 20:14:27 +00:00
tilghman 47818a9061 Merged revisions 169364 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r169364 | tilghman | 2009-01-19 13:49:25 -0600 (Mon, 19 Jan 2009) | 4 lines
  
  Truncate userevents at the end of a line, when the command exceeds the buffer.
  (closes issue #14278)
   Reported by: fnordian
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169365 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-19 20:05:52 +00:00
mvanbaak f5d529c9ad Make asterisk compile on non-amd64 versions of OpenBSD.
The HW_PHYSMEM64 is only available in latest OpenBSD and/or amd64 versions of OpenBSD.
Use HW_PHYSMEM when HW_PHYSMEM64 is not available.

(closes issue #14129)
Reported by: ys
Patches:
      2009011600_physmem64.diff.txt uploaded by mvanbaak (license 7)
Tested by: mvanbaak, jtodd


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169327 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-19 18:36:24 +00:00
twilson d2601c379a Fix qualify for TCP peer
(closes issue #14192)
Reported by: pabelanger
Patches: 
      asterisk-bug14192.diff.txt uploaded by jamesgolovich (license 176)
Tested by: jamesgolovich


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169080 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-17 01:56:36 +00:00
twilson 4603e4dbe0 Merged revisions 168716 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168716 | twilson | 2009-01-15 12:22:49 -0600 (Thu, 15 Jan 2009) | 12 lines
  
  Convert call to park_call_full to masq_park_call_announce
  
  Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
  parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
  do_parking_thread() and then promptly crash.
  (closes issue #14215)
  	Reported by: waverly360	
  	Tested by: otherwiseguy
  (closes issue #14228)
  	Reported by: kobaz
  	Tested by: otherwiseguy
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168941 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-16 22:16:23 +00:00
tilghman 844a51b7f3 Merged revisions 168828 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168828 | tilghman | 2009-01-16 12:41:35 -0600 (Fri, 16 Jan 2009) | 6 lines
  
  Fix the conjugation of Russian and Ukrainian languages.
  (related to issue #12475)
   Reported by: chappell
   Patches: 
         vm_multilang.patch uploaded by chappell (license 8)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168832 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-16 18:49:09 +00:00
murf 40e2c0e15a This patch allows null args in ast_expr2 func calls, and fixes commas being converted to pipes, which was 1.4 type stuff.
If the user says count=ENUMLOOKUP(${EXTEN},ALL,c,,enum.mydomain.tld);

then it won't complain about the empty arg (c,,...) and fabled's patch
won't let it swap the commas for pipes.

Ran it thru my dialplan and no complaints.


(closes issue #14169)
Reported by: fabled
Patches:
      function-argument-separator-fix.diff uploaded by fabled (license 448)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168737 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-15 20:54:59 +00:00
seanbright 347942d5e5 Don't crash when typing 'core set verbose' or 'core set debug' by themselves.
(closes issue #14219)
Reported by: jamesgolovich
Patches:
      asterisk-setverbosecrash.diff.txt uploaded by jamesgolovich (license 176)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168626 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-14 23:10:48 +00:00
mvanbaak a42d9b0219 Fix compilation on FreeBSD and OSX
This started as work to fix the 'core show sysinfo'
CLI command but while working on it oej
pointed out that read_credentials did not compile neither.
So while being there, fix that as well.

Thanks for all the testing oej!

(closes issue #14129)
Reported by: ys
Tested by: oej, mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168609 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-14 19:36:57 +00:00
tilghman ec7564e852 Merged revisions 168603 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168603 | tilghman | 2009-01-14 13:02:55 -0600 (Wed, 14 Jan 2009) | 7 lines
  
  Don't read into a buffer without first checking if a value is beyond the end.
  (closes issue #13600)
   Reported by: atis
   Patches: 
         20090106__bug13600.diff.txt uploaded by Corydon76 (license 14)
   Tested by: atis
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168604 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-14 19:11:14 +00:00
twilson f4c8743405 Add option to hide console connect messages
(closes issue #14222)
Reported by: jamesgolovich
Patches: 
      asterisk-hideconnect.diff.txt uploaded by jamesgolovich (license 176)
Tested by: otherwiseguy


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168585 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13 23:00:27 +00:00
russell d056b18a40 Merged revisions 168561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines

Revert unnecessary indications API change from rev 122314

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168562 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13 19:22:13 +00:00
dhubbard 2d3e2dc7bb correct a CLI description
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13 16:02:13 +00:00
mmichelson 721410dee5 bump the verbosity of a message in srv.c up by one. It used to be
at this level prior to a large patch merge which converted ast_verbose
calls to ast_verb

(closes issue #14221)
Reported by: jcovert
Patches:
      srv.c.patch uploaded by jcovert (license 551)




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168523 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-12 23:12:30 +00:00
tilghman c0765c5fbf Some platforms (notably, the BSDs) have a more efficient implementation called
closefrom(3).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168522 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-12 23:06:12 +00:00