Commit Graph

1976 Commits

Author SHA1 Message Date
Sean Bright bc1629a9e8 Fix build errors.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 16:50:34 +00:00
Tilghman Lesher fd6ee6e1f2 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/trunk@154061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03 21:57:14 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
Russell Bryant 5b168ee34b Merge changes from team/group/appdocsxml
This commit introduces the first phase of an effort to manage documentation of the
interfaces in Asterisk in an XML format.  Currently, a new format is available for
applications and dialplan functions.  A good number of conversions to the new format
are also included.

For more information, see the following message to asterisk-dev:

http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01 21:10:07 +00:00
Mark Michelson d521ad9696 * Fixed timeout logic in the dialing API as setting timeouts
had no effect
* Updated dialing API documentation to indicate that timeouts
  are specified in milliseconds
* Added a new timeout argument to the Page application. If time
  expires, any endpoints which have not answered will be hung up.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 20:05:46 +00:00
Terry Wilson 5fe37e47c6 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/trunk@153181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 18:55:33 +00:00
Russell Bryant 511ce6b2bf Use the ast_str API call to reset the string instead of manually editing its internals
(closes issue #13816)
Reported by: eliel
Patches: 
      channel.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 09:31:10 +00:00
Kevin P. Fleming 85f78531ce 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/trunk@152812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:54:29 +00:00
Kevin P. Fleming 10d36d9f34 fix a few small things found by using sparse
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:49:02 +00:00
Mark Michelson de90c84b1a After seeing another problem in #asterisk stemming from
the low default value of featuredigittimeout, I decided it
was high time to change it. I have changed the default to
2000 ms based on a suggestion from Leif Madsen.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:38:19 +00:00
Tilghman Lesher fa06ce2e6c Track down and fix annoying lock errors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 00:45:47 +00:00
Steve Murphy 6fad66dfb3 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/trunk@152536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:01:00 +00:00
Russell Bryant 316f3897a8 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/trunk@151906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-25 11:02:11 +00:00
BJ Weschke 9aefadd7c1 Do NOT attempt to do anything with the ast_config struct when it's been returned as INVALID by the config file interpreter.
(closes issue #13741)
 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-20 05:07:25 +00:00
Kevin P. Fleming 1ddc834b39 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/trunk@151101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-19 19:11:28 +00:00
BJ Weschke 09e9b5d208 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/trunk@150817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-18 02:18:33 +00:00
Michiel van Baak 805556773f Fix CLI command 'channel request hangup'
Prodded on IRC by Russell and fixed by eliel

(closes issue #13730)
Reported by: eliel
Patches:
      main_cli.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-17 17:31:07 +00:00
Mark Michelson 4ad187cba4 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/trunk@150305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-16 23:41:16 +00:00
Mark Michelson 8a1d9d1678 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/trunk@150302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-16 23:36:49 +00:00
Mark Michelson 29a8fe20c8 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/trunk@149205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 23:04:44 +00:00
Tilghman Lesher d5837ba8c2 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/trunk@149199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 22:38:06 +00:00
Kevin P. Fleming b17413c992 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/trunk@148612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 08:06:45 +00:00
Tilghman Lesher c1351ad237 Merge realtime_update2 branch, which adds a new realtime API call named
'update2', which permits updates which match across multiple columns, instead
of requiring all tables to have a single unique identifier.  All of the other
API calls with the exception of 'update' already had the ability to match on
multiple fields, so it was a missing and very desireable feature that an API
call implementing an update should have this, too.

This does not change any outward performance of Asterisk, but it should make
life easier for application developers who use the RealTime framework.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14 00:08:52 +00:00
Steve Murphy db7299f4bc 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/trunk@148519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-13 17:14:38 +00:00
Olle Johansson 32d93bbc0e Highlightning even more bugs in the current tcp/tls implementation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-13 15:49:01 +00:00
Sean Bright 1dedb785ab 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/trunk@148200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-10 00:42:13 +00:00
Mark Michelson 9851feb8fb 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/trunk@148160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 23:54:59 +00:00
Mark Michelson 6d70f45506 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/trunk@148112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 23:15:33 +00:00
Tilghman Lesher 8b14e5f493 Reverting format addition for now
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 21:47:02 +00:00
Tilghman Lesher f5d5eb5e19 Fudges for wav16, just like wav49
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 21:37:23 +00:00
Jeff Peeler c897b4e630 (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/trunk@147952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 19:27:32 +00:00
Steve Murphy e235a07376 (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/trunk@147807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09 14:17:33 +00:00
Tilghman Lesher 9335b3ad34 Allow people to select the old console behavior of white text on a black
background, by using the startup flag '-B'.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-07 17:44:32 +00:00
Jeff Peeler 0dc7ac9a6c 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/trunk@147146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-07 16:04:45 +00:00
Jeff Peeler 2ec290b09d Similar to r143204, masquerade the channel in the case of Park being called from AGI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 23:08:21 +00:00
Jeff Peeler 50923eab5d 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/trunk@146883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 22:26:25 +00:00
Jeff Peeler abc88c1d61 fix some comment placement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 22:08:40 +00:00
Jeff Peeler 7d8d1f50bb 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/trunk@146875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 22:03:01 +00:00
Sean Bright 6855b63d44 Fix a bug with the last item in CLI history getting duplicated when
read from the .asterisk_history file (and subsequently being duplicated
when written).  We weren't checking the result of fgets() which meant
that we read the same line twice before feof() actually returned non-
zero.

Also, stop writing out an extra blank line between each item in the
history file, fix a minor off-by-one error, and use symbolic constants
rather than a hardcoded integer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-04 16:20:31 +00:00
Jeff Peeler 4b22fb221c 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/trunk@146242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-03 22:40:59 +00:00
Sean Bright b29fb615ae 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/trunk@146198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-03 22:10:18 +00:00
Terry Wilson 84b0093bef The dialing API should inherit datastores as well as variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@146052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-03 17:35:37 +00:00
Tilghman Lesher 529874de7b Add schedule extensions to app_meetme. In addition, the reporter found a
problem within strptime(3), which we are correcting here with ast_strptime().
(closes issue #11040)
 Reported by: DEA
 Patches: 
       20080910__bug11040.diff.txt uploaded by Corydon76 (license 14)
 Tested by: DEA


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-01 23:02:25 +00:00
Mark Michelson 7eae109418 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/trunk@145606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-01 22:23:50 +00:00
Mark Michelson e6799e1c99 if (!(x) == 0) is the same as
if (x).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-01 21:33:11 +00:00
Mark Michelson a23b8c9158 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/trunk@145553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-01 21:06:26 +00:00
Michiel van Baak 90751b16ca Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.

This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-28 23:32:14 +00:00
Kevin P. Fleming 629861a705 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
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-27 15:52:56 +00:00
Steve Murphy 579177ae80 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/trunk@144678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-26 17:50:35 +00:00
Steve Murphy e74584ca3c (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/trunk@144569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 22:21:28 +00:00
Steve Murphy 8343faed0e 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/trunk@144067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-23 16:52:32 +00:00
Mark Michelson 48ffe6e772 If attempting to free a NULL pointer when MALLOC_DEBUG
is set, don't bother searching for a region to free, just
immediately exit.

This has the dual benefit of suppressing a warning message
about freeing memory at (nil) and of optimizing the free()
replacement by not having to do any futile searching for
the proper region to free.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@143400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-17 20:25:40 +00:00
Mark Michelson 224980b07b 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/trunk@143340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-17 18:26:35 +00:00
Tilghman Lesher 08af5bb312 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Tilghman Lesher bbf8c3d7cc When checking for an encoded character, make sure the string isn't blank, first.
(Closes issue #13470)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 16:54:44 +00:00
Tilghman Lesher 8c53dd7f5e Merged revisions 142740 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142740 | tilghman | 2008-09-12 11:27:32 -0500 (Fri, 12 Sep 2008) | 4 lines

Don't return a free'd pointer, when a file cannot be opened.
(closes issue #13462)
 Reported by: wackysalut

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 16:29:01 +00:00
Steve Murphy 67f7ac0499 Merged revisions 142675 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142675 | murf | 2008-09-11 22:29:34 -0600 (Thu, 11 Sep 2008) | 29 lines

Tested by: sergee, murf, chris-mac, andrew, KNK

This is a "second attempt" to restore the previous "endbeforeh" behavior
in 1.4 and up. In order to capture information concerning all the
legs of transfers in all their infinite combinations, I was forced
to this particular solution by a chain of logical necessities, the
first being that I was not allowed to rewrite the CDR mechanism from 
the ground up!

This change basically leaves the original machinery alone, which allows
IVR and local channel type situations to generate CDR's as normal, but
a channel flag can be set to suppress the normal running of the h exten.
That flag would be set by the code that runs the h exten from the
ast_bridge_call routine, to prevent the h exten from being run twice.
Also, a flag in the ast_bridge_config struct passed into ast_bridge_call
can be used to suppress the running of the h exten in that routine. This
would happen, for instance, if you use the 'g' option in the Dial app.

Running this routine 'early' allows not only the CDR() func to be used
in the h extension for reading CDR variables, but also allows them to
be modified before the CDR is posted to the backends.

While I dearly hope that this patch overcomes all problems, and 
introduces no new problems, reality suggests that surely someone
will have problems. In this case, please re-open 13251 (or 13289),
and we'll see if we can't fix any remaining issues.

** trunk note: some code to suppress the h exten being run 
from app_queue was added; for the 'continue' option available
only in trunk/1.6.x.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 04:50:48 +00:00
Steve Murphy c4fc8fe4be Merged revisions 142575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142575 | murf | 2008-09-11 16:55:49 -0600 (Thu, 11 Sep 2008) | 20 lines

(closes issue #13364)
Reported by: mdu113

Well, fundamentally, the problems revealed in 13364 are
because of the ForkCDR call that is done before the dial. 
When the bridge is in place, it's dealing with the first
(and wrong) cdr in the list.

So, I wrote a little func to zip down to the first non-locked
cdr in the chain, and thru-out the ast_bridge_call, these
results are used instead of raw chan->cdr and peer->cdr pointers.
This shouldn't affect anyone who isn't forking cdrs before a
dial, and should correct the cdr's of those that do.

So, this change ends up correcting the dstchannel
and userfield; the disposition was fixed by a previous
patch, it was OK coming into this problem.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-11 23:12:53 +00:00
Steve Murphy 4fc65a69a2 Merged revisions 142474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142474 | murf | 2008-09-10 15:58:17 -0600 (Wed, 10 Sep 2008) | 30 lines

(closes issue #12318)
Reported by: krtorio

I made a small change to the code that handles local channel situations.
In that code, I copy the answer time from the peer cdr, to the bridge_cdr,
but I wasn't also copying the disposition from the peer cdr.

So, Now I copy the disposition, and I've tested against 
these cases:

1. phone 1 never answers the phone; no cdr is generated at all.
   this should show up as a manager command failure or something.

2. phone 2 never answers. CDR is generated, says NO ANSWER

3. phone 2 is busy. CDR is generated, says BUSY

4. phone 2 answers: CDR is generated, times are correct; disposition
   is ANSWERED, which is correct. The start time is the time that
   the manager dialed the first phone. The answer time is the time
   the second phone picks up.

I purposely left the cid and src fields blank; since this call really
originates from the manager, there is no 'easy' data to put in these
fields. If you feel strongly that these fields should be filled in,
re-open this bug and I'll dig further.




........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-10 22:11:27 +00:00
Russell Bryant bdfd731b8b Merged revisions 142354 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142354 | russell | 2008-09-10 11:39:53 -0500 (Wed, 10 Sep 2008) | 7 lines

It is a normal situation that a task gets put in the scheduler that should run
as soon as possible.  Accept "0" as an acceptable time to run, and also treat
negative as "run now", and don't print a debug message about it.

(inspired by a message asking about the "request to schedule in the past"
 debug message on the -dev list)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-10 16:41:55 +00:00
Richard Mudgett 75e95cb2b3 Cleaned up comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09 17:30:52 +00:00
Russell Bryant 4f077691bc Merged revisions 142063 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r142063 | russell | 2008-09-09 10:40:24 -0500 (Tue, 09 Sep 2008) | 5 lines

Ensure that the stored CDR reference is still valid after the bridge before
poking at it.  Also, keep the channel locked while messing with this CDR.

(fixes crashes reported in issue #13409)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09 15:44:10 +00:00
Russell Bryant fbe13cfb86 Modify ast_answer() to not hold the channel lock while calling ast_safe_sleep()
or when calling ast_waitfor().  These are inappropriate times to hold the channel
lock.  This is what has caused "could not get the channel lock" messages from
chan_sip and has likely caused a negative impact on performance results of SIP
in Asterisk 1.6.  Thanks to file for pointing out this section of code.

(closes issue #13287)
(closes issue #13115)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-09 01:47:56 +00:00
Russell Bryant 1452b6dd97 Merged revisions 141806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141806 | russell | 2008-09-08 16:02:36 -0500 (Mon, 08 Sep 2008) | 7 lines

When doing an async goto, detect if the channel is already in the middle of a
masquerade.  This can happen when chan_local is trying to optimize itself out.
If this happens, fail the async goto instead of bursting into flames.

(closes issue #13435)
Reported by: geoff2010

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-08 21:05:01 +00:00
Michiel van Baak 28764dd1f6 Some fixes to autocompletion in some commands.
Changes applied by this patch:

- Fix autocompletion in 'sip prune realtime', sip peers where never auto completed. Now we complete this command with:
  'sip prune realtime peer' -> all | like | sip peers
  Also I have modified the syntax in the usage, was wrong...
- Pass ast_cli_args->argv and ast_cli_args->argc while running autocompletion on CLI commands (CLI_GENERATE).
  With this we avoid comparisons on ast_cli_args->line like this:
  strcasestr(a->line, " description")
  strcasestr(a->line, "descriptions ")
  strcasestr(a->line, "realtime peer"), and so on..

  Making the code more confusing (check the spaces in description!).
  The only thing we must be sure is to first check a->pos or a->argc.
														      
- Fix 'iax2 prune realtime' autocompletion, now we autocomplete this command with 'all' & 'iax2 peers', check a look that iax2 peers where all the peers, now only the ones in the cache..

(closes issue #13133)
Reported by: eliel
Patches:
      clichanges.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-06 12:03:11 +00:00
Steve Murphy 0f0c10993c Merged revisions 141156 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141156 | murf | 2008-09-05 08:15:43 -0600 (Fri, 05 Sep 2008) | 1 line

A small change to prevent double-posting of CDR's; thanks to Daniel Ferrer for bringing it to our attention
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-05 14:18:43 +00:00
Jeff Peeler f7efe4a1f7 Merged revisions 141028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r141028 | jpeeler | 2008-09-04 12:00:29 -0500 (Thu, 04 Sep 2008) | 7 lines

(closes issue #11979)
Fixes multiple parking problems:
Crash when executing a park on an extension dialed by AGI due to not returning the proper return code.
Crash when using a builtin feature that was a subset of a enabled dynamic feature.
Crash due to always hanging up the peer despite the fact that the peer was supposed to be parked.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@141039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-04 17:27:56 +00:00
Steve Murphy 068859119a In these changes, I have added some explanation
of changes to the Set and MSet apps, so people aren't
so shocked and surprised when they upgrade from
1.4 to 1.6.

Also, for the sake of those upgrading from 1.4 to
1.6 with AEL, I provide automatic support for the 
"old" way of using Set(), that still does the
exact same old thing with quotes and backslashes
and so on as 1.4 did, by having AEL compile in the
use of MSet() instead of Set(), everywhere it inserts
this code.

But, if the app_set var is set to 1.6 or higher,
it uses the "new", non-evaluative Set().

This only usually happens if the user manually 
inserts this into the asterisk.conf file, or runs
the "make samples" command.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-03 14:01:27 +00:00
Russell Bryant 4e105063a8 Formatting change to test something on the svn server
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-03 13:41:51 +00:00
Russell Bryant 655b8f09a7 Merged revisions 140816 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140816 | russell | 2008-09-03 08:24:35 -0500 (Wed, 03 Sep 2008) | 4 lines

Don't freak out if the poll emulation receives NULL for the pollfds array
(closes issue #13307)
Reported by: jcovert

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-03 13:26:43 +00:00
Steve Murphy f6d9de2b30 Merged revisions 140747 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140747 | murf | 2008-09-02 17:36:56 -0600 (Tue, 02 Sep 2008) | 1 line

I am turning the warnings generated in ast_cdr_free and post_cdr into verbose level 2 messages. Really, they matter little to end users. You either get the CDR's you wanted, or you don't, and it is a bug.

For trunk, I am going one step further. These messages were pretty worthless even for debug, so I'm completely removing them.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 23:44:04 +00:00
Steve Murphy 2fceed7f6d Merged revisions 140690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140690 | murf | 2008-09-02 16:40:13 -0600 (Tue, 02 Sep 2008) | 1 line

After reconsidering, with respect to 13409, ast_cdr_detach should be OK, better in fact, than ast_cdr_free, which generates lots of useless warnings that will undoubtably generate complaints.

Hmmm. It doesn't hush the useless warnings, but it does allow control of posting via the detach and post routines, for those possible situations,
where you'd want to post single-channel cdrs.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 22:55:12 +00:00
Steve Murphy 1c79a23b8e Merged revisions 140670 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140670 | murf | 2008-09-02 16:15:57 -0600 (Tue, 02 Sep 2008) | 14 lines

(closes issue #13409)
Reported by: tomaso
Patches:
      asterisk-1.6.0-rc2-cdrmemleak.patch uploaded by tomaso (license 564)

I basically spent the day, verifying that this patch 
solves the problem, and doesn't hurt in non-problem 
cases. Why valgrind did not plainly reveal this leak
absolutely mystifies and stuns me. 

Many, many thanks to tomaso for finding and providing the fix.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 22:50:59 +00:00
Jeff Peeler 8fc9d6d6fa Added the option s to the Park application which will silence the announcement of the parking space number. Also, fixes the bug of just clearing the flags instead of actually parsing the arguments to Park.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 17:53:32 +00:00
Mark Michelson 5dfefa5ee6 Merged revisions 140488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140488 | mmichelson | 2008-08-29 12:34:17 -0500 (Fri, 29 Aug 2008) | 22 lines

After working on the ao2_containers branch, I noticed
something a bit strange. In all cases where we provide
a callback function to ao2_container_alloc, the callback
function would only return 0 or CMP_MATCH. After inspecting
the ao2_callback() code carefully, I found that if you're
only looking for one specific item, then you should return
CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue
traversing the current bucket until the end searching for
more matches.

In cases like chan_iax2 where in 1.4, all the peers are
shoved into a single bucket, this makes for potentially
terrible performance since the entire bucket will be
traversed even if the peer is one of the first ones come
across in the bucket.

All the changes I have made were for cases where the 
callback function defined was passed to ao2_container_alloc
so that calls to ao2_find could find a unique instance
of whatever object was being stored in the container.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 17:47:17 +00:00
Mark Michelson a4e8af9af2 Allow for video files to be opened as well as
audio files.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-29 16:24:37 +00:00
Steve Murphy 8953b0f359 (closes issue #13366)
Reported by: erousseau

This was a reasonable enhancement request, which was
easy to implement. Since it's an enhancement, it 
could only be applied to trunk.

Basically, for accounting where "initiated" seconds
are billed for, if the microseconds field on the end
time is greater than the microseconds field for the
answer time, add one second to the billsec field.

The implementation was requested by erousseau, and
I've implemented it as requested. I've updated the
CHANGES, the cdr.conf.sample, and the .h files
accordingly, to accept and set a flag for the
corresponding new option. cdr.c adds in the extra
second based on the usec fields if the option is
set. Tested, seems to be working fine.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-26 15:57:49 +00:00
Tilghman Lesher 6dd5b8609f Optional light colored background, for those who use black on white terminals.
(closes issue #13306)
 Reported by: Corydon76
 Patches: 
       20080814__bug13306__3.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, pkempgen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-25 23:13:32 +00:00
Jeff Peeler 4a122b5d8c Merged revisions 139927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139927 | jpeeler | 2008-08-25 16:47:33 -0500 (Mon, 25 Aug 2008) | 3 lines

Fix a typo I made. Lesson learned, apply the patch if one exists.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-25 21:48:51 +00:00
Steve Murphy ea898dc6c3 Merged revisions 139764 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139764 | murf | 2008-08-25 09:33:14 -0600 (Mon, 25 Aug 2008) | 9 lines

This patch reverts the changes made via 139347, and 139635, as users
are seeing adverse difference. 

I will un-close 13251.

Back to the drawing board/ concept/ beginning/ whatever!



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-25 15:54:18 +00:00
Steve Murphy de1af295c8 Merged revisions 139635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139635 | murf | 2008-08-22 16:24:02 -0600 (Fri, 22 Aug 2008) | 6 lines

I found some problems with the code I committed earlier, when
I merged them into trunk, so I'm coming back to clean up.
And, in the process, I found an error in the code I added
to trunk and 1.6.x, that I'll fix using this patch also.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 22:32:35 +00:00
Steve Murphy 2488366a75 Merged revisions 139347 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139347 | murf | 2008-08-21 17:03:50 -0600 (Thu, 21 Aug 2008) | 47 lines


(closes issue #13251)
Reported by: sergee
Tested by: murf



THis is a bold move for a static release fix, but I wouldn't have
made it if I didn't feel confident (at least a *bit* confident)
that it wouldn't mess everyone up.

The reasoning goes something like this:

1. We simply cannot do anything with CDR's at the current point
(in pbx.c, after the __ast_pbx_run loop). It's way too late to
have any affect on the CDRs. The CDR is already posted and gone,
and the remnants have been cleared.

2. I was very much afraid that moving the running of the 'h'
extension down into the bridge code (where it would be now
practical to do it), would result in a lot more calls to the
'h' exten, so I implemented it as another exten under another
name, but found, to my pleasant surprise, that there was a 
1:1 correspondence to the running of the 'h' exten in the
pbx_run loop, and the new spot at the end of the bridge.
So, I ifdef'd out the current 'h' loop, and moved it into
the bridge code. The only difference I can see is the stuff
about the AST_PBX_KEEPALIVE, and hopefully, if this 
is still an important decision point, I can replicate it
if there are complaints. To be perfectly honest,
the KEEPALIVE situation is not totally clear to me,
and how it relates to a post-bridge situation is less
clear. I suspect the users will point out everything
in total clarity if this steps on anyone's toes!

3. I temporarily swap the bridge_cdr into the channel
before running the 'h' exten, which makes it possible
for users to edit the cdr before it goes out the door.
And, of course, with the endbeforehexten config var set,
the users can also get at the billsec/duration vals.
After the h exten finishes, the cdr is swapped back
and processing continues as normal.

Please, all who deal with CDR's, please test this version
of Asterisk, and file bug reports as appropriate!


........

I also made a little fix to the app_dial's 'e' option,
that is related to my updates.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 22:03:13 +00:00
Jeff Peeler 618b3eb8f8 Merged revisions 139621 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139621 | jpeeler | 2008-08-22 16:36:13 -0500 (Fri, 22 Aug 2008) | 5 lines

(closes issue #13359)
Reported by: Laureano
Patches:
      originate_channel_check.patch uploaded by Laureano (license 265)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 21:57:32 +00:00
Jeff Peeler ea788c02e7 remove extra comma typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 21:52:20 +00:00
Mark Michelson 060f6d5c3d Add missing unique id to ParkedCallGiveUp and ParkedCallTimeOut
manager events

(closes issue #13358)
Reported by: srt
Patches:
      13358_parking_events.diff uploaded by srt (license 378)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-22 20:02:35 +00:00
Steve Murphy 1b2e0a4365 Merged revisions 139074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r139074 | murf | 2008-08-20 11:14:55 -0600 (Wed, 20 Aug 2008) | 12 lines


(closes issue #13263)
Reported by: brainy
Tested by: murf

The specialized reset routine is tromping on the
flags field of the CDR. I made a change to not
reset the DISABLED bit. This should get rid of this
problem.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20 17:25:07 +00:00
Steve Murphy 04795d963f These changes are in regards to bug 13249, where users are being surprised by the changes made
to the Set app in trunk/1.6.x, as they come from the 1.4 world. They are only bitten if
they write their AEL dialplan in the 1.4 world, and then carry it over to a trunk/1.6.x 
installation where a "make samples" was executed, or where they hand-edited the 
asterisk.conf file and added the [compat] category with app_set = 1.6 (or higher).

(this commit does not totally solve 13249, at least not yet)

The change involves issueing a single warning while the AEL file is loading, if:
 1. app_set is present in the config file, and set to 1.6 or higher.
 2. there are double quotes in an assignment statement (eg x = "hi there";)
 3. the warning was not already issued.

The standalone app, aelparse, does not (yet) issue this warning. I'd have to
have it read in the asterisk.conf file, and that's a bit of hassle. I'll add
it if users request it, tho.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-19 15:59:12 +00:00
Sean Bright 642dd656eb Move Uniqueid to the end of the event for those that rely on the position
of the name/value pairs, pointed out by snuffy-home on #asterisk-commits.

For those of you who rely on the position of name/value pairs in manager
events... stop... that is why associative arrays were invented.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-17 14:12:11 +00:00
Sean Bright c8c264b9ad Add Uniqueid header to ParkedCall manager event.
(closes issue #13323)
Reported by: srt
Patches:
      13323_unique_id_for_parkedcalls_event.diff uploaded by srt (license 378)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-17 13:51:08 +00:00
Sean Bright 9ff1434641 Add missing colons to RTCPReceived and RTCPSent manager events.
(closes issue #13319)
Reported by: srt
Patches:
      13319_rtcp_manager_event_headers.diff uploaded by srt (license 378)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-17 13:40:36 +00:00
Tilghman Lesher f4586f3018 Also make sure hinting won't crash on reload.
(Closes issue #13312)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-16 12:52:06 +00:00
Tilghman Lesher 3a5eb27579 Remove deprecated syntax from sample config file
(closes issue #13314)
 Reported by: kue


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15 20:35:24 +00:00
Tilghman Lesher d5c673e441 Change free to ast_free_ptr, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15 19:36:11 +00:00
Tilghman Lesher af69ec03ed e->data can be NULL, so use the safe version of ast_strdup()
(closes issue #13312)
 Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15 19:22:48 +00:00
Russell Bryant 1f1dc4a0dc Merged revisions 138027 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r138027 | russell | 2008-08-15 10:07:16 -0500 (Fri, 15 Aug 2008) | 9 lines

Ensure that when a hangup occurs in autoservice, that a hangup frame gets
properly deferred to be read from the channel owner when it gets taken out
of autoservice.

(closes issue #12874)
Reported by: dimas
Patches: 
      v1-12874.patch uploaded by dimas (license 88)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-15 15:09:46 +00:00
Tilghman Lesher fdd92290af Convert deprecated routines to the new names.
(closes issue #13297)
 Reported by: snuffy
 Patches: 
       bug13297_20080814.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-13 17:36:15 +00:00
Sean Bright 74bf61579f That's all, folks. Not going to update the Makefile until res_jabber is
converted (snuffy, you there? :))


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 20:57:25 +00:00
Sean Bright 790fde68d9 Another batch of files from RSW. The remaining apps and a few more
files from main/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 20:23:50 +00:00
Sean Bright b69c8e6ab5 Another big chunk of changes from the RSW branch. Bunch of stuff from main/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 19:35:50 +00:00
Mark Michelson e12e97a640 Bump a LOG_NOTICE message to LOG_DEBUG since it appears
once for every bridged call



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 20:25:43 +00:00