Commit Graph

340 Commits

Author SHA1 Message Date
Richard Mudgett 06fe3e5abe Change comment to use local channel name designators in features.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-07 20:08:37 +00:00
Kinsey Moore 781f4657b9 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)
........

Merged revisions 365398 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 365399 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-04 22:17:38 +00:00
Russell Bryant 386c2c6edf features: Add FEATURE() and FEATUREMAP() functions.
Add two new dialplan functions: FEATURE() and FEATUREMAP().  FEATURE()
lets you set some of the configuration options from the [general] section
of features.conf on a per-channel basis.  FEATUREMAP() lets you customize
the key sequence used to activate built-in features, such as blindxfer,
and automon.  See the built-in documentation for details.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 00:58:54 +00:00
Richard Mudgett b22874415e 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
........

Merged revisions 364060 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 364065 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 20:35:41 +00:00
Richard Mudgett 7f0dce3bd1 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
........

Merged revisions 363428 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 363429 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 01:26:44 +00:00
Richard Mudgett 56d10c5677 Hangup affected channel in error paths of bridge_call_thread().
........

Merged revisions 363375 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 363376 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 00:03:52 +00:00
Mark Michelson 314d459317 Fix potential race condition during call pickup.
Prior to this patch, a connected line update was queued during
call pickup and then an answer frame was queued. The original
caller would presumably then have his connected line updated
and then the call would be answered.

In actuality, the answer frame was not how the call ended up
being answered. Rather, an odd section in app_dial that checks
if the called channel's state is up.

The result is that the order of the connected line update and
the answer were variable. In most cases, this wasn't actually
a bad thing. However, if the 'I' option was passed to dial, the
connected line update would be inhibited.

The fix is to queued the connected line after the answer frame is
queued. This way the race in app_dial is between two
conditions resulting in an answer. This way the connected line
update occurs after the answer every time.

(closes issue ASTERISK-19183)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
    Mark Michelson
Patches:
    ASTERISK-19183.patch uploaded by Mark Michelson (license 5049)
........

Merged revisions 360884 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 360885 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 23:36:37 +00:00
Jonathan Rose 655a8d4420 Introducing the log message unique call identifiers feature
Log messages will now display a call number that they are tied to (ordered for calls
based on when they started). This feature is made to be minimally invasive without
requiring changes to many of the existing log messages. These IDs  won't show up for
verbose messages on CLI (but they will in log files) This is currently in phase II
of production, see more about this feature on the wiki --
https://wiki.asterisk.org/wiki/display/AST/Unique+Call-ID+Logging

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 20:01:20 +00:00
Jonathan Rose d501c2ea2d undoing 360785 due to merging mistake
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 19:59:30 +00:00
Jonathan Rose bf994f0e04 Introducing the log message unique call identifiers feature
Log messages will now display a call number that they are tied to (ordered for calls
based on when they started). This feature is made to be minimally invasive without
requiring changes to many of the existing log messages. These IDs  won't show up for
verbose messages on CLI (but they will in log files) This is currently in phase II
of production, see more about this feature on the wiki --
https://wiki.asterisk.org/wiki/display/AST/Unique+Call-ID+Logging

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-29 19:54:35 +00:00
Jonathan Rose c6979ff581 Adds F option to Bridge application
Similar to dial and queue F option.

(Closes issue ASTERISK-19282)
Reported by: To
Patches:
	bridge_f-v3.diff uploaded by To (license 6347)
Review: https://reviewboard.asterisk.org/r/1825/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22 21:25:22 +00:00
Kinsey Moore c5b3db1956 Kill off red blobs in most of main/*
Everything still compiled after making these changes, so I assume these
whitespace-only changes didn't break anything (and shouldn't have).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22 19:51:16 +00:00
Richard Mudgett 334f13d8b8 Allow AMI action callback to be reentrant.
Fix AMI module reload deadlock regression from ASTERISK-18479 when it
tried to fix the race between calling an AMI action callback and
unregistering that action.  Refixes ASTERISK-13784 broken by
ASTERISK-17785 change.

Locking the ao2 object guaranteed that there were no active callbacks that
mattered when ast_manager_unregister() was called.  Unfortunately, this
causes the deadlock situation.  The patch stops locking the ao2 object to
allow multiple threads to invoke the callback re-entrantly.  There is no
way to guarantee a module unload will not crash because of an active
callback.  The code attempts to minimize the chance with the registered
flag and the maximum 5 second delay before ast_manager_unregister()
returns.

The trunk version of the patch changes the API to fix the race condition
correctly to prevent the module code from unloading from memory while an
action callback is active.

* Don't hold the lock while calling the AMI action callback.

(closes issue ASTERISK-19487)
Reported by: Philippe Lindheimer

Review: https://reviewboard.asterisk.org/r/1818/
Review: https://reviewboard.asterisk.org/r/1820/
........

Merged revisions 359979 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 359980 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-20 17:31:28 +00:00
Russell Bryant 9410f85699 Fix incorrect sizeof() usage in features.c.
This didn't actually result in a bug anywhere, luckily.  The only place
where the result of these memcpys was used is in app_dial, and the only
field that it read out of ast_call_feature was the first one, which is an
int, so these memcpys always copied just enough to avoid a problem.
........

Merged revisions 359069 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 359072 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-14 00:22:10 +00:00
Terry Wilson cb94c35a85 Fix setting CDR variables in the hangup extension
A previous CDR fix for setting CDR variables during a bridge via
custom dialplan features broke setting CDR variables in the
hangup extension. This patch fixes the issue.

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

Merged revisions 358978 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358989 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 20:43:19 +00:00
Terry Wilson 786f5898d1 Finalize ast_channel opaquification
Review: https://reviewboard.asterisk.org/r/1786/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 18:20:34 +00:00
Terry Wilson 0e5c761c28 Opaquify ast_channel typedefs, fd arrays, and softhangup flag
Review: https://reviewboard.asterisk.org/r/1784/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01 22:09:18 +00:00
Terry Wilson a9d607a357 Opaquify ast_channel structs and lists
Review: https://reviewboard.asterisk.org/r/1773/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29 16:52:47 +00:00
Kinsey Moore 1fac2fba4b Deprecated macro usage for connected line, redirecting, and CCSS
This commit adds GoSub alternatives to connected line, redirecting, and CCSS
macro hooks so that macro can finally be deprecated.  This also adds
deprecation warnings for those features when used and in documentation.

Review: https://reviewboard.asterisk.org/r/1760/
(closes issue SWP-4256)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 16:50:19 +00:00
Terry Wilson a9f4d13b02 Copy CDR variables when set during a bridge
This patch makes sure amaflags, accountcode, and userfield get copied
to the bridge CDR when set during a bridge (like via a custom feature).

(closes issue ASTERISK-16990)
Review: https://reviewboard.asterisk.org/r/1721/
........

Merged revisions 356963 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 356964 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 16:08:28 +00:00
Terry Wilson ebaf59a656 Opaquification for ast_format structs in struct ast_channel
Review: https://reviewboard.asterisk.org/r/1770/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 00:32:20 +00:00
Richard Mudgett 235f88d122 Fix blind transfer parking issues if the dialed extension is not recognized as a parking extension.
Custom parking extensions may not be coded such that the first and only
extension priority is the Park application.  These custom parking
extensions will not be recognized as parking extensions.  When a call is
blind transferred to an extension that is not recognized as a parking
extension, the normal blind transfer code causes the transferred channel
to start executing dialplan.  Calls that get parked in this manner do not
know the original channel name that parked the call so the original parker
could never be called back if the parked call is not retrieved before the
timeout time.  The parking space is also announced to the call being
parked as a side effect of not knowing the original parking channel.

* Fix handling of BLINDTRANSFER channel variable for call parking.

* Fixed SIP blind transfer using the wrong dialplan context variable to
check for the parking extension.

(closes issue ASTERISK-19322)
Reported by: aragon
Tested by: rmudgett, jparker

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

JIRA AST-766
........

Merged revisions 356521 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 356522 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23 20:14:54 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Terry Wilson 34c55e8e7c Opaquify char * and char[] in ast_channel
Review: https://reviewboard.asterisk.org/r/1733/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:27:06 +00:00
Richard Mudgett d162e85978 Add missing headers to AMI UnParkedCall event to uniquely identify the call.
The AMI UnParkedCall event was missing the Parkinglot and Uniqueid headers
that the AMI ParkedCall event contains.

(closes issue ASTERISK-19240)
Reported by: Michael Yara
........

Merged revisions 354116 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 354119 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-06 17:33:41 +00:00
Richard Mudgett 23bc964e1c Constify some more channel driver technology callback parameters.
Review: https://reviewboard.asterisk.org/r/1707/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 19:53:38 +00:00
Terry Wilson 99cae5b750 Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 20:12:09 +00:00
Mark Michelson c3c6b5a0ba Fix grammar of comment.
........

Merged revisions 352230 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 352231 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 20:31:11 +00:00
Mark Michelson 0920c50341 Fix blind transfers from failing if an 'h' extension is present.
This prevents the 'h' extension from being run on the transferee
channel when it is transferred via a native transfer mechanism such
as SIP REFER.

(closes ASTERISK-19173)
Reported by: Ross Beer
Tested by: Kristjan Vrban
Patches:
	ASTERISK-19173 by Mark Michelson (license 5049)

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

Merged revisions 352199 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 352228 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 20:29:48 +00:00
Mark Michelson 778fa4abaf Various parking improvements.
* Adds per-parking lot options comebackcontext and comebackdialtime
* Makes comebacktoorigin settable per parking lot
* Sets a PARKER channel variable when comebacktoorigin is disabled

(closes issue ASTERISK-16643)
Reported by: Mitch Sharp (bluecrow76)
Patches:
asterisk-1.6.2.17.2-park-features-comebackcontext-consolidated-v3.diff by Mitch Sharp (bluecrow76) license 5231
with updates by me.

Review: https://reviewboard.asterisk.org/r/1674
Review: https://reviewboard.asterisk.org/r/963
Reviewed by Richard Mudgett



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-20 20:47:42 +00:00
Richard Mudgett ec2b28d913 Remove some dead code in ast_bridge_call().
None of the parameters to ast_bridge_call() can be NULL for the bridge to
work so no need to check for it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-13 18:52:53 +00:00
Jonathan Rose 19a9761084 Adds peer to CEL report on CEL_BRIDGE_START and CEL_BRIDGE_END
(closes issue ASTERISK-17940)
Reporter: Nic Colledge
Patches:
	features_18.patch uploaded by Nic Colledge (license 6245)
........

Merged revisions 350501 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 350502 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-12 16:10:47 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Jonathan Rose 19a4928fee INFO/Record request configurable to use dynamic features
Adds two new options to SIP peers allowing them to specify features (dynamic or builtin)
to use when sending INFO/record requests. Recordonfeature activates whatever feature
is specified when recieving a record: on request while recordofffeature activates
whatever feature is specified when receiving a record: off request. Both of these
features can be disabled by setting the feature to an empty string.

(closes issue ASTERISK-16507)
Reported by: Jon Bright
Review: https://reviewboard.asterisk.org/r/1634/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-23 20:42:21 +00:00
Richard Mudgett be74e6f16e Clean-up on isle five for __ast_request_and_dial() and ast_call_forward().
* Add locking when a channel inherits variables and datastores in
__ast_request_and_dial() and ast_call_forward().  Note: The involved
channels are not active so there was minimal potential for problems.

* Remove calls to ast_set_callerid() in __ast_request_and_dial() and
ast_call_forward() because the set information is for the wrong direction.

* Don't use C++ keywords for variable names in ast_call_forward().

* Run the redirecting interception macro if defined when forwarding a call
in ast_call_forward().  Note: Currently will never execute because the
only callers that supply a calling channel supply a hungup or zombie
channel.

* Make feature_request_and_dial() put the transferee into autoservice when
it calls ast_call_forward() in case a redirection interception macro is
run.  Note: Currently will never happen because the caller channel (Party
B) is always hungup at this time.

* Make feature_request_and_dial() ignore the AST_CONTROL_PROCEEDING frame
to silence a log message.
........

Merged revisions 348464 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 348465 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16 23:58:44 +00:00
Richard Mudgett b05d4603c4 Fix crash during CDR update.
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/
........

Merged revisions 348362 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 348363 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-16 21:10:19 +00:00
Jonathan Rose 480d46f92c Add and document PARKEDCALL variable set during timeout
PARKEDCALL variable tracks which parking lot the call was last parked in.  This can be
used afterwards for flow control when returntoorigin is set to off. I went ahead and
documented both this and the existing variable set during timeout (PARKINGSLOT) in
the sample features.conf since there was no prior mention of variables being set during
timeout.

(closes issue ASTERISK-16239)
Reported By: Clod Patry
Patches:
	M17503.diff uploaded by Clod Patry (license 5138)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-14 21:08:20 +00:00
Richard Mudgett 3f13a41886 Mark channel running the h exten with the soft-hangup flag.
When a bridge is broken, ast_bridge_call() might execute the h exten on
the calling channel.  However, that channel may not have been the channel
that broke the bridge by hanging up.  The channel executing the h exten
must be in a hung up state so things like AGI run in the correct mode.

* Make sure ast_bridge_call() marks the channel it is executing the h
exten on as hung up.  (The AST_SOFTHANGUP_APPUNLOAD flag is used so as to
match the pbx.c main dialplan execution loop when it executes the h
exten.)

(closes issue ASTERISK-18811)
Reported by: David Hajek
Patches:
      jira_asterisk_18811_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: David Hajek, rmudgett
........

Merged revisions 347595 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 347600 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-08 17:55:07 +00:00
Jonathan Rose f6cd5af36b Fixes a segfault caused by referencing null frames introduced in r338623
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-24 22:09:11 +00:00
Richard Mudgett b961d57c4c Fix AGI exec Park to honor the Park application parameters.
The fix for ASTERISK-12715 and ASTERISK-12685 added a check for the Park
application because the channel needed to be masqueraded to prevent a
crash.  Since the Park application now always masquerades the channel into
the parking lot, the special check is no longer needed.  The fix also
resulted in AGI exec Park attempting to double park the call and not honor
the Park application parameters.

* Removed no longer necessary call to ast_masq_park_call() by AGI exec for
the Park application.  (Reverts -r146923)

* Fix Park application to only return 0 or -1.  The AGI exec Park was
causing broken pipe error messages because the Park application returned 1
on successful park.

(closes issue ASTERISK-18737)
........

Merged revisions 341717 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 341718 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-20 22:03:35 +00:00
Richard Mudgett 10de040b6e More parking issues.
* Fix potential deadlocks in SIP and IAX blind transfer to parking.

* Fix SIP, IAX, DAHDI analog, and MGCP channel drivers to respect the
parkext_exclusive option with transfers (Park(,,,,,exclusive_lot)
parameter).  Created ast_park_call_exten() and ast_masq_park_call_exten()
to maintian API compatibility.

* Made masq_park_call() handle a failed ast_channel_masquerade() setup.

* Reduced excessive struct parkeduser.peername[] size.
........

Merged revisions 341254 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 341255 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-18 21:15:45 +00:00
Richard Mudgett cabf08b511 Fix DTMF blind transfer continuing to execute dialplan after transfer.
Party A calls Party B.
Party A DTMF blind transfers Party B to Party C.
Party A channel continues to execute dialplan.

* Fixed the return value of builtin_blindtransfer() to return the correct
value after a transfer so the dialplan will not keep executing.

* Removed unnecessary connected line update that did not really do
anything.

* Made access to GOTO_ON_BLINDXFR thread safe in check_goto_on_transfer().

* Fixed leak of xferchan for failure cases in check_goto_on_transfer().

* Updated debug messages in builtin_blindtransfer() and
check_goto_on_transfer().

(closes issue ASTERISK-18275)
Reported by: rmudgett
Tested by: rmudgett
........

Merged revisions 340809 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 340810 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-13 23:08:48 +00:00
Olle Johansson 6e0f961432 Preserve DTMF length in main/features.c
Review: https://reviewboard.asterisk.org/r/1463/

A small part of much larger work with DTMF duration in Asterisk, 
funded  by IPvision AS in Denmark.

Thanks to irroot for the review!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-30 13:21:17 +00:00
Matthew Jordan 8b5ba33fe0 Merged revisions 335078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r335078 | mjordan | 2011-09-09 11:27:01 -0500 (Fri, 09 Sep 2011) | 29 lines
  
  Merged revisions 335064 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r335064 | mjordan | 2011-09-09 11:09:09 -0500 (Fri, 09 Sep 2011) | 23 lines
    
    Updated SIP 484 handling; added Incomplete control frame
    
    When a SIP phone uses the dial application and receives a 484 Address 
    Incomplete response, if overlapped dialing is enabled for SIP, then
    the 484 Address Incomplete is forwarded back to the SIP phone and the
    HANGUPCAUSE channel variable is set to 28.  Previously, the Incomplete
    application dialplan logic was automatically triggered; now, explicit
    dialplan usage of the application is required.
    
    Additionally, this patch adds a new AST_CONTOL_FRAME type called
    AST_CONTROL_INCOMPLETE.  If a channel driver receives this control frame,
    it is an indication that the dialplan expects more digits back from the
    device.  If the device supports overlap dialing it should attempt to 
    notify the device that the dialplan is waiting for more digits; otherwise,
    it can handle the frame in a manner appropriate to the channel driver.
    
    (closes issue ASTERISK-17288)
    Reported by: Mikael Carlsson
    Tested by: Matthew Jordan
    
    Review: https://reviewboard.asterisk.org/r/1416/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-09 16:28:23 +00:00
Richard Mudgett 3d63ec89e0 Merged revisions 334841 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r334841 | rmudgett | 2011-09-07 14:33:38 -0500 (Wed, 07 Sep 2011) | 17 lines
  
  Merged revisions 334840 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r334840 | rmudgett | 2011-09-07 14:31:44 -0500 (Wed, 07 Sep 2011) | 10 lines
    
    Fix AMI action Park crash.
    
    * Made AMI action Park not say anything to the parker channel (AMI header
    Channel2) since the AMI action is a third party parking the call.  (This
    is a change in behavior that cannot be preserved without a lot of effort.)
    
    * Made not play pbx-parkingfailed if the Park 's' option is used.
    
    JIRA AST-660
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 19:35:18 +00:00
Stefan Schmidt 081dcb4a46 Merged revisions 334747 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r334747 | schmidts | 2011-09-07 15:10:37 +0000 (Wed, 07 Sep 2011) | 9 lines
  
  Merged revisions 334682 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r334682 | schmidts | 2011-09-07 13:26:50 +0000 (Wed, 07 Sep 2011) | 3 lines
    
    Adding the Feature to sent a Reason Header in a SIP Cancel message by set the flag AST_FLAG_ANSWERED_ELSEWHERE before doing a masquerade in the pickup function.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 15:37:32 +00:00
Stefan Schmidt 40f505c009 clean up wrong merged stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 14:47:03 +00:00
Stefan Schmidt 334401e57d Merged revisions 334682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r334682 | schmidts | 2011-09-07 13:26:50 +0000 (Wed, 07 Sep 2011) | 3 lines
  
  Adding the Feature to sent a Reason Header in a SIP Cancel message by set the flag AST_FLAG_ANSWERED_ELSEWHERE before doing a masquerade in the pickup function.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 14:23:38 +00:00
Stefan Schmidt e549520b78 Adding the Feature to sent a Reason Header in a SIP Cancel message by set the flag AST_FLAG_ANSWERED_ELSEWHERE before doing a masquerade in the pickup function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-07 13:31:13 +00:00
Richard Mudgett 3ad6dccac8 Merged revisions 332101 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332101 | rmudgett | 2011-08-16 12:17:28 -0500 (Tue, 16 Aug 2011) | 140 lines
  
  Merged revisions 332100 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332100 | rmudgett | 2011-08-16 11:31:36 -0500 (Tue, 16 Aug 2011) | 133 lines
    
    Fix multiple parking issues.
    
    JIRA ASTERISK-17183
    Multi-parkinglot directs calls to wrong parkinglot.
    JIRA ASTERISK-17870
    Cannot retrieve parked calls.
    JIRA ASTERISK-17430
    ParkedCall() with no extension should pickup first available call and does not.
    JIRA AST-576
    Issues with parking lots
    
    * Removed searching for parking lots by extension.  Parking lots can only
    be found by the parking lot name since parking lot access extensions and
    spaces are not guaranteed to be unique.
    
    * Added parking_lot_name option to the Park and ParkedCall applications.
    Updated documentation for Park and ParkedCall applications.
    
    * Add parkext_exclusive configuration option to make parking entry
    extensions specify which parking lot they access.
    
    (closes issue ASTERISK-17183)
    Reported by: David Cabrejos
    Tested by: rmudgett, David Cabrejos
    
    (closes issue ASTERISK-17870)
    Reported by: Remi Quezada
    
    (closes issue ASTERISK-17430)
    Reported by: Philippe Lindheimer
    
    
    JIRA ASTERISK-17452
    Parking_offset not used
    JIRA AST-624
    'next' setting for findslot does nothing
    
    * Reimplemented since findslot feature option broken by -r114655.
    
    (closes issue ASTERISK-17452)
    Reported by: David Woolley
    Tested by: rmudgett
    
    
    JIRA ASTERISK-15792
    Dialplan continues execution after transfer to park.
    
    This happens for DTMF attended transfer, DTMF blind transfer, and DTMF
    one-touch-parking if the party initiating these features also initiated
    the call.
    
    * Fixed the return code from the affected builtin features when parking a
    call.
    
    (closes issue ASTERISK-15792)
    Reported by: Mat Murdock
    Tested by: rmudgett, twilson
    
    
    JIRA AST-607
    The courtesytone is not playing to the expected call when picking up a
    parked call.
    
    This is mostly a documentation problem.  However, the option is not reset
    to the default when features.conf is reloaded.
    
    * Updated features.conf.sample documentation for courtesytone and
    parkedplay options.
    
    * Reset the parkedplay option to default when features.conf is reloaded.
    
    
    JIRA AST-615
    AMI Park action followed by features reload results in orphaned channels
    in parking lot.
    
    * Reloading features.conf will not touch parking lots that have calls
    still parked in them.  Reload again at a later time.
    
    
    Misc additional fixes:
    
    * Added unit test for parking lot dialplan usage checking.
    
    * Made update connected line when a parked call is retrieved from a
    parking lot.
    
    * Made retrieved parked call stop ringing or MOH depending upon how the
    call was waiting in the parking lot.
    
    * Made CLI "features show" indicate if the parking lot is enabled for use.
    
    * Added PARKINGDYNEXTEN channel variable to allow dynamic parking lots to
    specify the parking lot access extension.
    
    * Made AMI ParkedCalls action ParkedCall events have a Parkinglot header.
    
    * Made AMI ParkedCalls action ParkedCallsComplete event have a Total
    header.
    
    * Fixed potential deadlock from AMI Park action holding channel locks
    while calling masq_park_call().
    
    * Fixed several places where ast_strdupa() were used inside of loops.
    (Mostly fixed by refactoring the loop body into its own function.)
    
    * Fixed copy_parkinglot() copying too much from the source parking lot.
    Extracted the parking lot configuration settings into struct
    parkinglot_cfg.
    
    * Refactored courtesytone playing code to put the channel not playing the
    tone in autoservice.
    
    * Fix when pbx-parkingfailed is played that the other channel is put in
    autoservice if it exists.
    
    * Fixed parkinglot reference leak in parked_call_exec() error paths.
    
    * Fixed parkinglot_unref() use of parkinglot after it was unreffed.
    
    * Made destroy the struct ast_parkinglot parkings lock when done.
    
    * Refactored the features.conf parking lot configuration code to eliminate
    redundancy.
    
    * Fixed feature reload to better protect parking lots.
    
    * Fixed parking lot container reference leak in handle_parkedcalls().
    
    * Fixed the total count in handle_parkedcalls().
    
    Review: https://reviewboard.asterisk.org/r/1358/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-16 17:23:08 +00:00
Richard Mudgett fa794d8f7a Merged revisions 331420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r331420 | rmudgett | 2011-08-10 14:07:53 -0500 (Wed, 10 Aug 2011) | 2 lines
  
  Make sure feature_request_and_dial() initializes outstate if passed in.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10 19:08:22 +00:00
Richard Mudgett 02ecb12f64 Merged revisions 331418 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r331418 | rmudgett | 2011-08-10 13:25:08 -0500 (Wed, 10 Aug 2011) | 6 lines
  
  Revert -r318141.  It was a band-aid that only partially fixed parking.
  
  A better fix is on reviewboard review 1358.
  
  (issue ASTERISK-17374)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10 18:27:16 +00:00
Richard Mudgett b99b1116be Merged revisions 331265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r331265 | rmudgett | 2011-08-09 18:12:49 -0500 (Tue, 09 Aug 2011) | 22 lines
  
  Merged revisions 331248 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r331248 | rmudgett | 2011-08-09 17:12:59 -0500 (Tue, 09 Aug 2011) | 15 lines
    
    Misc minor items found in code.
    
    * Add some reentrancy protection in pbx.c when creating the contexts_table
    hash table.
    
    * Fix inverted test in chan_sip.c conditional code.
    
    * Fix uninitialized variable and use of the wrong variable in chan_iax2.c.
    
    * Fix test of return value in app_parkandannounce.c.  Explicitly testing
    for -1 is bad if the function does not actually return that value when it
    fails.
    
    * Fixup some comments and add some curly braces in features.c.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-09 23:17:13 +00:00
Russell Bryant f243d129c9 Merged revisions 329257 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r329257 | russell | 2011-07-21 15:22:36 -0500 (Thu, 21 Jul 2011) | 2 lines
  
  s/1.10/10.0/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-21 20:26:44 +00:00
Richard Mudgett 3b80737787 Merged revisions 329145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r329145 | rmudgett | 2011-07-21 11:52:17 -0500 (Thu, 21 Jul 2011) | 16 lines
  
  Merged revisions 329144 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r329144 | rmudgett | 2011-07-21 11:46:21 -0500 (Thu, 21 Jul 2011) | 9 lines
    
    Dialplan bridge() app mutex 'current_dest_chan' freed more times than we've locked!
    
    This appears to be a leftover from when ast_channel was converted to ao2
    objects.
    
    Simply removed the extraneous unlock.
    
    (closes issue ASTERISK-17772)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-21 16:59:38 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
David Vossel d5ea9e5ae2 Merged revisions 324652 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r324652 | dvossel | 2011-06-23 13:23:21 -0500 (Thu, 23 Jun 2011) | 20 lines
  
  Merged revisions 324634 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r324634 | dvossel | 2011-06-23 13:18:46 -0500 (Thu, 23 Jun 2011) | 13 lines
    
    Merged revisions 324627 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r324627 | dvossel | 2011-06-23 13:16:52 -0500 (Thu, 23 Jun 2011) | 7 lines
      
      Addresses AST-2011-010, remote crash in IAX2 driver
      
      Thanks to twilson for identifying the issue and providing the patches.
      
      AST-2011-010
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-23 18:26:09 +00:00
Terry Wilson c33e1b0e27 Merged revisions 323754 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r323754 | twilson | 2011-06-15 13:21:52 -0500 (Wed, 15 Jun 2011) | 23 lines
  
  Merged revisions 323733 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r323733 | twilson | 2011-06-15 13:13:00 -0500 (Wed, 15 Jun 2011) | 16 lines
    
    Merged revisions 323732 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r323732 | twilson | 2011-06-15 13:06:24 -0500 (Wed, 15 Jun 2011) | 9 lines
      
      Fix DYNAMIC_FEATURES
      
      DYNAMIC_FEATURES were broken by a recent DTMF change. This patch makes
      sure that dynamic features are also checked when deciding whether or not
      to pass DTMF through or store it for interpreting.
      
      (closes issue ASTERISK-17914)
      Reported by: vrban
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 18:23:20 +00:00
Richard Mudgett 0a8f9d2cf0 Merged revisions 322749 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322749 | rmudgett | 2011-06-09 11:31:53 -0500 (Thu, 09 Jun 2011) | 15 lines
  
  Remove potential deadlock in call pickup race.
  
  Deadlock is possible in ast_do_pickup() when holding the target channel
  lock and trying to get the chan channel lock.  Also, holding the target
  lock when calling ast_channel_masquerade() is not a good idea because that
  routine does deadlock avoidance.
  
  * Removed the need to hold the target lock after marking the target with a
  datastore and getting the connected line data off of the target channel.
  
  * Moved can_pickup() to ast_can_pickup() in features.c.  Now all the call
  pickup methods use the same basic call pickup availability check.
  
  Review: https://reviewboard.asterisk.org/r/1234/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 16:47:07 +00:00
Leif Madsen a2ca0997a6 Merged revisions 321333 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321333 | lmadsen | 2011-05-27 17:40:23 -0400 (Fri, 27 May 2011) | 7 lines
  
  Allow parking lot hints and musicclass to be set.
  
  (closes issue #19378)
  Reported by: sboily_proformatique
  Patches:
        pf_parkinghint_music_fix uploaded by sboily proformatique (license 206)
  Tested by: russell
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 21:40:52 +00:00
Alec L Davis 7cc83a9018 Merged revisions 321211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321211 | alecdavis | 2011-05-27 20:31:15 +1200 (Fri, 27 May 2011) | 16 lines
  
  Fix *8 directed pickup locks system during pickupsound play out
  
  move playout from sip_pickup_thread to bridge using BRIDGE_PLAY_SOUND method,
  This stop the clash of 2 threads trying to write audio to same channel.
  In addition fixes choppy audio beep in issue 19177.
   
   (issue #18654)
   (issue #19177)
   Reported by: Docent
   Patches: 
        review1232-1.8.diff.txt alecdavis (license 585)
   Tested by: alecdavis
   
  Review: https://reviewboard.asterisk.org/r/1232/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 08:37:59 +00:00
Richard Mudgett 0096238b52 Merged revisions 320823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320823 | rmudgett | 2011-05-25 12:06:38 -0500 (Wed, 25 May 2011) | 18 lines
  
  The AMI Newstate event contains different information between v1.4 and v1.8.
  
  The addition of connected line support in v1.8 changes the behavior of the
  channel caller ID somewhat.  The channel caller ID value no longer time
  shares with the connected line ID on outgoing call legs.  The timing of
  some AMI events/responses output the connected line ID as caller ID.
  These party ID's are now separate.
  
  * The ConnectedLineNum and ConnectedLineName headers were added to many
  AMI events/responses if the CallerIDNum/CallerIDName headers were also
  present.
  
  (closes issue #18252)
  Reported by: gje
  Tested by: rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1227/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25 17:14:11 +00:00
Richard Mudgett a42bf8cc92 Merged revisions 320796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320796 | rmudgett | 2011-05-25 11:23:11 -0500 (Wed, 25 May 2011) | 17 lines
  
  Give zombies a safe channel driver to use.
  
  Recent crashes from zombie channels suggests that they need a safe home to
  goto.  When a masquerade happens, the physical part of the zombie channel
  is hungup.  The hangup normally sets the channel private pointer to NULL.
  If someone then blindly does a callback to the channel driver, a crash is
  likely because the private pointer is NULL.
  
  The masquerade now sets the channel technology of zombie channels to the
  kill channel driver.
  
  Related to the following issues:
  (issue #19116)
  (issue #19310)
  
  Review: https://reviewboard.asterisk.org/r/1224/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25 16:50:38 +00:00
Richard Mudgett 2af231dd91 Merged revisions 320059 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320059 | rmudgett | 2011-05-20 12:03:49 -0500 (Fri, 20 May 2011) | 1 line
  
  Misc comment cleanup in features.c.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 17:04:53 +00:00
Richard Mudgett ae091d166a Merged revisions 320057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320057 | rmudgett | 2011-05-20 11:43:02 -0500 (Fri, 20 May 2011) | 19 lines
  
  Crash while transferring a call during DTMF feature timeout.
  
  When a call is being attended transferred during the time between
  AST_FRAME_DTMF_BEGIN and AST_FRAME_DTMF_END, the transferred channel
  becomes a zombie (so tech data is not available), making ast_dtmf_stream()
  segfault when it tries to send the DTMF digit (at least with SIP
  channels).
  
  Patch based on feature-end-zombie.patch uploaded by Irontec (license 1256)
  
  * Check for zombies when ast_channel_bridge() returns.
  
  * Guarantee that the fo parameter value is initialized in
  ast_channel_bridge() before any returns.
  
  (closes issue #19116)
  Reported by: Irontec
  Tested by: rmudgett
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 16:46:02 +00:00
Richard Mudgett b1cfd0e059 Merged revisions 320007 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320007 | rmudgett | 2011-05-20 11:19:01 -0500 (Fri, 20 May 2011) | 2 lines
  
  Change some variable names to make pickup code easier to understand.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 16:20:25 +00:00
Richard Mudgett 0436c501c9 Merged revisions 319997 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319997 | rmudgett | 2011-05-20 10:48:25 -0500 (Fri, 20 May 2011) | 25 lines
  
  Crash when using directed pickup applications.
  
  The directed pickup applications can cause a crash if the pickup was
  successful because the dialplan keeps executing.
  
  This patch does the following:
  
  * Completes the channel masquerade on a successful pickup before the
  application returns.  The channel is now guaranteed a zombie and must not
  continue executing the dialplan.
  
  * Changes the return value of the directed pickup applications to return
  zero if the pickup failed and nonzero(-1) if the pickup succeeded.
  
  * Made some code optimizations that no longer require re-checking the
  pickup channel to see if it is still available to pickup.
  
  (closes issue #19310)
  Reported by: remiq
  Patches:
        issue19310_v1.8_v2.patch uploaded by rmudgett (license 664)
  Tested by: alecdavis, remiq, rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1221/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 15:52:20 +00:00
Jonathan Rose 87004f0d9f Merged revisions 319866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319866 | jrose | 2011-05-19 13:32:38 -0500 (Thu, 19 May 2011) | 11 lines
  
  Fix Randomize option on Park()
  
  The randomize option was generally not working like it should have at all on Park().
  This patch restores intended functionality.
  
  (closes issue #18862)
  Reported by: davidw
  Tested by: jrose
  
  Review: https://reviewboard.asterisk.org/r/1222/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-19 18:36:38 +00:00
Richard Mudgett db89abf0bd Merged revisions 318868 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318868 | rmudgett | 2011-05-13 11:28:26 -0500 (Fri, 13 May 2011) | 19 lines
  
  CDR's are being written immediately on caller hangup.
  
  CDR's are being written immediately on caller hangup.  The dialplan is not
  able to modify it in the h exten.  The h exten in the initial context is
  not run before closing CDR's when the bridge is unlinked if a macro is
  active and does not have an h exten.
  
  * Make ast_bridge_call() check for an h exten in the current context and
  if a macro is active then the initial context.  The first h exten found is
  then run before closing the CDR.
  
  (closes issue #18212)
  Reported by: leearcher
  Patches:
        issue18212_v1.8.patch uploaded by rmudgett (license 664)
  Tested by: rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1206/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-13 16:30:29 +00:00
Alec L Davis 892b7a2efd Merged revisions 318671 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318671 | alecdavis | 2011-05-13 10:52:08 +1200 (Fri, 13 May 2011) | 30 lines
  
  Fix directed group pickup feature code *8 with pickupsounds enabled 
  
  Since 1.6.2, the new pickupsound and pickupfailsound in features.conf cause many issues.
  
  1). chan_sip:handle_request_invite() shouldn't be playing out the fail/success audio, as it has 'netlock' locked.
  2). dialplan applications for directed_pickups shouldn't beep.
  3). feature code for directed pickup should beep on success/failure if configured.
  
  Created a sip_pickup() thread to handle the pickup and playout the audio, spawned from handle_request_invite.
  
  Moved app_directed:pickup_do() to features:ast_do_pickup().
  
  Functions below, all now use the new ast_do_pickup()
  app_directed_pickup.c:
     pickup_by_channel()
     pickup_by_exten()
     pickup_by_mark()
     pickup_by_part()
  features.c:
     ast_pickup_call()
  
  (closes issue #18654)
  Reported by: Docent
  Patches: 
        ast_do_pickup_1.8_trunk.diff.txt uploaded by alecdavis (license 585)
  Tested by: lmadsen, francesco_r, amilcar, isis242, alecdavis, irroot, rymkus, loloski, rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1185/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-12 22:56:43 +00:00
Richard Mudgett bf57bb3c89 Merged revisions 318282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318282 | rmudgett | 2011-05-09 14:07:01 -0500 (Mon, 09 May 2011) | 24 lines
  
  Hangup extension executed twice.
  
  When a user hangs up a call, in certain circumstances, the hangup
  extension can end up being executed twice:
  
  1) If a call is bridged and the 'h' extension executes the Hangup
  application, then the 'h' extension will be executed twice.
  
  2) If a call is bridged within a macro (Dial or Queue), it has its own 'h'
  extension, the main context also has an 'h' extension, and the macro 'h'
  extension executes the Hangup application, then both 'h' extensions will
  be executed.
  
  * Revert originally commited fix for #16106 and just set
  AST_FLAG_BRIDGE_HANGUP_RUN unconditionally in ast_bridge_call().  The
  bridge code just executed an 'h' extension so the main PBX loop does not
  need to execute one as well.
  
  (issue #16106)
  Reported by: ajohnson
  
  (issue #16548)
  Reported by: hajekd
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 19:09:16 +00:00
Jonathan Rose ff4c7d46c0 Minor change to 318141 to improve parsing behavior.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 14:37:10 +00:00
Jonathan Rose 229e066dcb Allows ParkedCall application to specify a parkinglot.
When invoking the app parkedcall, the argument can now include '@parkinglot' after the
extension.

(closes issue #18777)
Reported by: cartama
Patches:
      0018777.diff uploaded by cartama (license 1157)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 13:56:32 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Terry Wilson 8d2a71877a Merged revisions 315644 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r315644 | twilson | 2011-04-26 14:39:01 -0700 (Tue, 26 Apr 2011) | 32 lines
  
  Merged revisions 315643 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r315643 | twilson | 2011-04-26 14:27:44 -0700 (Tue, 26 Apr 2011) | 25 lines
    
    Merged revisions 315596 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r315596 | twilson | 2011-04-26 14:16:10 -0700 (Tue, 26 Apr 2011) | 18 lines
      
      Allow transfer loops without allowing forwarding loops
      
      We try to avoid the situation where two phones may be forwarded to each other
      causing an infinite loop by storing each dialed interface in a channel
      datastore and checking the list before dialing out. This works, but currently
      breaks situations like A calls B, A transfers B to C, B transfers C to A, and A
      transfers C to B. Since human interaction is happening here and not an
      automated forwarding loop, it should be allowed.
      
      This patch removes the dialed_interfaces datastore when a call is bridged (a
      suggestion from the brilliant mmichelson). If a call is being bridged, it
      should be safe to assume that we aren't stuck in a loop.
      
      Since we are now handling this is the bridge code, the previous attempts at
      handling it in app_dial and app_queue are removed.
      
      Review: https://reviewboard.asterisk.org/r/1195/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26 22:26:37 +00:00
Jonathan Rose 68dd87ef0d Merged revisions 313048 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r313048 | jrose | 2011-04-07 08:35:33 -0500 (Thu, 07 Apr 2011) | 16 lines
  
  Merged revisions 313047 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r313047 | jrose | 2011-04-07 08:23:01 -0500 (Thu, 07 Apr 2011) | 9 lines
    
    Makes parking lots clear and rebuild properly when features reload is invoked from CLI
    
    Before, default parkinglot in context parkedcalls with ext 700 would always be present and when reload was invoked, the previous parkinglots would not be cleared.
    
    (closes issue #18801)
    Reported by: mickecarlsson
    
    Review: https://reviewboard.asterisk.org/r/1161/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-07 13:42:13 +00:00
Terry Wilson d958ca6953 Merged revisions 310902 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310902 | twilson | 2011-03-16 12:19:57 -0500 (Wed, 16 Mar 2011) | 43 lines
  
  Merged revisions 310889 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r310889 | twilson | 2011-03-16 12:03:27 -0500 (Wed, 16 Mar 2011) | 36 lines
    
    Merged revisions 310888 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r310888 | twilson | 2011-03-16 11:58:42 -0500 (Wed, 16 Mar 2011) | 29 lines
      
      Don't delay DTMF in core bridge while listening for DTMF features
      
      This patch is mostly the work of Olle Johansson. I did some cleanup and
      added the silence generating code if transmit_silence is set.
      
      When a channel listens for DTMF in the core bridge, the outbound DTMF is not
      sent until we have received DTMF_END. For a long DTMF, this is a disaster. We
      send 4 seconds of DTMF to Asterisk, which sends no audio for those 4 seconds.
      Some products see this delay and the time skew on RTP packets that results and
      start ignoring the audio that is sent afterward.
      
      With this change, the DTMF_BEGIN frame is inspected and checked. If it matches
      a feature code, we wait for DTMF_END and activate the feature as before. If
      transmit_silence=yes in asterisk.conf, silence is sent if we paritally match a
      multi-digit feature. If it doesn't match a feature, the frame is forwarded
      along with the DTMF_END without delay. By doing it this way, DTMF is not delayed.
      
      (closes issue #15642)
      Reported by: jasonshugart
      Patches: 
            issue_15652_dtmf_ast-1.4.patch.txt uploaded by twilson (license 396)
      Tested by: globalnetinc, jde
      
      (closes issue #16625)
      Reported by: sharvanek
      
      Review: https://reviewboard.asterisk.org/r/1092/
      Review: https://reviewboard.asterisk.org/r/1125/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-16 17:29:16 +00:00
Jeff Peeler e2df246636 Allow parkedmusicclass to be settable for non-default parking lots.
(closes issue #17946)
Reported by: bluecrow76
Patches:
      asterisk-1.8.0-beta4-multipark-fixes-2010SEP02.diff


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-09 20:11:11 +00:00
Jeff Peeler 6b0fa46103 Merged revisions 307228 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r307228 | jpeeler | 2011-02-09 13:52:51 -0600 (Wed, 09 Feb 2011) | 17 lines
  
  Merged revisions 307227 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r307227 | jpeeler | 2011-02-09 13:52:12 -0600 (Wed, 09 Feb 2011) | 11 lines
    
    Make sure to set parking dial context for non-default parking lots.
    
    Since parking_con_dial isn't settable, set all parking lots to "park-dial".
    
    (closes issue #17946)
    Reported by: bluecrow76
    Patches:
          asterisk-1.8.0-beta4-multipark-fixes-2010SEP02.diff uploaded by bluecrow76 (license 270)
          modified by me
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-09 19:53:28 +00:00
Richard Mudgett 49feb747ba Pass a MCID request to the bridged channel.
Pass a MCID request to the bridged channel so the bridged channel can send
it to the network.

The ability to send the MCID request on an ISDN span is enabled with the
new chan_dahdi.conf mcid_send option.

JIRA SWP-2845
JIRA ABE-2736


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-07 23:33:44 +00:00
Terry Wilson 1277a80a5b Merged revisions 306674 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r306674 | twilson | 2011-02-07 14:43:22 -0800 (Mon, 07 Feb 2011) | 24 lines
  
  Merged revisions 306673 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r306673 | twilson | 2011-02-07 14:40:20 -0800 (Mon, 07 Feb 2011) | 17 lines
    
    Merged revisions 306672 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r306672 | twilson | 2011-02-07 14:35:20 -0800 (Mon, 07 Feb 2011) | 10 lines
      
      Don't try to pickup a call in the middle of a masquerade
      
      If A calls B which doesn't answer and C & D both try to do a call pickup, it is
      possible for ast_pickup_call to answer the call, then fail to masquerade one of
      the calls because the other one is already in the process of masquerading. This
      patch checks to see if the channel is in the process of masquerading before
      call before selecting it for a pickup.
      
      Review: https://reviewboard.asterisk.org/r/1094/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-07 22:46:07 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
Jeff Peeler fed10ed35d Merged revisions 306124 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r306124 | jpeeler | 2011-02-03 14:50:48 -0600 (Thu, 03 Feb 2011) | 17 lines
  
  Merged revisions 306123 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r306123 | jpeeler | 2011-02-03 14:49:48 -0600 (Thu, 03 Feb 2011) | 10 lines
    
    Set exception on channel in parking thread when POLLPRI event detected.
    
    This is done just to make the code be equivalent to the old select code. As
    noted in 303106 the same issue was already fixed in this branch, but the
    exception was not set on the channel in the case of POLLPRI. The reason that
    this did not cause a problem here is because in 122923 the check in __ast_read
    to check the exception flag was removed.
    
    (related to #18637)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 20:51:09 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Jeff Peeler 8677f0424e Merged revisions 304339 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r304339 | jpeeler | 2011-01-26 16:27:30 -0600 (Wed, 26 Jan 2011) | 9 lines
  
  Merged revisions 304338 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r304338 | jpeeler | 2011-01-26 16:26:37 -0600 (Wed, 26 Jan 2011) | 2 lines
    
    Change delimiter used internally for GOTO_ON_BLINDXFR to commas to match 76703.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 22:27:51 +00:00
Richard Mudgett ca014f49a2 Merged revisions 304007 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r304007 | rmudgett | 2011-01-25 17:28:25 -0600 (Tue, 25 Jan 2011) | 22 lines
  
  Merged revisions 304006 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r304006 | rmudgett | 2011-01-25 17:25:32 -0600 (Tue, 25 Jan 2011) | 15 lines
    
    Merged revisions 304005 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r304005 | rmudgett | 2011-01-25 17:21:09 -0600 (Tue, 25 Jan 2011) | 8 lines
      
      DTMF attended transfers sometimes fail for no apparent reason.
      
      The loop in feature_request_and_dial() can exit when Party C has answered
      without processing an AST_CONTROL_ANSWER.  Also sometimes an
      AST_CONTROL_ANSWER never happens even though Party C has answered.
      
      Don't hangup Party C if he is up or we receive an AST_CONTROL_ANSWER.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-25 23:31:40 +00:00
Russell Bryant 092134399c Merged revisions 303549 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r303549 | russell | 2011-01-24 14:51:37 -0600 (Mon, 24 Jan 2011) | 45 lines
  
  Merged revisions 303548 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r303548 | russell | 2011-01-24 14:49:53 -0600 (Mon, 24 Jan 2011) | 38 lines
    
    Merged revisions 303546 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r303546 | russell | 2011-01-24 14:32:21 -0600 (Mon, 24 Jan 2011) | 31 lines
      
      Fix channel redirect out of MeetMe() and other issues with channel softhangup.
      
      Mantis issue #18585 reports that a channel redirect out of MeetMe() stopped
      working properly.  This issue includes a patch that resolves the issue by
      removing a call to ast_check_hangup() from app_meetme.c.  I left that in my
      patch, as it doesn't need to be there.  However, the rest of the patch fixes
      this problem with or without the change to app_meetme.
      
      The key difference between what happens before and after this patch is the
      effect of the END_OF_Q control frame.  After END_OF_Q is hit in ast_read(),
      ast_read() will return NULL.  With the ast_check_hangup() removed, app_meetme
      sees this which causes it to exit as intended.  Checking ast_check_hangup()
      caused app_meetme to exit earlier in the process, and the target of the
      redirect saw the condition where ast_read() returned NULL.
      
      Removing ast_check_hangup() works around the issue in app_meetme, but doesn't
      solve the issue if another application did the same thing.  There are also
      other edge cases where if an application finishes at the same time that a
      redirect happens, the target of the redirect will think that the channel hung
      up.  So, I made some changes in pbx.c to resolve it at a deeper level.  There
      are already places that unset the SOFTHANGUP_ASYNCGOTO flag in an attempt to
      abort the hangup process.  My patch extends this to remove the END_OF_Q frame
      from the channel's read queue, making the "abort hangup" more complete.  This
      same technique was used in every place where a softhangup flag was cleared.
      
      (closes issue #18585)
      Reported by: oej
      Tested by: oej, wedhorn, russell
      
      Review: https://reviewboard.asterisk.org/r/1082/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 20:57:28 +00:00
Shaun Ruffell 80f6848ca3 Merged revisions 303107 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r303107 | sruffell | 2011-01-20 13:57:31 -0600 (Thu, 20 Jan 2011) | 23 lines
  
  Merged revisions 303106 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r303106 | sruffell | 2011-01-20 13:56:34 -0600 (Thu, 20 Jan 2011) | 15 lines
    
    main/features: Use POLLPRI when waiting for events on parked channels.
    
    This change resolves a regression in the 1.6.2 when converting from
    select to poll.  The DAHDI timers use POLLPRI to indicate that the timer
    fired, but features was not waiting for that flag.  The result was no
    audio for MOH when a call was parked and res_timing_dahdi was in use.
    
    This patch is slightly modified from the one on the mantis issue.  It does
    not set an exception on the channel if the POLLPRI flag is set.
    
    (closes issue #18262)
    Reported by: francesco_r
    Patches:
          patch_park_moh-trunk-2.txt uploaded by cjacobsen (license 1029)
          Tested by: francesco_r, rfrantik, one47
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-20 19:58:54 +00:00
Richard Mudgett c8e57f82bf Merged revisions 302713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302713 | rmudgett | 2011-01-19 15:29:22 -0600 (Wed, 19 Jan 2011) | 29 lines
  
  Merged revisions 302693 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r302693 | rmudgett | 2011-01-19 15:25:41 -0600 (Wed, 19 Jan 2011) | 22 lines
    
    Merged revisions 302671 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r302671 | rmudgett | 2011-01-19 15:21:56 -0600 (Wed, 19 Jan 2011) | 15 lines
      
      DTMF transfer plays the wrong sounds for wrong number or other call failure.
      
      * Set the default for features.conf.sample xferfailsound option to "beeperr"
      as documented instead of "pbx-invalid" and corrected the use of it in DTMF
      blind transfer (#1).
      
      * Improved DTMF blind transfer handling of wrong numbers.
      
      Most of the concerns in this issue were taken care of by the patch for
      issue 17999: Issues with DTMF triggered attended transfers.
      
      (closes issue #18379)
      Reported by: gincantalupo
      Tested by: rmudgett
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 21:35:28 +00:00
Sean Bright f4d63bf918 Merged revisions 302552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302552 | seanbright | 2011-01-19 13:54:47 -0500 (Wed, 19 Jan 2011) | 14 lines
  
  Merged revisions 302551 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r302551 | seanbright | 2011-01-19 13:54:03 -0500 (Wed, 19 Jan 2011) | 7 lines
    
    Remove an extraneous \r\n at the end of a parking manager events.
    
    (closes issue #18363)
    Reported by: clegall_proformatique
    Patches:
          asterisk_1.8_295998_parking_manager_events_format.patch uploaded by clegall proformatique (license 1139)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 18:55:43 +00:00
Richard Mudgett 8cd1ac534b Merged revisions 302318 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r302318 | rmudgett | 2011-01-18 16:04:14 -0600 (Tue, 18 Jan 2011) | 1 line
  
  Use the expanded format type instead of plain int.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 22:06:55 +00:00
Richard Mudgett a05aeff312 Merged revisions 302174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302174 | rmudgett | 2011-01-18 12:11:43 -0600 (Tue, 18 Jan 2011) | 102 lines
  
  Merged revisions 302173 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r302173 | rmudgett | 2011-01-18 12:07:15 -0600 (Tue, 18 Jan 2011) | 95 lines
    
    Merged revisions 302172 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r302172 | rmudgett | 2011-01-18 12:04:36 -0600 (Tue, 18 Jan 2011) | 88 lines
      
      Issues with DTMF triggered attended transfers.
      
      Issue #17999
      1) A calls B. B answers.
      2) B using DTMF dial *2 (code in features.conf for attended transfer).
      3) A hears MOH. B dial number C
      4) C ringing. A hears MOH.
      5) B hangup. A still hears MOH. C ringing.
      6) A hangup. C still ringing until "atxfernoanswertimeout" expires.
      For v1.4 C will ring forever until C answers the dead line. (Issue #17096)
      
      Problem: When A and B hangup, C is still ringing.
      
      Issue #18395
      SIP call limit of B is 1
      1. A call B, B answered
      2. B *2(atxfer) call C
      3. B hangup, C ringing
      4. Timeout waiting for C to answer
      5. Recall to B fails because B has reached its call limit.
      
      Because B reached its call limit, it cannot do anything until the transfer
      it started completes.
      
      Issue #17273
      Same scenario as issue 18395 but party B is an FXS port.  Party B cannot
      do anything until the transfer it started completes.  If B goes back off
      hook before C answers, B hears ringback instead of the expected dialtone.
      
      **********
      Note for the issue #17273 and #18395 fix:
      
      DTMF attended transfer works within the channel bridge.  Unfortunately,
      when either party A or B in the channel bridge hangs up, that channel is
      not completely hung up until the transfer completes.  This is a real
      problem depending upon the channel technology involved.
      
      For chan_dahdi, the channel is crippled until the hangup is complete.
      Either the channel is not useable (analog) or the protocol disconnect
      messages are held up (PRI/BRI/SS7) and the media is not released.
      
      For chan_sip, a call limit of one is going to block that endpoint from any
      further calls until the hangup is complete.
      
      For party A this is a minor problem.  The party A channel will only be in
      this condition while party B is dialing and when party B and C are
      conferring.  The conversation between party B and C is expected to be a
      short one.  Party B is either asking a question of party C or announcing
      party A.  Also party A does not have much incentive to hangup at this
      point.
      
      For party B this can be a major problem during a blonde transfer.  (A
      blonde transfer is our term for an attended transfer that is converted
      into a blind transfer.  :)) Party B could be the operator.  When party B
      hangs up, he assumes that he is out of the original call entirely.  The
      party B channel will be in this condition while party C is ringing, while
      attempting to recall party B, and while waiting between call attempts.
      
      WARNING:
      The ATXFER_NULL_TECH conditional is a hack to fix the problem.  It will
      replace the party B channel technology with a NULL channel driver to
      complete hanging up the party B channel technology.  The consequences of
      this code is that the 'h' extension will not be able to access any channel
      technology specific information like SIP statistics for the call.
      
      ATXFER_NULL_TECH is not defined by default.
      **********
      
      (closes issue #17999)
      Reported by: iskatel
      Tested by: rmudgett
      JIRA SWP-2246
      
      (closes issue #17096)
      Reported by: gelo
      Tested by: rmudgett
      JIRA SWP-1192
      
      (closes issue #18395)
      Reported by: shihchuan
      Tested by: rmudgett
      
      (closes issue #17273)
      Reported by: grecco
      Tested by: rmudgett
      
      Review: https://reviewboard.asterisk.org/r/1047/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 18:17:01 +00:00
Richard Mudgett 9be73e35de Merged revisions 300166 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r300166 | rmudgett | 2011-01-03 17:14:55 -0600 (Mon, 03 Jan 2011) | 11 lines
  
  Merged revisions 300165 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r300165 | rmudgett | 2011-01-03 17:02:13 -0600 (Mon, 03 Jan 2011) | 4 lines
    
    Use correct variable for atxfercallbackretries config option.
    
    * Misc formatting changes.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-03 23:18:20 +00:00
Leif Madsen cf655aa1c9 Merged revisions 299088 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r299088 | lmadsen | 2010-12-20 10:18:26 -0600 (Mon, 20 Dec 2010) | 13 lines
  
  Merged revisions 299087 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r299087 | lmadsen | 2010-12-20 10:18:03 -0600 (Mon, 20 Dec 2010) | 5 lines
    
    Note that Park() timeout is milliseconds.
    
    (closes issue #15758)
    Reported by: mmurdock
    Tested by: mmurdock, seanbright
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 16:19:22 +00:00
Terry Wilson 5ce016b463 Merged revisions 297952 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r297952 | twilson | 2010-12-09 14:48:44 -0600 (Thu, 09 Dec 2010) | 10 lines
  
  Don't crash after Set(CDR(userfield)=...) in ast_bridge_call
  
  Instead of setting peer->cdr = NULL, set it to not post.
  
  (closes issue #18415)
  Reported by: macbrody
  Patches: 
        patch-18415 uploaded by jsolares (license 1167)
  Tested by: jsolares, twilson
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@297956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-09 21:26:19 +00:00
Jason Parker ce6abd6bf7 Merged revisions 289340 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r289340 | qwell | 2010-09-29 16:12:43 -0500 (Wed, 29 Sep 2010) | 22 lines
  
  Merged revisions 289339 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r289339 | qwell | 2010-09-29 16:03:47 -0500 (Wed, 29 Sep 2010) | 15 lines
    
    Merged revisions 289338 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r289338 | qwell | 2010-09-29 15:56:26 -0500 (Wed, 29 Sep 2010) | 8 lines
      
      Allow a manager originate to succeed on forwarded devices.
      
      The timeout to wait for an answer was being set to 0 when a device forwarded to another
      extension.  We don't always need the timeout set like this, so make it an optional
      parameter, and don't use it in this case.
      
      ABE-2544
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@289354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-29 21:19:46 +00:00
Richard Mudgett e86c254b79 Merged revisions 287897 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r287897 | rmudgett | 2010-09-21 10:53:19 -0500 (Tue, 21 Sep 2010) | 1 line
  
  Cut-n-paste error in builtin_blindtransfer().
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-21 15:54:12 +00:00
Jeff Peeler eee14db850 Merged revisions 287020 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r287020 | jpeeler | 2010-09-15 15:58:39 -0500 (Wed, 15 Sep 2010) | 1 line
  
  fix uninintialized variable
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@287021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 21:00:03 +00:00
Jeff Peeler 41b95ee887 Merged revisions 286931 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r286931 | jpeeler | 2010-09-15 14:22:15 -0500 (Wed, 15 Sep 2010) | 16 lines
  
  Add parking extension for non-default parking lots.
  
  This is a new feature that allows for parking to custom parking lots to be
  accessed directly, rather than with channel variables or by changing the
  default parking lot. The extension is set with the parkext option just as the
  default parking lot is done. Also, the manager action has been updated to
  optionally allow a specified parking lot.
  
  (closes issue #14882)
  Reported by: vmikhnevych
  Patches: 
        patch_14882.txt uploaded by mnick (license 874)
        modified by me
  
  Review: https://reviewboard.asterisk.org/r/884/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-15 19:23:56 +00:00
Tilghman Lesher a6adb398e9 Merged revisions 286558 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r286558 | tilghman | 2010-09-13 18:50:34 -0500 (Mon, 13 Sep 2010) | 9 lines
  
  Merged revisions 286557 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r286557 | tilghman | 2010-09-13 18:48:51 -0500 (Mon, 13 Sep 2010) | 2 lines
    
    C precedence got me
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-13 23:51:32 +00:00