mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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/branches/1.4@223225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user