mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
A fair number of changes for the sake of bug 7506
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4501,12 +4501,10 @@ int ast_async_goto(struct ast_channel *chan, const char *context, const char *ex
|
||||
/* In order to do it when the channel doesn't really exist within
|
||||
the PBX, we have to make a new channel, masquerade, and start the PBX
|
||||
at the new location */
|
||||
struct ast_channel *tmpchan = ast_channel_alloc(0);
|
||||
struct ast_channel *tmpchan = ast_channel_alloc(0, chan->_state, 0, 0, "AsyncGoto/%s", chan->name);
|
||||
if (!tmpchan)
|
||||
res = -1;
|
||||
else {
|
||||
ast_string_field_build(tmpchan, name, "AsyncGoto/%s", chan->name);
|
||||
ast_setstate(tmpchan, chan->_state);
|
||||
/* Make formats okay */
|
||||
tmpchan->readformat = chan->readformat;
|
||||
tmpchan->writeformat = chan->writeformat;
|
||||
@@ -4863,7 +4861,7 @@ static void *async_wait(void *data)
|
||||
static int ast_pbx_outgoing_cdr_failed(void)
|
||||
{
|
||||
/* allocate a channel */
|
||||
struct ast_channel *chan = ast_channel_alloc(0);
|
||||
struct ast_channel *chan = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, 0);
|
||||
|
||||
if (!chan)
|
||||
return -1; /* failure */
|
||||
@@ -4976,9 +4974,8 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout
|
||||
/* create a fake channel and execute the "failed" extension (if it exists) within the requested context */
|
||||
/* check if "failed" exists */
|
||||
if (ast_exists_extension(chan, context, "failed", 1, NULL)) {
|
||||
chan = ast_channel_alloc(0);
|
||||
chan = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, "OutgoingSpoolFailed");
|
||||
if (chan) {
|
||||
ast_string_field_set(chan, name, "OutgoingSpoolFailed");
|
||||
if (!ast_strlen_zero(context))
|
||||
ast_copy_string(chan->context, context, sizeof(chan->context));
|
||||
set_ext_pri(chan, "failed", 1);
|
||||
|
Reference in New Issue
Block a user