Include types.h in chan_h323 as without it it can not be compiled on some operating systems like FreeBSD to name one.
(closes issue #11585)
Reported by: sobomax
Patches:
chan_h323.c.diff uploaded by sobomax (license 359)
Use ast_strlen_zero to see if our_contact is set or not on the dialog. It is possible for it to be a pointer to NULL.
(closes issue #11557)
Reported by: FuriousGeorge
Russell Bryant [Thu, 27 Dec 2007 16:11:41 +0000 (16:11 +0000)]
I went looking for where we downloaded the g722 implementation and came across
these two links. So, I'm adding them so they are available for reference later.
Russell Bryant [Thu, 27 Dec 2007 15:17:31 +0000 (15:17 +0000)]
Blocked revisions 94831 via svnmerge
........
r94831 | russell | 2007-12-27 09:16:56 -0600 (Thu, 27 Dec 2007) | 5 lines
Now that the contexts lock is a read/write lock, it should not be locked here
in ast_hint_state_changed(). This makes it get locked recursively which now
causes a deadlock.
(closes issue #11080, thanks to callguy for the access to a deadlocked machine)
Russell Bryant [Thu, 27 Dec 2007 14:52:07 +0000 (14:52 +0000)]
Merged revisions 94828-94829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r94828 | russell | 2007-12-27 08:33:21 -0600 (Thu, 27 Dec 2007) | 9 lines
Change ast_translator_best_choice() to only pay attention to audio formats.
This fixes a problem where Asterisk claims that a translation path can not be
found for channels involving video.
(closes issue #11638)
Reported by: cwhuang
Tested by: cwhuang
Patch suggested by cwhuang, with some additional changes by me.
........
r94829 | russell | 2007-12-27 08:44:29 -0600 (Thu, 27 Dec 2007) | 2 lines
Use the constant that I really meant to use here ...
Luigi Rizzo [Thu, 27 Dec 2007 00:21:02 +0000 (00:21 +0000)]
Enable building the code even if SDL is not present (similarly,
SDL is also detected at runtime).
Now we should be able to stream video even without a rendering device
(useful for remote monitoring).
Luigi Rizzo [Wed, 26 Dec 2007 23:00:29 +0000 (23:00 +0000)]
use fread instead of mmap to read in the comment area from the keypad.
fread is simpler and more portable, and there is no performance gain
in using mmap.
Tilghman Lesher [Wed, 26 Dec 2007 22:38:02 +0000 (22:38 +0000)]
Allow more spans than 32. Also, rearrange compiler flags so the most often
used flags appear closer to the top.
Reported by: tzafrir
Patch by: tzafrir,tilghman
(Closes issue #11528)
Workaround for what is probably a glibc bug (but we'll see this crop up again
and again, if we don't add the workaround).
Reported by: rolek
Patch by: tilghman
(Closes issue #11601, closes issue #11426)
Russell Bryant [Wed, 26 Dec 2007 19:09:17 +0000 (19:09 +0000)]
Merged revisions 94801 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r94801 | russell | 2007-12-26 13:04:31 -0600 (Wed, 26 Dec 2007) | 4 lines
Just in case the AST_FLAG_END_DTMF_ONLY flag was already set before starting
autoservice, remember it and ensure that the channel has the same setting when
autoservice gets stopped. (pointed out by d1mas, patched up by me)
Russell Bryant [Wed, 26 Dec 2007 18:47:52 +0000 (18:47 +0000)]
Merged revisions 94797 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r94797 | russell | 2007-12-26 12:46:39 -0600 (Wed, 26 Dec 2007) | 4 lines
When a channel is in autoservice, mark a flag on the channel that says that
we only care about the END of a digit. That way, no magic digit emulation stuff
will happen when all we're doing is queueing up END frames.
Russell Bryant [Wed, 26 Dec 2007 17:07:55 +0000 (17:07 +0000)]
Merged revisions 94789 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r94789 | russell | 2007-12-26 11:00:03 -0600 (Wed, 26 Dec 2007) | 5 lines
List include/asterisk/version.h as a .PHONY target because we want the commands
listed for this target to be executed regardless of whether the file exists or
not. This fixes having the version not up to date when running from svn.
(closes issue #11619, reported by plack, fixed by me)
Russell Bryant [Wed, 26 Dec 2007 17:07:12 +0000 (17:07 +0000)]
Merged revisions 94790 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r94790 | russell | 2007-12-26 11:06:26 -0600 (Wed, 26 Dec 2007) | 5 lines
Don't store DTMF BEGIN frames while a channel is in autoservice. It's just
going to make ast_read() do a lot of extra work when the channel comes back
out of autoservice.
(closes issue #11628, patched by me)
Russell Bryant [Wed, 26 Dec 2007 16:51:16 +0000 (16:51 +0000)]
Fix a bug in peer handling that caused multiple instances of a peer to end up
in the peers container after a reload. Somehow, this bug doesn't exist in 1.4 ...
(closes issue #11626)
(reported by pnlarsson, additional info from mvanbaak, fixed by me)
Luigi Rizzo [Wed, 26 Dec 2007 10:14:11 +0000 (10:14 +0000)]
Split console_video.c so that video codecs and gui functions
are in separate files (still #include'd because of tangling in the data
structures, but this is going to be cleaned up).
The video grabbing functions still need to be moved to a separate file.
Race: we need to wait to queue a NewChannel event until after the channel is
inserted into the channel list. The reason is because some manager users
immediately queue requests from the channel when they see that event and are
confused when Asterisk reports no such channel. (Closes issue #11632)
Luigi Rizzo [Sun, 23 Dec 2007 14:34:17 +0000 (14:34 +0000)]
move reading info from the keypad to a separate function.
Remove an unused keypad field and some debugging messages.
Adjust formatting on config file parsing
Luigi Rizzo [Sat, 22 Dec 2007 22:44:31 +0000 (22:44 +0000)]
Change the name of config file entries for keypad regions
from 'keypad_entry' to 'region'. Fix the example file accordingly.
Also make some fixes in the code do reset entries on reload of the keypad.
The recently committed kpad2.jpg has the correct names.
Luigi Rizzo [Sat, 22 Dec 2007 18:28:40 +0000 (18:28 +0000)]
Build console_video support by linking in, as opposed to including,
console_video.c
This will ease the task of splitting console_video.c into its components
(V4L and X11 grabbers, various video codecs and packetizers, SDL),
as well as ease future extensions (e.g. additional video sources,
codecs and rendering engines).
For the time being nothing changes for users: video support is off by
default, and requires -DHAVE_VIDEO_CONSOLE on the command line to be included
(if SDL and FFMPEG are available).
Mark Michelson [Fri, 21 Dec 2007 21:19:19 +0000 (21:19 +0000)]
Something I've been itching to do for a while now. A minor optimization in app_voicemail.
Since the dtable in base_encode always gets populated with the same values every time and never
changes, make it static and const and only initialize it once. Also, there's no reason to
define BASEMAXINLINE twice, so remove the redundant #define.
Jason Parker [Fri, 21 Dec 2007 20:12:50 +0000 (20:12 +0000)]
codecs.conf really shouldn't be mandatory.. it never had been before, so let's go back to being optional.
A big "thank you" to pnlarsson on IRC for allowing me access to his system to debug this.
Mark Michelson [Fri, 21 Dec 2007 01:14:32 +0000 (01:14 +0000)]
Moved the update of the queue_ent's rule list to just before we try to call
queue members. This allows for the change in penalty levels to be executed at
the most logical time frame.
Mark Michelson [Fri, 21 Dec 2007 00:44:17 +0000 (00:44 +0000)]
Merging the queue-penalty branch. In short, this allows one to dynamically adjust
the QUEUE_MAX_PENALTY and the newly introduced QUEUE_MIN_PENALTY during a call depending
on the amount of time passed. The purpose is to allow the call to open up to more (or maybe
just different) members without the caller's losing his place in the queue. See
configs/queuerules.conf.sample for an example of how to set up queue rules and configs/queues.conf.sample
for how to associate a rule with a queue.
Along with the functional changes, new CLI and manager commands exist to show the rules defined and
there is an additional CLI command to reload the queue rules.
Future enhancements that may be made: support for realtime queue rules and support for dynamically adding
a rule through the manager or CLI. Also a manager command to reload the queue rules (I'll probably write
this myself very soon).
Mark Michelson [Thu, 20 Dec 2007 23:43:24 +0000 (23:43 +0000)]
The changes to header inclusion in trunk broke compilation of app_voicemail when using
IMAP storage. The reason is that c-client has its own definitions for LOG_WARNING
and LOG_DEBUG, so we need to be sure to include asterisk's definitions last so that
we use the proper values in app_voicemail.
(closes issue #11437, reported by blitzrage, patch suggested by blitzrage)
Russell Bryant [Thu, 20 Dec 2007 20:16:21 +0000 (20:16 +0000)]
Merged revisions 94251 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r94251 | russell | 2007-12-20 14:08:42 -0600 (Thu, 20 Dec 2007) | 10 lines
Fix a deadlock in d-channel handling in chan_zap.
This deadlock was introduced by the fix to ensure that channels are properly
locked when handling channel variables. There were sections of this code where
the channel pvt was locked before the channel lock, when in fact it _must_ be
the other way around.
Luigi Rizzo [Thu, 20 Dec 2007 12:56:07 +0000 (12:56 +0000)]
add some macros to simplify parsing the config file,
see description in config.h .
They are a variant of the set of macros i used in chan_oss.c,
structured in a way to be more robust to the presence of
spurious ';' - basically, they define wrappers for 'do {'
and '} while (0)', plus some helper functions to deal with simple
cases such as ast_copy_string, ast_malloc, strtoul, ast_true ...
The prefix (CV_ as 'Config Variable') tries to be easy to remember
and has been chosen to not conflict with other existing macros in the tree.
For the time being, I have only updated the three source files in the
tree that used the old M_* macros. Hopefully, more files will be
converted.
NOTE:
I understand that inventing my own dialect of C is generally wrong;
however, the lack of adequate support in the language encourages
lazy programming practices (such as ignoring errors, bounds, etc.)
and this increases the chance of vulnerability in the code, especially
because we are parsing user input here.
Hopefully, these macros and the use of ast_parse_arg (in config.h)
should encourage the programmer to write more robust code.
Luigi Rizzo [Thu, 20 Dec 2007 09:55:05 +0000 (09:55 +0000)]
modify http://svn.digium.com/view/asterisk?view=rev&rev=93603
so that paths and filename are writable by asterisk.c without
causing segfaults.
This involves defining the variables as const char *,
and having them point to as static, writable buffer
defined in asterisk.c
On passing, fix some errors in using these variables
in some files in utils/ , and in res/snmp/agent.c
which was redefining a variable without using paths.h
Mark Michelson [Wed, 19 Dec 2007 23:17:42 +0000 (23:17 +0000)]
1. Unify the check for a penalty < 0 into the set_member_penalty code.
2. Fix an error when checking the CLI command for setting a member's penalty.
3. Fix a logging error if the incorrect parameter was the queue name or interface.
(closes issue #11544, reported and patched by Laureano)
Luigi Rizzo [Wed, 19 Dec 2007 17:09:01 +0000 (17:09 +0000)]
Add a new API function, written at least twice in app_voicemail.c
and likely in other places too.
This is quite useful when placing mail/html stuff in config files.
/*!
\brief Convert some C escape sequences (\b\f\n\r\t) into the
equivalent characters.
\brief s The string to be converted (will be modified).
\return The converted string.
*/
char *ast_unescape_c(char *s);
Luigi Rizzo [Wed, 19 Dec 2007 08:57:45 +0000 (08:57 +0000)]
Properly document AST_EXT_TOOL_CHECK() and use it to check for
NETSMP and GTK (GTK is not used thoug).
AST_EXT_TOOL_CHECK() could be used for checking curl status
as well, perhaps with a small addition because we currently seem
to require a curl version greater than X.Y.Z
Add a NETSMP_INCLUDE entry in makeopts.in
We don't have yet any macros for using pkg-config to check
for a specific package (right now there is only gtk2+
in the category).
Luigi Rizzo [Wed, 19 Dec 2007 08:12:33 +0000 (08:12 +0000)]
make netsmp build under AST_DEVMODE. Description, included in the source,
is below. I should note that the PACKAGE_* macros that asterisk
defines in autoconfig.h are not used anywhere in the tree so
they should just be removed.
/*
* There is some collision collision between netsmp and asterisk names,
* causing build under AST_DEVMODE to fail.
*
* The following PACKAGE_* macros are one place.
* Also netsnmp has an improper check for HAVE_DMALLOC_H, using
* #if HAVE_DMALLOC_H instead of #ifdef HAVE_DMALLOC_H
* As a countermeasure we define it to 0, however this will fail
* when the proper check is implemented.
*/