Commit Graph

1916 Commits

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

........
  r157639 | tilghman | 2008-11-18 19:02:45 -0600 (Tue, 18 Nov 2008) | 7 lines
  
  Starting with a change to ensure that ast_verbose() preserves ABI compatibility
  in 1.6.1 (as compared to 1.6.0 and versions of 1.4), this change also
  deprecates the use of Asterisk with FreeBSD 4, given the central use of va_copy
  in core functions.  va_copy() is C99, anyway, and we already require C99 for
  other purposes, so this isn't really a big change anyway.  This change also
  simplifies some of the core ast_str_* functions.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@157641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 01:08:46 +00:00
Mark Michelson
78b55553fd Merged revisions 157632 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r157632 | mmichelson | 2008-11-18 18:59:48 -0600 (Tue, 18 Nov 2008) | 10 lines

If malloc returns NULL, we need to  return NULL immediately or
else Asterisk will crash when attempting to dereference the NULL
pointer

(closes issue #13858)
Reported by: eliel
Patches:
      astmm.c.patch uploaded by eliel (license 64)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@157636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 01:00:44 +00:00
Mark Michelson
892f98a1e6 Merged revisions 157306 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r157306 | mmichelson | 2008-11-18 12:31:08 -0600 (Tue, 18 Nov 2008) | 20 lines

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

........
r157305 | mmichelson | 2008-11-18 12:25:55 -0600 (Tue, 18 Nov 2008) | 12 lines

Fix a crash in the end_bridge_callback of app_dial and
app_followme which would occur at the end of an attended
transfer. The error occurred because we initially stored
a pointer to an ast_channel which then was hung up due
to a masquerade.

This commit adds a "fixup" callback to the bridge_config
structure to allow for end_bridge_callback_data to be
changed in the case that a new channel pointer is needed
for the end_bridge_callback.


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@157308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-18 18:32:54 +00:00
Steve Murphy
1435f40ca5 Merged revisions 157302 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r157302 | murf | 2008-11-18 11:07:55 -0700 (Tue, 18 Nov 2008) | 18 lines

(closes issue #13420)
Reported by: alex70
Patches:
      13420.13539.patch uploaded by murf (license 17)
Tested by: murf, awk

This fixes two problems: a spurious linefeed insertion
probably left over from pre-precomment times. Only
generated when category had no previous comments.

The other problem: Insertions could get the line-numbering
out of whack and generate negative line numbers, causing 
chunks of line numbers to be emitted, on the scale of the
number of lines up to that point in the file. In such cases,
abort the looping, and all is well.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@157304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-18 18:20:48 +00:00
Russell Bryant
6266c668bc Merged revisions 157041 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r157041 | russell | 2008-11-14 22:25:57 -0600 (Fri, 14 Nov 2008) | 3 lines

Fix a few more places where the case insensitive hash should be used since
the comparison is case insensitive.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@157042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 04:30:42 +00:00
Tilghman Lesher
1747fd1d2f Merged revisions 156911 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r156911 | tilghman | 2008-11-14 11:02:00 -0600 (Fri, 14 Nov 2008) | 4 lines
  
  Ping is missing the standard double-newline after the event.
  (closes issue #13903)
   Reported by: kebl0155
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@156913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 17:04:13 +00:00
Tilghman Lesher
a99c4d9881 Merged revisions 156690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r156690 | tilghman | 2008-11-13 15:30:41 -0600 (Thu, 13 Nov 2008) | 14 lines
  
  Merged revisions 156688 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r156688 | tilghman | 2008-11-13 15:24:00 -0600 (Thu, 13 Nov 2008) | 7 lines
    
    Provide more space for all the data which can appear in an originating
    channel name.
    (closes issue #13398)
     Reported by: bamby
     Patches: 
           manager.c.diff uploaded by bamby (license 430)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@156691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 21:31:27 +00:00
Brandon Kruse
cd7a9cb4fe Merged revisions 156017 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r156017 | pari | 2008-11-11 17:02:43 -0600 (Tue, 11 Nov 2008) | 5 lines


 Patch by Ryan Brindley -- Make sure that manager refuses any duplicate 'new category' requests in updateconfig

(closes issue #13539)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@156654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 19:29:48 +00:00
Jeff Peeler
fe6767f2e1 Merged revisions 156649 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r156649 | jpeeler | 2008-11-13 13:17:50 -0600 (Thu, 13 Nov 2008) | 6 lines

(closes issue #13891)
Reported by: smurfix

This reverts a change I made in 116297. At the time it seemed the change was required to solve an issue with attempting a transfer but then letting it timeout without dialing any digits. However, I didn't realize that having an empty extension was possible. I'm removing the immediate return that was added in pbx_find_extension if the extension is null.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@156650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 19:18:34 +00:00
Steve Murphy
475be50f76 Merged revisions 156299 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r156299 | murf | 2008-11-12 12:47:29 -0700 (Wed, 12 Nov 2008) | 26 lines

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

........
r156297 | murf | 2008-11-12 12:36:16 -0700 (Wed, 12 Nov 2008) | 18 lines

It turns out that the 0x0XX00 codes being returned for
N, X, and Z are off by one, as per conversation with
jsmith on #asterisk-dev;  he was teaching a class
and disconcerted that this published rule was not
being followed, with patterns _NXX, _[1-8]22 and
_[2-9]22... and NXX was winning, but [1-8] should
have been. 

This change, tested on these 3 patterns now 
picks the proper one.

However, this change may surprise users who
set up dialplans based on previous behavior,
which has been there for what, 2 and half 
years or so now.



........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@156354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 20:11:54 +00:00
Russell Bryant
4c352528c1 Merged revisions 156166 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r156166 | russell | 2008-11-12 11:38:20 -0600 (Wed, 12 Nov 2008) | 15 lines

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

........
r156164 | russell | 2008-11-12 11:29:52 -0600 (Wed, 12 Nov 2008) | 7 lines

Move the sanity check that makes sure "always fork" is not set along with the 
console option to be after the code that reads options from asterisk.conf.  
This resolves a situation where Asterisk can start taking up 100% when
misconfigured.
(Thanks to Bryce Porter (x86 on IRC) for letting me log in to his system to
 figure out what was causing the 100% CPU problem.)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@156168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 17:38:43 +00:00
Tilghman Lesher
c42c0b578f Merged revisions 155763 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r155763 | tilghman | 2008-11-10 12:04:30 -0600 (Mon, 10 Nov 2008) | 6 lines
  
  Fix memory leak when MALLOC_DEBUG is enabled.
  (closes issue #13864)
   Reported by: eliel
   Patches: 
         readline.c.patch uploaded by eliel (license 64)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@155764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-10 18:05:44 +00:00
Sean Bright
839cb83ea3 Merged revisions 155554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r155554 | seanbright | 2008-11-08 20:27:00 -0500 (Sat, 08 Nov 2008) | 14 lines

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

........
r155553 | seanbright | 2008-11-08 20:08:07 -0500 (Sat, 08 Nov 2008) | 6 lines

Use static functions here instead of nested ones.  This requires a small
change to the ast_bridge_config struct as well.  To understand the reason
for this change, see the following post:

    http://gcc.gnu.org/ml/gcc-help/2008-11/msg00049.html

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@155556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-09 01:43:14 +00:00
Steve Murphy
9edc58f39e Merged revisions 154687 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r154687 | murf | 2008-11-05 09:11:11 -0700 (Wed, 05 Nov 2008) | 9 lines

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

........
r154685 | murf | 2008-11-05 09:06:53 -0700 (Wed, 05 Nov 2008) | 1 line

This fix was prompted by communication from user, who was seeing thousands of error logs... looks like EAGAIN. Made such uninteresting.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@154690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 16:14:20 +00:00
Tilghman Lesher
2f49661f8d Merged revisions 154060 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r154060 | tilghman | 2008-11-03 15:48:21 -0600 (Mon, 03 Nov 2008) | 3 lines
  
  Remove the potential for a division by zero error.
  (Closes issue #13810)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@154063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03 22:06:00 +00:00
Kevin P. Fleming
1036849a42 import gcc 4.3.2 warning fixes from trunk, with a few changes specific to this branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@153710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 23:56:13 +00:00
Terry Wilson
239f1d53bc Merged revisions 153181 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r153181 | twilson | 2008-10-31 13:55:33 -0500 (Fri, 31 Oct 2008) | 5 lines
  
  Recent CDR fixes moved execution of the 'h' exten into the bridging code, so variables that were set after ast_bridge_call was called would not show up in the 'h' exten.  Added a callback function to handle setting variables, etc. from w/in the bridging code.  Calls back into a nested function within the function calling ast_bridge_call
  
  (closes issue #13793)
  Reported by: greenfieldtech
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@153266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 22:11:11 +00:00
Mark Michelson
4d4e20eb54 This commit contains the bug fixes and documentation updates
which were committed to trunk in revision 153223. I blocked that
commit from 1.6.1 since it also contained a new feature.

Note to self: Separate commits so that you don't end up with
a situation where part of a commit should be merged but part
should be blocked from stable branches.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@153225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 20:10:40 +00:00
Kevin P. Fleming
db5d4c1619 Merged revisions 152812 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r152812 | kpfleming | 2008-10-30 11:54:29 -0500 (Thu, 30 Oct 2008) | 9 lines
  
  Merged revisions 152811 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r152811 | kpfleming | 2008-10-30 11:53:48 -0500 (Thu, 30 Oct 2008) | 3 lines
    
    instead of comparing the string pointer to 0, let's compare the value that was actually parsed out of the string (found by sparse)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@152814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:55:21 +00:00
Tilghman Lesher
f34b1869bd Merged revisions 152689 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r152689 | tilghman | 2008-10-29 19:45:47 -0500 (Wed, 29 Oct 2008) | 2 lines
  
  Track down and fix annoying lock errors
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@152690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 00:54:37 +00:00
Steve Murphy
f1da1c3957 Merged revisions 152536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r152536 | murf | 2008-10-28 23:01:00 -0600 (Tue, 28 Oct 2008) | 57 lines

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

........
r152535 | murf | 2008-10-28 22:36:32 -0600 (Tue, 28 Oct 2008) | 46 lines

The magic trick to avoid this crash is not to
try to find the channel by name in the list,
which is slow and resource consuming, but rather
to pay attention to the result codes from the
ast_bridge_call, to which I added the 
AST_PBX_NO_HANGUP_PEER_PARKED value, which
now are returned when a channel is parked.
Why? because CDR's aren't generated via parking,
so nothing is needed, but if a transfer occurred,
there are critical things I need.

If you get AST_PBX_KEEPALIVE,
then don't touch the channel pointer.

If you get AST_PBX_NO_HANGUP_PEER, or
AST_PBX_NO_HANGUP_PEER_PARKED, then don't
touch the peer pointer.

Updated the several places where the results
from a bridge were not being properly obeyed,
and fixed some code I had introduced so that
the results of the bridge were not overridden 
(in trunk).

All the places that previously tested for 
AST_PBX_NO_HANGUP_PEER now have to check for
both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED.

I tested this against the 4 common parking
scenarios:


1. A calls B; B answers; A parks B; B hangs up while A is getting the parking
slot announcement, immediately after being put on hold.

2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but
before the park times out.

3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold.

4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out.


No crash.

I also ran the scenarios above against valgrind, and accesses looked good.



........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@152537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:09:20 +00:00
Russell Bryant
3d3546fa0c Merged revisions 151906 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r151906 | russell | 2008-10-25 06:02:11 -0500 (Sat, 25 Oct 2008) | 16 lines

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

........
r151905 | russell | 2008-10-25 05:59:02 -0500 (Sat, 25 Oct 2008) | 8 lines

Move AMI initialization to occur after loading modules.  This prevents a
deadlock when someone tries to initiate a module reload from the AMI just
as Asterisk is starting.

(closes issue #13778)
Reported by: hotsblanc
Fix suggested by hotsblanc

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@151907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-25 11:11:25 +00:00
Kevin P. Fleming
f0c712cf4b Merged revisions 151101 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r151101 | kpfleming | 2008-10-19 22:11:28 +0300 (Sun, 19 Oct 2008) | 13 lines
  
  cleaup of the TCP/TLS socket API:
  
  1) rename 'struct server_args' to 'struct ast_tcptls_session_args', to follow coding guidelines
  
  2) make ast_make_file_from_fd() static and rename it to something that indicates what it really is for (again coding guidelines)
  
  3) rename address variables inside 'struct ast_tcptls_session_args' to be more descriptive (dare i say it... coding guidelines)
  
  4) change ast_tcptls_client_start() to use the new 'remote_address' field of the session args for the destination of the connection, and use the 'local_address' field to bind() the socket to the proper source address, if one is supplied
  
  5) in chan_sip, ensure that we pass in the PP address we are bound to when creating outbound (client) connections, so that our connections will appear from the correct address
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@151135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-19 19:33:42 +00:00
BJ Weschke
f4be174ad8 Merged revisions 150817 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r150817 | bweschke | 2008-10-17 22:18:33 -0400 (Fri, 17 Oct 2008) | 8 lines
  
   Using the GetVar handler in AMI is potentially dangerous (insta-crash [tm]) when you use a dialplan function that requires a channel and then you don't provide one or provide an invalid one in the Channel: parameter. We'll handle this situation exactly the same way it was handled in pbx.c back on r61766.
  We'll create a bogus channel for the function call and destroy it when we're done. If we have trouble allocating the bogus channel then we're not going to try executing the function call at all and run the risk of crashing.
  
  (closes issue #13715)
  reported by: makoto
  patch by: bweschke
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@150829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-18 02:29:37 +00:00
Mark Michelson
92b7447620 Merged revisions 150305 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r150305 | mmichelson | 2008-10-16 18:41:16 -0500 (Thu, 16 Oct 2008) | 14 lines

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

........
r150304 | mmichelson | 2008-10-16 18:40:54 -0500 (Thu, 16 Oct 2008) | 6 lines

Reverting changes from commits 150298 and 150301 since
I was mistakenly under the assumption that dialplan functions
*always* required that a channel be present. I need to go
home earlier, I think :)


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@150306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-16 23:41:50 +00:00
Mark Michelson
ddddee6976 Merged revisions 150302 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r150302 | mmichelson | 2008-10-16 18:36:49 -0500 (Thu, 16 Oct 2008) | 24 lines

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

........
r150298 | mmichelson | 2008-10-16 18:34:37 -0500 (Thu, 16 Oct 2008) | 10 lines

Don't try to call a dialplan function's read callback from
the manager's GetVar handler if an invalid channel has
been specified. Several dialplan functions, including
CHANNEL and SIP_HEADER, do not check for NULL-ness of
the channel being passed in.

(closes issue #13715)
Reported by: makoto


........
r150301 | mmichelson | 2008-10-16 18:35:07 -0500 (Thu, 16 Oct 2008) | 3 lines

And don't forget to return on the error condition


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@150303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-16 23:37:37 +00:00
Mark Michelson
fdd9a6f9b6 Merged revisions 149205 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r149205 | mmichelson | 2008-10-14 18:04:44 -0500 (Tue, 14 Oct 2008) | 20 lines

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

........
r149204 | mmichelson | 2008-10-14 18:00:01 -0500 (Tue, 14 Oct 2008) | 12 lines

Add a tolerance period for sync-triggered audiohooks
so that if packetization of audio is close (but not equal)
we don't end up flushing the audiohooks over small
inconsistencies in synchronization.

Related to issue #13005, and solves the issue
for most people who were experiencing the problem.
However, a small number of people are still experiencing
the problem on long calls, so I am not closing
the issue yet


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@149206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 23:05:14 +00:00
Tilghman Lesher
e65c411c8f Merged revisions 149199 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r149199 | tilghman | 2008-10-14 17:38:06 -0500 (Tue, 14 Oct 2008) | 8 lines
  
  Add additional memory debugging to several core APIs, and fix several memory
  leaks found with these changes.
  (Closes issue #13505, closes issue #13543)
  Reported by: mav3rick, triccyx
   Patches: 
         20081001__bug13505.diff.txt uploaded by Corydon76 (license 14)
   Tested by: mav3rick, triccyx
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@149202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 22:42:17 +00:00
Kevin P. Fleming
4cc69860bb Merged revisions 148612 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r148612 | kpfleming | 2008-10-14 03:06:45 -0500 (Tue, 14 Oct 2008) | 9 lines
  
  Merged revisions 148611 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r148611 | kpfleming | 2008-10-14 02:54:41 -0500 (Tue, 14 Oct 2008) | 3 lines
    
    it would be nice if this message printing code had actually been tested before it was committed...
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@148614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 08:08:40 +00:00
Steve Murphy
c6fc68ab1a Merged revisions 148519 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r148519 | murf | 2008-10-13 11:14:38 -0600 (Mon, 13 Oct 2008) | 15 lines

Hmmm. Nobody (but me) is interested in seeing 
the trie info when they do 'dialplan show ...'
(even with debug set to non-zero); so I set up a 
   'dialplan debug [context]' cli command instead, 
to explicitly show just the trie info.  I even
added an extension_exists() call to make sure the
trie info is built. I moved the explanatory header
to above the extension loop to ensure it only prints
once. And it will do this now, whether debug is set
or not.

I removed the trie printing from the 'dialplan show' 
command entirely. 


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@148562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-13 17:56:13 +00:00
Sean Bright
5f980bc229 Merged revisions 148200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r148200 | seanbright | 2008-10-09 20:42:13 -0400 (Thu, 09 Oct 2008) | 12 lines

Don't include logger.h in asterisk.h by default as it is causing problems building
app_voicemail.  Instead, include it where it is needed.  This turned out to be a
relatively minor issue because other headers include logger.h as well.

Need to test -addons before merging this back to 1.6.0.

(closes issue #13605)
Reported by: tomo1657
Patches: 
      13605_seanbright.diff uploaded by seanbright (license 71)
Tested by: mmichelson

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@148240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10 01:33:34 +00:00
Mark Michelson
502f661694 Merged revisions 148160 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r148160 | mmichelson | 2008-10-09 18:54:59 -0500 (Thu, 09 Oct 2008) | 14 lines

The priority was unnecessary for the manager atxfer, so it has
been removed. Furthermore, now we actually use the Context argument
passed to set the transfer context and don't error out if no
context is specified.

This addresses the actual problems outlined in issue 12158. Regarding
the other points brought up, regarding the inability to not transfer
to extensions which cannot be represented by DTMF, it is not enough of
a constraint that it is worth attempting to rework the feature.

(closes issue #12158)
Reported by: davidw


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@148161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 23:55:32 +00:00
Mark Michelson
49ea791733 Merged revisions 148112 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r148112 | mmichelson | 2008-10-09 18:15:33 -0500 (Thu, 09 Oct 2008) | 26 lines

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

........
r146026 | murf | 2008-10-03 12:12:54 -0500 (Fri, 03 Oct 2008) | 18 lines

(closes issue #13579)
Reported by: dwagner

(closes issue #13584)
Reported by: dwagner
Tested by: murf, putnopvut

The thought occurred to me that the res= from the extension spawn
was ending up being returned from the bridge.

"Thou shalt not poison the return value". Made the change
and it appears to allow blind xfers to work as normal.

If I'm wrong, reopen the bugs. But it looks good to me!

Many thanks to putnopvut for helping me reproduce this!


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@148115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 23:20:08 +00:00
Jeff Peeler
7bb1b2746b Merged revisions 147952 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r147952 | jpeeler | 2008-10-09 14:27:32 -0500 (Thu, 09 Oct 2008) | 6 lines

(closes issue #13139)
Reported by: krisk84
Tested by: krisk84

This change prevents a call that is placed in the parkinglot to be picked up before the PBX is finished. If another extension dials the parking extension before the PBX thread has completed at minimum warnings will occur about the PBX not properly being terminated. At worst, a crash could occur.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@147957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 19:28:31 +00:00
Steve Murphy
2c1bfe7643 Merged revisions 147807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r147807 | murf | 2008-10-09 08:17:33 -0600 (Thu, 09 Oct 2008) | 15 lines

(closes issue #13557)
Reported by: nickpeirson
Patches:
      pbx.c.patch uploaded by nickpeirson (license 579)
      replace_bzero+bcopy.patch uploaded by nickpeirson (license 579)
Tested by: nickpeirson, murf

1. replaced all refs to bzero and bcopy to memset and memmove instead.
2. added a note to the CODING-GUIDELINES
3. add two macros to asterisk.h to prevent bzero, bcopy from creeping
   back into the source
4. removed bzero from configure, configure.ac, autoconfig.h.in



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@147811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 15:06:21 +00:00
Jeff Peeler
550b71bbd8 Merged revisions 147146 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r147146 | jpeeler | 2008-10-07 11:04:45 -0500 (Tue, 07 Oct 2008) | 3 lines

Explicitly setting these fields to NULL was done because I wasn't sure if they would be NULL otherwise. Since they will be set automatically, removing.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@147147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-07 16:05:07 +00:00
Jeff Peeler
595d37e746 Merged revisions 146923 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r146923 | jpeeler | 2008-10-06 18:08:21 -0500 (Mon, 06 Oct 2008) | 3 lines

Similar to r143204, masquerade the channel in the case of Park being called from AGI.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@146924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 23:08:51 +00:00
Jeff Peeler
cd1a30c6c7 Merged revisions 146883 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r146883 | jpeeler | 2008-10-06 17:26:25 -0500 (Mon, 06 Oct 2008) | 12 lines

This commit squashes together three commits because the wrong approach was originally used. (One of the commits was only one line.)

1) r143204:
The main change here was to masquerade the channel if the channel that was to be parked was running a PBX on it. The PBX thread can then maintain full control of the channel (the zombie) as it expects to while allowing the parking thread full control of the real (parked) channel.

2) r143270:
Changed park_call_full to hold the parkinglot lock a little longer, which protects the parkeduser struct from being freed out from underneath. Made sure that the parking extension is added to the parking context while holding the lock thereby ensuring that there are no spurious warnings from removal attempts when a hangup occurs while the parking lot is being announced.

3) r143475: (the one liner)
compare peer and chan instead of looking at the parked user (pu), which could have possibly already have been freed by the parking thread


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@146886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 22:26:47 +00:00
Jeff Peeler
2fb8519c52 Merged revisions 146877 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r146877 | jpeeler | 2008-10-06 17:08:40 -0500 (Mon, 06 Oct 2008) | 1 line

fix some comment placement
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@146878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 22:09:06 +00:00
Jeff Peeler
2917e91db4 Merged revisions 146875 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r146875 | jpeeler | 2008-10-06 17:03:01 -0500 (Mon, 06 Oct 2008) | 5 lines

Explicitly set args in park_call_exec NULL so in the case of no options being passed in, there
 is no garbage attempted to be used. Also, do not set args to unknown value again if there are
 no options passed in.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@146876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 22:04:23 +00:00
Jeff Peeler
2e5cc80ba4 Merged revisions 146242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r146242 | jpeeler | 2008-10-03 17:40:59 -0500 (Fri, 03 Oct 2008) | 1 line

remove superfluous reference counting operations in manage_parkinglot since ao2_interator_next increments the ref count automatically
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@146243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-03 22:42:10 +00:00
Sean Bright
c48c50a814 Merged revisions 146198 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r146198 | seanbright | 2008-10-03 18:10:18 -0400 (Fri, 03 Oct 2008) | 7 lines

Resolve a subtle bug where we would never successfully be able to get
the first item in the CLI entry list.  This was preventing '!' from
showing up in either 'help' or in tab completion.

(closes issue #13578)
Reported by: mvanbaak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@146200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-03 22:13:01 +00:00
Mark Michelson
10258dd023 Merged revisions 145606 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r145606 | mmichelson | 2008-10-01 17:23:50 -0500 (Wed, 01 Oct 2008) | 11 lines

Okay, this should really do it now. While I did manage
to fix blind transfers with my last commit here, I also
caused an unwanted side-effect. That is, only the first
priority of the 'h' extension would be executed when
a blind transfer occurred instead of all priorities.

Essentially, my last commit corrected the return value
of ast_bridge_call. However, the implementation still
was not 100% correct. Now it is.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@145609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-01 22:24:52 +00:00
Mark Michelson
52b6762417 Merged revisions 145579 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r145579 | mmichelson | 2008-10-01 16:33:11 -0500 (Wed, 01 Oct 2008) | 4 lines

if (!(x) == 0) is the same as
if (x).


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@145584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-01 21:34:52 +00:00
Mark Michelson
a7da5b2e76 Merged revisions 145553 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r145553 | mmichelson | 2008-10-01 16:06:26 -0500 (Wed, 01 Oct 2008) | 13 lines

The logic surrounding the return value of ast_spawn_extension
within ast_bridge_call was reversed.

This problem was observed when a blind transfer placed from
the callee channel of a test call failed.

While the problem I am solving here is exactly the same
as what was reported in issue #13584, the difference is
that this fix I am applying is trunk-only. Issue #13584
was reported against the 1.4 branch, and my tests
of 1.4's blind transfers appear to work fine.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@145557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-01 21:20:20 +00:00
Kevin P. Fleming
bc5b69d250 Merged revisions 144949-144951 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r144949 | kpfleming | 2008-09-27 10:52:56 -0500 (Sat, 27 Sep 2008) | 17 lines
  
  Merged revisions 144924-144925 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r144924 | kpfleming | 2008-09-27 10:00:48 -0500 (Sat, 27 Sep 2008) | 6 lines
    
    improve header inclusion process in a few small ways:
    
      - it is no longer necessary to forcibly include asterisk/autoconfig.h; every module already includes asterisk.h as its first header (even before system headers), which serves the same purpose
      - astmm.h is now included by asterisk.h when needed, instead of being forced by the Makefile; this means external modules will build properly against installed headers with MALLOC_DEBUG enabled
      - simplify the usage of some of these headers in the AEL-related stuff in the utils directory
  ........
    r144925 | kpfleming | 2008-09-27 10:13:30 -0500 (Sat, 27 Sep 2008) | 2 lines
    
    fix some minor issues with rev 144924
  ........
................
  r144950 | kpfleming | 2008-09-27 11:10:33 -0500 (Sat, 27 Sep 2008) | 2 lines
  
  fix bugs caused by r144949 when MALLOC_DEBUG is defined
................
  r144951 | kpfleming | 2008-09-27 11:17:43 -0500 (Sat, 27 Sep 2008) | 1 line
  
  remove incorrect comment
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@144993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 16:49:27 +00:00
Steve Murphy
59d9a004e9 Merged revisions 144678 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r144678 | murf | 2008-09-26 11:50:35 -0600 (Fri, 26 Sep 2008) | 20 lines

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

........
r144677 | murf | 2008-09-26 11:47:13 -0600 (Fri, 26 Sep 2008) | 12 lines

(closes issue #13563)
Reported by: mnicholson
Patches:
      found1.diff uploaded by mnicholson (license 96)

This patch was mainly meant to apply to trunk and 1.6.x,
but I'm applying it to 1.4 also, which should be a perfectly
harmless fix to the vast majority of users who are not using
external switches, but the few who might be affected 
will not have to go to the pain of filing a bug report.


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@144680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-26 17:53:23 +00:00
Steve Murphy
6f1745168e Merged revisions 144569 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r144569 | murf | 2008-09-25 16:21:28 -0600 (Thu, 25 Sep 2008) | 14 lines

(closes issue #13557)
Reported by: nickpeirson

The user attached a patch, but the license is not yet
recorded. I took the liberty of finding and replacing
ALL index() calls with strchr() calls, and that
involves more than just main/pbx.c;

chan_oss, app_playback, func_cut also had calls
to index(), and I changed them out. 1.4 had no
references to index() at all.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@144578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 22:25:34 +00:00
Steve Murphy
98d269e5cd Merged revisions 144067 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r144067 | murf | 2008-09-23 10:52:32 -0600 (Tue, 23 Sep 2008) | 37 lines

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

........
r144066 | murf | 2008-09-23 10:41:49 -0600 (Tue, 23 Sep 2008) | 29 lines

(closes issue #13489)
Reported by: DougUDI
Tested by: murf

(closes issue #13490)
Reported by: seanbright
Tested by: murf

(closes issue #13467)
Reported by: edantie
Tested by: murf, edantie, DougUDI


This crash happens because we are unsafely handling old pointers.
The channel whose cdr is being handled, has been hung up and 
destroyed already. I reorganized the code a bit, and tried not
to lose the fork-cdr-chain concepts of the previous code.
I now verify that the 'previous' channel (the channel we
had when the bridge was started), still exists, by looking it up
by name in the channel list. I also do not try to reset the
CDR's of channels involved in bridges. 

Testing shows it solves the crash problem, and should not
negatively impact previous fixes involving CDR's generated
during/after blind transfers. (The reason we need to reset
the CDR's on the "beginning" channels in the first place).



........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@144069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-23 17:00:41 +00:00
Mark Michelson
89de83535b Merged revisions 143340 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r143340 | mmichelson | 2008-09-17 13:26:35 -0500 (Wed, 17 Sep 2008) | 14 lines

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

........
r143337 | mmichelson | 2008-09-17 13:24:15 -0500 (Wed, 17 Sep 2008) | 6 lines

Allow for "G.729" if offered in an SDP even though
it is not RFC 3551 compliant. Some Cisco switches
will send this in an SDP, and it doesn't hurt to
be able to accept this.


........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@143349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-17 18:30:24 +00:00