The Dial and Queue I option is intended to block connected line updates
and redirecting updates. However, it is a feature that when a call is
locally redirected, the I option is disabled if the redirected call runs
as a local channel so the administrator can have an opportunity to setup
new connected line information. Unfortunately, the Dial and Queue I
option is disabled for *all* forked calls if one of those calls is
redirected.
* Make the Dial and Queue I option apply to each outgoing call leg
independently. Now if one outgoing call leg is locally redirected, the
other outgoing calls are not affected.
* Made Dial not pass any redirecting updates when forking calls.
Redirecting updates do not make sense for this scenario.
* Made Queue not pass any redirecting updates when using the ringall
strategy. Redirecting updates do not make sense for this scenario.
* Fixed deadlock potential with chan_local when Dial and Queue send
redirecting updates for a local redirect.
* Converted the Queue stillgoing flag to a boolean bitfield.
(closes issue ASTERISK-19511)
Reported by: rmudgett
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/1920/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@367678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch addresses a number of memory leaks in a variety of modules that were
found by a static analysis tool. A brief summary of the changes:
* app_minivm: free ast_str objects on off nominal paths
* app_page: free the ast_dial object if the requested channel technology
cannot be appended to the dialing structure
* app_queue: if a penalty rule failed to match any existing rule list
names, the created rule would not be inserted and its memory
would be leaked
* app_read: dispose of the created silence detector in the presence of
off nominal circumstances
* app_voicemail: dispose of an allocated unique ID field for MWI event
un-subscribe requests in off nominal paths; dispose of
configuration objects when using the secret.conf option
* chan_dahdi: dispose of the allocated frame produced by ast_dsp_process
* chan_iax2: properly unref peer in CLI command "iax2 unregister"
* chan_sip: dispose of the allocated frame produced by sip_rtp_read's
call of ast_dsp_process; free memory in parse unit tests
* func_dialgroup: properly deref ao2 object grhead in nominal path of
dialgroup_read
* func_odbc: free resultset in off nominal paths of odbc_read
* cli: free match_list in off nominal paths of CLI match completion
* config: free comment_buffer/list_buffer when configuration file load
is unchanged; free the same buffers any time they were
created and config files were processed
* data: free XML nodes in various places
* enum: free context buffer in off nominal paths
* features: free ast_call_feature in off nominal paths of applicationmap
config processing
* netsock2: users of ast_sockaddr_resolve pass in an ast_sockaddr struct
that is allocated by the method. Failures in
ast_sockaddr_resolve could result in the users of the method
not knowing whether or not the buffer was allocated. The
method will now not allocate the ast_sockaddr struct if it
will return failure.
* pbx: cleanup hash table traversals in off nominal paths; free
ignore pattern buffer if it already exists for the specified
context
* xmldoc: cleanup various nodes when we no longer need them
* main/editline: various cleanup of pointers not being freed before being
assigned to other memory, cleanup along off nominal paths
* menuselect/mxml: cleanup of value buffer for an attribute when that attribute
did not specify a value
* res_calendar*: responses are allocated via the various *_request method
returns and should not be allocated in the various
write_event methods; ensure attendee buffer is freed if no
data exists in the parsed node; ensure that calendar objects
are de-ref'd appropriately
* res_jabber: free buffer in off nominal path
* res_musiconhold: close the DIR* object in off nominal paths
* res_rtp_asterisk: if we run out of ports, close the rtp socket object and free
the rtp object
* res_srtp: if we fail to create the session in libsrtp, destroy the
temporary ast_srtp object
(issue ASTERISK-19665)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1922
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20,
22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111,
and 115. Finding numbers 26, 33, and 29 were already resolved. Those skipped
were either extended/deprecated or in areas of code that shouldn't be
disturbed.
(Closes issue ASTERISK-19650)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
* Fix FollowMe leaving recorded caller name file on error paths in
app_exec().
* Use correct buffer dimension define in struct call_followme.moh[] and
struct fm_args.namerecloc[]. This fixes unexpected namerecloc filename
length restriction.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
* Made use MAX_YN_STRING define to make all accept/decline DTMF buffers
the same size. Just using 20 isn't good enough when someone didn't get
the memo.
* Fix stupid use of a global variable in FollowMe. (ynlongest)
* Fix bit field declarations in FollowMe.
* Fix FollowMe n option documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The VoiceMail d([c]) option is documented to accept digits for a new extension
in context <c>, if played during the greeting. This option works fine if the
extension being redirected to has an extension with the same initial digit in
the channel's current context. If that digit did not happen to exist in some
extension, a dialplan match would fail and the user would not be redirected.
This patch fixes it such that if the <c> option is used, the extensions are
matched in that context as opposed to the caller's original context.
(closes issue ASTERISK-18243)
Reported by: mjordan
Tested by: mjordan
Review: https://reviewboard.asterisk.org/r/1892
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Most of the changes here are trivial NULL checks. There are a couple
optimizations to remove the need to check for NULL and outboundproxy parsing
in chan_sip.c was rewritten to avoid use of strtok. Additionally, a bug was
found and fixed with the parsing of outboundproxy when "outboundproxy=," was
set.
(Closes issue ASTERISK-19654)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Correct the code in app_confbridge to play the conf-placeintoconf message to
the marked user entering the bridge instead of to the conference while the
marked user hears silence.
(closes issue ASTERISK-19641)
Reported-by: Mark A Walters
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The Speech API apps return -1 on failure, which will hang up the channel. This
may not be desirable behavior for some, but it isn't something that can be
changed without breaking people's dialplans or writing an option to all of the
Speech apps that does what TryExec already does. This patch documents the
hangup behavior of the apps, and suggests TryExec as the solution.
(closes issue AST-813)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@362815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
If the first command sent from an ExternalIVR client is an 'S' command, we were
blindly removing the first element from the play list and deferencing it, even
if it was NULL. This corrects that and also locks appropriately in one place.
(issue ASTERISK-17889)
Reported by: Chris Maciejewski
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@362586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
* chan_mobile: Fixed an overrun where the cind_state buffer (an integer array
of size 16) would be overrun due to improper bounds checking. At worst, the
buffer can be overrun by a total of 48 bytes (assuming 4-byte integers),
which would still leave it within the allocated memory of struct hfp. This
would corrupt other elements in that struct but not necessarily cause any
further issues.
* app_sms: The array imsg is of size 250, while the array (ud) that the data
is copied into is of size 160. If the size of the inbound message is
greater then 160, up to 90 bytes could be overrun in ud. This would corrupt
the user data header (array udh) adjacent to ud.
* chan_unistim: A number of invalid memmoves are corrected. These would move
data (which may or may not be valid) into the ends of these buffers.
* asterisk: ast_console_toggle_loglevel does not check that the console log
level being set is less then or equal to the allowed log levels of 32.
* frame: In ast_codec_pref_prepend, if any occurrence of the specified codec
is not found, the value used to index into the array pref->order would be
one greater then the maximum size of the array.
* jitterbuf: If the element being placed into the jitter buffer lands in the
last available slot in the jitter history buffer, the insertion sort attempts
to move the last entry in the buffer into one slot past the maximum length
of the buffer. Note that this occurred for both the min and max jitter
history buffers.
* tdd: If a read from fsk_serial returns a character that is greater then 32,
an attempt to read past one of the statically defined arrays containing the
values that character maps to would occur.
* localtime: struct ast_time and tm are not the same size - ast_time is larger,
although it contains the elements of tm within it in the same layout. Hence,
when using memcpy to copy the contents of tm into ast_time, the size of tm
should be used, as opposed to the size of ast_time.
* extconf: this treats ast_timing's minmask array as if it had a length of 48,
when it has defined the size of the array as 24. pbx.h defines minmask as
having a size of 48.
(issue ASTERISK-19668)
Reported by: Matt Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@362485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When storing a voicemail message using an ODBC connection to a database, the
voicemail message is first stored on disk. The sound file associated with
the message is read into memory before being transmitted to the database.
When this occurs, a failure in the C library's lseek function would cause a
negative value to be passed to the mmap as the size of the memory map to
create. This would almost certainly cause the creation of the memory map to
fail, resulting in the message being lost.
(issue ASTERISK-19655)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1863
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@362201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Prior to this patch, ForkCDR's e option would immediately set the end time of the forked
CDR to that of the CDR that is being terminated. This resulted in the new CDR's end time
being roughly the same as it's beginning time (which is in turn roughly the same as the
original's end time).
(closes issue ASTERISK-19164)
Reported by: Steve Davies
Patches:
cdr_fork_end.v10.patch uploaded by Steve Davies (license 5012)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@362082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
A memory leak/reference counting leak occurs if the MeetMeAdmin 'e' command
(eject last user that joined) is used in conjunction with a specified user.
Regardless of the command being executed, if a user is specified for the
command, MeetMeAdmin will look up that user. Because the 'e' option kicks
the last user that joined, as opposed to the one specified, the reference to
the user specified by the command would be leaked when the user variable
was assigned to the last user that joined.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The error message for failure to stop autoservice after a gosub or macro call
during a dial was removed for macro while Asterisk 1.4 was still being actively
developed. The corresponding gosub error message was never removed.
(closes issue ASTERISK-19551)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This came up while fixing documentation generation for many other cases where
the argument separator was not being displayed properly. Now that it is
displayed properly, it shows up in the wrong place for Transfer since the '/'
is only required if Tech is present.
(related to issue ASTERISK-18168)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
dial_list is a dynamically allocated array that is allocated at the beginning
of Page() based on how many devices will be dialed. This was never being freed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Echo()'s description states that it echoes audio, video, and DTMF except for #
while it actually echoes any frame that it receives other than DTMF #. This
was causing frame storms in the test suite in some circumstances where Echo()
was attached to both ends of a pair of local channels and control frames
were being periodically generated. Echo()'s behavior and description have
been modifed so that it only echoes media and non-# DTMF frames.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@360033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch addresses a bug with chanspy on local channels which roughly 50% of the time
would create a situation where chanspy can latch onto a zombie channel, keeping the zombie
alive forever and causing the channel doing the spying to never be able to hang up.
(closes issue ASTERISK-19493)
Reported by: lvl
Review: https://reviewboard.asterisk.org/r/1819/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Milliwatt is vulnerable to a remotely exploitable stack overrun when using
the 'o' option. This occurs due to the milliwatt_generate function not
accounting for AST_FRIENDLY_OFFSET when calculating the maximum number of
samples it can put in the output buffer.
This patch resolves this issue by taking into account AST_FRIENDLY_OFFSET
when determining the maximum number of samples allowed. Note that at no
point is remote code execution possible. The data that is written into the
buffer is the pre-defined Milliwatt data, and not custom data.
(closes issue ASTERISK-19541)
Reported by: Russell Bryant
Tested by: Matt Jordan
Patches:
milliwatt_stack_overrun.rev1.txt by Russell Bryant (license 6283)
Note that this patch was written by Russell, even though Matt uploaded it
........
Merged revisions 359645 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The connected line interception macros do not get executed when the
outgoing channel is initially created and that channel's caller-id is
implicitly imported into the incoming channel's connected line data. If
you are using the interception macros, you would expect that they get run
for every change to a channel's connected line information outside of
normal dialplan execution.
Review: https://reviewboard.asterisk.org/r/1817/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Ensure that status is set before it is used by resetting it during each loop
iteration. This could have resulted in incorrect results from this app.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359486 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When connected line support was added, the wait_for_answer() variable
single changed its meaning slightly. Unfortunately, the places where
single was used did not necessarily get updated to reflect that change.
Also audio/video frames were sent to all forked calls when the endpoints
were never made compatible.
* Don't pass audio/video media frames when the channels have not been made
compatible.
* Added handling of AST_CONTROL_SRCCHANGE to app_dial.c.
* Fixed app_dial.c passing on AST_CONTROL_HOLD because that frame can also
pass a requested MOH class.
(closes issue ASTERISK-16901)
Reported by: Chris Gentle
(closes issue ASTERISK-17541)
Reported by: clint
Review: https://reviewboard.asterisk.org/r/1805/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
These few places in the code used sizeof() on h_addr in struct hostent.
This is sizeof(char *). The correct way to get the size of this address is to
use h_length. This error would result in reads/writes of 8 bytes instead of 4
on 64-bit machines.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This change restores functionality that was present in 1.4, when AEL macros
were implemented with the Macro dialplan application. Macros are fraught with
functionality issues, because they consume a large portion of the underlying
application stack. This limits the ability of AEL users to call many layers
of subroutines, an issue which Gosub does not have (originally tested to
100,000 levels deep). Therefore, starting in 1.6.0, AEL macros were
implemented with Gosub.
However, there were some implicit behaviors of Macro, which were not replicated
at the same time as with the transition to Gosub, one of which is documented in
the related issue. In particular, the "h" extension is designed to execute not
in the Macro context, but in the topmost calling context. Due to legacy issues
with a misapplied bugfix many years ago, when a macro exited in 1.4, it looks
in all calling contexts, bubbling up from the deepest level until it finds an
"h" extension.
Since AEL hides the complexity of the underlying dialplan logic from the AEL
programmer, it's reasonable to assume that this behavior should not change in
the transition from Asterisk 1.4 LTS to Asterisk 1.8 LTS, lest we break
working AEL configurations in the transition to Asterisk 1.8 LTS. This fix
is the result, which implements a search for the "h" extension in all calling
Gosub contexts.
Fixes ASTERISK-19336
Patch: 20120308__ael_bugfix_for_trunk__2.diff (License #5003) by Tilghman Lesher
(with slight modifications for 1.8)
Tested by: Johan Wilfer
Review: https://reviewboard.asterisk.org/r/1776/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
In r203638, during the addition of the Channel Event Logging, in mid-2009, this
got broken in trunk and ended up in asterisk 1.8 and higher. This fixes so the
CDR(accountcode) from the calling channel is available to dialed channels again
as well as showing up properly in the CDR's.
(closes issue ASTERISK-19384)
Reported by: jamicque
Patches: accountcode.patch (License #6033) by jamicque
Review: https://reviewboard.asterisk.org/r/1775/
Reviewed by: Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When the stack frame is allocated, we save the address to which we should
return, when the Gosub returns. However, if we just want to restore the
priority, then we need to subtract 1 before setting it. Otherwise, when
a Gosub goes to a nonexistent address, it will skip a priority in the
dialplan. This is because when we return from an application, the PBX
increments the priority for us.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
In r354890, a memory leak in app_voicemail was fixed by properly disposing of
the allocated heard/deleted pointers. However, there are situations,
particularly when no messages are found in a folder, where these pointers are
not allocated and not NULL. In that case, an invalid free would be attempted,
which could crash app_voicemail. As there are a number of code paths where
this could occur, this patch uses the number of messages detected in the folder
before it attempts to free the pointers. This resolves the crash detected in
the Asterisk Test Suite's check_voicemail_nominal test.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
open_mailbox() was changed quite a long time ago to allocate this memory.
close_mailbox() should have been changed to be responsible for freeing it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@354889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Previously, realtime queues could be loaded without defining the queue member
table. This allowed for queue members to be dynamic, while the realtime
queue definitions could exist in some backing storage. Revision 342223 broke
this when it changed the return value for realtime_multientry to return NULL
when no results are returned. Previously, an empty ast_config object was
expected.
(closes issue ASTERISK-19170)
Reported by: Rene Mendoza
Tested by: Rene Mendoza
Patches:
rt_queue_member_patch.diff uploaded by Matt Jordan (license 6283)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@350552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Like Dial and Queue, FollowMe needs to deal with
AST_CONTROL_CONNECTED_LINE information so when the parties are initially
bridged, the connected line information will be correct.
* Added the 'I' option just like the app_dial and app_queue 'I' option.
(closes issue ASTERISK-18969)
Reported by: rmudgett
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/1656/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@350364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
If SLA was reloaded without the config file being changed, current settings got
wiped out before the SLA reload code decided it wasn't going to reload the file
since nothing was changed. Moving the settings reset later in the reload
process fixes this.
(closes issue AST-744)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@350023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When ChanSpy is initialized it creates and attaches 3 audiohooks:
1) Read audio off of the channel that we are spying on
2) Write audio to the channel that we are spying on
3) Write audio to the channel that is bridged to the channel that we are
spying on.
The first is always necessary, but the others are used only when specific
options are passed to the ChanSpy application (B, d, w, and W to be specific).
When those flags are not passed, neither of those audiohooks are ever sent
frames, but we still try to process the hooks for each voice frame that we
recieve on the channel.
So in short - only create and attach audiohooks that we actually need.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@349044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The ast_cdr_setcid() and ast_cdr_update() were shown in ASTERISK-18836 to
be called by different threads for the same channel. The channel driver
thread and the PBX thread running dialplan.
* Add lock protection around CDR API calls that access an ast_channel
pointer.
(closes issue ASTERISK-18836)
Reported by: gpluser
Review: https://reviewboard.asterisk.org/r/1628/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@348362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
ParkAndAnnounce tried to pass the CallerID to the announcing channel but
the ID was wiped out by the channel masquerade done when parking the call.
* Save the CallerID before parking the channel to pass it to the
announcing channel.
* Fixed a minor memory leak in ParkAndAnnounce.
* Updated some ParkAndAnnounce log messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@348310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The addition of the Connected Line support changed how CallerID is passed
to outgoing calls. The FollowMe application was not updated to pass
CallerID to the outgoing calls.
* Fix FollowMe CallerID on outgoing calls.
* Restructured findmeexec() to fix several memory leaks and eliminate some
duplicated code.
* Made check the return value of create_followme_number(). Putting a NULL
into the numbers list is bad if create_followme_number() fails.
* Fixed a couple uses of ast_strdupa() inside loops.
* The changes to bridge_builtin_features.c fix a similar CallerID issue
with the bridging API attended and blind transfers. (Not used at this
time.)
(closes issue ASTERISK-17557)
Reported by: hamlet505a
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/1612/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@348101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Meetme would attempt to substitute the realtime values of RECORDING_FILE and
RECORDING_FORMAT from the meetme db entry instead of using the channel variable set
for those variables in spite of those database entries being NULL or even lacking
a column to represent them.
(closes issue ASTERISK-18873)
Reported by: Byron Clark
Patches:
ASTERISK-18873-1.patch uploaded by Byron Clark (license 6157)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@347369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The voicemail [general] zonetag and locale variables weren't loaded
until after the mailboxes were initialized. This caused the settings to
be unset for those mailboxes until a reload was performed.
(closes issue ASTERISK-18838)
Review: https://reviewboard.asterisk.org/r/1570
Reviewed by: Matt Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@347111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Before, using the U flag in Voicemail with multiple recipients would put urgent messages
in the INBOX folder for all users past the first thanks to a bug with the message
copying function. This would also cause messages to fail to be sent if the INBOX
directory hadn't been created for that mailbox yet.
(closes issue ASTERISK-18245)
Reported by: Matt Jordan
(closes issue ASTERISK-18246)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1589/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@345487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This change was made because forcegreeting and forcename settings in voicemail could be
circumvented by hanging up after entering a password, because the only way voicemail
currently observes whether a mailbox is new or not is by checking to see if the password
is the same as the mailbox number or not.
(closes issue ASTERISK-18282)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1581/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@345062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Fixed app_queue.c:ring_entry() calling ast_call() with the channel locks
held. Chan_local attempts to do deadlock avoidance in its ast_call()
callback and could deadlock if a channel lock is already held.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@344539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
It was strange that the AgentCalled AMI event would get most of its
information from the incoming channel but then get the CallerID
information from the outgoing channel. Before connected line support was
added, this information was always the same at this point.
(closes issue ASTERISK-18152)
Reported by: Thomas Farnham
Tested by: rmudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@344536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This fixes an issue where a user of a dynamic conference was asked for a PIN
twice. This also adds documentation to assist in future modifications to the
piece of code responsible for PIN checking.
(closes issue AST-670)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@344439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The last time this code was touched (by me), a subtlety was missed based on the
difference between needing to check a pin's validity and the need to prompt
for a pin.
(closes issue ASTERISK-18488)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@344102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The MeetMe application documentation has some comments about usage of DAHDI,
and they were a bit outdated relative to modern DAHDI releases. This patch
changes the comment to just tell the user that a functional DAHDI timing
source is required, and no longer mention 'dahdi_dummy', since that module
does not exist in current DAHDI releases.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@342990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Despite an ominous sounding comment stating that membercount was for "logged
in" members only and thus we couldn't use ao2_container_count(), I could not
find a single place in the code where that seemed to be accurate. The only time
we decremented membercount was when we were marking something dead or actually
removing it. The only places we incremented it were either after ao2_link(), or
trying to correct for having set it to 0 during a reload. In every case where
we were correcting the value, it seemed that we were trying to make the count
actually match what ao2_container_count() would return. The only place I could
find where we made a determination about something being "logged in" or not, we
didn't trust the membercount, but instead looked at devicestate, paused, etc.
This patch removes membercount, replaces its use with ao2_container_count, and
manually adds the results of ao2_container_count to a "membercount" field for
ast_data queue query results. This patch also would fix AST-676, but as it is
slightly riskier than the previously committed fix, the two commits have been
made separately.
Reivew: https://reviewboard.asterisk.org/r/1541/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@342383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
ASTERISK-12175 changed the p and X options to not interfere with the s
option when they are used together. It makes more sense for the s option
to have priority for the DTMF '*' key since it cannot change its
activation code. Otherwise, you could not use option s with the p or X
options.
JIRA AST-671
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@340470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch adds an optional "module" attribute to the XML documentation spec
that allows the documentation processor to match apps with identical names from
different modules to their documentation. This patch also fixes a number of
bugs with the documentation processor and should make it a little more
efficient. Support for multiple languages has also been properly implemented.
ASTERISK-18130
Review: https://reviewboard.asterisk.org/r/1485/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@340108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Dummy channels created by ast_dummy_channel_alloc() should be destoyed by
ast_channel_unref(). Using ast_channel_release() needlessly grabs the
channel container lock and can cause a deadlock as a result.
* Analyzed use of ast_dummy_channel_alloc() and made use
ast_channel_unref() when done with the dummy channel. (Primary reason for
the reported deadlock.)
* Made app_dial.c:dial_exec_full() not call ast_call() holding any channel
locks. Chan_local could not perform deadlock avoidance correctly.
(Potential deadlock exposed by this issue. Secondary reason for the
reported deadlock since the held lock was part of the deadlock chain.)
* Fixed some uses of ast_dummy_channel_alloc() not checking the returned
channel pointer for failure.
* Fixed some potential chan=NULL pointer usage in func_odbc.c. Protected
by testing the bogus_chan value.
* Fixed needlessly clearing a 1024 char auto array when setting the first
char to zero is enough in manager.c:action_getvar().
(closes issue ASTERISK-18613)
Reported by: Thomas Arimont
Patches:
jira_asterisk_18613_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Thomas Arimont
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@337973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch fixes an issue where the voicemail duration was being reported
with a duration significantly less than the actual sound file duration.
Voicemails that contained mostly silence were reporting the duration of
only the sound in the file, as opposed to the duration of the file with
the silence. This patch fixes this by having two durations reported in
the __ast_play_and_record family of functions - the sound_duration and the
actual duration of the file. The sound_duration, which is optional, now
reports the duration of the sound in the file, while the actual full duration
of the file is reported in the duration parameter. This allows the voicemail
applications to use the sound_duration for minimum duration checking, while
reporting the full duration to external parties if the voicemail is kept.
(issue ASTERISK-2234)
(closes issue ASTERISK-16981)
Reported by: Mary Ciuciu, Byron Clark, Brad House, Karsten Wemheuer, KevinH
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1443
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@337118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The Dial d and H options break DTMF attended transfer atxferdropcall
option.
1) Party A calls party B.
2) Party B does a DTMF attended transfer to Party C.
If the dialplan uses the Dial d or H options to call Party C then the Dial
application answers the call immediately before initiating the call leg to
Party C. The premature answer causes the transfer code to not invoke the
atxferdropcall=no behavior for a blonde transfer since Party C has
"answered". The transfer code thinks that Party B has "consulted" with
Party C when Party B hangs up and completes the transfer to Party A.
Party A now hears ringback until Party C actually answers.
ASTERISK-13294 Dial d option.
ASTERISK-11067 Dial H option to disconnect before answer.
The referenced issues made Dial answer with the d and H options because
many SIP and ISDN phones cannot send DTMF before the call is connected.
* Made require the dialplan to control when or if the call needs to be
answered to use the Dial application d and H options. (The call is no
longer surprise answered when using the Dial d or H options.)
Review: https://reviewboard.asterisk.org/r/1381/
JIRA AST-623
JIRA AST-666
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@336658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When a single channel was dialed and there was media to be forwarded to the
calling channel, the media was written without regard for ringback causing
silence to be heard in some circumstances. This regression was introduced
when the meaning of "single" changed to mean only the number of channels
dialed.
(closes issue ASTERISK-18083)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@335341 65c4cc65-6c06-0410-ace0-fbb531ad65f3