aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-16 22:52:03 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-16 22:52:03 +0000
commit31e7d73422f7967e3ddd2c3efed1b7c09e06cc5b (patch)
tree8121b74b5299dcb8dbc752f566769569455cb8df /main
parentafa6cd3a2d8f8e1dd284e82dd9251b4fd312ae8a (diff)
Merged revisions 168941 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r168941 | twilson | 2009-01-16 16:16:23 -0600 (Fri, 16 Jan 2009) | 19 lines Merged revisions 168716 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168716 | twilson | 2009-01-15 12:22:49 -0600 (Thu, 15 Jan 2009) | 12 lines Convert call to park_call_full to masq_park_call_announce Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded parking, otherwise we will try to call ast_hangup() in __pbx_run() and in do_parking_thread() and then promptly crash. (closes issue #14215) Reported by: waverly360 Tested by: otherwiseguy (closes issue #14228) Reported by: kobaz Tested by: otherwiseguy ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@168980 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/features.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/main/features.c b/main/features.c
index 4a1244c8a..0822f9d15 100644
--- a/main/features.c
+++ b/main/features.c
@@ -548,6 +548,10 @@ static int masq_park_call(struct ast_channel *rchan, struct ast_channel *peer, i
if ((f = ast_read(chan)))
ast_frfree(f);
+ if (peer == rchan) {
+ peer = chan;
+ }
+
if (!play_announcement) {
orig_chan_name = ast_strdupa(chan->name);
}
@@ -2415,6 +2419,10 @@ static void *do_parking_thread(void *ignore)
ast_channel_unlock(chan);
+ if (!strncmp(peername, "Parked/", 7)) {
+ peername += 7;
+ }
+
if (dialfeatures)
snprintf(returnexten, sizeof(returnexten), "%s,,%s", peername, dialfeatures->options);
else /* Existing default */
@@ -2536,10 +2544,6 @@ std: for (x=0; x<AST_MAX_FDS; x++) { /* mark fds for next round */
/*! \brief Park a call */
static int park_call_exec(struct ast_channel *chan, void *data)
{
- /* Cache the original channel name in case we get masqueraded in the middle
- * of a park--it is still theoretically possible for a transfer to happen before
- * we get here, but it is _really_ unlikely */
- char *orig_chan_name = ast_strdupa(chan->name);
char orig_exten[AST_MAX_EXTENSION];
int orig_priority = chan->priority;
@@ -2561,7 +2565,7 @@ static int park_call_exec(struct ast_channel *chan, void *data)
res = ast_safe_sleep(chan, 1000);
/* Park the call */
if (!res) {
- res = park_call_full(chan, chan, 0, NULL, orig_chan_name);
+ res = masq_park_call_announce(chan, chan, 0, NULL);
/* Continue on in the dialplan */
if (res == 1) {
ast_copy_string(chan->exten, orig_exten, sizeof(chan->exten));