Way2call telephony device is your ultimate telephony integration solution! |
Waiting for call to complete and then redialing? |
Post Reply |
Author | |
mattj
Newbie Joined: Apr 15 2010 Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: Apr 20 2010 at 11:51am |
I'm just a noob so there's probably a better method but i created a class. I have a few global vars to track different events.
Imports Way2call Imports Way2call.Driver Imports System.Threading Public Class Cls_Events Public Sub WaitForConnection(ByVal DurationSec As Integer, ByVal DeviceID As Integer) MyCallDropped = False 'clear dropped call flag MyCallBusy = False 'clear number busy flag MyCallErrored = False 'clear call error flag MyCallConnected = False 'clear call connected flag Static start_time As DateTime = Now Dim elapsed_time As TimeSpan Do If MyCallConnected = True Then Exit Do 'exit loop if OnConnected event is fired If MyCallBusy = True Then Exit Do 'exit loop if the line is busy If MyCallDropped = True Then Exit Do 'exit loop if the call was dropped elapsed_time = Now.Subtract(start_time) ' operation timed out exit the loop If elapsed_time.TotalSeconds >= DurationSec Then Exit Do Application.DoEvents() Loop End Sub End Class then i did something like: w2cErr = w2cDrv.Device(0).Call("w5558675309", True, True) Dim CallEvent As New Cls_Events CallEvent.WaitForConnection(40, 0) |
|
stupid48
Newbie Joined: Mar 09 2010 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
I'm writing a .net executable that will dial out. If nobody answers, inside the same running application, I would like to redial. The problem is, I don't know how to pause and wait for the first call to finish. In the sample console application, there is a "goto" loop that allows the redial and the key to the loop is the line:
cki = Console.ReadKey(false); So, the Console.ReadKey is pausing the thread while the software is dialing and waiting for someone to hit "a" to make a new call. Does anyone know how to pause the thread in a windows .net application?Thanks....Chris
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.100 seconds.