Russell Bryant [Wed, 9 Dec 2009 15:15:02 +0000 (15:15 +0000)]
Blocked revisions 233782 via svnmerge
........
r233782 | russell | 2009-12-09 09:14:21 -0600 (Wed, 09 Dec 2009) | 22 lines
Set a module load priority for format modules.
A recent change to app_voicemail made it such that the module now assumes that
all format modules are available while processing voicemail configuration.
However, when autoloading modules, it was possible that app_voicemail was
loaded before the format modules. Since format modules don't depend on
anything, set a module load priority on them to ensure that they get loaded
first when autoloading.
This version of the patch is specific to Asterisk 1.4 and 1.6.0. These versions
did not already support module load priority in the module API. This adds a
trivial version of this which is just a module flag to include it in a pass before
loading "everything".
Thanks to mmichelson for the review!
(closes issue #16412)
Reported by: jiddings
Tested by: russell
Russell Bryant [Tue, 8 Dec 2009 18:00:16 +0000 (18:00 +0000)]
Set a module load priority for format modules.
A recent change to app_voicemail made it such that the module now assumes that
all format modules are available while processing voicemail configuration.
However, when autoloading modules, it was possible that app_voicemail was
loaded before the format modules. Since format modules don't depend on
anything, set a module load priority on them to ensure that they get loaded
first when autoloading.
This fix applies to trunk, 1.6.1, and 1.6.2. The fix for 1.4 and 1.6.0 will
require a different approach since the module load priority functionality is
not present in the module API.
David Ruggles [Mon, 7 Dec 2009 19:48:14 +0000 (19:48 +0000)]
Fix TCP Client interface
Fix a couple of very minor bugs that prevent the socket client from working. The wrong set of properties were used in one place and the size of the address variable isn't set if the host name is an ip address. Also includes a fix for a bug that was introduced previously.
Russell Bryant [Fri, 4 Dec 2009 17:18:22 +0000 (17:18 +0000)]
Merged revisions 233092 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r233092 | russell | 2009-12-04 11:12:47 -0600 (Fri, 04 Dec 2009) | 7 lines
Only do frame payload check for HOLD frames.
This code was added for helping to debug the source of invalid HOLD frames.
However, a side effect of this is that it will incorrectly report errors for
frames that have an integer payload. Make the check for this block specific
to the HOLD frame case.
........
Tilghman Lesher [Fri, 4 Dec 2009 16:08:58 +0000 (16:08 +0000)]
Update the mysql driver to always return NULL columns, as this is needed for the realtime API to work correctly.
(closes issue #16138)
Reported by: sohosys
Patches:
20091029__issue16138.diff.txt uploaded by tilghman (license 14)
Tested by: sohosys
Added additional field 'int display_inband_dtmf_warning', which when set to '1' displays the warning ('Inband DTMF is not supported on codec %s. Use RFC2833'), and when set to '0' doesn't display the warning. Otherwise you would get hundreds of warnings every second.
Tilghman Lesher [Thu, 3 Dec 2009 22:13:56 +0000 (22:13 +0000)]
Add pagerdateformat, to allow shorter dates for SMS messages.
(closes issue #16263)
Reported by: andrew
Patches:
pagerdate.patch uploaded by andrew (license 240)
(with a slight modification by me)
Deprecate "cz" in favor of "cs".
Also, change the use of language codes so that language registers as a prefix,
rather than an exact match.
(closes issue #16272)
Reported by: patrol-cz
Patches:
20091203__issue16272.diff.txt uploaded by tilghman (license 14)
........
Tilghman Lesher [Thu, 3 Dec 2009 00:08:55 +0000 (00:08 +0000)]
Fix multiple issues with musiconhold, which led to classes not getting destroyed properly.
* Classes are now tracked past removal from the core container, and module
removal is actively prevented until all references are freed.
* A hanging reference stored in the channel has been removed. This could have
caused a mismatch and the music state not properly cleared, if two or more
reloads occurred between MOH being stopped and MOH being restarted.
* In certain circumstances, duplicate classes were possible.
* A race existed at reload time between a process being killed and the thread
responsible for reading from the related pipe respawning that process.
* Several reference counts have also been corrected. At least one could have
caused deleted classes to stick around forever, consuming resources. This
originally manifested as MOH external processes that were not killed at
reload time.
(closes issue #16279, closes issue #16207)
Reported by: parisioa, dcabot
Patches:
20091202__issue16279__2.diff.txt uploaded by tilghman (license 14)
Tested by: parisioa, tilghman
David Ruggles [Wed, 2 Dec 2009 22:17:22 +0000 (22:17 +0000)]
Prevent double closing of FDs by EIVR
This caused a problem when asterisk was under heavy load and running both AGI and EIVR applications.
EIVR would close an FD at which point it would be considered freed and be used by a new AGI instance
the second close would then close the FD now in use by AGI.
The crash was happening as a result of a frame containing an invalid data
pointer, but was set with data length of zero. The few times the issue was
reproduced it _seemed_ that the frame was queued properly, that is the data
pointer was set to NULL. I never could reproduce the crash so as a last resort
the crash has been fixed, but a check in __ast_read has been added to give as
much information about the source of problematic frames in the future.
Tilghman Lesher [Tue, 1 Dec 2009 20:27:37 +0000 (20:27 +0000)]
More 32->64 bit codec conversions.
In the process of swapping ULAW to a place in the extended codec space, we
found several unhandled cases, where a 32-bit integer was still being used to
handle a codec field. Most of these have been fixed with this commit, although
there is at least one case (codec_dahdi) which depends upon outside headers to
be altered before a conversion can be made.
(Fixes AST-278, SWP-459)
Kevin P. Fleming [Mon, 30 Nov 2009 21:47:42 +0000 (21:47 +0000)]
Another round of UDPTL stack fixes/improvements:
1) Allow users of UDPTL stack to associate a character-string tag with a UDPTL
session, so that log/error/debug messages generated by the UDPTL stack can
be 'connected' to the endpoint that caused them to be generated.
2) Improve comments (and process) of calculating the far end's maximum IFP size
when redundancy mode is in use for error correction.
3) When an IFP larger than the calculated 'far max IFP' size is presented for
writing, truncate it rather than putting in the buffer and allowing the buffer
to overflow; this will cause the ends to retrain to a lower bit rate that
produces IFPs of an appropriate size if possible, and if not possible, the
FAX transfer will fail completely. In these cases, it is due to the one endpoint
supplying a T38FaxMaxDatagram value that is improperly calculated and is
too low to be of use; we have configuration options available to override
this behavior.
4) Eliminate use of T38FaxMaxDatagram value in udptl.conf; it is no longer
needed.
Remove duplicate entries from voicemail format lists. This prevents app_voicemail from entering an infinite loop when the same format is specified twice in the format list.
Remove duplicate entries from voicemail format lists. This prevents app_voicemail from entering an infinite loop when the same format is specified twice in the format list.
David Vossel [Mon, 30 Nov 2009 18:55:07 +0000 (18:55 +0000)]
app_queue crashes randomly, often during call-transfers
This patch adds a ref to the queue_ent object's parent call_queue
in queue_exec() so the call_queue won't be destroyed
while the the queue_ent still holds a pointer to it.
app_queue crashes randomly, often during call-transfers
In app_queue, it is possible for a call_queue to be destroyed
while another object still holds a pointer to it. This patch
converts call_queue objects to ao2 objects allowing them to be
ref counted. This makes it safe for the queue_ent object in
queue_exec() to reference it's parent call_queue even after it
has left the queue.
Joshua Colp [Mon, 30 Nov 2009 16:29:29 +0000 (16:29 +0000)]
Fix a bug where an immediate masquerade would cause a queued unhold frame to get lost. Now we just
indicate unhold directly after the masquerade is complete.
Tilghman Lesher [Tue, 24 Nov 2009 20:31:28 +0000 (20:31 +0000)]
Found a few places where queue refcounts were counted incorrectly. Also add debug statements.
(closes issue #15982, closes issue #15984)
Reported by: atis
Patches:
20091111__issue15982.diff.txt uploaded by tilghman (license 14)
Tested by: atis
Jeff Peeler [Tue, 24 Nov 2009 18:50:36 +0000 (18:50 +0000)]
Fix erroneous hangup extension execution
ast_spawn_extension behaves differently from 1.4 in that hangups and extensions
that do not exist do not return an error, whereas in 1.6 it does. This is now
taken into account so that the AST_FLAG_BRIDGE_HANGUP_RUN flag gets set
properly.
Jeff Peeler [Tue, 24 Nov 2009 17:12:25 +0000 (17:12 +0000)]
Fix problem on digital channels due to digital flag not getting set
Changed areas in sig_pri to set the digital flag using a callback that will
also set the corresponding flag in chan_dahdi. Modified dahdi_request slightly
so that if a bearer is marked as digital, that information is available when
creating the new channel.
(closes issue #16151)
Reported by: alecdavis
Patch based on bug_16151.diff.txt uploaded by alecdavis (license 585)
Tilghman Lesher [Tue, 24 Nov 2009 04:58:44 +0000 (04:58 +0000)]
Add REPLACE & PASSTHRU functions, overhaul of func_strings, fix API docs for the ast_get_encoded_* functions.
* Add REPLACE function, which searches a given variable for a set of
characters and replaces each with a given character.
* Add PASSTHRU function, which passes a literal string back, like a NoOp for
functions. Intent is to be able to specify a literal string to another
function that takes a variable name as an argument.
* Let the array manipulation functions work with dialplan functions, in
addition to variables. This allows the array manipulation functions to
modify ASTDB and ODBC backends, assuming the func_odbc configuration has
both read and write functions.
(closes issue #15223)
Reported by: ajohnson
Patches:
20091112__issue15223.diff.txt uploaded by tilghman (license 14)
Tested by: lmadsen, tilghman
Joshua Colp [Mon, 23 Nov 2009 15:45:45 +0000 (15:45 +0000)]
Change fax detection in chan_sip so it behaves as one would expect.
Internally the way T.38 is negotiated has changed and the option no longer
reflects a behavior that is valid. It will now look for a CNG tone on
received calls and if present send the call to the 'fax' extension. It is
then up to the application or channel to request the switch over to T.38.
When 'sip set debug' is enabled, and the last line of an incoming SIP message
is not properly newline terminated, ensure that that line is included in the
debug output.
Copy the peer CDR's userfield to the bridge CDR if it exists. This is necessary for the recordagentcalls option in chan_agent to store the recorded file name in the bridge CDR.
David Ruggles [Thu, 19 Nov 2009 14:53:58 +0000 (14:53 +0000)]
Basic cleanup of ExternalIVR: cleaned up argument parsing; implemented good coding practices where applicable; replaced most notice level logging with verbose logging; replaced warning messages that terminated with error messages; fixed memory leak identified by russellb