aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-03 23:12:17 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-03 23:12:17 +0000
commitae577509f6d6a301fc97e346d62fa18aaa338116 (patch)
treeda6d473d707ba3da10e66475e0648c9954da0f30 /channels
parent50aa36fccfa917ba4117ea540b0c6ad82a0dc801 (diff)
A big one...
This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop. This is accomplished by creating a datastore on the calling channel which has a linked list of all devices dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore is detached from the channel and destroyed. This change also introduces some side effects to the code which I shall enumerate here: 1. Datastore inheritance has been backported from trunk into 1.4 2. A large chunk of code has been removed from app_dial. This chunk is the section of code which handles the call forward case after the channel has been requested but before it has been called. This was removed because call-forwarding still works fine without it, it makes the code less error-prone should it need changing, and it made this set of changes much less painful to just have the forwarding handled in one place in each module. 3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore which is attached to the channel may be created and attached in either app_dial or app_queue, so they need a common place to find the datastore info. This approach was taken in case similar datastores are needed in the future, there will be a common place to add them. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90735 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_local.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 1144278f0..6985d8f75 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -467,6 +467,7 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout)
AST_LIST_INSERT_TAIL(&p->chan->varshead, new, entries);
}
}
+ ast_channel_datastore_inherit(p->owner, p->chan);
/* Start switch on sub channel */
if (!(res = ast_pbx_start(p->chan)))