if ((f = ast_read(chan)))
ast_frfree(f);
+ if (peer == rchan) {
+ peer = chan;
+ }
+
if (!play_announcement) {
orig_chan_name = ast_strdupa(chan->name);
}
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 */
/*! \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;
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));