Dials a phone number on a specified channel. Optionally, call progress can be enabled. Which channel device handle you call here can get a little tricky. For Analog and T-1, you should have already taken the phone off hook and routed to a voice resource. You should pass the voice resource chdev. For ISDN, you should NOT call the SetHook() function but simply call CTIDial(). You should pass the ISDN channel device. If you want this command to simply dial tones, pass the voice chdev even for ISDN.
[Visual Basic] Public Shared Function Dial( _ ByVal chdev As Integer, _ ByVal dialstr As String, _ ByVal call_progress As Integer, _ ByVal maxtime As Integer, _ ByVal originating_phone_number As String _ ) As DialResult
Device handle. (Voice Resource dev except for PRI - then dtidev.) For playing tones on an already connected call, pass the voice dev even for PRI.
dialstr
The phone number to dial.
call_progress
Pass a 1 if you desire call progress, 0 if you do not. For PRI, passing a 1 will return either a CR_BUSY, CR_CNCT, or CR_NOANS. For PRI PerfectCall pass a 2 which will return the call analysis return codes.
maxtime
How long to waint (in seconds) to wait for answer before timing out.
originating_phone_number
For PRI only. This is the caller-id the receiver will see. On some telephone networks, this allows you to "spoof" the outbound caller-id (ANI) received on the other end.