Kevin P. Fleming [Thu, 24 Jan 2008 00:04:35 +0000 (00:04 +0000)]
fix flag bit definitions to make code from issue #11049 actually work; along the way, clarify comments and add some dummy flag definitions for other multi-bit flags to hopefully stop this from happening in the future
Russell Bryant [Wed, 23 Jan 2008 17:48:08 +0000 (17:48 +0000)]
Merged revisions 99923 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r99923 | russell | 2008-01-23 11:46:55 -0600 (Wed, 23 Jan 2008) | 8 lines
ChanSpy issues a beep when it starts at the beginning of a list of channels to
potentially spy on. However, if there were no matching channels, it would beep
at you over and over, which is pretty annoying. Now, it will only beep once in
the case that there are no channels to spy on, but it will still beep again once
it reaches the beginning of the channel list again.
When we reset the password via an external command, we should also reset the
password stored in the in-memory list, too (otherwise it doesn't really take
effect).
(closes issue #11809)
Reported by: davetroy
Patches:
fix_externpass.diff uploaded by davetroy (license 384)
Thanks to Russell's education I realize that BUFSIZ has changed since I learned the C language
over 20 years ago... Resetting chan_sip to the size of BUFSIZ that I expected in my old
head to avoid too heavy memory allocations on some systems.
Ensure that we can get an address even when we don't have a default route.
(closes issue #9225)
Reported by: junky
Patches:
20080122__bug9225.diff.txt uploaded by Corydon76 (license 14)
Tested by: oej, loloski, sergee
Fixing an issue wherein monitoring local channels was not possible. During a channel
masquerade, the monitors on the two channels involved are swapped. In 99% of the cases
this results in the desired effect. However, if monitoring a local channel, this caused
the monitor which was on the local channel to get moved onto a channel which is immediately
hung up after the masquerade has completed. By swapping the monitors prior to the masquerade,
we avoid the problem by tricking the masquerade into placing the monitor back onto the channel
where we want it.
During the investigation of the issue, the channel's monitor was the only thing that was swapped
in such a manner which did not make sense to have done. All other variable swapping made sense.
Permit the user to specify number of seconds that a connection may remain idle,
which fixes a crash on reconnect with the MyODBC driver.
(closes issue #11798)
Reported by: Corydon76
Patches:
20080119__res_odbc__idlecheck.diff.txt uploaded by Corydon76 (license 14)
Tested by: mvanbaak
Russell Bryant [Sun, 20 Jan 2008 07:28:23 +0000 (07:28 +0000)]
Add a "console active" CLI command, which lets you find out which console device
is currently active for the Asterisk CLI, or to set it. Also, knock multiple device
support off of the to-do list.
Russell Bryant [Sun, 20 Jan 2008 06:11:49 +0000 (06:11 +0000)]
Merge changes from team/russell/console_devices
- Add support for multiple devices. All devices are configured in console.conf.
- Add "console list devices" CLI command to show configured devices. Also, changed
the old "list devices" to be "list available", which queries PortAudio for all
audio devices that are available for use.
Russell Bryant [Sat, 19 Jan 2008 10:06:02 +0000 (10:06 +0000)]
Merged revisions 99187 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r99187 | russell | 2008-01-19 04:05:27 -0600 (Sat, 19 Jan 2008) | 4 lines
Fix a couple of memory leaks with frame handling. Specifically,
ast_frame_free() needed to be called on the frame that came from the translator
to signed linear.
Russell Bryant [Fri, 18 Jan 2008 22:04:33 +0000 (22:04 +0000)]
Merge changes from team/group/sip-tcptls
This set of changes introduces TCP and TLS support for chan_sip. There are various
new options in configs/sip.conf.sample that are used to enable these features. Also,
there is a document, doc/siptls.txt that describes some things in more detail.
This code was implemented by Brett Bryant and James Golovich. It was reviewed
by Joshua Colp and myself. A number of other people participated in the testing
of this code, but since it was done outside of the bug tracker, I do not have their
names. If you were one of them, thanks a lot for the help!
(closes issue #4903, but with completely different code that what exists there.)
Russell Bryant [Fri, 18 Jan 2008 21:38:01 +0000 (21:38 +0000)]
Merged revisions 99081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r99081 | russell | 2008-01-18 15:37:21 -0600 (Fri, 18 Jan 2008) | 9 lines
Revert adding the packed attribute, as it really doesn't make sense why that
would do any good. Fix the real bug, which is to do the check to see if the
frame came from a translator at the beginning of ast_frame_free(), instead of
at the end. This ensures that it always gets checked, even if none of the
parts of the frame are malloc'd, and also ensures that we aren't looking at
free'd memory in the case that it is a malloc'd frame.
(closes issue #11792, reported by explidous, patched by me)
Russell Bryant [Fri, 18 Jan 2008 21:24:05 +0000 (21:24 +0000)]
Merged revisions 99079 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r99079 | russell | 2008-01-18 15:22:21 -0600 (Fri, 18 Jan 2008) | 4 lines
Since we're relying on the offset between the frame and the beginning of the translator
pvt struct, set the packed attribute to make sure we get to the right place.
(potential fix for issue #11792)
Terry Wilson [Fri, 18 Jan 2008 16:58:50 +0000 (16:58 +0000)]
This should at least temporarily fix a problem where the 't' Dial
option is incorrectly passed to the transferee when built-in
attended transfers are used. There is still a problem with 'T',
but better to fix some problems than no problems while we work
on it.
Tilghman Lesher [Fri, 18 Jan 2008 06:52:18 +0000 (06:52 +0000)]
Permit username and password to be NULL (which enables pass-through from the layer above).
Reported by: lurcher
Patch by: tilghman
(Closes issue #11739)
Russell Bryant [Thu, 17 Jan 2008 22:50:13 +0000 (22:50 +0000)]
Merged revisions 99004 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r99004 | russell | 2008-01-17 16:37:22 -0600 (Thu, 17 Jan 2008) | 10 lines
Have IAX2 optimize the codec translation path just like chan_sip does it. If
the caller's codec is in our codec list, move it to the top to avoid transcoding.
Mark Michelson [Thu, 17 Jan 2008 16:26:41 +0000 (16:26 +0000)]
Get the device state of the state interface instead of the interface when creating a new queue member.
Thanks to Atis Lezdins for bringing this up on the Asterisk-Dev mailing list.
Terry Wilson [Thu, 17 Jan 2008 03:09:32 +0000 (03:09 +0000)]
Update res_phoneprov to default to setting the SERVER variable to the IP
the HTTP request for the config came in on and the SERVER_PORT to the
bindport setting in sip.conf. I've left in the ability to override these
options, because I can't always guess how someone might decide to do something
weird with what is available to them--although needing to is pretty unlikely.
Documentation was updated to reflect preference for not setting serveraddr,
serveriface, or serverport. Tested on Linux and OS X.
Tilghman Lesher [Thu, 17 Jan 2008 00:13:32 +0000 (00:13 +0000)]
Change the way the new filter feature works, by allowing it to be a column NOT
logged into the database. This will allow more granularity of a decision
evaluated in the dialplan, then takes effect when posting the CDR.
Russell Bryant [Thu, 17 Jan 2008 00:05:13 +0000 (00:05 +0000)]
Add support for an easy way to automatically execute some Asterisk CLI commands
immediately at startup. Any commands in the startup_commands file in the Asterisk
config diretory will get executed.
(closes issue #11781)
Reported by: jamesgolovich
Patches:
asterisk-startupcmds.diff.txt uploaded by jamesgolovich (license 176)
-- With some changes by me.
Russell Bryant [Wed, 16 Jan 2008 22:36:47 +0000 (22:36 +0000)]
Blocked revisions 98982 via svnmerge
........
r98982 | russell | 2008-01-16 16:36:24 -0600 (Wed, 16 Jan 2008) | 5 lines
Add an unused pointer to the ast_channel struct. This makes the ast_channel structure
retain the same size as it had in previous 1.4 releases. Also, all of the offsets for
members in the structure are still the same (except for the two pointers that got replaced
for the new spy/whisper architecture.)
Russell Bryant [Wed, 16 Jan 2008 21:53:10 +0000 (21:53 +0000)]
Merge the changes from issue #10665 from the team/group/sip_session_timers branch.
This set of changes introduces SIP session timers support (RFC 4028). In short,
this prevents stuck SIP sessions that were not properly torn down due to network
or endpoint failures during an established SIP session.
To quote some of the documentation supplied with the patch:
"The SIP Session-Timers is an extension of the SIP protocol that allows end-points and proxies to
refresh a session periodically. The sessions are kept alive by sending a RE-INVITE or UPDATE
request at a negotiated interval. If a session refresh fails then all the entities that support Session-
Timers clear their internal session state. In addition, UAs generate a BYE request in order to clear
the state in the proxies and the remote UA (this is done for the benefit of SIP entities in the path
that do not support Session-Timers)."
(closes issue #10665)
Reported by: rjain
Patches:
chan_sip.c.1.diff uploaded by rjain (license 226)
chan_sip.c.diff uploaded by rjain (license 226)
sip.conf.sample.diff uploaded by rjain (license 226)
proc_422_rsp_comment.diff uploaded by rjain (license 226)
chan_sip.c.cache.diff uploaded by rjain (license 226)
chan_sip.memalloc uploaded by rjain (license 226)
chan_sip.memalloc.bugfix uploaded by rjain (license 226)
Patches tracked in team/group/sip_session_timers, with some additional fixes
by russell and oej.
Fix a deadlock in chan_local in local_hangup. There was contention because
the local_pvt was held and it was attempting to lock a channel, which is the
incorrect locking order.
Introduce a lock into the dialing API that protects it when destroying the structure.
(closes issue #11687)
Reported by: callguy
Patches:
11687.diff uploaded by file (license 11)
Don't drop the old record route information when dealing with packets related to a reinvite.
(closes issue #11545)
Reported by: kebl0155
Patches:
reinvite-patch.txt uploaded by kebl0155 (license 356)
Joshua Colp [Wed, 16 Jan 2008 02:30:13 +0000 (02:30 +0000)]
Remove DNS lookup from sip_devicestate. This seems to come from way back when and I can't think of a reason for it being here, plus it could cause needless DNS lookups.
(closes issue #10983)
Reported by: jtodd
Add autoconf logic for speexdsp. Later versions use a separate library for some things so we need to use it if present in codec_speex.
(closes issue #11693)
Reported by: yzg
Russell Bryant [Tue, 15 Jan 2008 23:53:28 +0000 (23:53 +0000)]
Merged revisions 98946 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r98946 | russell | 2008-01-15 17:50:10 -0600 (Tue, 15 Jan 2008) | 11 lines
Change a buffer in check_auth() to be a thread local dynamically allocated
buffer, instead of a massive buffer on the stack. This fixes a crash reported
by Qwell due to running out of stack space when building with LOW_MEMORY defined.
On a very related note, the usage of BUFSIZ in various places in chan_sip is
arbitrary and careless. BUFSIZ is a system specific define. On my machine,
it is 8192, but by definition (according to google) could be as small as 256.
So, this buffer in check_auth was 16 kB. We don't even support SIP messages
larger than 4 kB! Further usage of this define should be avoided, unless it
is used in the proper context.
Russell Bryant [Tue, 15 Jan 2008 23:31:53 +0000 (23:31 +0000)]
Merged revisions 98943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r98943 | russell | 2008-01-15 17:26:52 -0600 (Tue, 15 Jan 2008) | 25 lines
Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.
The issue here is that it is possible for an instance of a translator to get
destroyed while the frame allocated as a part of the translator is still being
processed. Specifically, this is possible anywhere between a call to ast_read()
and ast_frame_free(), which is _a lot_ of places in the code. The reason this
happens is that the channel might get masqueraded during this time. During a
masquerade, existing translation paths get destroyed.
So, this patch fixes the issue in an API and ABI compatible way. (This one is
for you, paravoid!)
It changes an int in ast_frame to be used as flag bits. The 1 bit is still used
to indicate that the frame contains timing information. Also, a second flag has
been added to indicate that the frame came from a translator. When a frame with
this flag gets released and has this flag, a function is called in translate.c to
let it know that this frame is doing being processed. At this point, the flag gets
cleared. Also, if the translator was requested to be destroyed while its internal
frame still had this flag set, its destruction has been deffered until it finds out
that the frame is no longer being processed.
Admittedly, this feels like a hack. But, it does fix the issue, and I was not able
to think of a better solution ...