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
This commit is contained in:
Richard Mudgett
2011-12-16 23:58:44 +00:00
parent 1b0741c7db
commit be74e6f16e
2 changed files with 73 additions and 36 deletions

View File

@@ -3538,7 +3538,9 @@ static struct ast_channel *feature_request_and_dial(struct ast_channel *caller,
} else if (chan == active_channel) {
if (!ast_strlen_zero(chan->call_forward)) {
state = 0;
ast_autoservice_start(transferee);
chan = ast_call_forward(caller, chan, NULL, tmp_cap, NULL, &state);
ast_autoservice_stop(transferee);
if (!chan) {
break;
}
@@ -3613,7 +3615,9 @@ static struct ast_channel *feature_request_and_dial(struct ast_channel *caller,
}
ast_autoservice_stop(transferee);
}
} else if (f->subclass.integer != -1 && f->subclass.integer != AST_CONTROL_PROGRESS) {
} else if (f->subclass.integer != -1
&& f->subclass.integer != AST_CONTROL_PROGRESS
&& f->subclass.integer != AST_CONTROL_PROCEEDING) {
ast_log(LOG_NOTICE, "Don't know what to do about control frame: %d\n", f->subclass.integer);
}
/* else who cares */