Commit Graph

17709 Commits

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

................
  r186799 | tilghman | 2009-04-07 17:23:46 -0500 (Tue, 07 Apr 2009) | 10 lines
  
  Merged revisions 186775 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r186775 | tilghman | 2009-04-07 17:16:50 -0500 (Tue, 07 Apr 2009) | 3 lines
    
    Fix Macro documentation to match current (and intended) behavior.
    (See -dev mailing list)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-07 22:33:38 +00:00
Mark Michelson
843fdc6773 Merged revisions 186720 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r186720 | mmichelson | 2009-04-07 15:46:18 -0500 (Tue, 07 Apr 2009) | 12 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-07 20:59:06 +00:00
Joshua Colp
40a70d9d38 Blocked revisions 186687 via svnmerge
........
  r186687 | file | 2009-04-06 20:11:13 -0300 (Mon, 06 Apr 2009) | 2 lines
  
  Fix a log message getting output when it should not have been.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-06 23:12:17 +00:00
Joshua Colp
ed2c74aa7b Blocked revisions 186653 via svnmerge
........
  r186653 | file | 2009-04-06 14:03:07 -0300 (Mon, 06 Apr 2009) | 2 lines
  
  Fix problem when authenticating a non-RTP dialog.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-06 17:03:53 +00:00
Joshua Colp
3a2e3998d7 Blocked revisions 186624 via svnmerge
........
  r186624 | file | 2009-04-06 13:15:30 -0300 (Mon, 06 Apr 2009) | 13 lines
  
  Add support for changing the outbound codec on a SIP call using
  a dialplan variable.
  
  This adds a dialplan variable (SIP_CODEC_OUTBOUND) which controls
  the codec offered for an outgoing SIP call. This is much like the
  SIP_CODEC dialplan variable and has the same restrictions. The codec
  set must be one that is configured for the call.
  
  (closes issue #13243)
  Reported by: samdell3
  Patches:
        13243.diff uploaded by file (license 11)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-06 16:19:56 +00:00
Mark Michelson
d9e2a9674b Blocked revisions 186620 via svnmerge
........
  r186620 | mmichelson | 2009-04-06 11:06:25 -0500 (Mon, 06 Apr 2009) | 3 lines
  
  Silly svn. These files didn't get merged over in the merge of the issue8824 branch.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-06 16:08:24 +00:00
Mark Michelson
a382338aff Blocked revisions 186566 via svnmerge
................
  r186566 | mmichelson | 2009-04-06 08:57:39 -0500 (Mon, 06 Apr 2009) | 8 lines
  
  Blocked revisions 186565 via svnmerge
  
  ........
    r186565 | mmichelson | 2009-04-06 08:54:41 -0500 (Mon, 06 Apr 2009) | 3 lines
    
    Revert commit 186445 because it causes the build to fail when IMAP_STORAGE is used.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-06 13:58:45 +00:00
Joshua Colp
be17d068a6 Blocked revisions 186563 via svnmerge
........
  r186563 | file | 2009-04-06 10:23:12 -0300 (Mon, 06 Apr 2009) | 8 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-06 13:25:27 +00:00
Mark Michelson
ab2db7e54b Blocked revisions 186525 via svnmerge
........
  r186525 | mmichelson | 2009-04-03 17:41:46 -0500 (Fri, 03 Apr 2009) | 22 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 22:44:08 +00:00
Kevin P. Fleming
df28619eca Merged revisions 186461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r186461 | kpfleming | 2009-04-03 15:20:01 -0500 (Fri, 03 Apr 2009) | 11 lines
  
  Merged revisions 186458 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r186458 | kpfleming | 2009-04-03 15:19:20 -0500 (Fri, 03 Apr 2009) | 5 lines
    
    Fix a bug where DAHDI/Zaptel channels would not properly switch formats when requested
    
    Don't offer AST_FORMAT_SLINEAR on DAHDI/Zaptel channels... while it could provide a slight performance benefit, the translation core in Asterisk has some flaws when a channel driver offers multiple raw formats. this fix is much simpler than fixing the translation core to solve that issue (although that will be done later).
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 20:21:47 +00:00
Tilghman Lesher
0b21b28a55 Merged revisions 186444,186447 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r186444 | tilghman | 2009-04-03 14:30:34 -0500 (Fri, 03 Apr 2009) | 14 lines
  
  Merged revisions 186415 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r186415 | tilghman | 2009-04-03 14:06:58 -0500 (Fri, 03 Apr 2009) | 7 lines
    
    Distinguish in a sent email between simple sends and forwards.
    (closes issue #11678)
     Reported by: jamessan
     Patches: 
           20090330__bug11678.diff.txt uploaded by tilghman (license 14)
     Tested by: tilghman, lmadsen
  ........
................
  r186447 | tilghman | 2009-04-03 14:59:55 -0500 (Fri, 03 Apr 2009) | 9 lines
  
  Merged revisions 186445 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r186445 | tilghman | 2009-04-03 14:56:48 -0500 (Fri, 03 Apr 2009) | 2 lines
    
    Found a conflict in the last commit, due to multiple targets
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 20:05:56 +00:00
Joshua Colp
3038d2a6c0 Blocked revisions 186382 via svnmerge
........
  r186382 | file | 2009-04-03 13:47:27 -0300 (Fri, 03 Apr 2009) | 11 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 16:48:13 +00:00
Joshua Colp
fe11c67980 Merged revisions 186321 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r186321 | file | 2009-04-03 12:52:50 -0300 (Fri, 03 Apr 2009) | 12 lines
  
  Merged revisions 186320 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r186320 | file | 2009-04-03 12:48:56 -0300 (Fri, 03 Apr 2009) | 5 lines
    
    Fix a problem with the crypto variable definitions not actually being defined properly.
    
    (closes issue #14804)
    Reported by: jvandal
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 15:56:03 +00:00
Tilghman Lesher
56b835f2ea Merged revisions 186297 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r186297 | tilghman | 2009-04-03 10:18:28 -0500 (Fri, 03 Apr 2009) | 4 lines
  
  Compatibility fix for glibc 2.4
  (Closes issue #14820)
  Reported by: phsultan
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 15:19:27 +00:00
Mark Michelson
e577b70d7a Merged revisions 186286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r186286 | mmichelson | 2009-04-03 09:32:05 -0500 (Fri, 03 Apr 2009) | 20 lines
  
  Fix the ability to retrieve voicemail messages from IMAP.
  
  A recent change made interactive vm_states no longer get
  added to the list of vm_states and instead get stored in
  thread-local storage.
  
  In trunk and all the 1.6.X branches, the problem is that
  when we search for messages in a voicemail box, we would
  attempt to update the appropriate vm_state struct by directly
  searching in the list of vm_states instead of using the
  get_vm_state_by_imap_user function. This meant we could not
  find the interactive vm_state that we wanted.
  
  (closes issue #14685)
  Reported by: BlargMaN
  Patches:
        14685.patch uploaded by mmichelson (license 60)
  Tested by: BlargMaN, qualleyiv, mmichelson
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 14:34:02 +00:00
Russell Bryant
e2c0a078e3 Merged revisions 186230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r186230 | russell | 2009-04-02 21:03:48 -0500 (Thu, 02 Apr 2009) | 29 lines

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

........
r186229 | russell | 2009-04-02 20:57:44 -0500 (Thu, 02 Apr 2009) | 21 lines

Fix a memory leak in cdr_radius.

I came across this while doing some testing of my ast_channel_ao2 branch.
After running a test overnight that generated over 5 million calls, Asterisk
had taken up about 1 GB of my system memory.  So, I re-ran the test with
MALLOC_DEBUG turned on.  However, it showed no leaks in Asterisk during the
test, even though Asterisk was still consuming it somehow.

Instead, I turned to valgrind, which when run with --leak-check=full, told
me exactly where the leak came from, which was from allocations inside the
radiusclient-ng library.  This explains why MALLOC_DEBUG did not report it.

After a bit of analysis, I found that we were leaking a little bit of memory
every time a CDR record was passed to cdr_radius.

I don't actually have a radius server set up to receive CDR records.  However,
I always have my development systems compile and install all modules.  In
addition to making sure there are not build errors across modules, always
loading modules helps find bugs like this, too, so it is strongly recommend for
all developers.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 02:11:17 +00:00
Mark Michelson
0dcd1d7601 Merged revisions 186175 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r186175 | mmichelson | 2009-04-02 16:56:21 -0500 (Thu, 02 Apr 2009) | 11 lines
  
  Merged revisions 186174 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r186174 | mmichelson | 2009-04-02 16:55:34 -0500 (Thu, 02 Apr 2009) | 5 lines
    
    Fix instructions in one-step parking comment to make more sense.
    
    Changed a capital K to a lowercase k.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 22:00:11 +00:00
Kevin P. Fleming
e95d7ceebf Merged revisions 186101 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r186101 | kpfleming | 2009-04-02 12:26:07 -0500 (Thu, 02 Apr 2009) | 9 lines
  
  Merged revisions 186081 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r186081 | kpfleming | 2009-04-02 12:21:29 -0500 (Thu, 02 Apr 2009) | 3 lines
    
    ensure that the buffer passed to DAHDI_SET_BUFINFO is fully initialized
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 17:28:05 +00:00
Joshua Colp
090fa5825c Blocked revisions 186078 via svnmerge
........
  r186078 | file | 2009-04-02 14:20:52 -0300 (Thu, 02 Apr 2009) | 10 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 17:21:33 +00:00
Tilghman Lesher
f381fb5421 Merged revisions 186060 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r186060 | tilghman | 2009-04-02 12:10:28 -0500 (Thu, 02 Apr 2009) | 16 lines
  
  Merged revisions 186059 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ................
    r186059 | tilghman | 2009-04-02 12:09:13 -0500 (Thu, 02 Apr 2009) | 9 lines
    
    Merged revisions 186056 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.2
    
    ........
      r186056 | tilghman | 2009-04-02 12:02:18 -0500 (Thu, 02 Apr 2009) | 2 lines
      
      Fix for AST-2009-003
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 17:14:25 +00:00
Tilghman Lesher
077d8b6181 Merged revisions 186021 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r186021 | tilghman | 2009-04-02 10:14:22 -0500 (Thu, 02 Apr 2009) | 7 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@186022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 15:15:22 +00:00
Kevin P. Fleming
ef1a48b00e Merged revisions 185953 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r185953 | kpfleming | 2009-04-02 08:51:44 -0500 (Thu, 02 Apr 2009) | 11 lines
  
  Merged revisions 185952 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r185952 | kpfleming | 2009-04-02 08:43:43 -0500 (Thu, 02 Apr 2009) | 5 lines
    
    the DAHDI_GETCONF, DAHDI_SETCONF and DAHDI_GET_PARAMS ioctls were recently corrected to show that they do, in fact, read data from userspace as part of their work. due to this fix, valgrind now reports a number of cases where chan_dahdi passed an uninitialized (or partially) buffer to these ioctls, which could lead to unexpected behavior.
    
    this patch corrects chan_dahdi to ensure that buffers passed to these ioctls are always fully initialized.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 13:54:03 +00:00
Tilghman Lesher
05fd775230 Merged revisions 185912 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r185912 | tilghman | 2009-04-01 15:13:28 -0500 (Wed, 01 Apr 2009) | 4 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 22:44:34 +00:00
Mark Michelson
161bd12d17 Blocked revisions 185777 via svnmerge
........
  r185777 | mmichelson | 2009-04-01 08:59:34 -0500 (Wed, 01 Apr 2009) | 5 lines
  
  Address Russell's comments regarding rev 185704.
  
  Use ast_debug and ast_softhangup_nolock.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 14:01:02 +00:00
Russell Bryant
0f0a3ef7dc Merged revisions 185772 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r185772 | russell | 2009-04-01 08:48:26 -0500 (Wed, 01 Apr 2009) | 14 lines

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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 13:51:31 +00:00
Russell Bryant
d343bb1c32 Blocked revisions 185741 via svnmerge
........
r185741 | russell | 2009-04-01 07:13:16 -0500 (Wed, 01 Apr 2009) | 2 lines

Fix dev-mode build on my box.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 12:30:53 +00:00
Mark Michelson
bf31300c1d Blocked revisions 185704 via svnmerge
........
  r185704 | mmichelson | 2009-03-31 19:39:01 -0500 (Tue, 31 Mar 2009) | 8 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01 00:40:40 +00:00
Kevin P. Fleming
5735e8fa95 Merged revisions 185664 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r185664 | kpfleming | 2009-03-31 17:35:07 -0500 (Tue, 31 Mar 2009) | 1 line
  
  ignore copied (generated) file
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 22:38:34 +00:00
Mark Michelson
2d24cd16b9 Merged revisions 185604 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r185604 | mmichelson | 2009-03-31 17:12:52 -0500 (Tue, 31 Mar 2009) | 3 lines
  
  Fix trunk's compilation.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 22:13:14 +00:00
Mark Michelson
c4a426da37 Merged revisions 185600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r185600 | mmichelson | 2009-03-31 17:02:48 -0500 (Tue, 31 Mar 2009) | 12 lines
  
  Merged revisions 185599 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r185599 | mmichelson | 2009-03-31 17:00:01 -0500 (Tue, 31 Mar 2009) | 6 lines
    
    Fix crash that would occur if an empty member was specified in queues.conf.
    
    (closes issue #14796)
    Reported by: pida
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 22:05:31 +00:00
Kevin P. Fleming
cf1ce6fbf6 Blocked revisions 185581 via svnmerge
........
  r185581 | kpfleming | 2009-03-31 16:29:50 -0500 (Tue, 31 Mar 2009) | 19 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 21:32:57 +00:00
Mark Michelson
ba7d4a584e Blocked revisions 185532 via svnmerge
................
  r185532 | mmichelson | 2009-03-31 15:56:46 -0500 (Tue, 31 Mar 2009) | 8 lines
  
  Blocked revisions 185531 via svnmerge
  
  ........
    r185531 | mmichelson | 2009-03-31 15:55:47 -0500 (Tue, 31 Mar 2009) | 3 lines
    
    Use AST_SCHED_DEL_SPINLOCK instead of manually using the logic.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 20:59:50 +00:00
Mark Michelson
a979a9e8df Merged revisions 185469 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r185469 | mmichelson | 2009-03-31 14:46:18 -0500 (Tue, 31 Mar 2009) | 14 lines
  
  Merged revisions 185468 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r185468 | mmichelson | 2009-03-31 14:45:30 -0500 (Tue, 31 Mar 2009) | 8 lines
    
    Fix Russian voicemail intro to say the word "messages" properly.
    
    (closes issue #14736)
    Reported by: chappell
    Patches:
          voicemail_no_messages.diff uploaded by chappell (license 8)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 19:47:41 +00:00
Mark Michelson
f5442084c8 Blocked revisions 185299 via svnmerge
................
  r185299 | mmichelson | 2009-03-31 10:34:29 -0500 (Tue, 31 Mar 2009) | 15 lines
  
  Blocked revisions 185298 via svnmerge
  
  ........
    r185298 | mmichelson | 2009-03-31 10:34:05 -0500 (Tue, 31 Mar 2009) | 10 lines
    
    Fix some state_interface stuff that was in trunk but not in the backport to 1.4.
    
    Issue #14359 was fixed between the time that I posted the review of the backport
    of the state interface change for 1.4. This merges the changes from that issue
    back into 1.4.
    
    (closes issue #14359)
    Reported by: francesco_r
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 19:40:27 +00:00
Russell Bryant
5e0f6ee564 Blocked revisions 185432 via svnmerge
........
r185432 | russell | 2009-03-31 14:07:58 -0500 (Tue, 31 Mar 2009) | 40 lines

Improve performance of the code handling the frame queue in chan_iax2.

In my tests that exercised full frame handling in chan_iax2, the version with
these changes took 30% to 40% of the CPU time compared to the same test of
Asterisk trunk before these modifications.

While doing some profiling for <http://reviewboard.digium.com/r/205/>,
one function that caught my eye was network_thread() in chan_iax2.c.
After the things that I was working on there, it was the next target
for analysis and optimization.  I used oprofile's source annotation
functionality and found that the loop traversing the frame queue in
network_thread() was to blame for the excessive CPU cycle consumption.

The frame_queue in chan_iax2 previously held all frames that either were
pending transmission or had been transmitted and are still pending
acknowledgment.

In network_thread(), the previous code would go back through the main
for loop after reading a single incoming frame or after being signaled
because a frame had been queued up for initial transmission.  In each
iteration of the loop, it traverses the entire frame queue looking for
frames that need to be transmitted.  On a busy server, this could easily
be quite a few entries.

This patch is actually quite simple.  The frame_queue has become only a list
of frames pending acknowledgment.  Frames that need to be transmitted are
queued up to a dedicated transmit thread via the taskprocessor API.

As a result, the code in network_thread() becomes much simpler, as its only
job is to read incoming frames.

In addition to the previously described changes, this patch includes some
additional changes to the frame_queue.  Instead of one big frame_queue, now
there is a list per call number to further reduce wasted list traversals.
The biggest impact of this change is in socket_process().

For additional details on testing and test results, see the review request.

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

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 19:08:16 +00:00
David Brooks
caa5439962 Merged revisions 185363 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r185363 | dbrooks | 2009-03-31 11:46:57 -0500 (Tue, 31 Mar 2009) | 44 lines
  
  Merged revisions 185362 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r185362 | dbrooks | 2009-03-31 11:37:12 -0500 (Tue, 31 Mar 2009) | 35 lines
    
    Fix incorrect parsing in chan_gtalk when xmpp contains extra whitespaces
    
    To drill into the xmpp to find the capabilities between channels, chan_gtalk 
    calls iks_child() and iks_next(). iks_child() and iks_next() are functions in 
    the iksemel xml parsing library that traverse xml nodes. The bug here is that 
    both iks_child() and iks_next() will return the next iks_struct node 
    *regardless* of type. chan_gtalk expects the next node to be of type IKS_TAG, 
    which in most cases, it is, but in this case (a call being made from the 
    Empathy IM client), there exists iks_struct nodes which are not IKS_TAG data 
    (they are extraneous whitespaces), and chan_gtalk doesn't handle that case, 
    so capabilities don't match, and a call cannot be made.
    
    iks_first_tag() and iks_next_tag(), on the other hand, will not return the 
    very next iks_struct, but will check to see if the next iks_struct is of 
    type IKS_TAG. If it isn't, it will be skipped, and the next struct of type 
    IKS_TAG it finds will be returned. This assures that chan_gtalk will find 
    the iks_struct it is looking for.
    
    This fix simply changes all calls to iks_child() and iks_next() to become 
    calls to iks_first_tag() and iks_next_tag(), which resolves the capability 
    matching.
    
    The following is a payload listing from Empathy, which, due to the extraneous 
    whitespace, will not be parsed correctly by iksemel:
    
    <iq from='dbrooksjab@235-22-24-10/Telepathy' to='astjab@235-22-24-10/asterisk' type='set' id='542757715704'> <session xmlns='http://www.google.com/session' initiator='dbrooksjab@235-22-24-10/Telepathy' type='initiate' id='1837267342'> <description xmlns='http://www.google.com/session/phone'> <payload-type clockrate='16000' name='speex' id='96'/>
     <payload-type clockrate='8000' name='PCMA' id='8'/>
     <payload-type clockrate='8000' name='PCMU' id='0'/>
     <payload-type clockrate='90000' name='MPA' id='97'/>
     <payload-type clockrate='16000' name='SIREN' id='98'/>
     <payload-type clockrate='8000' name='telephone-event' id='99'/>
    </description>
    </session>
    </iq>
  
  Review: http://reviewboard.digium.com/r/181/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 17:51:48 +00:00
Russell Bryant
fad34f595f Merged revisions 185261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r185261 | russell | 2009-03-31 09:53:45 -0500 (Tue, 31 Mar 2009) | 5 lines

Don't free() an astobj2 object.

(closes issue #14672)
Reported by: makoto

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 14:59:13 +00:00
Joshua Colp
7ebee51590 Merged revisions 185197 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r185197 | file | 2009-03-31 11:07:36 -0300 (Tue, 31 Mar 2009) | 15 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 14:11:25 +00:00
Richard Mudgett
9b6189b180 Merged revisions 185123 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r185123 | rmudgett | 2009-03-30 15:42:14 -0500 (Mon, 30 Mar 2009) | 9 lines
  
  Merged revisions 185121 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r185121 | rmudgett | 2009-03-30 15:40:11 -0500 (Mon, 30 Mar 2009) | 1 line
    
    Update the channel allocation method documentation.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 20:52:51 +00:00
Richard Mudgett
ac756bdcbb Merged revisions 185122 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r185122 | rmudgett | 2009-03-30 15:41:24 -0500 (Mon, 30 Mar 2009) | 26 lines
  
  Merged revisions 185120 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r185120 | rmudgett | 2009-03-30 15:38:11 -0500 (Mon, 30 Mar 2009) | 19 lines
    
    Make chan_misdn BRI TE side normally defer channel selection to the NT side.
    
    Channel allocation collisions are not handled by chan_misdn very well.
    This patch simply avoids the problem for BRI only.
    
    For PRI, allocation collisions are still possible but less likely since
    there are simply more channels available and each end could use a different
    allocation strategy.
    
    misdn.conf options available:
    te_choose_channel - Use to force the TE side to allocate channels.
    method - Specify the channel allocation strategy.
    
    (closes issue #13488)
    Reported by: Christian_Pinedo
    Patches:
          isdn_lib.patch.txt uploaded by crich
    Tested by: crich, siepkes, festr
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 20:52:07 +00:00
Mark Michelson
0551b7e9a1 Merged revisions 185072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r185072 | mmichelson | 2009-03-30 11:26:48 -0500 (Mon, 30 Mar 2009) | 45 lines
  
  Merged revisions 185031 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r185031 | mmichelson | 2009-03-30 11:17:35 -0500 (Mon, 30 Mar 2009) | 39 lines
    
    Fix queue weight behavior so that calls in low-weight queues are not inappropriately blocked.
    
    (This is copied and pasted from the review request I made for this patch)
    
    Asterisk has some odd behavior when queue weights are used. The current logic used when
    potentially calling a queue member is:
    
    If the member we are going to call is part of another queue and _that other queue has any 
    callers in it_ and has a higher weight than the queue we are calling from, then don't try 
    to contact that member. The issue here is what I have marked with underscores. If the 
    higher-weighted queue has any callers in it at all, then the queue member will be unreachable 
    from the lower-weighted queue. This has the potential to be really really bad if using a 
    queue strategy, such as leastrecent or fewestcalls, with the potential to call the same 
    member repeatedly.
    
    The fix proposed by garychen on issue 13220 is very simple and, as far as I can see, works 
    well for this situation. With this set of changes, the logic used becomes:
    
    If the member we are going to call is part of another queue, the other queue has a higher 
    weight than the queue we are calling from, and the higher weight queue has at least as many 
    callers as available members, then do not try to contact the queue member. If the higher 
    weighted queue has fewer callers than available members, then there is no reason to deny 
    the call to this member since the other queue can afford to spare a member.
    
    Since the fix involved writing a generic function for determining the number of available 
    members in the queue, I also modified the is_our_turn function to make use of the new 
    num_available_members function to determine if it is our turn to try calling a member. There 
    is one small behavior change. Before writing this patch, if you had autofill disabled, then 
    if you were the head caller in a queue, you would automatically be told that it was your 
    turn to try calling a member. This did not take into account whether there were actually any 
    queue members available to take the call. Now we actually make sure there is at least one 
    member available to take the call if autofill is disabled.
    
    (closes issue #13220)
    Reported by: garychen
    
    Review: http://reviewboard.digium.com/r/202/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@185089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 16:52:29 +00:00
Mark Michelson
d06bb8c393 Blocked revisions 184986 via svnmerge
................
  r184986 | mmichelson | 2009-03-30 10:25:04 -0500 (Mon, 30 Mar 2009) | 27 lines
  
  Blocked revisions 184980 via svnmerge
  
  ........
    r184980 | mmichelson | 2009-03-30 10:23:59 -0500 (Mon, 30 Mar 2009) | 22 lines
    
    Backport state interface changes to app_queue from trunk.
    
    After several issues raised on the Asterisk bugtracker against
    the 1.4 branch were determined to be fixable with the state interface
    change available in the 1.6.X series, it finally came time to just
    suck it up and backport the change.
    
    For a detailed explanation of what this change entails, the original
    trunk commit for this feature may be found here:
    
    http://svn.digium.com/view/asterisk?view=revision&revision=97203
    
    In addition, the details for the use of this change to fix the problems
    stated in issue #12970 may be found in the review request I made for
    this change. It is linked below.
    
    (closes issue #12970)
    Reported by: edugs15
    
    Review: http://reviewboard.digium.com/r/116
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 15:26:59 +00:00
Joshua Colp
1e3625e133 Merged revisions 184948 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r184948 | file | 2009-03-30 11:37:47 -0300 (Mon, 30 Mar 2009) | 21 lines
  
  Merged revisions 184947 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r184947 | file | 2009-03-30 11:35:47 -0300 (Mon, 30 Mar 2009) | 14 lines
    
    Improve our handling of T38 in the initial INVITE from a device.
    
    We now answer with matching media streams to what is requested. If an INVITE
    is received with both a T38 and RTP media stream this means we answer with both.
    For any outgoing calls created as a result of this inbound one no T38 is requested
    in the initial INVITE. Instead if we start receiving udptl packets we trigger a
    reinvite on the outbound side.
    
    (closes issue #12437)
    Reported by: marsosa
    Tested by: pinga-fogo, okrief, file, afu
    
    Review: http://reviewboard.digium.com/r/208/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 14:43:12 +00:00
Russell Bryant
dc3a259291 Merged revisions 184910 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r184910 | russell | 2009-03-30 08:55:44 -0500 (Mon, 30 Mar 2009) | 4 lines

Fix build error when chan_h323 is not being built.

(reported by cai1982 in #asterisk-dev)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 13:57:56 +00:00
Russell Bryant
6b8b4124a4 Merged revisions 184843 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r184843 | russell | 2009-03-29 00:52:20 -0500 (Sun, 29 Mar 2009) | 13 lines

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

........
r184842 | russell | 2009-03-29 00:51:55 -0500 (Sun, 29 Mar 2009) | 5 lines

Ensure targs variable is fully initialized.

(closes issue #14758)
Reported by: tim_ringenbach

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-29 05:56:50 +00:00
Russell Bryant
d627eb0451 Merged revisions 184838 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r184838 | russell | 2009-03-29 00:32:04 -0500 (Sun, 29 Mar 2009) | 8 lines

Simplify chan_h323 build to not require a second run of "make".

(closes issue #14715)
Reported by: jthurman
Patches:
      h323-makefile-1.6.2.0-beta1.patch uploaded by jthurman (license 614)
Tested by: tzafrir, russell

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-29 05:32:29 +00:00
Kevin P. Fleming
2616defc54 Merged revisions 184762 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r184762 | kpfleming | 2009-03-27 14:10:32 -0500 (Fri, 27 Mar 2009) | 12 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 19:21:33 +00:00
Russell Bryant
36edf175df Merged revisions 184726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r184726 | russell | 2009-03-27 13:04:43 -0500 (Fri, 27 Mar 2009) | 2 lines

Use ast_random() instead of rand() to ensure we use the best RNG available.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 18:12:08 +00:00
Russell Bryant
64f1321f14 Merged revisions 184693 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r184693 | russell | 2009-03-27 11:21:10 -0500 (Fri, 27 Mar 2009) | 2 lines

Change global_app_buf to ast_str_thread_global_buf.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 16:25:13 +00:00
Joshua Colp
6f76b69676 Merged revisions 184677 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r184677 | file | 2009-03-27 12:57:28 -0300 (Fri, 27 Mar 2009) | 7 lines
  
  Fix a potential timer leak in bridge_softmix.
  
  It is possible for a bridge to be created without actually being used.
  In that scenario a timing file descriptor would be opened and not
  closed. To fix this the timing file descriptor is now closed in the
  destroy callback, not the thread function.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@184678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 15:58:11 +00:00