dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

1470 Commits

Author SHA1 Message Date
russell 7cfa10f05b Merged revisions 90348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90348 | russell | 2007-11-30 13:26:04 -0600 (Fri, 30 Nov 2007) | 8 lines

Change the behavior of ao2_link().  Previously, in inherited a reference.
Now, it automatically increases the reference count to reflect the reference
that is now held by the container.

This was done to be more consistent with ao2_unlink(), which automatically
releases the reference held by the container.  It also makes it so it is
no longer possible for a pointer to be invalid after ao2_link() returns.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90351 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30 19:34:47 +00:00
russell 2393a4999d Merged revisions 90310 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90310 | russell | 2007-11-30 12:46:46 -0600 (Fri, 30 Nov 2007) | 2 lines

Add some notes on the behavior of ao2_unlink() after a discussion with Tilghman

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90311 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-30 18:47:14 +00:00
tilghman 178cee50cf Merged revisions 90155 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90155 | tilghman | 2007-11-29 11:29:59 -0600 (Thu, 29 Nov 2007) | 5 lines

Use of "private" as a field name in a header file messes with C++ projects
Reported by: chewbacca
Patch by: casper
(Closes issue #11401)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90158 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29 17:50:44 +00:00
tilghman d593529831 Fix build of trunk
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90157 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29 17:42:21 +00:00
russell 4efbdfc704 Merged revisions 90145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90145 | russell | 2007-11-28 18:20:34 -0600 (Wed, 28 Nov 2007) | 5 lines

This set of changes is to make some callerID handling thread-safe.
The ast_set_callerid() function needed to lock the channel.  Also, the handlers
for the CALLERID() dialplan function needed to lock the channel when reading
or writing callerid values directly on the channel structure.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90146 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29 00:28:10 +00:00
russell 633b7b4f97 Merged revisions 90142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90142 | russell | 2007-11-28 18:06:08 -0600 (Wed, 28 Nov 2007) | 4 lines

Merge a change from team/russell/chan_refcount ...

This makes ast_stopstream() thread-safe.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90143 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29 00:07:32 +00:00
russell bf1706909c Merge another small doxygen change from team/russell/chan_refcount to indicate
that a channel doesn't need to be locked before calling a certain function.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90141 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 23:57:30 +00:00
russell 7d8b10cc2f Merge some channel.h doxygen updates from team/russell/chan_refcount
This was mostly to note whether a channel needed to be locked or not before
calling these functions.  However, I added some other things, too.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90139 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 23:47:26 +00:00
qwell 8cce4fbf02 Remove "old"-style CLI handler, since nothing uses it anymore.
Closes issue #11403, patch by eliel.  This also completes the janitor project.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90038 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 20:27:40 +00:00
russell 78bd1dcd5f Merged revisions 89893 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89893 | russell | 2007-11-27 18:20:13 -0600 (Tue, 27 Nov 2007) | 4 lines

 - update documentation for some of the goto functions to note that they
   handle locking the channel as needed
 - update ast_explicit_goto() to lock the channel as needed

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89915 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-28 00:24:19 +00:00
russell 25a29b29a6 Document that the channel is not locked when the send_digit_begin and end
callbacks get called.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89891 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 23:56:45 +00:00
oej fecacc7468 More "moremanager" fixes. Manager commands to check module status.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89771 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 21:04:29 +00:00
oej dfd2efe50a More "moremanager" changes - doxygen docs and changing manager version (finally)
before making more dramatic changes.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89770 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 20:50:48 +00:00
oej bb9210c7a9 The following patch with updates for trunk. Works much better in trunk.
Also by accident fixed a bad typo by a previous committer, which actually made video calls
not work fully...

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

........
r89630 | oej | 2007-11-27 16:23:17 +0100 (Tis, 27 Nov 2007) | 12 lines

If we get a codec offer using a well-known payload type, but using it for another
codec that we don't know, Asterisk did not remove that codec from the list.

With this patch, we remove the codec from audio and video rtp objects and
deny it ever existed. Thanks to lasse for testing.

(closes issue #11376)
Reported by: lasse
Patches: 
      bug11376.txt uploaded by oej (license 306)
Tested by: lasse

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89698 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 19:24:17 +00:00
qwell 3db53911ba Add an S_COR macro, which is similar to the existing S_OR macro,
except with an additional boolean arg.

A hack such as:
foo ? S_OR(bar, "baz") : "baz"
becomes:
S_COR(foo, bar, "baz")


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89683 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 19:12:33 +00:00
murf 5aff21b945 Merged revisions 89622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89622 | murf | 2007-11-26 23:24:02 -0700 (Mon, 26 Nov 2007) | 1 line

closes issue #11379; OK, this is an attempt to make both sides happy. To the cdr.conf file, I added the option 'unanswered', which defaults to 'no'. In this mode, you will see a cdr for a call, whether it was answered or not. The disposition will be NO ANSWER or ANSWERED, as appropriate. The src is as you'd expect, the destination channel will be one of the channels from the Dial() call, usually the last in the list if more than one chan was specified. With unanswered set to 'yes', you will still see this cdr entry in both cases. But in the case where the dial timed out, you will also see a cdr for each line attempted, marked NO ANSWER, with no destination channel name. The new option defaults to 'no', so you don't see the pesky extra cdr's by default, and you will not see the irritating 'not posted' messages.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89623 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27 06:47:08 +00:00
oej a6d5c8a789 Start using Doxygen groupings to group variables and defines.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89607 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26 20:19:50 +00:00
oej bc21278887 Try to get channel.h and channel.c aligned in regards to ast_set_callerid as well
as change name of variables to follow the rest of the naming.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89564 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-25 19:33:33 +00:00
tilghman 6ab028735f Merged revisions 89559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89559 | tilghman | 2007-11-25 11:17:10 -0600 (Sun, 25 Nov 2007) | 14 lines

We previously attempted to use the ESCAPE clause to set the escape delimiter to
a backslash.  Unfortunately, this does not universally work on all databases,
since on databases which natively use the backslash as a delimiter, the
backslash itself needs to be delimited, but on other databases that have no
delimiter, backslashing the backslash causes an error.

So the only solution that I can come up with is to create an option in res_odbc
that explicitly specifies whether or not backslash is a native delimiter.  If
it is, we use it natively; if not, we use the ESCAPE clause to make it one.

Reported by: elguero
Patch by: tilghman
(Closes issue #11364)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89561 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-25 17:50:07 +00:00
oej 14c325e930 Housekeeping...
- Fix typo in chan_sip
- Remove changes to caller ID structure, moving it to branch (russellb)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89551 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-25 11:10:52 +00:00
murf 2a36d53ce3 closes issue #11363; where the pattern _20x. buried in an included context, didn't match 2012; There were a small set of problems to fix: 1. I needed NOT to score patterns unless you are at the end of the data string. 2. Capital N,X,Z and small n,x,z are OK in patterns. I canonicalize the patterns in the trie to caps. 3. When a pattern ends with dot or exclamation, CANMATCH/MATCHMORE should always report this pattern, no matter the length. With this commit, I also supplied the wish of Luigi, where the user can select which pattern matching algorithm to use, the old (legacy) pattern matcher, or the new, trie based matcher. The OLD matcher is the default. A new [general] section variable, extenpatternmatchnew, is added to the extensions.conf, and the example config has it set to false. If true, the new matcher is used. In all other respects, the context/exten structs are the same; the tries and hashtabs are formed, but in the new mode the tries are not used. A new CLI command 'dialplan set extenpatternmatch true/false' is provided to allow switching at run time. I beg users that are forced to return to the old matcher to please report the reason in the bug tracker. Measured the speed benefit of the new matcher against an impossibly large context with 10,000 extensions: the new matcher is 374 times faster.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89547 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-24 21:00:26 +00:00
oej ea9304c01b Let's start with implementing the base architecture for UTF8 caller ID's
so we can handle multiple formats properly. This is not carved in stone,
but a proposal to start with.

We need to add support for transliterations as well as UTF8 handling,
propably with libiconv. Murf is looking into that for the dialplan.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89531 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-23 09:40:02 +00:00
rizzo f73d606067 formatting cleanup on the header,
normalization of the assignment of descriptor fields.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89530 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-23 09:03:33 +00:00
rizzo 37da700299 formatting cleanup
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89523 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 04:19:04 +00:00
rizzo e8a5f98fe8 shuffle a little bit the content of header files to reduce dependencies.
In this commit:
- move the ast_register/unregister_app functions to module.h
  to avoid the need to include pbx.h for the simpler apps;
- move the ast_group structure to channel.h to remove the
  dependency of app.h on linkedlists.h

Note, this is a long process that I am doing in small steps.

The main difficulty is that now for each subsystem we
have a single header (e.g. channel.h) included by the subsystem
provider (usually one file, e.g. channel.c) and by its clients
(dozens of them, e.g. we have some 70+ apps and 30+ functions).

This requires the clients to include all the extra headers
required by the provider (eg. lock.h, linkedlists.h, definitions
of substructures...) even though many of the clients would be
just happy with opaque struct declarations and function prototypes.

The long term plan is to eventually rectify this structure
so that the compilation can become faster, and also APIs
are more stable.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89522 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 03:50:04 +00:00
rizzo 737b408d52 more removal of redundant headers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89519 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 02:07:33 +00:00
rizzo 9a04121e36 implement the split of file.h and mod_format.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89515 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 00:53:49 +00:00
rizzo 3f6e17e2cd Add a specific header for providers of file and format handling routines,
moving here structs and function declarations formerly in file.h



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89514 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 00:53:13 +00:00
kpfleming 6d30ebbac7 move these forward declarations back to asterisk.h where they belong... even though asterisk.h includes compat.h, these declarations have nothing to do with the being platform-compatible and are directly related to being part of Asterisk
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89482 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 16:07:11 +00:00
rizzo 076f1b61c3 add check for video4linux
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89475 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 01:29:45 +00:00
rizzo 4f4d5cb3bf X11 checks (at least some - for other platforms with
unusual X11 locations you might need to add more directories)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89472 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 00:22:41 +00:00
rizzo 89d8d78652 move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 23:16:15 +00:00
rizzo 8d3385f534 move internal function declarations to include/asterisk/_private.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89465 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 22:18:21 +00:00
kpfleming 7c35bb6a7f switch compile-time option checking to string storage mode in this branch too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89463 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 19:28:10 +00:00
russell 7bdba4b8b1 Be a bit more pedantic about the type for holding the md5 sum for the build options.
Also, doxygenify the comment.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89440 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 23:03:37 +00:00
rizzo f89608896c move the declaration of struct ast_channel ast_frame and ast_module
to compat.h so it is always available - hopefully this will let
us reduce the number of inclusions of channel.h and frame.h



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89426 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 19:36:32 +00:00
rizzo 9cf442d7f7 include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 18:52:04 +00:00
rizzo 520bf42a50 revert inclusion of options.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89412 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 14:36:12 +00:00
file c47a1d44ba Use the easy way that rizzo mentioned, only include malloc.h on the Windows platform.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89398 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-18 17:49:40 +00:00
file 9aacf0a023 Revert last commit, apparently buildbot lied to me.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89397 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-18 17:03:38 +00:00
file 1c0212aaba Change how we handle alloca to conform with how it is suggested in the autoconf manual for AC_FUNC_ALLOCA. FreeBSD 6 now builds again and no other platforms should be broken by this.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89396 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-18 17:01:41 +00:00
file 6f925e459e Use autoconf logic to determine the presence of PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP and PTHREAD_MUTEX_RECURSIVE_NP. Enclose error message from network.h in "
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89394 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 23:03:16 +00:00
rizzo 7c4aecdfc4 if alloca.h is not present, try malloc.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 19:29:54 +00:00
rizzo f9cb61c116 prefer socket.h over other variants (winsock etc.)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89385 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 16:32:18 +00:00
rizzo fb8143ad31 start using asterisk/network.h for network related headers.
Also remove some unnecessary includes.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89380 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:11:53 +00:00
rizzo 139e5f6dd4 wrapper for all generic network headers that have different names
and locations on the various systems.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89379 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 14:00:24 +00:00
rizzo 678373f7a8 use autoconf results to conditionally compile timersub
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89372 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 10:32:56 +00:00
rizzo 19d672e30a compatibility fixes for cygwin
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89371 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 10:28:55 +00:00
rizzo 344808cb75 some version of flex produce code that wants __STDC_VERSION__
defined, but the compiler does not always define it.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89370 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 10:26:21 +00:00
rizzo 370182a288 timersub is a macro not a function, so write the check in a way
that detects both formats.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89363 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 09:30:22 +00:00
russell 1ccd0d8633 Update the configure script check for sys/poll.h to also provide the result in
include/asterisk/autoconfig.h.  Also, move the conditional include of sys/poll.h
or asterisk/poll-compat.h into asterisk/config.h instead of the two headers it
existed in before.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 06:33:07 +00:00
rizzo 15e6a2fe21 add detection for timersub() and winsock.h/winsock2.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89357 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 04:17:53 +00:00
rizzo c950f36c72 provide definitions for __LITTLE_ENDIAN and __BIG_ENDIAN if not present.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89356 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 03:28:31 +00:00
rizzo fda7338287 use poll as detected by configure
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89355 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 03:07:06 +00:00
rizzo 7e662cf783 acinclude.m4: add a function to help checking sdl-config, gtk-config
and the like (this could be used for gtk and gtk2 as well)
Other files: add tests for sdl, sdl_image and avcodec and regenerate
	configure and autoconfig.h.in



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89351 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 01:49:26 +00:00
rizzo 5a50119d9d add check for the presence of glob
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89350 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 00:31:32 +00:00
rizzo 6a323c6c93 paths are already in include/asterisk/paths.h so don't duplicate
them in include/asterisk.h



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89345 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 23:28:28 +00:00
rizzo d2e1694e0a whitespace only change - adjust indentation and add some
comments on the content of these two files.

utils.h (which is included in over 150 files) contains a lot of
unrelated functions which require the inclusion of a large number
of other headers.  At some point we should partition its content
in a better way.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89341 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 22:37:17 +00:00
rizzo afb7764dd1 logger.h does not need options.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89338 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 21:23:50 +00:00
rizzo 82c12f8105 remove redundant #include "asterisk/compat.h",
but make sure that asterisk/compiler.h is included everywhere



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89336 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 21:08:28 +00:00
rizzo 883346d64a Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
kpfleming 3dc676ceb8 Merged revisions 89325 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89325 | kpfleming | 2007-11-16 10:47:46 -0600 (Fri, 16 Nov 2007) | 4 lines

To help combat problems where people build external modules (asterisk-addons or others) and then change the build options of the Asterisk build in a way that makes the incompatible without warning, this commit introduces an MD5 signature of the important build-time options and includes that signature into modules when they are built. When the loader loads one of these modules and notices the problem, it will emit a warning to console and refuse to initialize the module, as doing so could cause the system to be unstable or even crash.

If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89326 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 16:56:59 +00:00
rizzo b483469ff7 add a small new function to retrieve variables from a config
once we have a pointer to the category.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89322 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 10:07:24 +00:00
tilghman 9f485cd0a3 If we're going to be passing a negative value for the size of a stringfield,
in order to indicate something, then using an UNSIGNED parameter is bad,
mmmmmkay?


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89312 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 23:50:15 +00:00
rizzo 6a4d64e3ef access channel locks through ast_channel_lock/unlock/trylock and not
through ast_mutex primitives.

To detect all occurrences, I have renamed the lock field in struct ast_channel
so it is clear that it shouldn't be used directly.

There are some uses in res/res_features.c (see details of the diff)
that are error prone as they try and lock two channels without
caring about the order (or without explaining why it is safe).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89293 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-15 16:20:47 +00:00
rizzo ea0d4674a6 make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, 
and catched a few instances where this was actually done.

Given the differences between trunk and 1.4 (and the fact that this
is effectively an API change) it is better to fix 1.4 independently.
These are

chan_sip.c::sip_register()
chan_skinny.c:: near line 2847
config.c:: near line 1774
logger.c::make_components()
res_adsi.c:: near line 1049

I may have missed some instances for modules that do not build here.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 13:18:40 +00:00
russell 2e70fd8720 Fix up various coding guidelines issues ...
- handle memory allocation failures
 - add an ast_ prefix to a publicly exported function
 - put curly braces in the right places
 - add a bunch of spaces where they should be be used


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89266 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14 03:22:09 +00:00
russell b1d1f5e444 This fixes a build error on my mac. It also works on my linux box. Let me
know if it breaks any other platform ...


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89253 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-13 21:01:14 +00:00
qwell daf95de377 Doxygen fixes.
Also fix a common typo I kept seeing (arguement) in various files.

Closes issue #11222, patch by snuffy (with arguement > argument by me).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89202 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 23:44:20 +00:00
murf 71ed15b080 Thanks to snuffy for this doxygen update to hashtab.h; closes issue #11223
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89198 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 21:50:02 +00:00
murf 52ab483cb5 Thanks to snuff-work, who brought up that these fixes might need to be made.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89196 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12 20:49:27 +00:00
murf aef44ae684 This is the perhaps the biggest, boldest, most daring change I've ever committed to trunk. Forgive me in advance any disruption this may cause, and please, report any problems via the bugtracker. The upside is that this can speed up large dialplans by 20 times (or more). Context, extension, and priority matching are all fairly constant-time searches. I introduce here my hashtables (hashtabs), and a regression for them. I would have used the ast_obj2 tables, but mine are resizeable, and don't need the object destruction capability. The hashtab stuff is well tested and stable. I introduce a data structure, a trie, for extension pattern matching, in which knowledge of all patterns is accumulated, and all matches can be found via a single traversal of the tree. This is per-context. The trie is formed on the first lookup attempt, and stored in the context for future lookups. Destruction routines are in place for hashtabs and the pattern match trie. You can see the contents of the pattern match trie by using the 'dialplan show' cli command when 'core set debug' has been done to put it in debug mode. The pattern tree traversal only traverses those parts of the tree that are interesting. It uses a scoreboard sort of approach to find the best match. The speed of the traversal is more a function of the length of the pattern than the number of patterns in the tree. The tree also contains the CID matching patterns. See the source code comments for details on how everything works. I believe the approach general enough that any issues that might come up involving fine points in the pattern matching algorithm, can be solved by just tweaking things. We shall see. The current pattern matcher is fairly involved, and replicating every nuance of it is difficult. If you find and report problems, I will try to resolve than as quickly as I can. The trie and hashtabs are added to the existing context and exten structs, and none of the old machinery has been removed for the sake of the multitude of functions that use them. In the future, we can (maybe) weed out the linked lists and save some space.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89129 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09 16:00:22 +00:00
kpfleming a45a413db3 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08 05:28:47 +00:00
russell f855ea037a Print out the channel name as a prefix to the "agi debug" output. This makes
AGI debugging on busy systems much easier.

(closes issue #10730)
Reported by: junky
Patches: 
      agi_debug_chan.diff uploaded by junky (license 177)
	  20070923_10730.diff uploaded by mvanbaak (license 7)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89074 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07 00:00:38 +00:00
tilghman 4b2fc9d3e7 Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits.
 - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution.
   (This doesn't affect anything immediately, until another codec has wb support.)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89071 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 22:51:48 +00:00
tilghman c0f25b1bf2 Merged revisions 89045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89045 | tilghman | 2007-11-06 13:09:06 -0600 (Tue, 06 Nov 2007) | 2 lines

We went to the trouble of creating a method of tracking failed trylocks, then never turned it on (oops).

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89049 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:16:02 +00:00
oej beb1ba7813 Additional TDD changes (preparing for SIP changes - adding TDD support to SIP)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89048 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:10:26 +00:00
qwell f20cdcdc59 Allow gtalk and jingle to use TLS connections again.
Closes issue #9972


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89041 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 18:44:19 +00:00
tilghman f1e53779f1 Set up detection of IP_PKTINFO in autoconf for chan_unistim
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88973 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 15:01:56 +00:00
russell f36c90c199 Merged revisions 88805 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88805 | russell | 2007-11-05 16:07:54 -0600 (Mon, 05 Nov 2007) | 12 lines

After seeing crashes related to channel variables, I went looking around at the
ways that channel variables are handled.  In general, they were not handled in
a thread-safe way.  The channel _must_ be locked when reading or writing from/to
the channel variable list.

What I have done to improve this situation is to make pbx_builtin_setvar_helper()
and friends lock the channel when doing their thing.  Asterisk API calls almost 
all lock the channel for you as necessary, but this family of functions did not.

(closes issue #10923, reported by atis)
(closes issue #11159, reported by 850t)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88934 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 14:08:54 +00:00
russell fe4629867d Merged revisions 88931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88931 | russell | 2007-11-06 07:50:15 -0600 (Tue, 06 Nov 2007) | 8 lines

Remove some checks to see if locks are initialized from the non-DEBUG_THREADS
versions of the lock routines.  These are incorrect for a number of reasons:
 - It breaks the build on mac.
 - If there is a problem with locks not getting initialized, then the proper
   fix is to find that place and fix the code so that it does get initialized.
 - If additional debug code is needed to help find the problem areas, then this
   type of things should _only_ be put in the DEBUG_THREADS wrappers.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88932 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 13:57:16 +00:00
kpfleming a5b8bbee8f Merged revisions 88862 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88862 | kpfleming | 2007-11-05 20:52:05 -0600 (Mon, 05 Nov 2007) | 2 lines

update comment to match the state of the code

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88863 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 02:53:13 +00:00
russell a7c35f1073 Merged revisions 88719 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88719 | russell | 2007-11-05 14:40:01 -0600 (Mon, 05 Nov 2007) | 7 lines

Merge changes from asterisk/team/kpfleming/SRV-priority-handling

Previously, the SRV record support in Asterisk was broken.  There was no
guarantee on what record Asterisk would choose to actually use.  This set of
changes improves the situation by ensuring that Asterisk will choose the
highest priority record.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88740 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-05 20:44:05 +00:00
rizzo 5c6adf7951 Simplify the implementation and the API for stringfields;
details and examples are in include/asterisk/stringfields.h.

Not applicable to older branches except for 1.4 which will
receive a fix for the routines that free memory pools.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88454 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-04 19:44:31 +00:00
tilghman bad99f6a2a Add pbx_lua as a method of doing extensions
Reported by: mnicholson
Patch by: mnicholson
Closes issue #11140


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88250 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02 15:36:34 +00:00
tilghman 991e435f45 Merged revisions 88210 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88210 | tilghman | 2007-11-02 08:03:03 -0500 (Fri, 02 Nov 2007) | 5 lines

Fix build on Solaris
Reported by: snuffy
Patch by: ys
Closes issue #11143

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88211 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02 13:10:29 +00:00
qwell 8af80a59de Remove traces of gnutls, since we no longer use/need it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88184 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 23:26:51 +00:00
murf 47c8ea00b8 This commits the performance mods that give the priority processing engine in the pbx, a 25-30% speed boost. The two updates used, are, first, to merge the ast_exists_extension() and the ast_spawn_extension() where they are called sequentially in a loop in the code, into a slightly upgraded version of ast_spawn_extension(), with a few extra args; and, second, I modified the substitute_variables_helper_full, so it zeroes out the byte after the evaluated string instead of demanding you pre-zero the buffer; I also went thru the code and removed the code that zeroed this buffer before every call to the substitute_variables_helper_full. The first fix provides about a 9% speedup, and the second the rest. These figures come from the 'PIPS' benchmark I describe in blogs, conf. reports, etc.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 22:26:51 +00:00
qwell 0468ce965b Switch res_jabber to use openssl rather than gnutls.
Closes issue #9972, patch by phsultan.  Copied from branch at http://svn.digium.com/svn/asterisk/team/phsultan/res_jabber-openssl/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 22:10:33 +00:00
file cb916384a2 Remove old whisper remnants from channel.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87815 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-31 16:07:50 +00:00
tilghman f74129bc6e Merged revisions 87739 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87739 | tilghman | 2007-10-30 18:02:22 -0500 (Tue, 30 Oct 2007) | 5 lines

Fix for uninitialized mutexes on *BSD
Reported by: ys
Fixed by: ys
Closes issue #11116

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87740 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-30 23:08:59 +00:00
russell 525cd3a0d9 Merged revisions 87396 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87396 | russell | 2007-10-29 15:22:07 -0500 (Mon, 29 Oct 2007) | 5 lines

Add some more details to the output of "core show locks".  When a thread
is waiting for a lock, this will now show the details about who currently
has it locked.
(inspired by issue #11100)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87397 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29 20:24:47 +00:00
file cbbce6c578 Add autoconf checks for extra suppserv definitions that are not present in releases yet. chan_misdn should now build against the latest release.
(closes issue #11103)
Reported by: IgorG


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87325 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29 16:34:45 +00:00
murf 15b76d347e Merged revisions 87168 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87168 | murf | 2007-10-26 10:34:02 -0600 (Fri, 26 Oct 2007) | 1 line

closes issue #11086 where a user complains that references to following contexts report a problem; The problem was REALLy that he was referring to empty contexts, which were being ignored. Reporter stated that empty contexts should be OK. I checked it out against extensions.conf, and sure enough, empty contexts ARE ok. So, I removed the restriction from AEL. This, though, highlighted a problem with multiple contexts of the same name. This should be OK, also. So, I added the extend keyword to AEL, and it can preceed the 'context' keyword (mixed with 'abstract', if nec.). This will turn off the warnings in AEL if the same context name is used 2 or more times. Also, I now call ast_context_find_or_create for contexts now, instead of just ast_context_create; I did this because pbx_config does this. The 'extend' keyword thus becomes a statement of intent. AEL can now duplicate the behavior of pbx_config,
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87187 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26 17:39:39 +00:00
tilghman 1c1252b9de Use the same delimited character as the FILTER function in FIELDQTY and CUT.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87103 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26 00:11:31 +00:00
kpfleming daac309efb Merged revisions 87069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87069 | kpfleming | 2007-10-25 18:03:11 -0500 (Thu, 25 Oct 2007) | 2 lines

appending one list to another should leave the first list empty, and not require the user to do that

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87070 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-25 23:11:28 +00:00
russell e7eeedfe90 Merged revisions 86836 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86836 | russell | 2007-10-22 16:36:12 -0500 (Mon, 22 Oct 2007) | 9 lines

If lock tracking is not enabled, then we can not attempt to log any mutex
failures.  If so, we could end up in infinite recursion.  The only lock that
is affected by this is a mutex in astmm.c used when MALLOC_DEBUG is enabled.

(closes issue #11044)
Reported by: ys
Patches:
      lock.h.diff uploaded by ys (license 281)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86839 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 21:37:58 +00:00
qwell 7756b987a0 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 20:05:18 +00:00
russell 0d496aa19a Merged revisions 86726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86726 | russell | 2007-10-22 10:43:30 -0500 (Mon, 22 Oct 2007) | 4 lines

Update the static mutex initializer to include the initialization of
the internal mutex used to protect the lock debugging data.
(closes issue #11044, patch suggested by Ivan)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86734 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 15:45:04 +00:00
russell 9cac9bf42a Merged revisions 85532 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85532 | russell | 2007-10-13 00:24:33 -0500 (Sat, 13 Oct 2007) | 8 lines

Properly handle the case where read() may return the text for more than one
CLI command at once for a remote console.

(closes issue #10888)
Reported by: jamesgolovich
Patches: 
      asterisk-climultiple.diff.txt uploaded by jamesgolovich (license 176)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86585 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-21 22:52:20 +00:00