Groups > Microsoft > dotNET Speech SDK > Re: Disconnect call after 120 seconds of inactivity




Disconnect call after 120 seconds of inactivity

Disconnect call after 120 seconds of inactivity
Wed, 18 Apr 2007 09:48:33 -040
I am having a problem when the user makes a mistake and taps the ringer hook 
and does not fully hang up and terminate the call.  They then get a stutter 
dial tone (beeping dial tone) and dial the applications number again which 
transfers the call to another instance of the application.  This causes at 
least one channel to be tied up until midnight when the server recycles. 
This is reducing throughput since a channel is lost every time this happens. 
I allow the users to press * to start over but I don't think everyone is 
doing this.

I had posted about this a while ago and got a response to set a timer in 
javascript to disconnect the call but I am having trouble getting this to 
work because setTimeout() does not appear to be supported in whatever 
version of javascript the Speech Application SDK 1.1 uses.

Has anyone run into this problem or does anyone have any ideas on how to 
disconnect the call in this situation.  Simply disconnecting after 2 minutes 
would be fine as I am sometimes seeing calls at 15 hours long!  I need to 
roll another application out and would like to have this problem resolved 
before I do.

Thanks in advance!
Andy 

Post Reply
Re: Disconnect call after 120 seconds of inactivity
Mon, 25 Jun 2007 14:36:36 -040
I believe I have finally found a solution to this problem and as I thought, 
it was very simple.

The solution is in the SilenceAndLowConf sample in C:\Program 
Files\Microsoft Speech Application SDK 1.1\Applications\Samples

To make sure the call is ended I added a CatchThreeMumblesQA QA control 
right after my initial Welcome QA that says Welcome once.  This QA has the 
following ClientActivation script and OnClientComplete script which will 
play any QA prompt a max of three times and then termminate the call.  I 
found out that window.close() ends the call which I also didn't know.  I 
also unchecked BargeIn and checked PlayOnce.

// Use the client activation function of the first QA on the page to count 
the number
// of consecutive silences and/or mumbles. By putting the logic into a 
separate QA,
// we are able to do the counting in one place, rather than in each QA 
separately.
function CatchThreeMumblesQA_ClientActivationFunction(theQA)
{
 if (RunSpeech.ActiveQA == null) return(false);
 var h = RunSpeech.ActiveQA.History;
 return((h.length > 2) &&
   ((h[h.length-1] == "Silence") || (h[h.length-1] ==
"NoReco")) &&
   ((h[h.length-2] == "Silence") || (h[h.length-2] ==
"NoReco")) &&
   ((h[h.length-3] == "Silence") || (h[h.length-3] ==
"NoReco")))
}
function CatchThreeMumblesQA_OnClientComplete()
{
 // We call window.close, which will disconnect the call (and thus no more 
prompts will be played)
 window.close();
}

Let me know if you have any questions.
Thanks!
Andy
"Andy Klare" <klar02@hotmail.com> wrote in message 
news:uTdvKBcgHHA.4416@TK2MSFTNGP03.phx.gbl...
>I am having a problem when the user makes a mistake and taps the ringer 
>hook and does not fully hang up and terminate the call.  They then get a 
>stutter dial tone (beeping dial tone) and dial the applications number 
>again which transfers the call to another instance of the application. 
>This causes at least one channel to be tied up until midnight when the 
>server recycles. This is reducing throughput since a channel is lost every 
>time this happens. I allow the users to press * to start over but I don't 
>think everyone is doing this.
>
> I had posted about this a while ago and got a response to set a timer in 
> javascript to disconnect the call but I am having trouble getting this to 
> work because setTimeout() does not appear to be supported in whatever 
> version of javascript the Speech Application SDK 1.1 uses.
>
> Has anyone run into this problem or does anyone have any ideas on how to 
> disconnect the call in this situation.  Simply disconnecting after 2 
> minutes would be fine as I am sometimes seeing calls at 15 hours long!  I 
> need to roll another application out and would like to have this problem 
> resolved before I do.
>
> Thanks in advance!
> Andy
> 

Post Reply
about | contact