diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-29 21:03:47 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-29 21:03:47 +0000 |
commit | 6a49bde78670f909d414a6f5053832982f83eea2 (patch) | |
tree | 93a81d5463466f76267a69216474ea7ba20c4318 /main | |
parent | 21298d8d10753cf0b7bc210ccbb30ae86c961a98 (diff) |
Merged revisions 289338 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r289338 | qwell | 2010-09-29 15:56:26 -0500 (Wed, 29 Sep 2010) | 8 lines
Allow a manager originate to succeed on forwarded devices.
The timeout to wait for an answer was being set to 0 when a device forwarded to another
extension. We don't always need the timeout set like this, so make it an optional
parameter, and don't use it in this case.
ABE-2544
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@289339 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 9 | ||||
-rw-r--r-- | main/features.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/main/channel.c b/main/channel.c index 51dd1d23e..f60f76c78 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3986,6 +3986,7 @@ struct ast_channel *ast_call_forward(struct ast_channel *caller, struct ast_chan struct ast_channel *new = NULL; char *data, *type; int cause = 0; + int res; /* gather data and request the new forward channel */ ast_copy_string(tmpchan, orig->call_forward, sizeof(tmpchan)); @@ -4041,7 +4042,11 @@ struct ast_channel *ast_call_forward(struct ast_channel *caller, struct ast_chan ast_channel_unlock(orig); /* call new channel */ - if ((*timeout = ast_call(new, data, 0))) { + res = ast_call(new, data, 0); + if (timeout) { + *timeout = res; + } + if (res) { ast_log(LOG_NOTICE, "Unable to call forward to channel %s/%s\n", type, (char *)data); ast_hangup(orig); ast_hangup(new); @@ -4104,7 +4109,7 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *d if (timeout > -1) timeout = res; if (!ast_strlen_zero(chan->call_forward)) { - if (!(chan = ast_call_forward(NULL, chan, &timeout, format, oh, outstate))) { + if (!(chan = ast_call_forward(NULL, chan, NULL, format, oh, outstate))) { return NULL; } continue; diff --git a/main/features.c b/main/features.c index fd78a5a29..1a81a1cba 100644 --- a/main/features.c +++ b/main/features.c @@ -2277,7 +2277,7 @@ static struct ast_channel *feature_request_and_dial(struct ast_channel *caller, if (chan && (chan == active_channel)){ if (!ast_strlen_zero(chan->call_forward)) { - if (!(chan = ast_call_forward(caller, chan, &to, format, NULL, outstate))) { + if (!(chan = ast_call_forward(caller, chan, NULL, format, NULL, outstate))) { return NULL; } continue; |