aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_features.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2004-11-02 12:56:15 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2004-11-02 12:56:15 +0000
commitb2410aca493cc25b7f90902e77a40c875fabcbe6 (patch)
treef6c26402959a10266b08a760361432b4f96bd2e7 /res/res_features.c
parent2248c612f0204cc7b7162c2de12dd560daf122c4 (diff)
prevent seg fault with attempt_transfer (bug #2741)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@4146 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_features.c')
-rwxr-xr-xres/res_features.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/res/res_features.c b/res/res_features.c
index b2fd1a866..409e04763 100755
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -302,6 +302,12 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
int allowdisconnect_in,allowdisconnect_out,allowredirect_in,allowredirect_out;
char *monitor_exec;
+ if (chan && peer) {
+ pbx_builtin_setvar_helper(chan, "BRIDGEPEER", peer->name);
+ pbx_builtin_setvar_helper(peer, "BRIDGEPEER", chan->name);
+ } else if (chan)
+ pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", NULL);
+
if (monitor_ok) {
if (!monitor_app) {
if (!(monitor_app = pbx_findapp("Monitor")))
@@ -480,6 +486,8 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
}
/* XXX Maybe we should have another message here instead of invalid extension XXX */
} else if (ast_exists_extension(transferee, transferer_real_context, newext, 1, transferer->callerid)) {
+ pbx_builtin_setvar_helper(peer, "BLINDTRANSFER", chan->name);
+ pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", peer->name);
ast_moh_stop(transferee);
res=ast_autoservice_stop(transferee);
if (!transferee->pbx) {