PDA

Click to See Complete Forum and Search --> : TAPI and TSPI


LokiMoose
Aug 6th, 2000, 03:58 AM
I am writing a program that monitors a telephone line for caller ID. The idea being that when a call comes in, the CLI is extracted from the modem, and a specific message can be played to specific callers. Using MSComm I can extract the CLI information no problem, but how would I go about using TAPI/TSPI to pick up the line and play the message? The modem is a voice modem, so I know the hardware is capable, but I'm tearing my hair out trying to make sense of the software side. Any help here greatfully received.

AdrianCsi
Aug 19th, 2000, 10:11 AM
...What hair?

shragel
Sep 16th, 2001, 11:49 AM
How do you get the caller id with the mscomm?

please post the code

shragel
Sep 16th, 2001, 06:46 PM
here is the code for anyone looking.

Private Sub Form_Load()

MSComm1.CommPort = 3
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True
' Send the attention command to the modem.
MSComm1.Output = "ATZ" & Chr$(13) ' Ensure that
' the modem responds with "OK".
' Wait for data to come back to the serial port.
Do
DoEvents
Buffer$ = Buffer$ & MSComm1.Input
Loop Until InStr(Buffer$, "OK" & vbCrLf)
' Read the "OK" response data in the serial port.
' Close the serial port.
MSComm1.Output = "AT+VCID=1" & Chr$(13) ' Ensure that

End Sub

Private Sub MSComm1_OnComm()
Dim InString As String
' Retrieve all available data.
MSComm1.InputLen = 0
'Text1.Text = Text1.Text & "Dropped Phone" & vbCrLf
' Check for data.
If MSComm1.InBufferCount Then
' Read data.
ww = MSComm1.Input
Text1.Text = Text1.Text & ww

If ww Like "*NAME*" Then
pos = InStr(1, ww, "Time=", vbTextCompare)
List1.AddItem Mid(ww, pos + 5, 11)
pos = InStr(1, ww, "Nmbr=", vbTextCompare)
List1.AddItem Mid(ww, pos + 5, 10)
pos = InStr(1, ww, "Name=", vbTextCompare)
List1.AddItem Mid(ww, pos + 5)
End If
End If

End Sub


Add a Comm control texbox mulktiline true and listbox.

yrwyddfa
Sep 19th, 2001, 11:02 AM
Do you know of any good resources for Modem interaction with VB?

preferably free ones