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
The configuration option for allowing hosts to make non-token-based calls
is 'calltokenoptional', not 'calltokenignore'. (reported on asterisk-users)
........
Joshua Colp [Fri, 13 Nov 2009 17:22:47 +0000 (17:22 +0000)]
Store the cause code that is returned when trying to create a channel in ChanIsAvail in the
AVAILCAUSECODE dialplan variable instead of overwriting the device state in AVAILSTATUS.
Leif Madsen [Thu, 12 Nov 2009 13:54:45 +0000 (13:54 +0000)]
Update sip.conf.sample.
Just updating a spelling error and some capitalization in a
documentation update that Olle added. May the Swenglish be
with you.
If two pattern classes start with the same digit and have the same number of characters, they will compare equal.
The example given in the issue report is that of [234] and [246], which have
these characteristics, yet they are clearly not equivalent. The code still
uses these two characteristics, yet when the two scores compare equal, an
additional check will be done to compare all characters within the class to
verify equality.
(closes issue #15421)
Reported by: jsmith
Patches:
20091109__issue15421__2.diff.txt uploaded by tilghman (license 14)
Tested by: jsmith, thedavidfactor
........
Tilghman Lesher [Tue, 10 Nov 2009 21:22:50 +0000 (21:22 +0000)]
When GOSUB is invoked within an AGI, it may not exit correctly.
(closes issue #16216)
Reported by: atis
Patches:
20091110__atis_work.diff.txt uploaded by tilghman (license 14)
Tested by: atis
Remove broken support for direct transcoding between G.726 RFC3551 and G.726 AAL2.
On some systems the translation core would actually consider g726aal2 -> g726 -> signed linear
to be a quicker path then g726aal2 -> signed linear which exposed this problem.
ExternalIVR uses the D tag for two different event types. This documents that
behavior and how to differentiate between the two cases. Also includes a minor
spelling fix and clarification
Gavin Henry [Tue, 10 Nov 2009 11:16:10 +0000 (11:16 +0000)]
Schema file additions
* Added AsteriskDialplan, AsteriskAccount and AsteriskMailbox objectClasses
to allow standalone dialplan, account and mailbox entries (STRUCTURAL)
* Added new Fields:
- AstAccountLanguage, AstAccountTransport, AstAccountPromiscRedir,
- AstAccountAccountCode, AstAccountSetVar, AstAccountAllowOverlap,
- AstAccountVideoSupport, AstAccountIgnoreSDPVersion
* Removed redundant IPaddr (there's already IPAddress)
- Gives more configuration Flags for SIP-Users available (tested)
- Allows to create Asterisk Attributes in defined Asterisk ObjectClasses
without extensibleObject (which really should be the last resort); gives
also additional possibilities for LDAP-filter
Add the 'relative-periodic-announce' option to app_queue to allow for calculating the time of announcments from the end of the previous announcment rather than from the beginning.
Tilghman Lesher [Mon, 9 Nov 2009 07:37:52 +0000 (07:37 +0000)]
Fix various problems detected with Valgrind.
* chan_console accessed pvts after deallocation.
* cdr_mysql stored a pointer that was freed by realloc()
* The module loader did not check usecount on shutdown, which led to chan_iax2
reading a timer that was already unloaded.
* The event subsystem sometimes creates an event with no IEs. Due to a corner
condition, the code would read beyond the memory boundary.
* res_pktccops did not correctly check whether its monitor thread was started.
(closes issue #16062)
Reported by: alexanderheinz
Patches:
20091109__issue16062.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman
fixes audiohook write crash occuring in chan_spy whisper mode.
After writing to the audiohook list in ast_write(), frames
were being freed incorrectly. Under certain conditions this
resulted in a double free crash.
David Brooks [Fri, 6 Nov 2009 22:07:22 +0000 (22:07 +0000)]
ami_testhooks.c automatically registers hook
ami_testhooks.c was registering for AMI events upon module load. Moved the registration
to its own CLI command. Added CLI command for unregistering the hook. Changed some of
the wording, removed unnecessary arguments/parameters.
Mark Michelson [Fri, 6 Nov 2009 22:00:12 +0000 (22:00 +0000)]
Get chan_ooh323 to compile with gcc 4.2.
For some reason, the code compiles just fine with later versions
of GCC, but this one requires some weird double casting in order
to get rid of all warnings. Whatever.
For reasons not yet known, it appears possible for an ast_frame
to have a datalen greater than zero while the actual data is NULL
during Packet Loss Concealment. Most codecs don't support PLC so
this doesn't affect them. This patch catches the malformed frame
and prevents the crash from occuring. Additional efforts to determine
why it is possible for a frame to look like this are still being
investigated.
Tilghman Lesher [Thu, 5 Nov 2009 21:24:21 +0000 (21:24 +0000)]
MEETME_INFO should not return a literal error message to the dialplan.
(closes issue #15450)
Reported by: JimVanM
Patches:
meetmeinfopatch.diff.txt uploaded by dbrooks (license 790)
Tested by: JimVanM