Results 1 to 5 of 5

Thread: TAPI and TSPI

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Bristol UK
    Posts
    4

    Question

    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.

  2. #2
    New Member
    Join Date
    Jan 2000
    Location
    Gloucester, UK
    Posts
    3
    ...What hair?

  3. #3
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    How do you get the caller id with the mscomm?

    please post the code

  4. #4
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    here is the code for anyone looking.
    VB Code:
    1. Private Sub Form_Load()
    2.  
    3.    MSComm1.CommPort = 3
    4.    ' 9600 baud, no parity, 8 data, and 1 stop bit.
    5.    MSComm1.Settings = "9600,N,8,1"
    6.    ' Tell the control to read entire buffer when Input
    7.    ' is used.
    8.    MSComm1.InputLen = 0
    9.    ' Open the port.
    10.    MSComm1.PortOpen = True
    11.    ' Send the attention command to the modem.
    12.    MSComm1.Output = "ATZ" & Chr$(13) ' Ensure that
    13.    ' the modem responds with "OK".
    14.    ' Wait for data to come back to the serial port.
    15.    Do
    16.       DoEvents
    17.    Buffer$ = Buffer$ & MSComm1.Input
    18.    Loop Until InStr(Buffer$, "OK" & vbCrLf)
    19.    ' Read the "OK" response data in the serial port.
    20.    ' Close the serial port.
    21. MSComm1.Output = "AT+VCID=1" & Chr$(13) ' Ensure that
    22.  
    23. End Sub
    24.  
    25. Private Sub MSComm1_OnComm()
    26. Dim InString As String
    27. ' Retrieve all available data.
    28. MSComm1.InputLen = 0
    29. 'Text1.Text = Text1.Text & "Dropped Phone" & vbCrLf
    30. ' Check for data.
    31. If MSComm1.InBufferCount Then
    32.    ' Read data.
    33.    ww = MSComm1.Input
    34.    Text1.Text = Text1.Text & ww
    35.  
    36. If ww Like "*NAME*" Then
    37. pos = InStr(1, ww, "Time=", vbTextCompare)
    38. List1.AddItem Mid(ww, pos + 5, 11)
    39. pos = InStr(1, ww, "Nmbr=", vbTextCompare)
    40. List1.AddItem Mid(ww, pos + 5, 10)
    41. pos = InStr(1, ww, "Name=", vbTextCompare)
    42. List1.AddItem Mid(ww, pos + 5)
    43. End If
    44. End If
    45.  
    46. End Sub

    Add a Comm control texbox mulktiline true and listbox.

  5. #5
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253
    Do you know of any good resources for Modem interaction with VB?

    preferably free ones

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width