dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

1964 Commits

Author SHA1 Message Date
tilghman 6e814d6644 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: http://svn.digium.com/svn/asterisk/trunk@157639 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19 01:02:45 +00:00
mmichelson 88ec29a481 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: http://svn.digium.com/svn/asterisk/trunk@157632 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19 00:59:48 +00:00
mmichelson 135ce47598 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: http://svn.digium.com/svn/asterisk/trunk@157306 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-18 18:31:08 +00:00
murf fe4ad3a4a2 (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: http://svn.digium.com/svn/asterisk/trunk@157302 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-18 18:07:55 +00:00
eliel b17c75817d Avoid a not needed cast, making code more readable.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157073 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-15 15:37:11 +00:00
russell 7927af69d9 Fix a few more places where the case insensitive hash should be used since
the comparison is case insensitive.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157041 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-15 04:25:57 +00:00
tilghman 5f8bb934f4 Ping is missing the standard double-newline after the event.
(closes issue #13903)
 Reported by: kebl0155


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156911 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-14 17:02:00 +00:00
tilghman ca96e392ca 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: http://svn.digium.com/svn/asterisk/trunk@156690 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-13 21:30:41 +00:00
jpeeler 62c00648f0 (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: http://svn.digium.com/svn/asterisk/trunk@156649 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-13 19:17:50 +00:00
eliel 20313cb12e 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: http://svn.digium.com/svn/asterisk/trunk@156575 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-13 15:46:06 +00:00
eliel b8b9781f95 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: http://svn.digium.com/svn/asterisk/trunk@156541 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-13 13:53:13 +00:00
eliel 28bb0c48be Remove trailing whitespaces
using ':%s/\s\+$//' pointed by seanbright on #asterisk-dev


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156535 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-13 13:08:34 +00:00
murf c2775595e6 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: http://svn.digium.com/svn/asterisk/trunk@156299 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 19:47:29 +00:00
russell ecadc01e36 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: http://svn.digium.com/svn/asterisk/trunk@156166 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 17:38:20 +00:00
eliel 92360e76ef - The paramname is a pointer allocated with strdup() or malloc(), so,
we need to free it with ast_free().


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156162 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 17:28:02 +00:00
mvanbaak e005e919bd 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: http://svn.digium.com/svn/asterisk/trunk@156120 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 06:46:04 +00:00
eliel f4ab4abaf3 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: http://svn.digium.com/svn/asterisk/trunk@156051 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 00:17:43 +00:00
pari d8c640af72 changing comment style to conform coding guidelines
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156018 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-11 23:32:31 +00:00
pari bf38177783 Patch by Ryan Brindley -- Make sure that manager refuses any duplicate 'new category' requests in updateconfig
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156017 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-11 23:02:43 +00:00
tilghman 68d353e96e 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: http://svn.digium.com/svn/asterisk/trunk@155763 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-10 18:04:30 +00:00
eliel d3011dda43 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: http://svn.digium.com/svn/asterisk/trunk@155711 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-10 13:53:23 +00:00
seanbright 2034723f38 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: http://svn.digium.com/svn/asterisk/trunk@155590 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-09 01:59:59 +00:00
seanbright 70ff546e20 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: http://svn.digium.com/svn/asterisk/trunk@155554 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-09 01:27:00 +00:00
seanbright a7a95954c8 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: http://svn.digium.com/svn/asterisk/trunk@155401 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 22:39:30 +00:00
seanbright 8e17ba0b0b 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: http://svn.digium.com/svn/asterisk/trunk@155284 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 16:18:52 +00:00
russell 38ff416edd 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: http://svn.digium.com/svn/asterisk/trunk@155241 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 14:50:30 +00:00
eliel 8f78b27c8a If 'asterisk.conf' is not found, instead of giving up,
load documentation for the 'en_US' language (fix my last
commit).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155204 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 03:02:01 +00:00
eliel bec40ce4dc Fix an asterisk crash if no asterisk.conf configuration file is present.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155175 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07 02:37:47 +00:00
eliel 60f7ccb157 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: http://svn.digium.com/svn/asterisk/trunk@154967 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-06 18:19:00 +00:00
seanbright b6eddc8dd9 Update a couple places to use the new ast_channel_search_locked API call.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154923 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 22:19:22 +00:00
tilghman 921b015a76 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: http://svn.digium.com/svn/asterisk/trunk@154922 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 22:19:18 +00:00
tilghman 7c5853a25d Add LISTFILTER dialplan function, along with supporting documentation. See
documentation for more information on how to use it.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154915 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 21:58:48 +00:00
murf c1c857932e 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: http://svn.digium.com/svn/asterisk/trunk@154687 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 16:11:11 +00:00
eliel 47e61bf781 Add more SeeAlso references based on TFOT.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154647 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 14:37:07 +00:00
eliel ddd3625c89 - 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: http://svn.digium.com/svn/asterisk/trunk@154578 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05 13:07:29 +00:00
seanbright 1a38e697db 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: http://svn.digium.com/svn/asterisk/trunk@154429 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 23:23:39 +00:00
tilghman cf7ea76646 Slightly optimize ast_devstate_str and rename global functions devstate2str and config_text_file_save to have an ast_ prefix
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154260 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 18:47:20 +00:00
seanbright fbdcc9fb02 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: http://svn.digium.com/svn/asterisk/trunk@154191 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 17:23:33 +00:00
seanbright f5ca1c8410 Fix build errors.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154186 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 16:50:34 +00:00
tilghman e4073fa6f6 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: http://svn.digium.com/svn/asterisk/trunk@154061 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-03 21:57:14 +00:00
kpfleming cc1b2c100f 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: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 18:52:13 +00:00
russell b1f91b97d2 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: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-01 21:10:07 +00:00
mmichelson 9bc20020f1 * 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: http://svn.digium.com/svn/asterisk/trunk@153223 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-31 20:05:46 +00:00
twilson b417a0a687 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: http://svn.digium.com/svn/asterisk/trunk@153181 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-31 18:55:33 +00:00
russell f052e15a98 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: http://svn.digium.com/svn/asterisk/trunk@153057 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-31 09:31:10 +00:00
kpfleming d219281fd4 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: http://svn.digium.com/svn/asterisk/trunk@152812 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30 16:54:29 +00:00
kpfleming 5cb4e461fd fix a few small things found by using sparse
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152809 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30 16:49:02 +00:00
mmichelson 5cb631dcff 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: http://svn.digium.com/svn/asterisk/trunk@152807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30 16:38:19 +00:00
tilghman f138e9dbd0 Track down and fix annoying lock errors
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152689 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30 00:45:47 +00:00
murf 6d700c596a 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: http://svn.digium.com/svn/asterisk/trunk@152536 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-29 05:01:00 +00:00