another checkpoint... chan_zap can now use the new ZT_ECHOCAN_PARAMS ioctl if it is present, but doesn't parse any supplied parameters yet
(this implementation is not very memory efficient as the parameters and their values will be duplicated for each channel that has the same settings, but we can worry about that later once it is working)
Allocate a SIP refer structure when performing a transfer using BYE with Also so that the transfer information is properly stored. (AST-2008-001)
(closes issue #11637)
Reported by: greyvoip
Mark Michelson [Wed, 2 Jan 2008 20:23:23 +0000 (20:23 +0000)]
Since ',' is the standard argument separator in trunk, change app_queue
to use AST_STANDARD_APP_ARGS instead of AST_NONSTANDARD_APP_ARGS for determining
member data.
improve AC_C_DEFINE_CHECK to not try to evaluate the macro being checked for, but just check for its existence
finish implementation of check for Zaptel HWGAIN support
add check for Zaptel ECHOCANCEL_PARAMS support
and now just to keep the libresample party going... if the functions from libresample are going to be in the main Asterisk binary, it makes sense for the header that defines them to be available without any special CFLAGS and to out-of-tree modules building against /usr/include/asterisk
umm... this did not compile on x86-64, and could not possibly have worked on any platform as it was passing string pointers to a function expecting ints
A change to improve the accuracy of queue logging in the case where a member does not
answer during the specified timeout period. Prior to this change, there was a small chance
that the member name recorded in this case would be blank. Also prior to this change, if using
the ringall strategy, if no one answered the call during the specified timeout, the member name
listed in the queue log would randomly be one of the members that was rung.
(closes issue #11498, reported and tested by hloubser, patched by me)
Russell Bryant [Wed, 2 Jan 2008 16:20:26 +0000 (16:20 +0000)]
For some odd reason, the last set of libresample build changes from Kevin did
not work for everyone, but it did for some. This set of changes makes trunk
start again for those having problems. Instead of building libresample as a
static library, it just links the object files in directly with the asterisk
binary.
actually check for a function present in libiconv (don't know how this test could have worked before) and don't do the check on Linux/GNU systems because libiconv is not present there and attempting to link with '-liconv' always fails (it's not necessary as the iconv functionality is always available)
go back to including libresample in the main Asterisk binary, but this time including a small hack to ensure that it does get linked in (and also modify the strip_nonapi script to leave the resample_<foo> symbols alone)
Philippe Sultan [Wed, 2 Jan 2008 11:34:26 +0000 (11:34 +0000)]
Set stream flags to zero upon initialization.
When the XMPP over TLS/SSL connection resets for some reason, it is
wrongly believed as being secured, which makes the re-connection
process endlessly fail. This was reported by mvanbaak in issue #11644.
Luigi Rizzo [Wed, 2 Jan 2008 09:16:17 +0000 (09:16 +0000)]
some cleanup of this code while I am trying to debug a problem with
gdb dying while debugging asterisk. The problem seems to be related
with a race in the handling of module_list, which in turn is triggeded
by calling dlopen() on a system which uses initializers to create
locks.
Russell Bryant [Wed, 2 Jan 2008 01:00:44 +0000 (01:00 +0000)]
Instead of linking libresample into the main Asterisk binary, build it as
res_resample, and mark codec_resample as dependent upon res_resample. This
prevents the linker from optimizing away libresample, and also makes it so the
libresample code isn't linked in to multiple places. (I have another module
in a branch that needs it, too.)
Joshua Colp [Tue, 1 Jan 2008 23:09:32 +0000 (23:09 +0000)]
Fix building of codec_resample on platforms other then Cygwin. On everything else it actually gets built after codec_resample, so you can't exactly link it in since it doesn't exist.
Luigi Rizzo [Tue, 1 Jan 2008 22:21:39 +0000 (22:21 +0000)]
make codec_resample build on __CYGWIN__, and make it load on FreeBSD
(and probably other systems as well).
Both need libresample.a to be specified in the linking phase,
and cygwin needs <float.h> as other BSD.
The checks for OS-specific headers should really be moved to some
common header though.
Luigi Rizzo [Tue, 1 Jan 2008 22:08:32 +0000 (22:08 +0000)]
implement "configure" checks for libiconv, and add the
iconv dependency for func_iconv.
This fixes some build issues on CYGWIN and FreeBSD and probably
other platforms where libiconv is not there by default
Avoiding a potentially bad locking situation. ast_merge_contexts_and_delete writelocks the conlock, then
calls ast_hint_extension, which attempts to readlock the same lock. Recursion with read-write locks is
dangerous, so the inner lock needs to be removed. I did this by copying the "guts" of ast_hint_extension
into ast_merge_contexts_and_delete (sans the extra lock).
(this change is inspired by the locking problems seen in issue #11080, but I have no idea if this is the
problematic area experienced by the reporters of that issue)
Russell Bryant [Mon, 31 Dec 2007 21:33:45 +0000 (21:33 +0000)]
Update chan_console to natively use a 16 kHz sample rate. If it is talking
to an 8 kHz endpoint, then codec_resample will automatically be used to properly
resample the audio before sending it to/from chan_console.
Russell Bryant [Mon, 31 Dec 2007 21:22:31 +0000 (21:22 +0000)]
Merge changes from team/russell/codec_resample
This commit imports libresample for use in Asterisk. It also adds a new codec
module, codec_resample. This module uses libresample to re-sample signed linear
audio between 8 kHz and 16 kHz.
It also provides an alternative for converting between 16 kHz G.722 and 8 kHz
signed linear when using G.722, which will likely be useful as some people have
complained about volume issues when the current codec_g722 converts to 8 kHz
signed linear. But, to test this, you will have to disable the g722-to-slin and
g722-to-slin16 translators in codec_g722.c.
Russell Bryant [Mon, 31 Dec 2007 16:13:26 +0000 (16:13 +0000)]
Merge the main set of changes from team/russell/chan_console.
Add a new console channel driver, chan_console, which is a console channel
driver that uses portaudio as a cross platform audio interface. It was written
to provide a console channel driver that works with Mac CoreAudio, but it
supports a number of other audio interfaces, as well, including OSS and ALSA.
It could one day be the single console channel driver, but does not yet have
as many features as chan_oss.
Luigi Rizzo [Sat, 29 Dec 2007 02:02:03 +0000 (02:02 +0000)]
Move grabbers definitions to a separate file, vgrabbers.c, so it is easier
to add more entries. This required moving struct grab_desc to the common
header, and adding an entry in the Makefile.
On passing, cleanup some comments and file headers (some are still missing).
Luigi Rizzo [Fri, 28 Dec 2007 23:15:11 +0000 (23:15 +0000)]
Add a few entries up to 1408x1152 in the table of known video resolutions.
This makes it very convenient to enlarge images using the right-click
on the video window.
Mark Michelson [Fri, 28 Dec 2007 18:39:29 +0000 (18:39 +0000)]
The diff for this change looks really bad, but all I did here was decrease the indentation of most
of the queue_exec function by reversing the logic of an if statement. This change makes the function
comply better with the coding guidelines. Since this change is purely a cosmetic change to the code, I am
only committing the change to trunk.
Mark Michelson [Fri, 28 Dec 2007 16:12:06 +0000 (16:12 +0000)]
Some changes to app_amd.
The channel name is printed in verbose messages
maximumWordLength option added.
Duration of words that do not meet the minimum word duration will be logged
The duration of pre-greeting silence will be logged
Only consider us in the greeting if we actually detected a valid word duration.
(closes issue #11650, reported and patched by davevg)
I found a bug while browsing the queue code and managed to reproduce it in a small setup.
If a queue uses the ringall strategy, it was possible through unfortunate coincidence for a single member at a given penalty level to
make app_queue think that all members at that penalty level were unavailable and cause the members at the
next penalty level to be rung. With this patch, we will only move to the next penalty level if ALL the members
at a given penalty level are unreachable.
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)