caller id software Caller ID Software, MS Access


Caller ID Software
Programming
Hardware

Hardware
Hardware
Caller ID Software
Programming
Hardware
Contact

Microsoft Access 97 Software Download

NOTE: This is an actual working version. For the product to work as intended you need an Identifier, the MS Comm control, and Caller ID service from your telephone company. This is for Advanced users (programmers) of Access.

This download file is a Microsoft Access database file. It contains a form which uses the MS Comm control. You must have this control and it must be registered in order to work. If you do not have this control you can still view the source code to see how easy the Identifier integrates with software.

To download click here... Identifier.mdb (350K bytes)
Or a Zipped copy using PKZIPW access.zip (81K)

About the Software

This is an example Microsoft Access application which demonstrates how easily the Identifier interfaces with Access. It uses the MS Comm control. You must have this Microsoft control to make the application work.

The Identifier was designed to easily integrate with software applications. The Identifier sends a simple ASCII string to the computer via the serial port when ever it sees an event on a phone line. These events always start with a plus sign and end with a carriage return (see examples below). The software monitors the serial port. This application sets up the MS Comm control to fire an event upon reception of each character transmitted from the Identifier. It looks for a plus sign. Once it see the plus sign it saves the following characters until it sees a carriage return. As soon as it sees the carriage return it processes the event.

Comm Port Routine

The following portion of the source code shows how each character is processed as it is received from the serial port. This code runs when the MS Comm control fires its "comEvReceive" event. The character is assigned to the varable "strCommChar".

Select Case strCommChar 
  Case "+"              'Beginning of Identifier Event
    strIdentifier = ""
  Case Chr$(10)         'Ignor the Line Feed after the CR
    ' ignor line feed
  Case Chr$(13)         'Carriage Return, End of Identifier Event String
     IdentifierEvent (strIdentifier)  ' The Identifier Event is passed to a processing routine
   Case Else            'Append the received character to the Identifier String
     strIdentifier = strIdentifier + strCommChar 
End Select


Identifer Event Format

The first character after the plus sign identifies what type of Identifier event occurred. Although commas separate the data in the event string, it is actually a fixed field format. Therefore you do not have to search for the commas to extract the data. A simple substring function is all that is required because the data is always in the same place for each type of event.

The following is an annotated example of the real time data from the Identifier with all events enabled. The example is two calls, one to another line with Caller ID and one to a line with Distinctive Ring but no Caller ID. This example has all realtime events enabled. Each type of event may selectively turn on or off. All data is output in a fixed field format.


+2,4,002				     OFF HOOK OUTGOING LINE 2
+5,3,002				     DTMF DIGIT 3 PRESSED LINE 2
+5,4,002					  "      4        "
+5,4,002					  "      4        "
+5,7,002					  "      7        "
+5,6,002					  "      6        "
+5,6,002					  "      6        "
+5,5,002					  "      5        "
+2,1,001				      RING START LINE 1
+2,2,001				      RING STOP LINE 1
+1,9543447665,Y E S TELECOM   ,001	      CALLER ID INFO INCOMING LINE 1
+2,1,001				      RING START LINE 1
+2,2,001				      RING STOP LINE 1
+2,3,001				      OFF HOOK INCOMING LINE 1
+2,0,002				      ON HOOK LINE 2 IDLE
+2,0,003				      ON HOOK LINE 1 IDLE


Event Processing Example

The following source code takes the Identifier Event string passed by the above Comm routine and extracts the information. The Identifier Event string is passed without the preceding plus sign. The first character indicates the type of Identifier Event. The types are:
  • 1 Caller ID, Number and Name
  • 2 Line Status
  • 3 Watchdog or Serial Number
  • 4 Caller ID, Out of Area or Private
  • 5 Touch Tone (DTMF)
  • 8 Caller ID Signal Error

Event Processing Source Code


strEventType = Mid$(strEvent, 1, 1)  'The first character indicates the type of event
Select Case strEventType
  Case "1"                                     'Caller ID Event
    intLineNumber = CByte(Mid$(strEvent, 30, 3)) 'Get line number
    strCallerIdNumber = Mid$(strEvent, 3, 10)    'Get Caller's phone number
    strCallerIdName = Mid$(strEvent, 14, 15)     'Get Caller ID Name
  Case "2"                                     'Line status event
    intLineNumber = CByte(Mid$(strEvent, 5, 3))  'Get Line Number
    Select Case Mid$(strEvent, 3, 1)             'Get type of line status event
    Case "0"                                       'On hook/Idle event
      strDialed(intLineNumber) = ""                  ' Clear all data
      strCallerIdName = ""
      strCallerIdNumber = ""
      strStatus = "Idle"
    Case "1"                                     'Ring Start Event
      strStatus = "Ringing"
    Case "3"                                     'Off Hook incoming call
      strStatus = "Answered"
    Case "4"
      strStatus = "Outgoing Call"                'Off Hook originating call
    End Select
  Case "3"                       'Serial Number or Watchdog Event
    Exit Sub                     ' Do not process
Case "4"                      'Caller ID Event - Out of Area or Private
    intLineNumber = CByte(Mid$(strEvent, 5, 3))
    strCallerIdNumber = ""
    If Mid$(strEvent, 3, 1) = "P" Then   'Private Caller ID, blocked by caller
      strCallerIdName = "Private"
    Else
      strCallerIdName = "Out of Area"    'Caller ID data not available to telco
    End If
    
  Case "5"                      'DTMF event
    intLineNumber = CByte(Mid$(strEvent, 5, 3)) 'Get line number and Save this digit
                                                ' with any previous digits received
                                                ' on this line
    strDialed(intLineNumber) = strDialed(intLineNumber) + Mid$(strEvent, 3, 1) 
              'Third char. of event is the Digit
Case "8"                                          ' Caller ID Signal Error Event
    intLineNumber = CByte(Mid$(strEvent, 5, 3))
    strCallerIdName = "Unknown"
End Select