Summary: | ASTERISK-14925: [patch] call time limit overflow | ||
Reporter: | Stanislaw Pitucha (viraptor) | Labels: | |
Date Opened: | 2009-10-01 11:21:12 | Date Closed: | 2010-01-18 16:31:29.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_dial |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) patch_16006_trunk.txt | |
Description: | Call limit specified with L option overflows without warning when the value reaches 2^31. Call is disconnected without any specific message then. So really there should be 2 fixes: - Dial() should report that the call was stopped because of the timeout - limit of 2^31 should be handled more properly | ||
Comments: | By: Matthias Nick (mnick) 2009-11-17 15:02:24.000-0600 added a patch for trunk. The max 'ms'-value you can now store is (2^63)-1. That means your maximum timelimit is '292.5 million years' or ~~ 1/15 x age of the earth :D . I think it should be enough. Tested it with exten => 8,n,Dial(SIP/mnick,120,rmL(4730000000000::5000)); which is 7 million 2 hundred 50 thousand 5 hundred 44 minutes 59 seconds By: Leif Madsen (lmadsen) 2010-01-05 09:54:02.000-0600 Pinging the reporter to test this patch. By: Digium Subversion (svnbot) 2010-01-18 16:31:27.000-0600 Repository: asterisk Revision: 241143 U trunk/channels/chan_dahdi.c U trunk/channels/sig_analog.c U trunk/include/asterisk/time.h U trunk/main/channel.c U trunk/main/enum.c U trunk/main/features.c U trunk/main/timing.c U trunk/pbx/pbx_dundi.c ------------------------------------------------------------------------ r241143 | jpeeler | 2010-01-18 16:31:26 -0600 (Mon, 18 Jan 2010) | 13 lines Extend max call limit duration from 24.8 days to 292+ million years. If the limit was set past MAX_INT upon answering, the call was immediately hung up due to overflow from the return of ast_tvdiff_ms (in ast_check_hangup). The time calculation functions ast_tvdiff_sec and ast_tvdiff_ms have been changed to return an int64_t to prevent overflow. Also the reporter suggested adding a message indicating the reason for the call hanging up. Given that the new limit is so much higher, the message (which would only really be useful in the overflow scenario) has been made a debug message only. (closes issue ASTERISK-14925) Reported by: viraptor ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=241143 |