summaryrefslogtreecommitdiff
path: root/bridges/bridge_builtin_features.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-12-13 23:10:42 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-12-13 23:10:42 +0000
commit090f9d83a542c52fa9122b77e837304bac9324eb (patch)
treec9ff620ca732a929fc9b8a0c5ee71bfbe42b58c5 /bridges/bridge_builtin_features.c
parent7d1c55d093f44b0e468e04cab370e861de7c1878 (diff)
Fix FollowMe CallerID on outgoing calls.
The addition of the Connected Line support changed how CallerID is passed to outgoing calls. The FollowMe application was not updated to pass CallerID to the outgoing calls. * Fix FollowMe CallerID on outgoing calls. * Restructured findmeexec() to fix several memory leaks and eliminate some duplicated code. * Made check the return value of create_followme_number(). Putting a NULL into the numbers list is bad if create_followme_number() fails. * Fixed a couple uses of ast_strdupa() inside loops. * The changes to bridge_builtin_features.c fix a similar CallerID issue with the bridging API attended and blind transfers. (Not used at this time.) (closes issue ASTERISK-17557) Reported by: hamlet505a Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1612/ ........ Merged revisions 348101 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 348102 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'bridges/bridge_builtin_features.c')
-rw-r--r--bridges/bridge_builtin_features.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/bridges/bridge_builtin_features.c b/bridges/bridge_builtin_features.c
index 802e9ae30..5fdb664d5 100644
--- a/bridges/bridge_builtin_features.c
+++ b/bridges/bridge_builtin_features.c
@@ -69,10 +69,10 @@ static int grab_transfer(struct ast_channel *chan, char *exten, size_t exten_len
}
/*! \brief Helper function that creates an outgoing channel and returns it immediately */
-static struct ast_channel *dial_transfer(const struct ast_channel *caller, const char *exten, const char *context)
+static struct ast_channel *dial_transfer(struct ast_channel *caller, const char *exten, const char *context)
{
- char destination[AST_MAX_EXTENSION+AST_MAX_CONTEXT+1] = "";
- struct ast_channel *chan = NULL;
+ char destination[AST_MAX_EXTENSION + AST_MAX_CONTEXT + 1];
+ struct ast_channel *chan;
int cause;
/* Fill the variable with the extension and context we want to call */
@@ -83,8 +83,13 @@ static struct ast_channel *dial_transfer(const struct ast_channel *caller, const
return NULL;
}
- /* Before we actually dial out let's inherit the appropriate dialplan variables */
+ /* Before we actually dial out let's inherit appropriate information. */
+ ast_channel_lock_both(caller, chan);
+ ast_connected_line_copy_from_caller(&chan->connected, &caller->caller);
ast_channel_inherit_variables(caller, chan);
+ ast_channel_datastore_inherit(caller, chan);
+ ast_channel_unlock(chan);
+ ast_channel_unlock(caller);
/* Since the above worked fine now we actually call it and return the channel */
if (ast_call(chan, destination, 0)) {