Commit Graph

1752 Commits

Author SHA1 Message Date
Sean Bright
8340a34a4a Merged revisions 199051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r199051 | seanbright | 2009-06-04 10:31:24 -0400 (Thu, 04 Jun 2009) | 47 lines
  
  Merged revisions 199022 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r199022 | seanbright | 2009-06-04 10:14:57 -0400 (Thu, 04 Jun 2009) | 40 lines
    
    Safely handle AMI connections/reload requests that occur during startup.
    
    During asterisk startup, a lock on the list of modules is obtained by the
    primary thread while each module is initialized.  Issue 13778 pointed out a
    problem with this approach, however.  Because the AMI is loaded before other
    modules, it is possible for a module reload to be issued by a connected client
    (via Action: Command), causing a deadlock.
    
    The resolution for 13778 was to move initialization of the manager to happen
    after the other modules had already been lodaded.  While this fixed this
    particular issue, it caused a problem for users (like FreePBX) who call AMI
    scripts via an #exec in a configuration file (See issue 15189).
    
    The solution I have come up with is to defer any reload requests that come in
    until after the server is fully booted.  When a call comes in to
    ast_module_reload (from wherever) before we are fully booted, the request is
    added to a queue of pending requests.  Once we are done booting up, we then
    execute these deferred requests in turn.
    
    Note that I have tried to make this a bit more intelligent in that it will not
    queue up more than 1 request for the same module to be reloaded, and if a
    general reload request comes in ('module reload') the queue is flushed and we
    only issue a single deferred reload for the entire system.
    
    As for how this will impact existing installations - Before 13778, a reload
    issued before module initialization was completed would result in a deadlock.
    After 13778, you simply couldn't connect to the manager during startup (which
    causes problems with #exec-that-calls-AMI configuration files).  I believe this
    is a good general purpose solution that won't negatively impact existing
    installations.
    
    (closes issue #15189)
    (closes issue #13778)
    Reported by: p_lindheimer
    Patches:
          06032009_15189_deferred_reloads.diff uploaded by seanbright (license 71)
    Tested by: p_lindheimer, seanbright
    
    Review: https://reviewboard.asterisk.org/r/272/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@199052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-04 14:53:49 +00:00
David Vossel
9c6652d306 Merged revisions 198856 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r198856 | dvossel | 2009-06-02 16:17:49 -0500 (Tue, 02 Jun 2009) | 10 lines
  
  Generic call forward api, ast_call_forward()
  
  The function ast_call_forward() forwards a call to an extension specified in an ast_channel's call_forward string.  After an ast_channel is called, if the channel's call_forward string is set this function can be used to forward the call to a new channel and terminate the original one.  I have included this api call in both channel.c's ast_request_and_dial() and feature.c's feature_request_and_dial().  App_dial and app_queue already contain call forward logic specific for their application and options.
  
  (closes issue #13630)
  Reported by: festr
  
  Review: https://reviewboard.asterisk.org/r/271/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@198889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-03 15:27:30 +00:00
Matthew Nicholson
95fac13256 Merged revisions 198072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r198072 | mnicholson | 2009-05-29 14:04:24 -0500 (Fri, 29 May 2009) | 21 lines
  
  Merged revisions 198068 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r198068 | mnicholson | 2009-05-29 13:53:01 -0500 (Fri, 29 May 2009) | 15 lines
    
    Use AST_CDR_NOANSWER instead of AST_CDR_NULL as the default CDR disposition.
    
    This change also involves the addition of an AST_CDR_FLAG_ORIGINATED flag that is used on originated channels to distinguish: them from dialed channels.
    
    (closes issue #12946)
    Reported by: meral
    Patches:
          null-cdr2.diff uploaded by mnicholson (license 96)
    Tested by: mnicholson, dbrooks
    
    (closes issue #15122)
    Reported by: sum
    Tested by: sum
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@198073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 19:13:03 +00:00
Mark Michelson
a66b938920 Merged revisions 197606 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r197606 | mmichelson | 2009-05-28 10:32:19 -0500 (Thu, 28 May 2009) | 22 lines
  
  Recorded merge of revisions 197588 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r197588 | mmichelson | 2009-05-28 10:27:49 -0500 (Thu, 28 May 2009) | 16 lines
    
    Allow for media to arrive from an alternate source when responding to a reinvite with 491.
    
    When we receive a SIP reinvite, it is possible that we may not be able to process the
    reinvite immediately since we have also sent a reinvite out ourselves. The problem is
    that whoever sent us the reinvite may have also sent a reinvite out to another party,
    and that reinvite may have succeeded.
    
    As a result, even though we are not going to accept the reinvite we just received, it
    is important for us to not have problems if we suddenly start receiving RTP from a new
    source. The fix for this is to grab the media source information from the SDP of the
    reinvite that we receive. This information is passed to the RTP layer so that it will
    know about the alternate source for media.
    
    Review: https://reviewboard.asterisk.org/r/252
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@197615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 15:34:48 +00:00
Mark Michelson
c7731d3489 Merged revisions 197543 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r197543 | mmichelson | 2009-05-28 09:58:06 -0500 (Thu, 28 May 2009) | 27 lines
  
  Merged revisions 197537 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r197537 | mmichelson | 2009-05-28 09:49:13 -0500 (Thu, 28 May 2009) | 21 lines
    
    Add flags to chanspy audiohook so that audio stays in sync.
    
    There are two flags being added to the chanspy audiohook here. One
    is the pre-existing AST_AUDIOHOOK_TRIGGER_SYNC flag. With this set,
    we ensure that the read and write slinfactories on the audiohook do
    not skew beyond a certain tolerance.
    
    In addition, there is a new audiohook flag added here,
    AST_AUDIOHOOK_SMALL_QUEUE. With this flag set, we do not allow for
    a slinfactory to build up a substantial amount of audio before 
    flushing it. For this particular issue, this means that the person 
    spying on the call will hear the conversations in real time with very 
    little delay in the audio.
    
    (closes issue #13745)
    Reported by: geoffs
    Patches:
          13745.patch uploaded by mmichelson (license 60)
    Tested by: snblitz
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@197544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 15:03:55 +00:00
Jeff Peeler
76b9a6b5d8 Fix broken attended transfers
The bridge was terminating immediately after the attended transfer was 
completed. The problem was because upon reentering ast_channel_bridge
nexteventts was checked to see if it was set and if so could possibly
return AST_BRIDGE_COMPLETE.
  
(closes issue #15183)
Reported by: andrebarbosa
Tested by: andrebarbosa, tootai, loloski


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@197126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-27 17:09:25 +00:00
Matthew Nicholson
e5d7298863 Merged revisions 195882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r195882 | mnicholson | 2009-05-21 10:33:55 -0500 (Thu, 21 May 2009) | 20 lines
  
  Merged revisions 195881 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r195881 | mnicholson | 2009-05-21 10:25:50 -0500 (Thu, 21 May 2009) | 13 lines
    
    This commit prevents cdr records with AST_CDR_FLAG_ANSLOCKED and AST_CDR_FLAG_LOCKED from being updated in certain cases.
    
    This is accomplished by adding two functions to update the answer time and disposition of calls that checks for the proper lock flags.  These functions are used in the ast_bridge_call() function so that ForkCDR(A) calls are respected.
    
    This patch also modifies the way ast_bridge_call() chooses the cdr record to base the bridged_cdr on.  Previously the first unlocked cdr record would be chosen, now instead the first cdr record is chosen and forked cdr records are moved to the bridge_cdr.  This allows the original cdr record and any forked cdr records to be properly updated with answer and end times.
    
    (closes issue #13797)
    Reported by: sh0t
    Tested by: sh0t
    
    (closes issue #14744)
    Reported by: deepesh
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@195894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 16:19:24 +00:00
Tilghman Lesher
4892be94a6 Recorded merge of revisions 195370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r195370 | tilghman | 2009-05-18 15:52:33 -0500 (Mon, 18 May 2009) | 15 lines
  
  Recorded merge of revisions 195366 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r195366 | tilghman | 2009-05-18 15:24:13 -0500 (Mon, 18 May 2009) | 8 lines
    
    Add a similar dependency on SMDI for voicemail as already exists for ADSI.
    (closes issue #14846)
     Reported by: pj
     Patches: 
           20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14)
           20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14)
           20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@195371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 20:53:37 +00:00
Kevin P. Fleming
3f94c3bd6b Merged revisions 192357 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r192357 | kpfleming | 2009-05-05 15:18:21 +0200 (Tue, 05 May 2009) | 5 lines
  
  Correct some flaws in the memory accounting code for stringfields and ao2 objects
  
  Under some conditions, the memory allocation for stringfields and ao2 objects would not have supplied valid file/function names for MALLOC_DEBUG tracking, so this commit corrects that.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@192358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 13:23:27 +00:00
Kevin P. Fleming
10a2c0099e Merged revisions 192318 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r192318 | kpfleming | 2009-05-05 12:34:19 +0200 (Tue, 05 May 2009) | 5 lines
  
  Properly account for memory allocated for channels and datastores
  
  As in previous commits, when channels are allocated (with ast_channel_alloc) or datastores are allocated (with ast_datastore_alloc) properly account for the memory being owned by the caller, instead of the allocator function itself.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@192353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 12:27:18 +00:00
Kevin P. Fleming
60280df797 Merged revisions 192279 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r192279 | kpfleming | 2009-05-05 10:51:06 +0200 (Tue, 05 May 2009) | 5 lines
  
  Ensure that string pools allocated to hold stringfields are properly accounted in MALLOC_DEBUG mode
  
  This commit modifies the stringfield pool allocator to remember the 'owner' of the stringfield manager the pool is being allocated for, and ensures that pools allocated in the future when fields are populated are owned by that file/function.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@192280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 09:02:19 +00:00
Tilghman Lesher
5e04e9d398 Merged revisions 191367 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r191367 | tilghman | 2009-04-30 12:40:58 -0500 (Thu, 30 Apr 2009) | 3 lines
  
  Detect eaccess (or euidaccess) before using it.
  Reported by Andrew Lindh via the -dev list.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@191368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 17:43:37 +00:00
Kevin P. Fleming
53843dfb82 Merged revisions 190725 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r190725 | kpfleming | 2009-04-27 14:30:54 -0500 (Mon, 27 Apr 2009) | 13 lines
  
  Merged revisions 190721 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r190721 | kpfleming | 2009-04-27 14:29:46 -0500 (Mon, 27 Apr 2009) | 7 lines
    
    Fix 'inconsistent line endings' when autoconf 2.63 is used
    
    Attempt to make configure script regeneration 'safe' using autoconf 2.63, which embeds a bare CR into the script, thus making Subversion complain about inconsistent line endings
    
    This commit changes the MIME type of the configure script to be 'binary' thus making Subversion no longer inspect line endings, and as a bonus 'svn diff' will no longer try to generate diff output for it, which is not generally useful anyway.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@190730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27 19:40:58 +00:00
Tilghman Lesher
08c9634115 Merge of timedwrlock detection broke build.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@190419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-23 22:21:06 +00:00
Tilghman Lesher
94b71d104f Merged revisions 190093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r190093 | tilghman | 2009-04-22 16:38:15 -0500 (Wed, 22 Apr 2009) | 14 lines
  
  Merged revisions 190092 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r190092 | tilghman | 2009-04-22 16:35:03 -0500 (Wed, 22 Apr 2009) | 7 lines
    
    Detect availability of pthread_rwlock_timedwrlock() before using it.
    (closes issue #14930)
     Reported by: tilghman
     Patches: 
           20090420__bug14930.diff.txt uploaded by tilghman (license 14)
     Tested by: mvanbaak, tilghman
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@190094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-22 21:41:24 +00:00
Jeff Peeler
62f5546319 Merged revisions 190057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r190057 | jpeeler | 2009-04-22 16:15:55 -0500 (Wed, 22 Apr 2009) | 9 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@190059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-22 21:17:29 +00:00
Doug Bailey
a0c3c3dad9 Merged revisions 189629 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r189629 | dbailey | 2009-04-21 09:28:04 -0500 (Tue, 21 Apr 2009) | 10 lines
  
  Merged revisions 189601 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r189601 | dbailey | 2009-04-21 09:00:55 -0500 (Tue, 21 Apr 2009) | 3 lines
    
    Add check in configure script to check for GLOB_NOMAGIC and GLOB_BRACE in glob.h 
    This allows config.c to compile when linked against uclibc that does not support these parameters
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@189630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-21 14:52:54 +00:00
Tilghman Lesher
3d7bac20f6 typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@187490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 19:03:50 +00:00
Tilghman Lesher
9a69733bc2 Merged revisions 187483 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r187483 | tilghman | 2009-04-09 13:40:01 -0500 (Thu, 09 Apr 2009) | 15 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@187485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 18:52:58 +00:00
Tilghman Lesher
ec49f90f69 Merged revisions 187302 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r187302 | tilghman | 2009-04-08 23:59:05 -0500 (Wed, 08 Apr 2009) | 14 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@187304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 05:16:06 +00:00
Joshua Colp
01dc8d8ea9 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.0@186322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 15:53:32 +00:00
Russell Bryant
ce37a27180 Merged revisions 184147 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r184147 | russell | 2009-03-24 20:42:10 -0500 (Tue, 24 Mar 2009) | 5 lines
  
  Fix build issues on Mac OSX.
  
  (closes issue #14714)
  Reported by: ygor
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@184148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 01:48:17 +00:00
David Vossel
90b97eddc4 Merged revisions 183436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r183436 | dvossel | 2009-03-19 15:30:39 -0500 (Thu, 19 Mar 2009) | 13 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@183437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 20:32:20 +00:00
Russell Bryant
70eaf71dfe Merged revisions 183242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r183242 | russell | 2009-03-19 13:00:15 -0500 (Thu, 19 Mar 2009) | 10 lines

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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@183243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 18:08:02 +00:00
David Vossel
9628d62ffa Merged revisions 183172 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r183172 | dvossel | 2009-03-19 11:28:33 -0500 (Thu, 19 Mar 2009) | 20 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@183199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 17:10:09 +00:00
Russell Bryant
e047ec4d72 Merged revisions 182847 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r182847 | russell | 2009-03-17 21:28:55 -0500 (Tue, 17 Mar 2009) | 52 lines

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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@182945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 14:24:27 +00:00
Kevin P. Fleming
c0219aa890 Merged revisions 182525 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r182525 | kpfleming | 2009-03-17 09:38:11 -0500 (Tue, 17 Mar 2009) | 11 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@182526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17 14:39:16 +00:00
Jeff Peeler
368b57494b Merged revisions 181135 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r181135 | jpeeler | 2009-03-10 23:06:44 -0500 (Tue, 10 Mar 2009) | 20 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@181137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 04:17:26 +00:00
Kevin P. Fleming
2a877c8fcb Merged revisions 180373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r180373 | kpfleming | 2009-03-05 12:29:38 -0600 (Thu, 05 Mar 2009) | 15 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@180377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-05 18:36:31 +00:00
David Vossel
9cad0b7e22 Merged revisions 180032 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r180032 | dvossel | 2009-03-03 17:21:18 -0600 (Tue, 03 Mar 2009) | 14 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@180078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 23:35:18 +00:00
Tilghman Lesher
aac9d07849 Merged revisions 177732 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r177732 | tilghman | 2009-02-20 15:25:37 -0600 (Fri, 20 Feb 2009) | 10 lines
  
  Merged revisions 177701 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r177701 | tilghman | 2009-02-20 15:15:01 -0600 (Fri, 20 Feb 2009) | 3 lines
    
    This exception does not appear to still be true for Solaris 10, and OpenSolaris definitely needs it to be removed.
    Fixed for snuff-home on -dev channel.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@177756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-20 21:31:50 +00:00
David Vossel
e938398385 Fixes issue with undefined audio codecs in chan_iax2
During iax2 call negotiation, supported codecs are passed in an Information Element containing a 2 byte field where each bit correlates to a specific codec.  In 1.6 only audio codec bits 0-12 and 15 are defined, leaving bits 13-14 undefined.  By default all bits are enabled unless specified otherwise.  Since its a 2 byte field and 13-14 are not defined, these bits are never turned off.  In trunk, bits 13-14 are defined, which means 1.6 is advertising support for codecs it does not have when talking to trunk.  I fixed this by adding #define for undefined audio codec bits.  These bits are then removed from iax2's full bandwidth capabilities.   

(closes issue #14283)
Reported by: jcovert


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@177698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-20 20:27:45 +00:00
Tilghman Lesher
36f41cee56 Merged revisions 177664 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r177664 | tilghman | 2009-02-20 11:29:51 -0600 (Fri, 20 Feb 2009) | 8 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@177665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-20 17:42:16 +00:00
Jeff Peeler
fff4e4f7cd Merged revisions 177387 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r177387 | jpeeler | 2009-02-19 10:45:02 -0600 (Thu, 19 Feb 2009) | 3 lines
  
  Fix another merge error from 176708
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@177388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-19 16:45:30 +00:00
Tilghman Lesher
fece998d9c Merged revisions 177098 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r177098 | tilghman | 2009-02-18 13:05:15 -0600 (Wed, 18 Feb 2009) | 9 lines
  
  Merged revisions 177096 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r177096 | tilghman | 2009-02-18 12:30:38 -0600 (Wed, 18 Feb 2009) | 2 lines
    
    Document the return value of the update method (as requested on -dev list)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@177099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-18 19:07:05 +00:00
Jeff Peeler
46db811169 Merged revisions 176708 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r176708 | jpeeler | 2009-02-17 16:08:00 -0600 (Tue, 17 Feb 2009) | 23 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@176710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 22:14:38 +00:00
Mark Michelson
ddee1048c7 Merged revisions 176697 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r176697 | mmichelson | 2009-02-17 15:40:09 -0600 (Tue, 17 Feb 2009) | 3 lines
  
  Clear up documentation of AST_FRIENDLY_OFFSET in frame.h
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@176698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 21:40:40 +00:00
Kevin P. Fleming
f3ae0e00a7 Merged revisions 176255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r176255 | kpfleming | 2009-02-16 15:45:54 -0600 (Mon, 16 Feb 2009) | 13 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@176258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16 21:50:47 +00:00
Michiel van Baak
25c01347d8 Merged revisions 175952 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r175952 | mvanbaak | 2009-02-16 01:26:59 +0100 (Mon, 16 Feb 2009) | 10 lines
  
  Merged revisions 175921 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r175921 | mvanbaak | 2009-02-16 00:37:03 +0100 (Mon, 16 Feb 2009) | 3 lines
    
    fix mis-spelling of the word registered.
    Reported by De_Mon on #asterisk-dev.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@176022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16 09:40:22 +00:00
Mark Michelson
90ef4eb33e Merged revisions 175121 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r175121 | mmichelson | 2009-02-12 10:28:06 -0600 (Thu, 12 Feb 2009) | 11 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@175122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-12 16:33:24 +00:00
Mark Michelson
a45ec0c30a Merged revisions 174945 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r174945 | mmichelson | 2009-02-11 16:41:01 -0600 (Wed, 11 Feb 2009) | 29 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@174946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-11 22:48:11 +00:00
Terry Wilson
af2b34cb56 Merged revisions 172580 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r172580 | twilson | 2009-01-30 15:29:12 -0600 (Fri, 30 Jan 2009) | 44 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@172635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-30 23:58:31 +00:00
Mark Michelson
07adec4209 Merged revisions 172598 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r172598 | mmichelson | 2009-01-30 16:22:04 -0600 (Fri, 30 Jan 2009) | 3 lines

Fix redefinition of flag in channel.h


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@172604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-30 22:23:11 +00:00
Steve Murphy
491c4a9c68 Merged revisions 172063 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r172063 | murf | 2009-01-28 13:31:06 -0700 (Wed, 28 Jan 2009) | 52 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@172065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28 20:41:45 +00:00
Russell Bryant
d6ff97e30d Merged revisions 170943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r170943 | russell | 2009-01-24 20:49:30 -0600 (Sat, 24 Jan 2009) | 6 lines

Change ARRAY_LEN() to be more C++ safe.

When the second part of this macro is written as 0[a] instead of a[0], it will
force a failure if the macro is used on a C++ object that overloads the []
operator.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@170944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-25 02:50:24 +00:00
Tilghman Lesher
4deaa3d67f Merged revisions 169944 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r169944 | tilghman | 2009-01-21 18:44:52 -0600 (Wed, 21 Jan 2009) | 16 lines
  
  Merged revisions 169943 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r169943 | tilghman | 2009-01-21 18:43:31 -0600 (Wed, 21 Jan 2009) | 9 lines
    
    AST_RWLOCK_INIT_VALUE is always defined.  What we really wanted to ask is
    whether autoconf detected a static initializer value.  This fixes rwlocks
    on all such platforms (mainly, Mac OS X).
    (closes issue #13767)
     Reported by: jcovert
     Patches: 
           20090121__bug13767.diff.txt uploaded by Corydon76 (license 14)
     Tested by: jcovert, Corydon76
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@169945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 00:45:38 +00:00
Tilghman Lesher
b669fac978 Merged revisions 168832 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r168832 | tilghman | 2009-01-16 12:49:09 -0600 (Fri, 16 Jan 2009) | 13 lines
  
  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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@168835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-16 18:53:48 +00:00
Russell Bryant
1b1c2db6bd Merged revisions 168562 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r168562 | russell | 2009-01-13 13:22:13 -0600 (Tue, 13 Jan 2009) | 10 lines

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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@168564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 19:27:54 +00:00
Steve Murphy
5d34e0df03 Merged revisions 166665 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

Due to non-symmetrical updating, I had some fairly
interesting conflicts to straighten out in this
release. The changes were such that I was compelled
to run thru all the same tests as trunk, which turned
up some problems, which I fixed. 

................
  r166665 | murf | 2008-12-23 11:13:49 -0700 (Tue, 23 Dec 2008) | 153 lines
  
  Merged revisions 166093 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  In order to merge this 1.4 patch into trunk,
  I had to resolve some conflicts and wait for
  Russell to make some changes to res_agi.
  I re-ran all the tests; 39 calls in all, and
  made fairly careful notes and comparisons: I
  don't want this to blow up some aspect of 
  asterisk; I completely removed the KEEPALIVE
  from the pbx.h decls. The first 3 scenarios
  involving feature park; feature xfer to 700;
  hookflash park to Park() app call all behave
  the same, don't appear to leave hung channels,
  and no crashes.
  
  ........
    r166093 | murf | 2008-12-19 15:30:32 -0700 (Fri, 19 Dec 2008) | 131 lines
    
    This merges the masqpark branch into 1.4
    
    These changes eliminate the need for (and use of)
    the KEEPALIVE return code in res_features.c;
    There are other places that use this result code
    for similar purposes at a higher level, these appear
    to be left alone in 1.4, but attacked in trunk.
    
    The reason these changes are being made in 1.4, is
    that parking ends a channel's life, in some situations,
    and the code in the bridge (and some other places),
    was not checking the result code properly, and dereferencing
    the channel pointer, which could lead to memory corruption
    and crashes.
    
    Calling the masq_park function eliminates this danger 
    in higher levels.
    
    A series of previous commits have replaced some parking calls
    with masq_park, but this patch puts them ALL to rest,
    (except one, purposely left alone because a masquerade
    is done anyway), and gets rid of the code that tests
    the KEEPALIVE result, and the NOHANGUP_PEER result codes.
    
    While bug 13820 inspired this work, this patch does
    not solve all the problems mentioned there.
    
    I have tested this patch (again) to make sure I have
    not introduced regressions. 
    
    Crashes that occurred when a parked party hung up
    while the parking party was listening to the numbers
    of the parking stall being assigned, is eliminated.
    
    These are the cases where parking code may be activated:
    
    1. Feature one touch (eg. *3)
    2. Feature blind xfer to parking lot (eg ##700)
    3. Run Park() app from dialplan (eg sip xfer to 700)
       (eg. dahdi hookflash xfer to 700)
    4. Run Park via manager.
    
    The interesting testing cases for parking are:
    I. A calls B, A parks B
        a. B hangs up while A is getting the numbers announced.
        b. B hangs up after A gets the announcement, but 
           before the parking time expires
        c. B waits, time expires, A is redialed,
           A answers, B and A are connected, after
           which, B hangs up.
        d. C picks up B while still in parking lot.
    
    II. A calls B, B parks A
        a. A hangs up while B is getting the numbers announced.
        b. A hangs up after B gets the announcement, but 
           before the parking time expires
        c. A waits, time expires, B is redialed,
           B answers, A and B are connected, after
           which, A hangs up.
        d. C picks up A while still in parking lot.
    
    Testing this throroughly involves acting all the permutations
    of I and II, in situations 1,2,3, and 4.
    
    Since I added a few more changes (ALL references to KEEPALIVE in the bridge
    code eliimated (I missed one earlier), I retested
    most of the above cases, and no crashes.
    
    H-extension weirdness.
    
    Current h-extension execution is not completely
    correct for several of the cases.
    
    For the case where A calls B, and A parks B, the
    'h' exten is run on A's channel as soon as the park
    is accomplished. This is expected behavior.
    
    But when A calls B, and B parks A, this will be
    current behavior:
    
    After B parks A, B is hung up by the system, and
    the 'h' (hangup) exten gets run, but the channel
    mentioned will be a derivative of A's...
    
    Thus, if A is DAHDI/1, and B is DAHDI/2,
    the h-extension will be run on channel
    Parked/DAHDI/1-1<ZOMBIE>, and the 
    start/answer/end info will be those 
    relating to Channel A.
    
    And, in the case where A is reconnected to
    B after the park time expires, when both parties
    hang up after the joyful reunion, no h-exten
    will be run at all.
    
    In the case where C picks up A from the 
    parking lot, when either A or C hang up,
    the h-exten will be run for the C channel.
    
    CDR's are a separate issue, and not addressed
    here.
    
    As to WHY this strange behavior occurs, 
    the answer lies in the procedure followed
    to accomplish handing over the channel
    to the parking manager thread. This procedure
    is called masquerading. In the process,
    a duplicate copy of the channel is created,
    and most of the active data is given to the
    new copy. The original channel gets its name
    changed to XXX<ZOMBIE> and keeps the PBX
    information for the sake of the original
    thread (preserving its role as a call 
    originator, if it had this role to begin
    with), while the new channel is without
    this info and becomes a call target (a
    "peer").
    
    In this case, the parking lot manager
    thread is handed the new (masqueraded)
    channel. It will not run an h-exten
    on the channel if it hangs up while
    in the parking lot. The h exten will
    be run on the original channel instead,
    in the original thread, after the bridge
    completes.
    
    See bug 13820 for our intentions as
    to how to clean up the h exten behavior.
  
  Review: http://reviewboard.digium.com/r/29/
  
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@166729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-24 00:52:12 +00:00
Tilghman Lesher
6964b59097 Merged revisions 166696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r166696 | tilghman | 2008-12-23 14:47:08 -0600 (Tue, 23 Dec 2008) | 7 lines
  
  Allow semicolons and extended characters in user-specified SIP headers.
  (closes issue #14110)
   Reported by: gork
   Patches: 
         20081222__bug14110__2.diff.txt uploaded by Corydon76 (license 14)
   Tested by: gork, putnopvut
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@166697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 20:52:19 +00:00