From d99619101031c6da9e91687a94d650688cfbbb73 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Fri, 16 Jan 2009 22:52:03 +0000 Subject: [PATCH] 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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@168980 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/features.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main/features.c b/main/features.c index 4a1244c8ae..0822f9d15c 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; xname); 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)); -- 2.47.3