Summary:ASTERISK-14504: app_waituntil does not wait on 1.6.1
Reporter:Trevor Hammonds (trevmeister)Labels:
Date Opened:2009-07-21 07:47:02Date Closed:2009-08-26 12:46:42
Versions:Frequency of
Description:app_waituntil always believes the argument passed to it is the past.  It never causes a wait, and passes to the next entry in the dialplan.  

This appears to work correctly in SVN 1.6.2.


The relevant dialplan entry is:

exten => 8765,n,WaitUntil(${FutureTime})

The console indicates the following notice:

[Jul 17 17:13:57] NOTICE[4609]: app_waituntil.c:72 waituntil_exec:
WaitUntil called in the past (now 1247876037, arg 1247876040)

Related note:  Applications/app_waituntil is not listed in the "Category" dropdown box on the issues tracker.
Comments:By: Trevor Hammonds (trevmeister) 2009-07-21 07:56:38

Summary should read: app_waituntil does not wait on 1.6.1


By: Leif Madsen (lmadsen) 2009-07-21 08:48:38

* Updated summary, and added new category. Then updated this issue.

Could you provide the console output and dialplan usage from the two versions? (working and non-working version).


By: Tilghman Lesher (tilghman) 2009-07-21 12:40:19

The only differences that I could find were between 1.6.0 and 1.6.1.  There are no functional differences in this application between 1.6.1 and 1.6.2, AFAICT.

By: Trevor Hammonds (trevmeister) 2009-07-21 17:25:57

My C programming skills are fairly rusty.  However, looking at the code left me with the same opinion.  I will re-install 1.6.1 on my test machine this evening and run the tests that were failing, that now work fine on SVN-branch-1.6.2-r207364.  

I will provide the complete dialplan for the test, as well as the console output.

By: Trevor Hammonds (trevmeister) 2009-08-02 05:44:06

WaitUntil worked fine on SVN 1.6.2 r207364 through r209626.  When I updated to r209992 this evening, WaitUntil began failing again.  I downgraded to 209626, and the problem went away.  

The only files changed in the update to r209992 were:
U    pbx/pbx_config.c
U    channels/misdn/isdn_lib.c
U    channels/misdn/ie.c
U    apps/app_milliwatt.c
U    main/Makefile
U    main/db1-ast/mpool/mpool.c
U    main/event.c
U    main/pbx.c
U    utils/frame.c

So the issue has to reside in one of those files.  

Relevant dialplan entries:
exten => 8463,n,Verbose(2,WaitUntil ${FutureTime})
exten => 8463,n,WaitUntil(${FutureTime})
exten => 8463,n(beep),Playtones(!800/500,0)

For reference, the variable FutureTime is rounded up to the next 10-second increment from when initially called

Console output:
Rev 209626 (WaitUntil works properly)
[Aug  2 03:26:17]     -- Executing [8463@internal:22] Verbose("SIP/4000-09274688", "2,WaitUntil 1249208780") in new stack
[Aug  2 03:26:17]   == WaitUntil 1249208780
[Aug  2 03:26:17]     -- Executing [8463@internal:23] WaitUntil("SIP/4000-09274688", "1249208780") in new stack
[Aug  2 03:26:20]     -- Executing [8463@internal:24] PlayTones("SIP/4000-09274688", "!800/500,0") in new stack

Rev 209992 (WaitUntil broken)
[Aug  2 03:31:22]     -- Executing [8463@internal:22] Verbose("SIP/4000-09836410", "2,WaitUntil 1249209090") in new stack
[Aug  2 03:31:22]   == WaitUntil 1249209090
[Aug  2 03:31:22]     -- Executing [8463@internal:23] WaitUntil("SIP/4000-09836410", "1249209090") in new stack
[Aug  2 03:31:22] NOTICE[20041]: app_waituntil.c:95 waituntil_exec: WaitUntil called in the past (now 1249209082, arg 1249209090)
[Aug  2 03:31:22]     -- Executing [8463@internal:24] PlayTones("SIP/4000-09836410", "!800/500,0") in new stack

By: Tilghman Lesher (tilghman) 2009-08-20 17:16:37

I am completely unable to reproduce this issue.

By: Leif Madsen (lmadsen) 2009-08-20 18:08:47

I can't reproduce it either. That means you'll have to provide us more information to reproduce this issue. Most likely you'll have to give a developer access to the system that is experiencing this issue.

I tried with both the revision you provided in the bug report, and the latest 1.6.1 branch.

By: Tilghman Lesher (tilghman) 2009-08-26 12:46:42

No response from reporter.