Intercept Caller ID Info??

Posted on 2001-07-16
Medium Priority
Last Modified: 2010-07-27
Hi, is there any way I could intercept the caller id info coming from my modem, when my phone rings, without using shareware activex component(s)?  In HyperTerminal, when I connect directly to COM3 (my modem) and type "AT+VCID=1", the next time my phone rings I get the date, time, name, and number of the person calling...

Question by:darknite
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

GeoffKell earned 800 total points
ID: 6288698
It's worth a read of




Author Comment

ID: 6290516
Thanx, from that page i've got this code:

Public Function GetVarInfo(strdata As String, lngOffset As Long, lngLength As Long) As String
' pluck something out of a long string
Dim strTemp As String
    GetVarInfo = Mid(strdata, lngOffset, lngLength)
End Function

'Added the extra mem variable to hold the variable sized data returned by the
'linegetcallinfo function in the application

    dwTotalSize As Long
    dwNeededSize As Long
    dwUsedSize As Long

    hLine As Long
    dwLineDeviceID As Long
    dwAddressID As Long

    dwBearerMode As Long
    dwRate As Long
    dwMediaMode As Long

    dwAppSpecific As Long
    dwCallID As Long
    dwRelatedCallID As Long
    dwCallParamFlags As Long
    dwCallStates As Long

    dwMonitorDigitModes As Long
    dwMonitorMediaModes As Long

    dwOrigin As Long
    dwReason As Long
    dwCompletionID As Long
    dwNumOwners As Long
    dwNumMonitors As Long

    dwCountryCode As Long
    dwTrunk As Long

    dwCallerIDFlags As Long
    dwCallerIDSize As Long
    dwCallerIDOffset As Long
    dwCallerIDNameSize As Long
    dwCallerIDNameOffset As Long

    dwCalledIDFlags As Long
    dwCalledIDSize As Long
    dwCalledIDOffset As Long
    dwCalledIDNameSize As Long
    dwCalledIDNameOffset As Long

    dwConnectedIDFlags As Long
    dwConnectedIDSize As Long
    dwConnectedIDOffset As Long
    dwConnectedIDNameSize As Long
    dwConnectedIDNameOffset As Long

    dwRedirectionIDFlags As Long
    dwRedirectionIDSize As Long
    dwRedirectionIDOffset As Long
    dwRedirectionIDNameSize As Long
    dwRedirectionIDNameOffset As Long

    dwRedirectingIDFlags As Long
    dwRedirectingIDSize As Long
    dwRedirectingIDOffset As Long
    dwRedirectingIDNameSize As Long
    dwRedirectingIDNameOffset As Long

    dwAppNameSize As Long
    dwAppNameOffset As Long

    dwDisplayableAddressSize As Long
    dwDisplayableAddressOffset As Long

    dwCalledPartySize As Long
    dwCalledPartyOffset As Long

    dwCommentSize As Long
    dwCommentOffset As Long

    dwDisplaySize As Long
    dwDisplayOffset As Long

    dwUserUserInfoSize As Long
    dwUserUserInfoOffset As Long

    dwHighLevelCompSize As Long
    dwHighLevelCompOffset As Long

    dwLowLevelCompSize As Long
    dwLowLevelCompOffset As Long

    dwChargingInfoSize As Long
    dwChargingInfoOffset As Long

    dwTerminalModesSize As Long
    dwTerminalModesOffset As Long

    dwDevSpecificSize As Long
    dwDevSpecificOffset As Long
End Type

' The Line_Device_Type user-defined structure collects all of the variables associated
' with a Telephone Line being used by the TAPI functions in the application.

Type Line_Device_Type
    Device_Name As String               'Device Name for a Telephone Line (Dialogic XXXX).
    LineID As Integer                   'Device Driver ID for a Telephone Line (0,1,2 Channel #).
    lphLine As Long                     'Device ID for a Telephone Line (XXXXXX).
    udtLineCall As LINECALLPARAMS       'Parameters filled in after the Line is Initialized.
    Reply_ID As Long                    'Reply ID returned by asynchronous TAPI Functions.
    lhActiveCall As Long                'Handle ID to an Active Call (Out/In Bound).
    Line_Open As Boolean                'True: If Line is opened
    Line_Has_Call As Boolean            'True: If Line has a Call
    CallerIDAddress As String           'Caller ID Address (Phone #)received on line
    CallerID_Flag As Integer            'Caller ID flags received on line
End Type

'Parameters:        pLineDevice         'Line Device Record Structure.
'Return:            String: Description of Call Progress State.
Function TAPI_GetCallerID(pLineDevice As Line_Device_Type) As Boolean
'Local Variables.
Dim RetCode As Long                 'Error Code returned from the TAPI fucnctions.
                                    ' (0=Success).
Dim Success As Boolean              'True: If the function executes successfully.
Dim TempLineInfo As LINECALLINFO    'Structure needed to retrieve the Caller ID.
Dim TempCallerID As String          'Caller ID status for the trace file.

    'Initialize Local Variables.
    Success = True
    TempCallerID$ = "Unknown"

    'Set the Total Size of the Caller ID Structure.
    TempLineInfo.dwTotalSize = LINECALLINFO_TOTALSIZE

    'Retrieve the Call Information for the Inbound Line.
    RetCode = lineGetCallInfo(pLineDevice.lhActiveCall, TempLineInfo)
    If RetCode < 0 Then 'If un-successful.
        AddText DisplayPanel, TAPIErrMsg(RetCode) & " - Line Get Caller ID"
        Success = False
        TempCallerID$ = "Error getting Caller ID"
    Else 'If Successful.
        'Save Caller ID Flags
        pLineDevice.CallerID_Flag = CInt(TempLineInfo.dwCallerIDFlags)
        'Test to see that the CallerIDFlags has the bit for Caller Party ID set.
        If (TempLineInfo.dwCallerIDFlags And LINECALLPARTYID_ADDRESS) Then
            'Test to see if the CallerID Offset and Size is greater than 0.
            If (TempLineInfo.dwCallerIDOffset > 0) _
            And TempLineInfo.dwCallerIDSize > 0 Then
                'Set the Caller ID Address found in the Memory Buffer of the Structure.
                pLineDevice.CallerIDAddress$ = GetVarInfo(TempLineInfo.mem, (TempLineInfo.dwCallerIDOffset - LINECALLINFO_FIXEDSIZE + 1), TempLineInfo.dwCallerIDSize - 1)
                TempCallerID$ = pLineDevice.CallerIDAddress$
            Else 'If Offset or Size is not found.
                TempCallerID$ = "Unknown - No Offset/Size"
            End If
        Else 'If LINECALLPARTYID_ADDRESS bit is not set.
            TempCallerID$ = "Unknown - Flags: " & "(" & Trim$(Str$(TempLineInfo.dwCallerIDFlags)) & ")"
        End If

        'Display results.
    End If
    AddText DisplayPanel, "Line Get Caller ID: " & TempCallerID$

    'Return Success Status.
    TAPI_GetCallerID = Success

End Function

'-------------------- END CODE --------------------------

But, I have no idea what to do with it!!?  Also, it keeps telling me that there are two user-types that are undefined... i'm not sure what I have to do there either cause they look defined to me!?

Any help would be greatly appreciated, thanks!

Expert Comment

ID: 6716397
I'm trying to do the same thing. I've been lookinig at http://www.yes-tele.com 

I'd be pleased if anyone could help with my similar question at http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=visualbasic&qid=20252441

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Expert Comment

ID: 6718673
I'm trying to do the same thing. I've been lookinig at http://www.yes-tele.com 

I'd be pleased if anyone could help with my similar question at http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=visualbasic&qid=20252441

LVL 49

Expert Comment

ID: 7153491
Hi darknite,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept GeoffKell's comment(s) as an answer.

darknite, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer

Expert Comment

ID: 10093195
hi experts,

i'm working on call barring system and i'm wondering if anyone knows how to make the line busy with a busy tone using tapiline.


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question