- Joined
- Aug 13, 2012
- Messages
- 22
- Reaction score
- 1
I'm asking this to better understand how the VAD makes .Net function calls, rather than to solve a particular problem.
In order to illustrate the point, I have a test .Net function which sleeps for a number of milliseconds then returns (see below).
My main flow is 5 voice prompts alternating with 5 calls to my .Net function to pause 2 seconds each time.
You would expect there to be a 2 second gap between each voice prompt,
but what actually happens is that a single ten second delay (5 x 2 sec) occurs before the 5 voice prompts, which then execute contiguously. Then the call ends.
Can someone please explain how this behaviour is happening?
Thanks
In order to illustrate the point, I have a test .Net function which sleeps for a number of milliseconds then returns (see below).
My main flow is 5 voice prompts alternating with 5 calls to my .Net function to pause 2 seconds each time.
You would expect there to be a 2 second gap between each voice prompt,
but what actually happens is that a single ten second delay (5 x 2 sec) occurs before the 5 voice prompts, which then execute contiguously. Then the call ends.
Can someone please explain how this behaviour is happening?
Thanks
Code:
// sets a pause in millisec
public string IvrPause(string ms)
{
Stopwatch sw = new Stopwatch();
sw.Start();
Thread.Sleep(int.parse(ms);
sw.Stop();
DebugToFile("stopwatch", string.Format("{0:000000}", sw.ElapsedMilliseconds)); // just to prove it!
return "OK";
}