mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 15:49:56 +00:00
attended transfer use transferer context first and set who is transfering at the beginning (issue #6752 reported by moy -- minor mods done by myself)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
UPGRADE.txt
11
UPGRADE.txt
@@ -37,7 +37,13 @@ PBX Core:
|
|||||||
|
|
||||||
* The (very old and undocumented) ability to use BYEXTENSION for dialing
|
* The (very old and undocumented) ability to use BYEXTENSION for dialing
|
||||||
instead of ${EXTEN} has been removed.
|
instead of ${EXTEN} has been removed.
|
||||||
|
|
||||||
|
* Builtin (res_features) transfer functionality attempts to use the context
|
||||||
|
defined in TRANSFER_CONTEXT variable of the transferer channel first. If
|
||||||
|
not set, it uses the transferee variable. If not set in any channel, it will
|
||||||
|
attempt to use the last non macro context. If not possible, it will default
|
||||||
|
to the current context.
|
||||||
|
|
||||||
Command Line Interface:
|
Command Line Interface:
|
||||||
|
|
||||||
* 'show channels concise', designed to be used by applications that will parse
|
* 'show channels concise', designed to be used by applications that will parse
|
||||||
@@ -158,6 +164,9 @@ Variables:
|
|||||||
* OSP applications exports several new variables, ${OSPINHANDLE},
|
* OSP applications exports several new variables, ${OSPINHANDLE},
|
||||||
${OSPOUTHANDLE}, ${OSPINTOKEN}, ${OSPOUTTOKEN}, ${OSPCALLING},
|
${OSPOUTHANDLE}, ${OSPINTOKEN}, ${OSPOUTTOKEN}, ${OSPCALLING},
|
||||||
${OSPINTIMELIMIT}, and ${OSPOUTTIMELIMIT}
|
${OSPINTIMELIMIT}, and ${OSPOUTTIMELIMIT}
|
||||||
|
|
||||||
|
* Builtin transfer functionality sets the variable ${TRANSFERERNAME} in the new
|
||||||
|
created channel. This variables holds the channel name of the transferer.
|
||||||
|
|
||||||
Functions:
|
Functions:
|
||||||
|
|
||||||
|
|||||||
@@ -563,9 +563,9 @@ static int finishup(struct ast_channel *chan)
|
|||||||
|
|
||||||
static const char *real_ctx(struct ast_channel *transferer, struct ast_channel *transferee)
|
static const char *real_ctx(struct ast_channel *transferer, struct ast_channel *transferee)
|
||||||
{
|
{
|
||||||
const char *s = pbx_builtin_getvar_helper(transferee, "TRANSFER_CONTEXT");
|
const char *s = pbx_builtin_getvar_helper(transferer, "TRANSFER_CONTEXT");
|
||||||
if (ast_strlen_zero(s))
|
if (ast_strlen_zero(s))
|
||||||
s = pbx_builtin_getvar_helper(transferer, "TRANSFER_CONTEXT");
|
s = pbx_builtin_getvar_helper(transferee, "TRANSFER_CONTEXT");
|
||||||
if (ast_strlen_zero(s)) /* Use the non-macro context to transfer the call XXX ? */
|
if (ast_strlen_zero(s)) /* Use the non-macro context to transfer the call XXX ? */
|
||||||
s = transferer->macrocontext;
|
s = transferer->macrocontext;
|
||||||
if (ast_strlen_zero(s))
|
if (ast_strlen_zero(s))
|
||||||
@@ -1039,6 +1039,7 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call
|
|||||||
if ((chan = ast_request(type, format, data, &cause))) {
|
if ((chan = ast_request(type, format, data, &cause))) {
|
||||||
ast_set_callerid(chan, cid_num, cid_name, cid_num);
|
ast_set_callerid(chan, cid_num, cid_name, cid_num);
|
||||||
ast_channel_inherit_variables(caller, chan);
|
ast_channel_inherit_variables(caller, chan);
|
||||||
|
pbx_builtin_setvar_helper(chan, "TRANSFERERNAME", caller->name);
|
||||||
if (!ast_call(chan, data, timeout)) {
|
if (!ast_call(chan, data, timeout)) {
|
||||||
struct timeval started;
|
struct timeval started;
|
||||||
int x, len = 0;
|
int x, len = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user