Johann Steinwendtner
2009-May-06 12:17 UTC
[asterisk-users] precision of wait dialplan application
Hello ! In order to chase after a problem I implemented the following dialplan to have an answertime of exactly one minute: exten => xxxxxxxxxxx,1,NoOp(Test wait) exten => xxxxxxxxxxx,n,Answer exten => xxxxxxxxxxx,n,NoOp(Current timestamp: ${STRFTIME(${EPOCH},,%C%y%m%d%H%M%S)}) exten => xxxxxxxxxxx,n,Wait(60) exten => xxxxxxxxxxx,n,NoOp(Current timestamp: ${STRFTIME(${EPOCH},,%C%y%m%d%H%M%S)}) exten => xxxxxxxxxxx,n,Hangup But it seems the Wait(60) lasts longer than 60 seconds: -- Executing [xxxxxxxxxxx at from_meridian:1] NoOp("DAHDI/29-1", "Test wait") in new stack -- Executing [xxxxxxxxxxx at from_meridian:2] Answer("DAHDI/29-1", "") in new stack -- Executing [xxxxxxxxxxx at from_meridian:3] NoOp("DAHDI/29-1", "Current timestamp: 20090506135813") in new stack -- Executing [xxxxxxxxxxx at from_meridian:4] Wait("DAHDI/29-1", "60") in new stack -- Executing [xxxxxxxxxxx at from_meridian:5] NoOp("DAHDI/29-1", "Current timestamp: 20090506135915") in new stack -- Executing [xxxxxxxxxxx at from_meridian:6] Hangup("DAHDI/29-1", "") in new stack What is wrong in this example ? Regards Hans
David Backeberg
2009-May-08 16:39 UTC
[asterisk-users] precision of wait dialplan application
On Wed, May 6, 2009 at 8:17 AM, Johann Steinwendtner <steinwendtner at gmx.net> wrote:> But it seems the Wait(60) lasts longer than 60 seconds: > > ? ? -- Executing [xxxxxxxxxxx at from_meridian:1] NoOp("DAHDI/29-1", "Test wait") in new stack > ? ? -- Executing [xxxxxxxxxxx at from_meridian:2] Answer("DAHDI/29-1", "") in new stack > ? ? -- Executing [xxxxxxxxxxx at from_meridian:3] NoOp("DAHDI/29-1", "Current timestamp: 20090506135813") in new stack > ? ? -- Executing [xxxxxxxxxxx at from_meridian:4] Wait("DAHDI/29-1", "60") in new stack > ? ? -- Executing [xxxxxxxxxxx at from_meridian:5] NoOp("DAHDI/29-1", "Current timestamp: 20090506135915") in new stack > ? ? -- Executing [xxxxxxxxxxx at from_meridian:6] Hangup("DAHDI/29-1", "") in new stack > > What is wrong in this example ?Could be rounding error. Try it ten times and see if it's always that wrong. If it's always that wrong, just do a wait(59) :-p