dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

283 Commits

Author SHA1 Message Date
twilson 9b10a0c265 Replace Berkeley DB with SQLite 3
There were some bugs in the very ancient version of Berkeley DB that Asterisk
used. Instead of spending the time tracking down the bugs in the Berkeley code
we move to the much better documented SQLite 3.

Conversion of the old astdb happens at runtime by running the included
astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave
identically to the old Berkeley backend, but in the future we could offer a
much more robust interface.

We do not include the SQLite 3 library in the source tree, but instead rely
upon the distribution-provided libraries. SQLite is so ubiquitous that this
should not place undue burden on administrators.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@326589 f38db490-d61c-443f-a65b-d21fe96a405b
2011-07-06 20:58:12 +00:00
tilghman d49f8f3715 Merged revisions 324955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324955 | tilghman | 2011-06-27 11:30:50 -0500 (Mon, 27 Jun 2011) | 5 lines
  
  Save and restore errno from within signal handlers.
  
  This is recommended by the POSIX standard, as well as by the sigaction(2) manpage
  for various platforms that we support (e.g. Mac OS X).
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@324961 f38db490-d61c-443f-a65b-d21fe96a405b
2011-06-27 16:32:19 +00:00
jrose 315881adf7 Merged revisions 322069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322069 | jrose | 2011-06-06 14:07:56 -0500 (Mon, 06 Jun 2011) | 8 lines
  
  Fixes level toggling for logger set levels since it was reversed
   
  (closes issue ASTERISK-17850)
  Reported by: Luke H
  Tested by: jrose, Luke H
    
  Review: https://reviewboard.asterisk.org/r/1244/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@322070 f38db490-d61c-443f-a65b-d21fe96a405b
2011-06-06 19:15:10 +00:00
russell c321368c48 Support routing text messages outside of a call.
Asterisk now has protocol independent support for processing text messages
outside of a call.  Messages are routed through the Asterisk dialplan.
SIP MESSAGE and XMPP are currently supported.  There are options in sip.conf
and jabber.conf that enable these features.

There is a new application, MessageSend().  There are two new functions,
MESSAGE() and MESSAGE_DATA().  Documentation will be available on
the project wiki, wiki.asterisk.org.

Thanks to Terry Wilson for the assistance with development and to David Vossel
for helping with some additional testing.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@321546 f38db490-d61c-443f-a65b-d21fe96a405b
2011-06-01 21:31:40 +00:00
seanbright b36e75c3b8 Add some new editline bindings by default, and allow for user specified configuration.
I excluded the part of this patch that used the HOME environment variable since
the built-in editline library goes to great lengths to disallow that.  Instead
only settings the EDITRC environment variable will use a user specified file.

Also, the default environment variable use to determine the edit more is
AST_EDITMODE instead of AST_EDITOR (although the latter is still supported).

(closes issue #15929)
Reported by: kkm
Patches:
      astcli-editrc-v2.diff uploaded by kkm (license 888)
      015929-astcli-editrc-trunk.240324.diff uploaded by kkm (license 888)
Tested by: seanbright


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@317395 f38db490-d61c-443f-a65b-d21fe96a405b
2011-05-05 21:20:00 +00:00
russell 681ceaeaac Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@316293 f38db490-d61c-443f-a65b-d21fe96a405b
2011-05-03 20:45:32 +00:00
russell 1c64667333 Merged revisions 315810 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r315810 | russell | 2011-04-27 10:55:48 -0500 (Wed, 27 Apr 2011) | 2 lines
  
  Set the copyright year to 2011 in the startup message.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@315811 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-27 15:56:44 +00:00
tilghman c855ea7dcb Merged revisions 312286,312288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r312286 | tilghman | 2011-04-01 05:44:33 -0500 (Fri, 01 Apr 2011) | 2 lines
  
  Reload must react correctly against a possibly changed table, so dropping the conditional reload flag.
................
  r312288 | tilghman | 2011-04-01 05:58:45 -0500 (Fri, 01 Apr 2011) | 21 lines
  
  Merged revisions 312287 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r312287 | tilghman | 2011-04-01 05:51:24 -0500 (Fri, 01 Apr 2011) | 14 lines
    
    Merged revisions 312285 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r312285 | tilghman | 2011-04-01 05:36:42 -0500 (Fri, 01 Apr 2011) | 7 lines
      
      Found some leaking file descriptors while looking at ast_FD_SETSIZE dead code.
      
      (issue #18969)
       Reported by: oej
       Patches: 
             20110315__issue18969__14.diff.txt uploaded by tilghman (license 14)
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@312289 f38db490-d61c-443f-a65b-d21fe96a405b
2011-04-01 10:59:32 +00:00
tilghman f56051be4f Merged revisions 309678 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309678 | tilghman | 2011-03-05 04:29:30 -0600 (Sat, 05 Mar 2011) | 14 lines
  
  Merged revisions 309677 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309677 | tilghman | 2011-03-05 04:28:24 -0600 (Sat, 05 Mar 2011) | 7 lines
    
    Missed part of the conversion when we started passing ppid to astcanary.
    
    (closes issue #18850)
     Reported by: viraptor
     Patches: 
           canary_ppid.patch uploaded by viraptor (license 543)
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@309679 f38db490-d61c-443f-a65b-d21fe96a405b
2011-03-05 10:30:28 +00:00
dvossel f27e928f05 Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
-Functional changes
1. Dynamic global format list build by codecs defined in codecs.conf
2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
3. Negotiation of SILK attributes in chan_sip.
4. SPEEX 32khz with translation
5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
   using codec_resample.c
6. Various changes to RTP code required to properly handle the dynamic format list
   and formats with attributes.
7. ConfBridge now dynamically jumps to the best possible sample rate.  This allows
   for conferences to take advantage of HD audio (Which sounds awesome)
8. Audiohooks are no longer limited to 8khz audio, and most effects have been
   updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
9. codec_resample now uses its own code rather than depending on libresample.

-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@308582 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-22 23:04:49 +00:00
qwell 7daf1af6b2 Merged revisions 307536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r307536 | qwell | 2011-02-10 16:39:30 -0600 (Thu, 10 Feb 2011) | 22 lines
  
  Merged revisions 307535 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r307535 | qwell | 2011-02-10 16:35:49 -0600 (Thu, 10 Feb 2011) | 15 lines
    
    Merged revisions 307534 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r307534 | qwell | 2011-02-10 16:33:09 -0600 (Thu, 10 Feb 2011) | 8 lines
      
      Remove color when executing commands via a remote console.
      
      Essentially this makes '-x' imply '-n' on rasterisk.  This was done in a
      different and incomplete way previously, which I'm reverting here.
      
      (issue #18776)
      Reported by: alecdavis
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@307537 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-10 22:43:51 +00:00
dvossel 4aca3187a3 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
2011-02-03 16:22:10 +00:00
seanbright 74638dafd0 Remove some trailing whitespace and steal revision 300000.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@300000 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-29 22:19:26 +00:00
jpeeler 287be71bb6 Add support for several platforms to obtain the real thread ID.
Already had the pthread ID which is not the same.  The most obvious enhancement
is in the "core show threads" output. As stated in the utils header, if the
platform isn't supported -1 is reported (instead of the process ID previously).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@298137 f38db490-d61c-443f-a65b-d21fe96a405b
2010-12-12 03:58:33 +00:00
schmidts c6d866ff51 move devices from hints into an ao2_container
by splitting up devices from hints into an own ao2_container the callback to
get these devices for statechange handling is faster.
with this changes the length of a device used in a hint isnt longer restricted
to 80 characters.

Tests showed that calling handle_statechange is 40 times faster if no hints
are used and 25 times faster if there are any hints.

(closes issue #17928)
Reported by: mdu113
Tested by: schmidts

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@296752 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-30 09:49:25 +00:00
tilghman 3fc049cf91 Merged revisions 296534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r296534 | tilghman | 2010-11-29 01:28:44 -0600 (Mon, 29 Nov 2010) | 20 lines
  
  Merged revisions 296533 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r296533 | tilghman | 2010-11-29 01:27:09 -0600 (Mon, 29 Nov 2010) | 13 lines
    
    I love standards.  There are so many to choose from.  Except when there isn't one.
    
    Linux and *BSD disagree on the elements within the ucred structure.  Detect
    which one is in use on the system.
    
    (closes issue #18384)
     Reported by: bjm
     Patches: 
           cred-diffs uploaded by bjm (license 473)
           20101127__issue18384__1.6.2.diff.txt uploaded by tilghman (license 14)
           20101127__issue18384__1.8.diff.txt uploaded by tilghman (license 14)
     Tested by: tilghman, bjm
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@296535 f38db490-d61c-443f-a65b-d21fe96a405b
2010-11-29 07:30:09 +00:00
jpeeler bccb73bf04 Merged revisions 290864 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r290864 | jpeeler | 2010-10-07 21:56:24 -0500 (Thu, 07 Oct 2010) | 23 lines
  
  Merged revisions 290863 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r290863 | jpeeler | 2010-10-07 21:45:44 -0500 (Thu, 07 Oct 2010) | 16 lines
    
    Merged revisions 290862 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r290862 | jpeeler | 2010-10-07 21:35:29 -0500 (Thu, 07 Oct 2010) | 9 lines
      
      Ensure editline cleanup occurs when Ctrl-C is pressed at control console.
      
      A recent change was made to avoid a race condition on shutdown which only called
      the end functions from the console thread. However, when pressing Ctrl-C the
      quit handler is called from the signal handler thread.
      
      (closes issue #17698)
      Reported by: jmls
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@290865 f38db490-d61c-443f-a65b-d21fe96a405b
2010-10-08 03:00:40 +00:00
russell e22a598bff Merged revisions 288341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r288341 | russell | 2010-09-22 11:45:18 -0500 (Wed, 22 Sep 2010) | 25 lines
  
  Merged revisions 288340 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r288340 | russell | 2010-09-22 11:44:13 -0500 (Wed, 22 Sep 2010) | 18 lines
    
    Merged revisions 288339 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r288339 | russell | 2010-09-22 11:39:16 -0500 (Wed, 22 Sep 2010) | 11 lines
      
      Fix a 100% CPU consumption problem when setting console=yes in asterisk.conf.
      
      The handling of -c and console=yes should be the same, but they were not.
      When you specify -c, it sets both a flag for console module and for asterisk
      not to fork() off into the background.  The handling of console=yes only set
      console mode, so you would end up with a background process() trying to run
      the Asterisk console and freaking out since it didn't have anything to read
      input from.
      
      Thanks to beagles for reporting and helping debug the problem!
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@288342 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-22 16:46:20 +00:00
tilghman 38227225d4 Merged revisions 287935 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r287935 | tilghman | 2010-09-21 14:08:36 -0500 (Tue, 21 Sep 2010) | 16 lines
  
  Merged revisions 287934 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r287934 | tilghman | 2010-09-21 14:07:53 -0500 (Tue, 21 Sep 2010) | 9 lines
    
    Merged revisions 287933 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r287933 | tilghman | 2010-09-21 14:07:07 -0500 (Tue, 21 Sep 2010) | 2 lines
      
      Less than zero is an error, not any non-zero value.
    ........
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@287936 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-21 19:09:15 +00:00
tilghman c32f63c825 Merged revisions 284597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r284597 | tilghman | 2010-09-02 00:00:34 -0500 (Thu, 02 Sep 2010) | 29 lines
  
  Merged revisions 284593,284595 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r284593 | tilghman | 2010-09-01 17:59:50 -0500 (Wed, 01 Sep 2010) | 18 lines
    
    Merged revisions 284478 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r284478 | tilghman | 2010-09-01 13:49:11 -0500 (Wed, 01 Sep 2010) | 11 lines
      
      Ensure that all areas that previously used select(2) now use poll(2), with implementations that need poll(2) implemented with select(2) safe against 1024-bit overflows.
      
      This is a followup to the fix for the pthread timer in 1.6.2 and beyond, fixing
      a potential crash bug in all supported releases.
      
      (closes issue #17678)
       Reported by: russell
      Branch: https://origsvn.digium.com/svn/asterisk/team/tilghman/ast_select 
      
      Review: https://reviewboard.asterisk.org/r/824/
    ........
  ................
    r284595 | tilghman | 2010-09-01 22:57:43 -0500 (Wed, 01 Sep 2010) | 2 lines
    
    Failed to rerun bootstrap.sh after last commit
  ................
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@284598 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-02 05:02:54 +00:00
tilghman 8c187a70f6 Merged revisions 278981 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r278981 | tilghman | 2010-07-23 11:42:25 -0500 (Fri, 23 Jul 2010) | 8 lines
  
  Avoid race with consolethread on shutdown (on parallel processors).
  
  (closes issue #17080)
   Reported by: sybasesql
   Patches: 
         20100721__issue17080.diff.txt uploaded by tilghman (license 14)
   Tested by: sybasesql
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278982 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-23 16:43:34 +00:00
tilghman 771cdeecd1 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278132 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-20 19:35:02 +00:00
tilghman db212ff911 Merged revisions 272925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272925 | tilghman | 2010-06-28 16:50:02 -0500 (Mon, 28 Jun 2010) | 8 lines
  
  Don't change ownership/group/permissions on run directory, if it already exists.
  
  (closes issue #17076)
   Reported by: stuarth
   Patches: 
         20100324__issue17076.diff.txt uploaded by tilghman (license 14)
   Tested by: stuarth
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@272926 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-28 21:50:57 +00:00
tilghman ec579b68ae Merged revisions 269635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r269635 | tilghman | 2010-06-10 02:52:34 -0500 (Thu, 10 Jun 2010) | 9 lines
  
  Ensure restartable system calls can restart (BSD signal semantics).
  
  This eliminates the annoying <beep> on the console.
  
  (closes issue #17477)
   Reported by: jvandal
   Patches: 
         20100610__issue17477.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@269636 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-10 08:15:45 +00:00
rmudgett 245c5d9eb8 Generic Advice of Charge.
Asterisk Generic AOC Representation
- Generic AOC encode/decode routines.
  (Generic AOC must be encoded to be passed on the wire in the AST_CONTROL_AOC frame)
- AST_CONTROL_AOC frame type to represent generic encoded AOC data
- Manager events for AOC-S, AOC-D, and AOC-E messages

Asterisk App Support
- app_dial AOC-S pass-through support on call setup
- app_queue AOC-S pass-through support on call setup

AOC Unit Tests
- AOC Unit Tests for encode/decode routines
- AOC Unit Test for manager event representation.

SIP AOC Support
- Pass-through of generic AOC-D and AOC-E messages to snom phones via the
  snom AOC specification.
- Creation of chan_sip page3 flags for the addition of the new
  'snom_aoc_enabled' sip.conf option.

IAX AOC Support
- Natively supports AOC pass-through through the use of the new
  AST_CONTROL_AOC frame type

DAHDI AOC Support
- ETSI PRI full AOC Pass-through support
- 'aoc_enable' chan_dahdi.conf option for independently enabling
  pass-through of AOC-S, AOC-D, AOC-E.
- 'aoce_delayhangup' option for retrieving AOC-E on disconnect.
- DAHDI A() dial string option for requesting AOC services.
  example usage:
  ;requests AOC-S, AOC-D, and AOC-E on call setup
  exten=>1111,1,Dial(DAHDI/g1/1112/A(s,d,e))

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@267096 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-02 18:10:15 +00:00
tilghman f4d2dfe4e2 Merged revisions 266585 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r266585 | tilghman | 2010-06-01 10:17:46 -0500 (Tue, 01 Jun 2010) | 11 lines
  
  Prevent CLI prompt from distorting output of lines shorter than the prompt.
  
  Uses the VT100 method of clearing the line from the cursor position to the
  end of the line:  Esc-0K
  
  (closes issue #17160)
   Reported by: coolmig
   Patches: 
         20100531__issue17160.diff.txt uploaded by tilghman (license 14)
   Tested by: coolmig
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266592 f38db490-d61c-443f-a65b-d21fe96a405b
2010-06-01 15:18:59 +00:00
tilghman 5696c84027 Setup environment variables for the benefit of child processes and disallow changing them.
(closes issue #14899)
 Reported by: jmls
 Patches: 
       20090916__issue14899.diff.txt uploaded by tilghman (license 14)
 Tested by: jmls


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266385 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-28 22:50:06 +00:00
tilghman 1297a59878 Only report swap on platforms which can examine those statistics
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266337 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-28 20:53:04 +00:00
tilghman 01e42965e9 Merged revisions 266142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r266142 | tilghman | 2010-05-26 16:11:44 -0500 (Wed, 26 May 2010) | 14 lines
  
  Use sigaction for signals which should persist past the initial trigger, not signal.
  
  If you call signal() in a Solaris signal handler, instead of just resetting
  the signal handler, it causes the signal to refire, because the signal is not
  marked as handled prior to the signal handler being called.  This effectively
  causes Solaris to immediately exceed the threadstack in recursive signal
  handlers and crash.
  
  (closes issue #17000)
   Reported by: rmcgilvr
   Patches: 
         20100526__issue17000.diff.txt uploaded by tilghman (license 14)
   Tested by: rmcgilvr
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266146 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-26 21:17:46 +00:00
twilson 0c7add2a03 Merge the rest of the FullyBooted patch
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@265467 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-24 22:21:58 +00:00
tilghman e6aec778a5 On systems with a LOT of RAM, a signed integer sometimes printed negative.
(closes issue #16837)
 Reported by: jlpedrosa
 Patches: 
       20100504__issue16837.diff.txt uploaded by tilghman (license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@265316 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-24 18:19:08 +00:00
mmichelson db41c6c80b Fix transcode_via_sln option with SIP calls and improve PLC usage.
From reviewboard:
The problem here is a bit complex, so try to bear with me...

It was noticed by a Digium customer that generic PLC (as configured in
codecs.conf) did not appear to actually be having any sort of benefit when
packet loss was introduced on an RTP stream. I reproduced this issue myself
by streaming a file across an RTP stream and dropping approx. 5% of the
RTP packets. I saw no real difference between when PLC was enabled or disabled
when using wireshark to analyze the RTP streams.

After analyzing what was going on, it became clear that one of the problems
faced was that when running my tests, the translation paths were being set
up in such a way that PLC could not possibly work as expected. To illustrate,
if packets are lost on channel A's read stream, then we expect that PLC will
be applied to channel B's write stream. The problem is that generic PLC can
only be done when there is a translation path that moves from some codec to
SLINEAR. When I would run my tests, I found that every single time, read
and write translation paths would be set up on channel A instead of channel
B. There appeared to be no real way to predict which channel the translation
paths would be set up on.

This is where Kevin swooped in to let me know about the transcode_via_sln
option in asterisk.conf. It is supposed to work by placing a read translation
path on both channels from the channel's rawreadformat to SLINEAR. It also
will place a write translation path on both channels from SLINEAR to the
channel's rawwriteformat. Using this option allows one to predictably set up
translation paths on all channels. There are two problems with this, though.
First and foremost, the transcode_via_sln option did not appear to be working
properly when I was placing a SIP call between two endpoints which did not
share any common formats. Second, even if this option were to work, for PLC
to be applied, there had to be a write translation path that would go from
some format to SLINEAR. It would not work properly if the starting format
of translation was SLINEAR.

The one-line change presented in this review request in chan_sip.c fixed the
first issue for me. The problem was that in sip_request_call, the
jointcapability of the outbound channel was being set to the format passed to
sip_request_call. This is nativeformats of the inbound channel. Because of this,
when ast_channel_make_compatible was called by app_dial, both channels already
had compatibly read and write formats. Thus, no translation path was set up at
the time. My change is to set the jointcapability of the sip_pvt created during
sip_request_call to the intersection of the inbound channel's nativeformats and
the configured peer capability that we determined during the earlier call to
create_addr. Doing this got the translation paths set up as expected when using
transcode_via_sln.

The changes presented in channel.c fixed the second issue for me. First and
foremost, when Asterisk is started, we'll read codecs.conf to see the value of
the genericplc option. If this option is set, and ast_write is called for a
frame with no data, then we will attempt to fill in the missing samples for
the frame. The implementation uses a channel datastore for maintaining the
PLC state and for creating a buffer to store PLC samples in. Even when we
receive a frame with data, we'll call plc_rx so that the PLC state will have
knowledge of the previous voice frame, which it can use as a basis for when
it comes time to actually do a PLC fill-in.

So, reviewers, now I ask for your help. First off, there's the one line change
in chan_sip that I have put in. Is it right? By my logic it seems correct, but
I'm sure someone can tell me why it is not going to work. This is probably the
change I'm least concerned about, though. What concerns me much more is the
set of changes in channel.c. First off, am I even doing it right? When I run
tests, I can clearly see that when PLC is activated, I see a significant increase
in RTP traffic where I would expect it to be. However, in my humble opinion, the
audio sounds kind of crappy whenever the PLC fill-in is done. It sounds worse to
me than when no PLC is used at all. I need someone to review the logic I have used
to be sure that I'm not misusing anything. As far as I can see my pointer arithmetic
is correct, and my use of AST_FRIENDLY_OFFSET should be correct as well, but I'm
sure someone can point out somewhere where I've done something incorrectly.

As I was writing this review request up, I decided to give the code a test run under
valgrind, and I find that for some reason, calls to plc_rx are causing some invalid
reads. Apparently I'm reading past the end of a buffer somehow. I'll have to dig around
a bit to see why that is the case. If it's obvious to someone reviewing, speak up!

Finally, I have one other proposal that is not reflected in my code review. Since
without transcode_via_sln set, one cannot predict or control where a translation
path will be up, it seems to me that the current practice of using PLC only when
transcoding to SLINEAR is not useful. I recommend that once it has been determined
that the method used in this code review is correct and works as expected, then
the code in translate.c that invokes PLC should be removed.

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@264452 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-19 21:29:08 +00:00
eliel 2b551e72e4 Asterisk data retrieval API.
This module implements an abstraction for retrieving and exporting
asterisk data.
Developed by:
	Brett Bryant <brettbryant@gmail.com>
	Eliel C. Sardanons (LU1ALY) <eliels@gmail.com>
For the Google Summer of code 2009 Project.
Documentation can be found in doxygen format and inside the
header include/asterisk/data.h

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



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@258517 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-22 18:07:02 +00:00
mmichelson 0eb1e5407a Merge Call completion support into trunk.
From Reviewboard:
CCSS stands for Call Completion Supplementary Services. An admittedly out-of-date
overview of the architecture can be found in the file doc/CCSS_architecture.pdf
in the CCSS branch. Off the top of my head, the big differences between what is
implemented and what is in the document are as follows:

1. We did not end up modifying the Hangup application at all.
2. The document states that a single call completion monitor may be used across
   multiple calls to the same device. This proved to not be such a good idea
   when implementing protocol-specific monitors, and so we ended up using one
   monitor per-device per-call.
3. There are some configuration options which were conceived after the document
   was written. These are documented in the ccss.conf.sample that is on this
   review request.
		      
For some basic understanding of terminology used throughout this code, see the
ccss.tex document that is on this review.

This implements CCBS and CCNR in several flavors.

First up is a "generic" implementation, which can work over any channel technology
provided that the channel technology can accurately report device state. Call
completion is requested using the dialplan application CallCompletionRequest and can
be canceled using CallCompletionCancel. Device state subscriptions are used in order
to monitor the state of called parties.

Next, there is a SIP-specific implementation of call completion. This method uses the
methods outlined in draft-ietf-bliss-call-completion-06 to implement call completion
using SIP signaling. There are a few things to note here:

* The agent/monitor terminology used throughout Asterisk sometimes is the reverse of
  what is defined in the referenced draft.

* Implementation of the draft required support for SIP PUBLISH. I attempted to write
  this in a generic-enough fashion such that if someone were to want to write PUBLISH
  support for other event packages, such as dialog-state or presence, most of the effort
  would be in writing callbacks specific to the event package.

* A subportion of supporting PUBLISH reception was that we had to implement a PIDF
  parser. The PIDF support added is a bit minimal. I first wrote a validation
  routine to ensure that the PIDF document is formatted properly. The rest of the
  PIDF reading is done in-line in the call-completion-specific PUBLISH-handling
  code. In other words, while there is PIDF support here, it is not in any state
  where it could easily be applied to other event packages as is.

Finally, there are a variety of ISDN-related call completion protocols supported. These
were written by Richard Mudgett, and as such I can't really say much about their
implementation. There are notes in the CHANGES file that indicate the ISDN protocols
over which call completion is supported.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@256528 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-09 15:31:32 +00:00
tilghman 296f7c46ea Pass the PID of the Asterisk process, not the PID of the canary.
(closes issue #17065)
 Reported by: globalnetinc
 Patches: 
       astcanary.patch uploaded by makoto (license 38)
 Tested by: frawd, globalnetinc


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@255952 f38db490-d61c-443f-a65b-d21fe96a405b
2010-04-02 20:19:01 +00:00
tzafrir d110bd89b6 make 'core show settings' should show all settable directories
(closes issue #17086)
Reported by: tzafrir
Patches:
      asterisk_extra_settings_dirs.diff uploaded by tzafrir (license 46)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@254162 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-23 22:48:03 +00:00
mmichelson 4b1ca40f36 Initialize channels prior to loading "preload" modules.
We can have bad results when a module, upon being loaded, attempts
to reference the channels container if the container hasn't yet
been initialized. I saw this happen by trying to preload pbx_config.so
and having a hint defined which referenced a non-existent SIP peer.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253872 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-22 20:32:15 +00:00
russell b8db65d578 Update comment to reflect new timeout value.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253378 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-18 18:23:07 +00:00
russell 5a8fa60ea8 Increase CLI command output timeout for asterisk -rx to 60 seconds.
(closes issue #17049)
Reported by: russell
Tested by: russell

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253357 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-18 18:18:43 +00:00
tilghman ecfc5f5016 Merged revisions 252361 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r252361 | tilghman | 2010-03-14 20:33:50 -0500 (Sun, 14 Mar 2010) | 4 lines
  
  Launch Asterisk on Mac OS X with launchd.
  
  Reviewboard: https://reviewboard.asterisk.org/r/551/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252362 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-15 01:37:04 +00:00
tilghman b117a7de89 Merged revisions 248859 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r248859 | tilghman | 2010-02-25 15:21:05 -0600 (Thu, 25 Feb 2010) | 15 lines
  
  Some platforms clear /var/run at boot, which makes connecting a remote console... difficult.
  
  Previously, we only created the default /var/run/asterisk directory at install
  time.  While we could create it in the init script, that would not work for
  those who start asterisk manually from the command line.  So the safest thing
  to do is to create it as part of the Asterisk boot process.  This also changes
  the ownership of the directory, because the pid and ctl files are created after
  we setuid/setgid.
  
  (closes issue #16802)
   Reported by: Brian
   Patches: 
         20100224__issue16802.diff.txt uploaded by tilghman (license 14)
   Tested by: tzafrir
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@248861 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-25 21:22:39 +00:00
seanbright 86c24efbe0 Merged revisions 244926 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r244926 | seanbright | 2010-02-05 12:03:35 -0500 (Fri, 05 Feb 2010) | 1 line
  
  Update main copyright date.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@244927 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-05 17:05:32 +00:00
jpeeler dd43b1905e Add new option to asterisk.conf (lockconfdir) to protect conf dir during reloads
(closes issue #16358)
Reported by: raarts
Patches: 
      lockconfdir.diff uploaded by raarts (license 937)
      modified by me


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@243551 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-27 18:29:49 +00:00
tilghman 21520f22c0 Err, oops, it was already the way I intended.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240629 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-15 23:50:47 +00:00
tilghman 5e7b7fb65f The previous attempt at using a pipe to guarantee astcanary shutdown did not work.
We're revisiting the previous patch, albeit with a method that overcomes the
prior criticism that it was not POSIX-compliant.
(closes issue #16602)
 Reported by: frawd
 Patches: 
       20100114__issue16602.diff.txt uploaded by tilghman (license 14)
 Tested by: frawd


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240499 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-15 21:40:14 +00:00
tilghman b7ec076367 It's been long enough -- make the behavior introduced in 1.6 the default.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@239000 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-10 06:56:36 +00:00
dvossel 5d1bac896e Unit Test Framework API
The Unit Test Framework is a new API that manages registration and
execution of unit tests in Asterisk with the purpose of verifying the
operation of C functions.  The Framework consists of a single test
manager accompanied by a list of registered test functions defined
within the code.  A test is defined, registered, and unregistered
from the framework using a set of macros which allow the test code
to only be compiled within asterisk when the TEST_FRAMEWORK flag is
enabled in menuselect.  This allows the test code to exist in the
same file as the C functions it intends to verify.  Registered tests
may be viewed and executed via a set of new CLI commands.  CLI commands
are also present for generating and exporting test results into xml
and txt formats.

For more information and use cases please refer to the documentation
provided at the beginning of the test.h file.

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


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@236027 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-22 16:09:11 +00:00
file 466ea98f2a Add an 'X' option to the asterisk application which enables #exec for configuration files.
This option can be used to enable #exec support in the asterisk.conf configuration file.

(closes issue #16260)
Reported by: atis
Patches:
      exec_includes.patch uploaded by atis (license 242)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@232510 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02 20:10:07 +00:00
tilghman 7326fe3151 Reorder option flags. Change guidelines so that example code is consistent with guidelines
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@231369 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-26 02:09:58 +00:00
oej 47269d650e Add the capability to require a module to be loaded, or else Asterisk exits.
Review: https://reviewboard.asterisk.org/r/426/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@229819 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-13 08:52:28 +00:00