Commit Graph

1976 Commits

Author SHA1 Message Date
Steve Murphy 11e22239cc Merged revisions 158603 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r158603 | murf | 2008-11-21 16:14:50 -0700 (Fri, 21 Nov 2008) | 11 lines

In reference to the fix made for 13871, I was
merging the fix into 1.6.0 and realized I missed
the code in the h-exten block, and didn't catch it
because my test case had the h-exten commented out.

So, this corrects the code I missed, as a 
preventative against another crash report.
Tested with the h-exten defined, all is well.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 23:40:46 +00:00
Tilghman Lesher 35213dff98 Allow space within an extension, when the space is within a character class.
(requested by lmadsen on -dev, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 23:33:22 +00:00
Tilghman Lesher 7bd6f1744b Merged revisions 158600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r158600 | tilghman | 2008-11-21 17:07:46 -0600 (Fri, 21 Nov 2008) | 5 lines
  
  The passed extension may not be the same in the list as the current entry,
  because we strip spaces when copying the extension into the structure.
  Therefore, use the copied item to place the item into the list.
  (found by lmadsen on -dev, fixed by me)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 23:14:11 +00:00
Russell Bryant 6fb1f86054 Merged revisions 158539 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r158539 | russell | 2008-11-21 16:05:55 -0600 (Fri, 21 Nov 2008) | 2 lines

When compiling with DEBUG_THREADS, report the real file/func/line for ao2_lock/ao2_unlock

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 22:12:37 +00:00
Steve Murphy 3c01868040 Merged revisions 158483 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r158483 | murf | 2008-11-21 14:19:47 -0700 (Fri, 21 Nov 2008) | 11 lines

(closes issue #13871)
Reported by: mdu113

This one is totally my fault. The code doesn't even
create a bridge CDR if the channel CDR has POST_DISABLED.
I didn't check for that at the end of the bridge.
Fixed with a few small insertions. Tested. Looks
good. No cdr generated, no crash, no unnecc. data
objects created either.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 21:47:16 +00:00
Jason Parker ea1446635e Make sure we add the Event header for CoreShowChannels.
(closes issue #13334)
Reported by: srt
Patches:
      13334_missing_event_header_in_core_show_channel.diff uploaded by srt (license 378)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 19:40:57 +00:00
Mark Michelson 3a9c27459e Merged revisions 158072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r158072 | twilson | 2008-11-20 11:48:58 -0600 (Thu, 20 Nov 2008) | 2 lines

Begin on a crusade to end trailing whitespace!

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 18:20:00 +00:00
Ryan Brindley e27f9325ea more formatting corrections :: one line for loops and if statements still need {}
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:53:42 +00:00
Ryan Brindley ad918da94f formatting changes :: one line for loops and if statements should have {}
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:46:56 +00:00
Jeff Peeler d12263a16a (closes issue #12929)
Reported by: snyfer

This handles the case for a zero length file to attempt to be streamed. Instead of failing from not playing any data, go ahead and return success as ast_streamfile should consider playing nothing a success when there is nothing to play.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:37:31 +00:00
Kevin P. Fleming 8d5deb312b Merged revisions 157859 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
  
  the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
  
  with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
  
  while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 00:08:12 +00:00
Terry Wilson d66a8cd264 Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying to parse an invalid config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 19:25:14 +00:00
Tilghman Lesher afb571ba8f 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/trunk@157639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 01:02:45 +00:00
Mark Michelson 07a22680ee 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/trunk@157632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 00:59:48 +00:00
Mark Michelson d91f1df3e0 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/trunk@157306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-18 18:31:08 +00:00
Steve Murphy f68bfa4ff3 (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/trunk@157302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-18 18:07:55 +00:00
Eliel C. Sardanons 7a20daefed Avoid a not needed cast, making code more readable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 15:37:11 +00:00
Russell Bryant 1148e648b8 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/trunk@157041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-15 04:25:57 +00:00
Tilghman Lesher 777d5ee470 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/trunk@156911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 17:02:00 +00:00
Tilghman Lesher c2d30ffaa5 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/trunk@156690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 21:30:41 +00:00
Jeff Peeler 93a59f5bda (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/trunk@156649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 19:17:50 +00:00
Eliel C. Sardanons a22928b853 Introduce XML documentation for:
- MeetMe()
  - MeetMeCount()
  - MeetMeChannelAdmin()
  - MeetMeAdmin()
  - SLAStation()
  - SLATrunk()

- Add an attribute to optionlist 'hasparams' with the same functionality as the one
we have in <parameter> and <argument> (the DTD was updated)
- Fix a leak when getting an attribute while parsing an <optionlist>.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 15:46:06 +00:00
Eliel C. Sardanons 62a32fef40 Fix a typo introduced when changing xmldoc_has_arguments() to xmldoc_has_inside()
we need to pass the name of the node that we are looking for.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 13:53:13 +00:00
Eliel C. Sardanons df6b78b742 Remove trailing whitespaces
using ':%s/\s\+$//' pointed by seanbright on #asterisk-dev


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-13 13:08:34 +00:00
Steve Murphy 449c012c68 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/trunk@156299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 19:47:29 +00:00
Russell Bryant e2133648f9 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/trunk@156166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 17:38:20 +00:00
Eliel C. Sardanons 15d30a56cd - The paramname is a pointer allocated with strdup() or malloc(), so,
we need to free it with ast_free().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 17:28:02 +00:00
Michiel van Baak 86f900b201 This commit does two things:
- Add CLI aliases module to asterisk.
- Remove all deprecated CLI commands from the code

Initial work done by file.
Junk-Y and lmadsen did a lot of work and testing to
get the list of deprecated commands into the configuration file.

Deprecated CLI commands are now handled by this new module,
see cli_aliases.conf for more info about that.

ok russellb@ via reviewboard

(closes issue #13735)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 06:46:04 +00:00
Eliel C. Sardanons 6f31fed83f Implement AGI XML documentation parsing functions.
A new <agi> element is used to describe the XML documentation.
We have the usual synopsis,syntax,description and seealso for AGI commands.
The CLI 'agi show commands' command was changed to show all the documentation se
ctions.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-12 00:17:43 +00:00
Pari Nannapaneni f50966c16a changing comment style to conform coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-11 23:32:31 +00:00
Pari Nannapaneni 7a2b0102f1 Patch by Ryan Brindley -- Make sure that manager refuses any duplicate 'new category' requests in updateconfig
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-11 23:02:43 +00:00
Tilghman Lesher a974729765 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/trunk@155763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-10 18:04:30 +00:00
Eliel C. Sardanons 23adb8e509 Move all the XML documentation API from pbx.c to xmldoc.c.
Export the XML documentation API:
   ast_xmldoc_build_synopsis()
   ast_xmldoc_build_syntax()
   ast_xmldoc_build_description()
   ast_xmldoc_build_seealso()
   ast_xmldoc_build_arguments()
   ast_xmldoc_printable()
   ast_xmldoc_load_documentation()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-10 13:53:23 +00:00
Sean Bright 48522988ab In order to move away from nested function use, some changes to the recently introduced
ast_channel_search_locked need to be made.  Specifically, the caller needs to be able to
pass arbitrary data which in turn is passed to the callback.  This patch addresses all
of the nested functions currently in asterisk trunk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-09 01:59:59 +00:00
Sean Bright 9ef09ad1d4 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/trunk@155554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-09 01:27:00 +00:00
Sean Bright 30d1744ffc Add ability to pass arbitrary data to the ao2_callback_fn (called from
ao2_callback and ao2_find).  Currently, passing OBJ_POINTER to either
of these mandates that the passed 'arg' is a hashable object, making
searching for an ao2 object based on outside criteria difficult.

Reviewed by Russell and Mark M. via ReviewBoard:
    http://reviewboard.digium.com/r/36/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 22:39:30 +00:00
Sean Bright 1d09d193e7 Convert open-coded linked list in indications to the AST_LIST_* macros. This
cleans the code up some and should make it more maintainable as time goes on.

Reviewed by Russell, Kevin, Mark M., and Tilghman via ReviewBoard:
	http://reviewboard.digium.com/r/34/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 16:18:52 +00:00
Russell Bryant 1a239454f1 Fix some code in chan_sip that was intended to unlink multiple objects from a
container.  The OBJ_MULTIPLE flag must be provided here.  Otherwise, this would
only remove a single object.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 14:50:30 +00:00
Eliel C. Sardanons 9cc7bc998b If 'asterisk.conf' is not found, instead of giving up,
load documentation for the 'en_US' language (fix my last
commit).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 03:02:01 +00:00
Eliel C. Sardanons 65d4d1eb0f Fix an asterisk crash if no asterisk.conf configuration file is present.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-07 02:37:47 +00:00
Eliel C. Sardanons e771f08f60 Simplify the output of [See Also].
Functions are printed without parenthesis like: FUNTION
Applications are printed with parenthesis like: AppName()
Cli commands are printed like: 'core show application'
The other type of references are printed as they are inside the <ref> tag.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-06 18:19:00 +00:00
Sean Bright 6ac794074e Update a couple places to use the new ast_channel_search_locked API call.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 22:19:22 +00:00
Tilghman Lesher 81fb7597e5 Don't read history on -rx commands.
(Closes issue #13571)
Reported by: tzafrir
Patch '0001-no-need-for-history-on-asterisk-rx.patch' uploaded by tzafrir.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 22:19:18 +00:00
Tilghman Lesher 0d25ddd366 Add LISTFILTER dialplan function, along with supporting documentation. See
documentation for more information on how to use it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 21:58:48 +00:00
Steve Murphy f7c20e0dec 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/trunk@154687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 16:11:11 +00:00
Eliel C. Sardanons 990a6bebe8 Add more SeeAlso references based on TFOT.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 14:37:07 +00:00
Eliel C. Sardanons f18699be24 - Add more <see-also> based on TFOT.
- Add the 'filename' type to the see-also ref. To be able to reference a filename.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05 13:07:29 +00:00
Sean Bright 086a52d9d1 Introduce a new API call ast_channel_search_locked, which iterates through the
channel list calling a caller-defined callback.  The callback returns non-zero
if a match is found.  This should speed up some of the code that I committed
earlier today in chan_sip (which is also updated by this commit).

Reviewed by russellb and kpfleming via ReviewBoard:
	http://reviewboard.digium.com/r/28/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 23:23:39 +00:00
Tilghman Lesher 2cc8e25222 Slightly optimize ast_devstate_str and rename global functions devstate2str and config_text_file_save to have an ast_ prefix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 18:47:20 +00:00
Sean Bright f349f18eaa GLOB_BRACE is already added to MY_GLOB_FLAGS if it is supported on the
platform.  This should resolve some build errors on Solaris.

(issue #13704)
Reported by: dougm


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 17:23:33 +00:00