Commit Graph

21992 Commits

Author SHA1 Message Date
Mark Michelson
2deb898bcd Fix two more coverity constant expression result findings.
These correspond to findings 0 and 1 in the core findings of
ASTERISK-19649.

After contacting Mark Spencer, he was unsure of what the intent
behind these lines of code were, so they are being axed.

For Asterisk 1.8 and 10, the output of debugging DUNDi frames
will not be changed, but for trunk the "Retry" portion will
be omitted since it does not properly distinguish retransmissions
from initial frames.

(closes issue ASTERISK-19649)
Reported by Matthew Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-14 19:57:42 +00:00
Mark Michelson
fd520e0d19 Fix broken reinvite glare scenario.
To make a long story short, reinvite glares were broken
because Asterisk would invert the To and From headers
when ACKing a 491 response.

The reason was because the initreq of the dialog was being
changed to the incoming glared reinvite instead of being
set to the outgoing glared reinvite. This change has three
parts

* In handle_incoming, we never will reject an ACK because it
has a to-tag present, even if we think the request may be out
of dialog.
* In handle_request_invite, we do not change the initreq when
receiving a reinvite to which we will respond with a 491.
* In handle_request_invite, several superflous settings up
pendinginvite have been removed since this is dones automatically
by transmit_response_reliable

Review: https://reviewboard.asterisk.org/r/1911


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-14 19:10:20 +00:00
Russell Bryant
dac30f1523 format_mp3: Fix a possible crash in mp3_read().
This patch fixes a potential crash in mp3_read() by not assuming that
dbuf has enough data to finish filling up the output buffer.  The patch
also makes sure that the dbuf state gets reset after we know we read
everything out of it already.

In passing, this patch includes some other cleanups of this module,
including stripping trailing whitespace, formatting fixes based on
coding guidelines, and removing a number of unused members from the
private state struct.

(closes issue ASTERISK-19761)
Reported by: Chris Maciejewsk
Tested by: Chris Maciejewsk


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-11 23:53:38 +00:00
Richard Mudgett
91154705df * Made ast_change_name() hold the channels container lock while changing the channel name.
* Eliminate redundant list not empty check in clone_variables().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10 23:38:16 +00:00
Kinsey Moore
a94fcae21b Resolve FORWARD_NULL static analysis warnings
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
2012-05-10 20:50:47 +00:00
Jonathan Rose
ae528efea3 Coverity Report: Fix issues for error type CHECKED_RETURN for core
(issue ASTERISK-19658)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1905/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10 16:47:17 +00:00
Mark Michelson
965dd3a7d8 Close the proper tcptls_session when session creation fails.
(issue AST-998)
Reported by: Thomas Arimont
Tested by: Thomas Arimont



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10 16:10:18 +00:00
Jonathan Rose
a7650f8002 Coverity Report: Fix issues for error type UNINIT in Core supported modules
(issue ASTERISK-19652)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1909/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10 15:35:33 +00:00
Jonathan Rose
50b43947f1 Block on frameout if the hardware has enough samples to complete a frame.
Fixes some problems with skipping audio in elaborate scenarios involving
multiple codecs by making codec_dahdi operate in a more synchronous
fashion similar to codec_g729. This change also fixes the use of file
conversion tools from Asterisk's CLI. This change may cause the thread
responsible for transcoding audio to block briefly (Shaun Ruffell describes
this as 'several milliseconds') while waiting for the hardware transcoder.

(closes issue ASTERISK-19643)
reported by: Shaun Ruffell
Patches:
	0001-codec_dahdi-Block-on-frameout-the-hardware-has-enoug.patch
	uploaded by Shaun Ruffell (license 5417)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-09 19:10:17 +00:00
Mark Michelson
3a9a0b9cea Prevent sip_pvt refleak when an ast_channel outlasts its corresponding sip_pvt.
chan_sip was coded under the assumption that a SIP dialog with an owner channel
will always be destroyed after the owner channel has been hung up.

However, there are situations where the SIP dialog can time out and auto destruct
before the corresponding channel has hung up. A typical example of this would be
if the 'h' extension in the dialplan takes a long time to complete. In such cases,
__sip_autodestruct() would complain about the dialog being auto destroyed with
an owner channel still in place. The problem is that even once the owner channel
was hung up, the sip_pvt would still be linked in its ao2_container because nothing
would ever unlink it.

The fix for this is that if __sip_autodestruct() is called for a sip_pvt that still
has an owner channel in place, the destruction is rescheduled for 10 seconds in the
future. This will continue until the owner channel is finally hung up.

(closes issue ASTERISK-19425)
reported by David Cunningham
Patches:
    ASTERISK-19425.patch uploaded by Mark Michelson (License #5049)

(closes issue ASTERISK-19455)
reported by Dean Vesvuio
Tested by Dean Vesvuio



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-09 16:11:52 +00:00
Richard Mudgett
55980149c7 * Fix FollowMe memory leak on error paths in app_exec().
* 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
2012-05-08 20:14:30 +00:00
Richard Mudgett
e163e37e24 * Fix accept/decline DTMF buffer overwrite in FollowMe.
* 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
2012-05-08 18:02:29 +00:00
Mark Michelson
2cb787371c Send more accurate identification information in dialog-info SIP NOTIFYs.
This uses the calling channel's caller ID and connected line information
to populate the remote and local identities in the dialog-info NOTIFY when
an extension is ringing.

There is a bit of an oddity here, and that is that we seed the remote target
with the To header of the outbound call rather than the from header. This
is because it was reported that seeding with the from header caused hints
to be broken with certain SNOM devices. A comment has been added to the code
to explain this.

(closes issue ASTERISK-16735)
reported by Maciej Krajewski
patches:
    local_remote_hint2.diff uploaded by Mark Michelson (license #5049)
	16735_tweak1.diff uploaded by Mark Michelson (license #5049)
Tested by Niccolo Belli



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-08 15:48:10 +00:00
Richard Mudgett
4547358e75 Fix type punned compiler warning in test_config.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-07 18:40:35 +00:00
Matthew Jordan
2c8f87dcb4 Support VoiceMail d() option when extension does not exist in channel's context
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
2012-05-07 18:36:54 +00:00
Mark Michelson
eafb430562 Fix findings 0-3, 5, and 8 for Coverity MISSING_BREAK errors.
(Issue ASTERISK-19662)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-07 16:01:28 +00:00
Kinsey Moore
83d3444284 Fix many issues from the NULL_RETURNS Coverity report
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
2012-05-04 22:12:55 +00:00
Richard Mudgett
186a89e99c Fix local channel chains optimizing themselves out of a call.
* Made chan_local.c:check_bridge() check the return value of
ast_channel_masquerade().  In long chains of local channels, the
masquerade occasionally fails to get setup because there is another
masquerade already setup on an adjacent local channel in the chain.

* Made the outgoing local channel (the ;2 channel) flush one voice or
video frame per optimization attempt.

* Made sure that the outgoing local channel also does not have any frames
in its queue before the masquerade.

* Made do the masquerade immediately to minimize the chance that the
outgoing channel queue does not get any new frames added and thus
unconditionally flushed.

* Made block indication -1 (Stop tones) event when the local channel is
going to optimize itself out.  When the call is answered, a chain of local
channels pass down a -1 indication for each bridge.  This blizzard of -1
events really slows down the optimization process.

(closes issue ASTERISK-16711)
Reported by: Alec Davis
Tested by: rmudgett, Alec Davis
Review: https://reviewboard.asterisk.org/r/1894/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-04 16:24:34 +00:00
Mark Michelson
c6d9524482 Fix core FINDING 2, FINDING 3, and FINDING 4 from Coverity's CONSTANT_EXPRESSION_RESULT report.
These three all are in RTP code that attempts to print the number of sequence number cycles
in an RTCP RR report. The code was masking out the upper 16 bits and then shifting the number
right by 16 bits. This led to an all zero result in all cases. The fix is to do the shift without
the bit masking.

(issue ASTERISK-19649)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-04 15:48:44 +00:00
Alexandr Anikin
4bddfcf335 Fix warning of Coverity Static analysis, change H225ProtocolIdentifier
from value to pointer per functions that use this.

(close issue ASTERISK-19670)
Reported by: Matt Jordan
Patches:
  ASTERISK-19670.patch (License #5415)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-03 14:54:22 +00:00
Alexandr Anikin
0b9bca22bd Fix coverity static analysis warning, allocate full ie structure
instead of without data buffer

(close issue ASTERISK-19674)
Reported by: Matt Jordan
Patches:
  ASTERISK-19674.patch (License #5415)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-03 14:18:25 +00:00
Terry Wilson
c068460b12 Don't leak a ref if out of memory and can't link the linkedid
If the ao2_link fails, we are most likely out of memory and bad things
are going to happen. Before those bad things happen, make sure to clean
up the linkedid references.

This patch also adds a comment explaining why linkedid can't be passed
to both local channel allocations and combines two ao2_ref calls into 1.

Review: https://reviewboard.asterisk.org/r/1895/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-02 17:02:39 +00:00
Terry Wilson
7da21c68c4 Fix a CEL LINKEDID_END race and local channel linkedids
This patch has the ;2 channel inherit the linkedid of the ;1 channel and fixes
the race condition by no longer scanning the channel list for "other" channels
with the same linkedid. Instead, cel.c has an ao2 container of linkedid strings
and uses the refcount of the string as a counter of how many channels with the
linkedid exist. Not only does this eliminate the race condition, but it also
allows us to look up the linkedid by the hashed key instead of traversing the
entire channel list.

Review: https://reviewboard.asterisk.org/r/1895/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-02 15:49:03 +00:00
Richard Mudgett
a11540c95b Fixed __ao2_ref() validating user_data twice.
(closes issue ASTERISK-19755)
Reported by: Gunther Kelleter
Patches:
      ao2_ref.patch (license #6372) patch uploaded by Gunther Kelleter


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-01 23:11:53 +00:00
Mark Michelson
095054e4a1 Fix Coverity-reported ARRAY_VS_SINGLETON error.
As it turned out, this wasn't a huge deal. We were calling
ast_app_parse_options() for a set of options of which none
took arguments. The proper thing to do for this case is to
pass NULL for the "args" parameter here. We were instead passing
a seemingly-randomly chosen char * from the function. While this
would never get written to, you can rest assured things would
have gotten bad had new options (which took arguments) been added
to func_volume.

(closes issue ASTERISK-19656)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-01 23:08:20 +00:00
Jason Parker
be16f2da64 Prevent a potential crash when using manager hooks.
Found by me while poking at DPMA-127.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-01 21:37:17 +00:00
Richard Mudgett
fde9505a95 * Fix error path resouce leak in local_request().
* Restructure local_request() to reduce indentation.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-01 21:36:54 +00:00
Kinsey Moore
dcd64542bc Play conf-placeintoconf message to the correct channel
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
2012-05-01 19:03:17 +00:00
Jonathan Rose
5b45764bb7 Fix bad check in voicemail functions for ast_inboxcount2_func
Check looks for ast_inboxcount_func instead of ast_inboxcount2_func on
ast_inboxcount2_func calls.

(closes issue ASTERISK-19718)
Reported by: Corey Farrell
Patches:
	ast_app_inboxcount2-null-refcheck.patch uploaded by Corey Farrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-01 18:16:27 +00:00
Mark Michelson
dba70c1340 Revert improved identities sent in dialog-info NOTIFY requests in r360862
Revision 360862 was intended to improve identities sent in dialog-info
NOTIFY requests. Some users reported that hint became broken once this
was done. It's not clear exactly what part of the patch has caused this
regression, but broken hints are bad.

For now, this revision is being reverted so that the next releases of
Asterisk do not have bad behavior in them. The original reported issue
will have to be fixed differently in the next version of Asterisk.

(issue ASTERISK-16735)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-30 19:39:49 +00:00
Alexandr Anikin
97787d8c5e Fix use freed pointer in return value from call thread
(issue ASTERISK-19663)
Reported by: Matt Jordan
Patches:
  ASTERISK-19663-ooh323.patch (License #5415)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-30 16:37:33 +00:00
Mark Murawki
2a6bdce6b4 Sanatize result from bfd_find_nearest_line (BETTER_BACKTRACES)
bfd_find_nearest_line can possibly set file to null resulting in a crash when strrchr(file) runs

(closes issue ASTERISK-19815)
Reported by Mark Murawski
Tested by Mark Murawski




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-30 15:51:12 +00:00
Matthew Jordan
f248f6eb71 Fix error that caused truncate operations to fail
Another very inappropriate placement of a ')' (again introduced in r362151)
caused the various truncate operations to attempt to truncate the sound file
at a position of '0'.

(issue ASTERISK-19655)
Reported by: Matt Jordan

(issue ASTERISK-19810)
Reported by: colbec


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-29 19:31:55 +00:00
Mark Michelson
139a7459cd Don't attempt to make use of the dynamic_exclude_static ACL if DNS lookup fails.
(closes issue ASTERISK-18321)
Reported by Dan Lukes
Patches:
	ASTERISK-18321.patch by Mark Michelson (license #5049)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 21:48:19 +00:00
Terry Wilson
f0eb58d0d5 Fix ast_parse_arg numeric type range checking and add tests
ast_parse_arg wasn't checking for strto* parse errors or limiting
the results by the actual range of the numeric types. This patch fixes
that and adds unit tests as well.

Review: https://reviewboard.asterisk.org/r/1879/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 21:45:15 +00:00
Matthew Jordan
c527c4d197 Prevent overflow in calculation in ast_tvdiff_ms on 32-bit machines
The method ast_tvdiff_ms attempts to calculate the difference, in milliseconds,
between two timeval structs, and return the difference in a 64-bit integer.
Unfortunately, it assumes that the long tv_sec/tv_usec members in the timeval
struct are large enough to hold the calculated values before it returns.  On
64-bit machines, this might be the case, as a long may be 64-bits.  On 32-bit
machines, however, a long may be less (32-bits), in which case, the calculation
can overflow.

This overflow caused significant problems in MixMonitor, which uses the method
to determine if an audio factory, which has not presented audio to an audiohook,
is merely late in providing said audio or will never provide audio.  In an
overflow situation, the audiohook would incorrectly determine that an audio
factory that will never provide audio is merely late instead.  This led to
situations where a MixMonitor never recorded any audio.  Note that this happened
most frequently when that MixMonitor was started by the ConfBridge application
itself, or when the MixMonitor was attached to a Local channel.

(issue ASTERISK-19497)
Reported by: Ben Klang
Tested by: Ben Klang
Patches:
  32-bit-time-overflow-10-2012-04-26.diff (license #6283) by mjordan

(closes issue ASTERISK-19727)
Reported by: Mark Murawski
Tested by: Michael L. Young
Patches:
  32-bit-time-overflow-2012-04-27.diff (license #6283) by mjordan)

(closes issue ASTERISK-19471)
Reported by: feyfre
Tested by: feyfre

(issue ASTERISK-19426)
Reported by: Johan Wilfer

Review: https://reviewboard.asterisk.org/r/1889/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 19:26:37 +00:00
Kinsey Moore
0536634ff1 Allow SIP pvts involved in Replaces transfers to fall out of reference sooner
Unref the SIP pvt stored in the refer structure as soon as it is no longer
needed so that the pvt and associated file descriptors can be freed sooner.
This change makes a reference decrement unnecessary in code that handles SIP
BYE/Also transfers which should not touch the reference anyway.

(Closes issue ASTERISK-19579)
Reported by: Maciej Krajewski
Tested by: Maciej Karjewski

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 18:57:47 +00:00
Matthew Jordan
3ef885b576 Allow for reloading SRTP crypto keys within the same SIP dialog
As a continuation of the patch in r356604, which allowed for the
reloading of SRTP keys in re-INVITE transfer scenarios, this patch
addresses the more common case where a new key is requested within 
the context of a current SIP dialog.  This can occur, for example, when
certain phones request a SIP hold.

Previously, once a dialog was associated with an SRTP object, any
subsequent attempt to process crypto keys in any SDP offer - either
the current one or a new offer in a new SIP request - were ignored.  This
patch changes this behavior to only ignore subsequent crypto keys within
the current SDP offer, but allows future SDP offers to change the keys.

(issue ASTERISK-19253)
Reported by: Thomas Arimont
Tested by: Thomas Arimont

Review: https://reviewboard.asteriskorg/r/1885/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 14:42:17 +00:00
Richard Mudgett
faec22add3 Update Pickup application documentation. (With feeling this time.)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 21:10:00 +00:00
Richard Mudgett
28fef5789b Fix DTMF atxfer running h exten after the wrong bridge ends.
When party B does an attended transfer of party A to party C, the
attending bridge between party B and C should not be running an h exten
when the bridge ends.  Running an h exten now sets a softhangup flag to
ensure that an AGI will run in dead AGI mode.

* Set the AST_FLAG_BRIDGE_HANGUP_DONT on the party B channel for the
attending bridge between party B and C.

(closes issue AST-870)

(closes issue ASTERISK-19717)
Reported by: Mario

(closes issue ASTERISK-19633)
Reported by: Andrey Solovyev
Patches:
      jira_asterisk_19633_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Andrey Solovyev, Mario


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 20:23:09 +00:00
Terry Wilson
bbd95e031d Add more constness to the end_buf pointer in the netconsole
issue ASTERISK-18308
Review: https://reviewboard.asterisk.org/r/1876/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 19:24:35 +00:00
Kinsey Moore
c4ed0550e8 Fix reference leaks involving SIP Replaces transfers
The reference held for SIP blind transfers using the Replaces header in an
INVITE was never freed on success and also failed to be freed in some error
conditions.  This caused a file descriptor leak since the RTP structures in use
at the time of the transfer were never freed.  This reference leak and another
relating to subscriptions in the same code path have now been corrected.

(closes issue ASTERISK-19579)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 13:24:11 +00:00
Alec L Davis
2ecce90e93 chan_sip: [general] maxforwards, not checked for a value greater than 255
The peer maxforwards is checked for both '< 1' and '> 255',
but the default 'maxforwards' in the [general] section is only checked for '< 1'

alecdavis (license 585)
Reported by: alecdavis
Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/1888/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 09:44:18 +00:00
Richard Mudgett
d6ab0313c6 Update Pickup application documentation. (Even better)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 03:11:00 +00:00
Richard Mudgett
78b487007c Update Pickup application documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 22:59:01 +00:00
Richard Mudgett
1302d291c7 Make DAHDISendCallreroutingFacility wait 5 seconds for a reply before disconnecting the call.
Some switches may not handle the call-deflection/call-rerouting message if
the call is disconnected too soon after being sent.  Asteisk was not
waiting for any reply before disconnecting the call.

* Added a 5 second delay before disconnecting the call to wait for a
potential response if the peer does not disconnect first.

(closes issue ASTERISK-19708)
Reported by: mehdi Shirazi
Patches:
      jira_asterisk_19708_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 20:46:15 +00:00
Richard Mudgett
74a9fcd6c4 Clear ISDN channel resetting state if the peer continues to use it.
Some ISDN switches occasionally fail to send a RESTART ACKNOWLEDGE in
response to a RESTART request.

* Made the second SETUP received after sending a RESTART request clear the
channel resetting state as if the peer had sent the expected RESTART
ACKNOWLEDGE before continuing to process the SETUP.  The peer may not be
sending the expected RESTART ACKNOWLEDGE.

(issue ASTERISK-19608)
(issue AST-844)
(issue AST-815)
Patches:
      jira_ast_815_v1.8.patch (license #5621) patch uploaded by rmudgett (modified)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 19:45:34 +00:00
Richard Mudgett
262ee9fd02 Fix recalled party B feature flags for a failed DTMF atxfer.
1) B calls A with Dial option T
2) B DTMF atxfer to C
3) B hangs up
4) C does not answer
5) B is called back
6) B answers
7) B cannot initiate transfers anymore

* Add dial features datastore to recalled party B channel that is a copy
of the original party B channel's dial features datastore.

* Extracted add_features_datastore() from add_features_datastores().

* Renamed struct ast_dial_features features_caller and features_callee
members to my_features and peer_features respectively.  These better names
eliminate the need for some explanatory comments.

* Simplified code accessing the struct ast_dial_features datastore.

(closes issue ASTERISK-19383)
Reported by: lgfsantos


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 01:21:43 +00:00
Richard Mudgett
0dbc13d013 Hangup affected channel in error paths of bridge_call_thread().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-24 23:58:55 +00:00
Tilghman Lesher
233b8364d3 On some platforms, O_RDONLY is not a flag to be checked, but merely the absence of O_RDWR and O_WRONLY.
The POSIX specification does not mandate how these 3 flags must be specified,
only that one of the three must be specified in every call.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23 16:02:28 +00:00