diff options
author | Matthew Nicholson <mnicholson@digium.com> | 2009-10-09 18:34:08 +0000 |
---|---|---|
committer | Matthew Nicholson <mnicholson@digium.com> | 2009-10-09 18:34:08 +0000 |
commit | 0d4726b0a2f135fc5bdc97acf6178877a8606e3f (patch) | |
tree | 6b1d931cf838995fe6113614bc712c5edb37f90e | |
parent | 280859e51c8af05ea77135cd55c6a1c0b886d723 (diff) |
Merged revisions 223225 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r223225 | mnicholson | 2009-10-09 13:20:11 -0500 (Fri, 09 Oct 2009) | 8 lines
Signal timeouts by returning AST_CONTROL_RINGING when originating calls.
(closes issue #15104)
Reported by: nblasgen
Patches:
manager-timeout1.diff uploaded by mnicholson (license 96)
Tested by: nblasgen, mnicholson
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/channel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index 0e150d6b8..60ad9638b 100644 --- a/main/channel.c +++ b/main/channel.c @@ -4374,7 +4374,11 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, const s while (timeout && chan->_state != AST_STATE_UP) { struct ast_frame *f; res = ast_waitfor(chan, timeout); - if (res <= 0) /* error, timeout, or done */ + if (res == 0) { /* timeout, treat it like ringing */ + *outstate = AST_CONTROL_RINGING; + break; + } + if (res < 0) /* error or done */ break; if (timeout > -1) timeout = res; |