Russell Bryant [Fri, 15 Jun 2007 15:27:34 +0000 (15:27 +0000)]
The SLATRUNK_STATUS variable indicated "SUCCESS" for both an answer of the
incoming call on the trunk, or if the trunk reached its ring timeout.
This patch changes the variable to say "RINGTIMEOUT" in that case.
(issue #9973, reported by n00dle, patch by me)
Russell Bryant [Wed, 13 Jun 2007 19:57:38 +0000 (19:57 +0000)]
Move the logic for destroying a call when no response is received to a BYE
outside of the block that checks for FLAG_FATAL to be set. This flag is only
set when the packet is transmitted with the reliability set to XMIT_CRITICAL
when the original packet is transmitted. A BYE is always sent with it set
to XMIT_RELIABLE, meaning this code could never be encountered. This resulted
in seeing some SIP channels that would never go away with the last packet
sent being a BYE.
(part of issue #9235, patch from jcmoore)
Mark Michelson [Wed, 13 Jun 2007 19:41:13 +0000 (19:41 +0000)]
Contains a patch for fixing an encoding problem when using Outlook to view voicemail emails and attachments.
This fix has also been tested on Thunderbird, Evolution, Pine, and Mutt.
(Issue 9336, reported by marwick, patched by mutterc)
Russell Bryant [Tue, 12 Jun 2007 19:40:17 +0000 (19:40 +0000)]
Fix a memory leak pointed out by prashant_jois in #asterisk-bugs. PQclear() was
not called on the result structure after doing a PQexec(). Also, fix up some
formatting in passing.
Russell Bryant [Tue, 12 Jun 2007 19:13:41 +0000 (19:13 +0000)]
In ast_channel_make_compatible(), just return if the channels' read and write
formats already match up. There are code paths that call this function on a
pair of channels multiple times. This made calls fail that were using g729
in some cases. The reason is that codec_g729a will unregister itself from the
list of available translators will all licenses are in use. So, the first
time the function got called, the right translation path was allocated.
However, the second time it got called, the code would not find a translation
path to/from g729 and make the call fail, even if the channel actually already
had a g729 translation path allocated.
Merged revisions 68732 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r68732 | crichter | 2007-06-11 18:49:00 +0200 (Mo, 11 Jun 2007) | 1 line
added check for NULL Pointer when calling misdn_new. Asterisk does not allow us to create channels anymore when stop gracefully is used :). also modified the restart_indicator to 0
........
Merged revisions 68631 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r68631 | crichter | 2007-06-11 11:18:01 +0200 (Mo, 11 Jun 2007) | 1 line
fixed problem that the dummybc chanels had no lock, checking for the lock now. Also fixed the channel restart stuff, we can now specify and restart particular channels too.
........
Don't call ast_waitstream_full when the control file descriptor and audio file descriptor are not set, simply call ast_waitstream! (issue #8530 reported by rickead2000)
Russell Bryant [Thu, 7 Jun 2007 23:14:45 +0000 (23:14 +0000)]
Merged revisions 68351 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r68351 | russell | 2007-06-07 18:13:33 -0500 (Thu, 07 Jun 2007) | 3 lines
Fix a problem where saying a character wouldn't properly break out when the caller pressed '#'
(issue #8113, reported by patbaker82, patch from jamesgolovich (hey, long time no see!) and patbaker82)
some improvements to the IAX2 full frame dropping logic recently added:
- use inaddrcmp(), since we have it
- output the type of frame and subclass being dropped, and the type/subclass that is already being processed (which caused the drop)
Russell Bryant [Thu, 7 Jun 2007 21:16:07 +0000 (21:16 +0000)]
Fix loading persistent queue members when using realtime configuration for queues.
Also, remove an unneeded leading slash for the astdb family.
(issue #9911, patch by atis)
Mark Michelson [Thu, 7 Jun 2007 19:47:42 +0000 (19:47 +0000)]
Submitting a fix for Issue 8016. Added a check to make sure that greetings get stored properly.
(Issue 8016, reported by edhorton, patched by alamantia with modification by me. Thanks to Jason Parker
for the advice on this).
Joshua Colp [Thu, 7 Jun 2007 18:39:52 +0000 (18:39 +0000)]
Fix logic when doing a name based channel search for a structure when you want to start from a specific point in the channel list. (issue #9324 reported by slavon)
Olle Johansson [Thu, 7 Jun 2007 09:55:13 +0000 (09:55 +0000)]
Ok, we found out that this is not about if you have any *active* clients using TLS, but
if you have initialized TLS at all during the lifetime of the module. So if you reload
to disable TLS, it won't help.
Olle Johansson [Thu, 7 Jun 2007 09:42:26 +0000 (09:42 +0000)]
If you have a jabber client that uses TLS, refuse unload. Bad fix, but will prevent
crashes while we are trying to find a workaround.
Iksemel development seems to have stalled and we might have to stop using the
TCP/TLS connections in that library and use our own, which would scale better
from a poll/select perspective I guess. It would also make it easier to migrate
to OpenSSL and stop Asterisk from depending on both OpenSSL and GnuTLS.
Olle Johansson [Thu, 7 Jun 2007 09:00:44 +0000 (09:00 +0000)]
Issue #9738 - Make sure we can unload res_jabber. Patch by phsultan - thanks!
Due to a bug in the iksemel library, this will not work if you are using GTLS
in the connection. That's being investigated. If you figure out a way to handle
that without us having to patch iksemel, let us know in the bug report. Thanks.
Russell Bryant [Wed, 6 Jun 2007 22:08:02 +0000 (22:08 +0000)]
Disable reload functionality in res_snmp. It is not possible to initialize the
snmp library more than once without completely unloading the module and loading
it again.
(issue #9571, reported by hristo, additional helpful debug information from festr,
patch from me)
Russell Bryant [Wed, 6 Jun 2007 21:14:46 +0000 (21:14 +0000)]
Fix a crash when doing call pickups with SIP phones. The code unlocked the
channel when it should not have.
(issue #9652, reported by corruptor, fixed by me)
Mark Michelson [Wed, 6 Jun 2007 19:26:55 +0000 (19:26 +0000)]
Fix for Issue 9810. There was a segfault under a specific set of circumstances:
1. VoiceMailMain was configured in the dialplan with an extension as its argument
2. A message was left for this mailbox
3. Tried to call VoiceMailMain but hung up before entering password.
This was fixed by checking that a pointer was non-null prior to trying to dereference it.
(Issue 9810, reported by xmarksthespot, patched by Corydon76 with modifications by me).
Russell Bryant [Wed, 6 Jun 2007 16:55:59 +0000 (16:55 +0000)]
Merged revisions 67715 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r67715 | russell | 2007-06-06 11:40:51 -0500 (Wed, 06 Jun 2007) | 5 lines
We have some bug reports showing crashes due to a double free of a channel.
Add a sanity check to ast_channel_free() to make sure we don't go on trying
to free a channel that wasn't found in the channel list.
(issue #8850, and others...)
Russell Bryant [Tue, 5 Jun 2007 23:01:44 +0000 (23:01 +0000)]
Fix some crashes related to the use of the "meetme" CLI command. The code for
this command was not locking the conference list at all.
(issue #9351, reported by and patch submitted by Junk-Y, committed patch
is different and by me)
Steve Murphy [Tue, 5 Jun 2007 21:30:18 +0000 (21:30 +0000)]
this fixes bug 9883, wherein macros were not allowing the includes construct. fixed and tested, looks OK. Now includes can serve as an adjunct to catch.
Russell Bryant [Tue, 5 Jun 2007 20:53:28 +0000 (20:53 +0000)]
This bug has been hanging over my head ever since I wrote this SLA code.
Every time I tried to go debug it by adding some debug output, the behavior
would change. It turns out I wasn't crazy. I had the following piece of code:
if (remove)
AST_LIST_REMOVE_CURRENT(...);
Well, AST_LIST_REMOVE_CURRENT was not wrapped in braces, so my conditional
statement didn't do much good at all. It always ran at least all of the
macro minus the first statement, so I was seeing list entries magically
disappear when they weren't supposed to.
After many hours of debugging, I have come to this extremely irritating fix. :)
Mark Michelson [Tue, 5 Jun 2007 18:32:50 +0000 (18:32 +0000)]
Fix for bug number 9786, wherein voicemails saved to IMAP storage using extensions other than gsm were
unable to be played over the phone. (Issue 9786, reporter: xmarksthespot, Patched by xmarksthe spot with revisions by me,
reviewed by Russell Bryant).
Steve Murphy [Tue, 5 Jun 2007 18:17:28 +0000 (18:17 +0000)]
Added code to automatically add a default case to switches that don't have one. In some cases, rather than fall thru, it results in a goto with -1 result, which terminates the extension; a sort of dialplan seqfault, sort of. This was required to fix bug reported in 9881
Russell Bryant [Tue, 5 Jun 2007 16:56:36 +0000 (16:56 +0000)]
Fix a problem that showed itself by causing Zap channel names to be completely
bogus on my machine. ast_safe_string_alloc() was broken. It called
vsnprintf() on a va_args list twice without re-initializing it. After the first
usage, va_end() and va_start() must be called again.
Merged revisions 67306 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r67306 | crichter | 2007-06-05 17:39:43 +0200 (Di, 05 Jun 2007) | 1 line
simplified the EVENT_SETUP handling in the cb_events function a lot. Commented the different possibilities a bit and made functions of shared code. When the dialed extension does not exist in the extensions.conf we'll jump into the 'i' extension if this does exist, else we disconnect the call with the cause:1 = No Route to Destination.
........
Russell Bryant [Tue, 5 Jun 2007 15:51:53 +0000 (15:51 +0000)]
When shutting down "gracefully", go through and run the unload() callbacks for
all of the modules. "stop now" is considered a non-graceful shutdown and will
not go through this process.
(issue #9804, reported by chrisost, patch by me)
ensure that a burst of full frames (AST_FRAME_DTMF being the prime example) will not be processed out of order... this is a brute force fix, but seems to be the safest fix for now (thanks to the Digium PQ department for finding this bug)
Russell Bryant [Mon, 4 Jun 2007 23:31:40 +0000 (23:31 +0000)]
Fix up a bunch of places where the iax2 pvt structure can disappear and the
code did not account for it and crashes.
(issues #9642, #9569, #9666, probably others ... based on the work by
stevedavies and mihai, with additional changes from me)
Jason Parker [Mon, 4 Jun 2007 23:26:28 +0000 (23:26 +0000)]
Fix for skinny keepalives.
If there is no traffic from the phone for (keep_alive * 1100) ms (arbitrarily
adding 10% for network issues, etc), unregister the device.
Russell Bryant [Mon, 4 Jun 2007 22:28:55 +0000 (22:28 +0000)]
Add comments for two functions that get called with the appropriate call locked,
but perform operations that could result in the pvt structure getting destroyed
before returning again, causing numerous seg faults all over the module.
(inspired by issues #9642, #9569, and #9666, and the work done by stevedavies
and mihai)
Joshua Colp [Mon, 4 Jun 2007 17:41:59 +0000 (17:41 +0000)]
Returning a value that indicates the parking of a call was a success when it really wasn't (because the parking slot selected was in use) is the wrong thing to do. (issue #9723 reported by mdu113)
Russell Bryant [Mon, 4 Jun 2007 16:02:31 +0000 (16:02 +0000)]
Change the configure script to build a test program against libcurl to make
sure the results from curl-config can be used to compile successfully. This is
intended to help prevent a situation where you are cross compiling, and the
configure script finds the curl library installed on the host.
(issue #9865, reported and patched by zandbelt)
Russell Bryant [Mon, 4 Jun 2007 15:47:40 +0000 (15:47 +0000)]
Resolve a deadlock in chan_iax2. When handling an implicit ACK to a frame that
was marked as the final transmission for a call, don't call iax2_destroy() for
that call while the global frame queue is still locked. There is a very nice
explanation of the deadlock in the report.
(issue #9663, thorough report and patch from stevedavies, additional positive
test reports from mihai and joff_oconnell)
Mark Michelson [Fri, 1 Jun 2007 21:09:30 +0000 (21:09 +0000)]
Submitting a fix for voicemail with IMAP storage. Attachments with format specified as gsm were duplicated (i.e. two attachments) were left.
Thank you very much to xmarksthespot for submitting the patch that fixed this. (Issues 9787 and 8873, Reported by xmarksthespot and jerjer, patched by xmarksthespot)
Russell Bryant [Fri, 1 Jun 2007 19:41:30 +0000 (19:41 +0000)]
Changes to the way DTMF is handled in the core broke dialing in chan_skinny.
This patch makes chan_skinny usable again. I did not end up testing this,
but there are multiple positive test reports listed in the bug report.
(issue #9596, reported by pj, testing by pj and mvanbaak, and the fix was
written by DEA)
It is now possible for this path of execution to have the frame pointer be NULL, therefore we need to check for it before trying to access it. (issue #9836 reported by barthpbx)