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)
Kevin P. Fleming [Fri, 25 May 2007 14:28:46 +0000 (14:28 +0000)]
handle the GNUTLS library properly in the configure script and build system
don't build in OSP support unless we have found and are allowed to use SSL support
Russell Bryant [Thu, 24 May 2007 15:04:14 +0000 (15:04 +0000)]
Ensure that frames are fully initialized. This will probably fix getting
weird timestamp log messages in logs when using the Festival app.
(issue #9781, patch by me)
Russell Bryant [Thu, 24 May 2007 14:49:05 +0000 (14:49 +0000)]
Fix the calculation of the RTT for RTCP. The previous code would result in
oscillating and incorrect data. Additionally, the RTT would sometimes report
negative values due to incorrect calculations.
(issue #9601, patch from davetroy)
Olle Johansson [Thu, 24 May 2007 14:38:30 +0000 (14:38 +0000)]
Issue 8409 - phsultan - Fix "login" as component to jabber server.
...and, by accident, fix a bug in chan_sip for stopping a loop on retransmits
of BYE requests.
Merged revisions 65767 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r65767 | crichter | 2007-05-24 11:19:58 +0200 (Do, 24 Mai 2007) | 1 line
we should only activate the generator in chan_misdn, when asterisk hask not yet taken the call (WAITING4DIGS state). Alerting audio will be generated fomr asterisk for example.
........
Russell Bryant [Tue, 22 May 2007 13:09:34 +0000 (13:09 +0000)]
Merged revisions 65389 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r65389 | russell | 2007-05-22 08:07:03 -0500 (Tue, 22 May 2007) | 4 lines
Fix a memory leak that I just noticed in the device state handling in app_queue.
On most device state changes, it would leak roughly 8 to 64 bytes (the length of
the name of the device).
Merged revisions 65328 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r65328 | crichter | 2007-05-22 09:46:39 +0200 (Di, 22 Mai 2007) | 1 line
we stop the tones only when we're in the pre-call phase, otherwise e.g. when in CONNECTED state we should not stop tones when we receive an Information Message
........
Steve Murphy [Fri, 18 May 2007 22:26:51 +0000 (22:26 +0000)]
Ugh. The svnmerge didn't catch the shift from cdr.c to main/cdr.c, and neither did I. This is the remainder of the 9717 patch, the fix for the run-away FAIL status for a call
Steve Murphy [Fri, 18 May 2007 22:06:27 +0000 (22:06 +0000)]
Merged revisions 65172 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r65172 | murf | 2007-05-18 14:56:20 -0600 (Fri, 18 May 2007) | 1 line
This update will fix the situation that occurs as described by 9717, where when several targets are specified for a dial, if any one them reports FAIL, the whole call gets FAIL, even though others were ringing OK. I rearranged the priorities, so that a new disposition, NULL, is at the lowest level, and the disposition get init'd to NULL. Then, next up is FAIL, and next up is BUSY, then NOANSWER, then ANSWERED. All the related set routines will only do so if the disposition value to be set to is greater than what's already there. This gives the intended effect. So, if all the targets are busy, you'd get BUSY for the call disposition. If all get BUSY, but one, and that one rings is not answered, you get NOANSWER. If by some freak of nature, the NULL value doesn't get overridden, then the disp2str routine will report NOANSWER as before.
........
Issue 9235 - part of the problem, maybe not all. Please retry with this patch (and no
other patch) if you have problems with hanging SIP channels. Thank you.
A special Thank You to WeBRainstorm that gave me access to his system.
Olle Johansson [Fri, 18 May 2007 12:58:39 +0000 (12:58 +0000)]
- Adding support for putting calls OFF hold with a re-invite with blank SDP. This was a bug found while doing tests at SIPit in Antwerp.
- In order to not duplicate code, I restructured some of the code for putting calls on/off hold.
Thanks DEA for reminding me. This fix has been asleep in the videocaps branch until now.
Russell Bryant [Fri, 18 May 2007 02:48:51 +0000 (02:48 +0000)]
Fix a small bug I noticed while working on something else. app_queue did not
unregister its device state monitoring callback in unload_module(). So, this
would make Asterisk crash on the first device state change after you
unload the module.