diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-09 18:20:11 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-09 18:20:11 +0000 |
commit | 09b1e8e83054023be74f9c866950f50880e06105 (patch) | |
tree | 30e8520b53e643410b0ecdc26328153293ac3c66 /main | |
parent | 81c2e78bd7d749b9354436774106ed9e4851eee9 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@223225 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-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 48ec63bf6..17f99ed38 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3286,7 +3286,11 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *d 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; |