?
Solved

Intercept Caller ID Info??

Posted on 2001-07-16
6
Medium Priority
?
529 Views
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...

Thx!
0
Comment
Question by:darknite
[X]
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
6 Comments
 
LVL 5

Accepted Solution

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

http://www.ainslie.org.uk/callerid/cli_faq.htm#Q_29

Regards
GK

0
 

Author Comment

by:darknite
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
Global Const LINECALLINFO_FIXEDSIZE = 296
Global Const LINECALLINFO_VARSIZE = 500
Global Const LINECALLINFO_TOTALSIZE = LINECALLINFO_FIXEDSIZE + LINECALLINFO_VARSIZE

Type LINECALLINFO
    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
    DialParams As LINEDIALPARAMS

    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
    mem As String * LINECALLINFO_VARSIZE
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!
0
 
LVL 1

Expert Comment

by:ncw
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

Thanks
0
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!

 
LVL 1

Expert Comment

by:ncw
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

Thanks
0
 
LVL 49

Expert Comment

by:DanRollins
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
0
 

Expert Comment

by:nec_noc
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.

thanks,
Cen
0

Featured Post

Technology Partners: 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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, left to enroll

771 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