[asterisk-commits] mmichelson: branch group/issue8824 r145248 - /team/group/issue8824/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 30 17:10:41 CDT 2008
Author: mmichelson
Date: Tue Sep 30 17:10:40 2008
New Revision: 145248
URL: http://svn.digium.com/view/asterisk?view=rev&rev=145248
Log:
This change makes it so that builtin attended transfers
will properly indicate connected line updates to the
final channels left once the transfer has completed.
Blind transfers should be similar, but I'm saving that for
the next commit
Modified:
team/group/issue8824/main/features.c
Modified: team/group/issue8824/main/features.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/main/features.c?view=diff&rev=145248&r1=145247&r2=145248
==============================================================================
--- team/group/issue8824/main/features.c (original)
+++ team/group/issue8824/main/features.c Tue Sep 30 17:10:40 2008
@@ -1198,6 +1198,7 @@
struct ast_bridge_config bconfig;
struct ast_frame *f;
int l;
+ struct ast_party_connected_line connected_line;
ast_debug(1, "Executing Attended Transfer %s, %s (sense=%d) \n", chan->name, peer->name, sense);
set_peers(&transferer, &transferee, peer, chan, sense);
@@ -1331,6 +1332,13 @@
tobj->peer = xferchan;
tobj->bconfig = *config;
+ ast_party_connected_line_collect_caller(&connected_line, &newchan->cid);
+ connected_line.source = AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER;
+ ast_connected_line_update(xferchan, &connected_line);
+ ast_party_connected_line_collect_caller(&connected_line, &xferchan->cid);
+ connected_line.source = AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER;
+ ast_connected_line_update(newchan, &connected_line);
+
if (ast_stream_and_wait(newchan, xfersound, ""))
ast_log(LOG_WARNING, "Failed to play transfer sound!\n");
ast_bridge_call_thread_launch(tobj);
@@ -1428,6 +1436,13 @@
tobj->peer = xferchan;
tobj->bconfig = *config;
+ ast_party_connected_line_collect_caller(&connected_line, &newchan->cid);
+ connected_line.source = AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER;
+ ast_connected_line_update(xferchan, &connected_line);
+ ast_party_connected_line_collect_caller(&connected_line, &xferchan->cid);
+ connected_line.source = AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER;
+ ast_connected_line_update(newchan, &connected_line);
+
if (ast_stream_and_wait(newchan, xfersound, ""))
ast_log(LOG_WARNING, "Failed to play transfer sound!\n");
ast_bridge_call_thread_launch(tobj);
@@ -1908,6 +1923,7 @@
ast_channel_inherit_variables(caller, chan);
pbx_builtin_setvar_helper(chan, "TRANSFERERNAME", caller->name);
+ ast_log(LOG_NOTICE, "Going to place a call from %s to %s\n", caller->name, chan->name);
if (!ast_call(chan, data, timeout)) {
struct timeval started;
int x, len = 0;
@@ -1977,6 +1993,8 @@
f = NULL;
ready=1;
break;
+ } else if (f->subclass == AST_CONTROL_CONNECTED_LINE) {
+ ast_indicate_data(caller, AST_CONTROL_CONNECTED_LINE, f->data.ptr, f->datalen);
} else if (f->subclass != -1) {
ast_log(LOG_NOTICE, "Don't know what to do about control frame: %d\n", f->subclass);
}
More information about the asterisk-commits
mailing list