Results 1 to 14 of 14

Thread: Caller ID program

  1. #1

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Caller ID program

    Is there a way i can make a program which monitors my phone line, and displays the details of a telephone call when recieving one.

    I used to work ni a pizza place so i know its possible, what happens is when a customer phones up, the form is loaded with the details of where they are phoning from, their number, and the call type (ie international, national, local etc)

    Any one know how to do this.
    ilmv

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Caller ID program

    Not through native VB. I'm sure you would need some type of third party control (at God know's what cost) that has the ability to capture this type of data.

    In addition, there would almost have to be some type of hardware that you would have to install on your PC that the phone or phone line connects to somehow.

    I'll do some Googling and see if I can find anything.

  3. #3
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: Caller ID program

    PHP in your FACE!

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Caller ID program

    I told you they wouldn't be free. I found this as well.

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Caller ID program

    There is a free one on Planet Source Code. It doesn't work with all Caller-ID enabled modems that I've tried it on. I don't know if I should post it, so here is a link.

    Title: Caller I.D.
    Description: This is everything you could ask for in a caller id program. This will monitor your incoming calls and display them if you have caller id and if your modem supports caller id. You can select a picture for the person calling. This will also speak if desired when a person calls and save all your calls. You will need the text-to-speech engine which you can get from http://www.microsoft.com/msagent/downloads/user.asp#tts. I've seen things way worse than this cost alot of money, so take advantage of this source. This is just a beta version. Most things have been tested. Please send any of your feedback or information to improve this source to keith_escalade AT yahoo.com or pm me on AIM: kescalade1
    This file came from Planet-Source-Code.com...the home millions of lines of source code
    You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb...48942&lngWId=1

    The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL.

  6. #6
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Caller ID program

    I've tried the one David suggested. It works on some modems, and on some it doesnt. The fact is that there are (I think) five different protocols for transmiting the Caller ID data. It will work only if your modem supports the same protocol that your phone company uses.

  7. #7

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: Caller ID program

    when i downloaded it there was no Xvoice dll?

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Caller ID program

    I posted the readme that tells how to get it.

  9. #9

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: Caller ID program

    downloaded the test to speach exe and installed, but still no joy, what am i doing wrong?

  10. #10
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Caller ID program

    One month later:

    I wrote a very nice talking caller ID program years ago using VB. To monitor the phone line I used the MSComm control. Since the text sent is standardized, the only difference between modems should be the setup string.

    To setup the modem I would send the string
    VB Code:
    1. 'set up for unformatted caller ID
    2.     MSComm1.Output = "AT#cid=2" + Chr$(13)
    Then when a call arrived
    VB Code:
    1. Private Sub MSComm1_OnComm()
    2. Dim instring As String, y As Integer
    3. Static Buffer As String
    4. Dim i As Integer, x As String
    5.  
    6.     instring = MSComm1.Input
    7.     Buffer = Buffer & instring
    8.     y = InStr(Buffer, vbCrLf)
    9.     While y > 0
    10.         instring = Left$(Buffer, y - 1)
    11.         Buffer = (Mid$(Buffer, y + 2))
    12.         If Not CID(instring) Then ModemResponse = Stripped(instring)
    13.         y = InStr(Buffer, vbCrLf)
    14.     Wend
    15.  
    16. End Sub
    17.  
    18. Function CID(instring As String) As Boolean
    19. Dim x As String, y As Integer, q As String, w As String, i As Integer
    20. Dim Z As String, O As String, Cname As String
    21. Dim Tuday As String, Thisdate As String, NowsTime As String
    22. Dim AC As String, SoundFile As String
    23. Dim MessageLen As Integer, pointer As Integer, Field As String
    24. Dim Number As String, T As String, a As Single, D As String
    25.  
    26. x = "MESG = "
    27. 'Message format:
    28. '{header} {message length} {field1} {field2} ... {fieldn} {checksum}
    29. 'Typical messages:
    30. '80 27 01 08 {mm dd hh mm} 02 0A {acd pre suff} 07 0F {name} 8D
    31. '80 19 01 08 {mm dd hh mm} 02 0A {acd pre suff} 08 01 "O" 5F
    32. '80 10 01 08 {mm dd hh mm}  04 01 4F 08 01 4F 5F
    33.  
    34. '{header} = 80h
    35. '{message length} = number of bytes in message not including header, this byte, or checksum
    36.  
    37. pointer = InStr(instring, x) ' y points to header -1
    38. If pointer = 0 Then CID = False:  Exit Function ' not a caller ID message
    39. CID = True
    40. pointer = pointer + 1 + Len(x)
    41.  
    42. MessageLen = Asc(Mid(instring, pointer, 1)) + pointer 'length of message
    43. pointer = pointer + 1 'point to 1st field
    44.  
    45. While pointer < MessageLen 'parse the fields
    46.  
    47. Select Case FieldType(instring, pointer, Field)
    48.  
    49. Case Is = 1 'date field
    50. '    08 length of date field
    51. '    {mm dd hh mm} date and time
    52.     If SetTime Then
    53.      T = Mid$(Field, 5, 2) & ":" & Mid$(Field, 7, 2)
    54.      D = Mid$(Field, 1, 2) & "/" & Mid$(Field, 3, 2)
    55.      Time = T
    56.      Date = D
    57.     End If
    58.    
    59.     x = Format(Date, "long date")
    60.     Tuday = Left$(x, InStr(x, ",") - 1)
    61.     Thisdate = Format(Date, "medium date")
    62.     NowsTime = Format(Time, "medium time")
    63.  
    64. Case Is = 2 'caller number field
    65. '    0A length of caller number filed
    66. '    {acd pre suff} caller's number areacode+prefix+suffix
    67.     Z = Trim$(Right$(Field, 4)) 'suffix
    68.     q = Trim$(Mid$(Field, 4, 3))   'prefix
    69.     w = Trim$(Left$(Field, 3)) 'area code
    70.     Number = Field
    71.  
    72. Case Is = 4 ' UnAvailable Caller Number
    73. '    01 length of caller number filed
    74. '    4F "O"
    75.     Number = "UnAvailable"
    76.  
    77. Case Is = 7 ' caller name field
    78. '    0F length of caller name field
    79. '    {name} caller's name padded on left with spaces
    80.     Cname = Field
    81.    
    82. Case Is = 8 ' UnAvailable Caller Name
    83. '   01 length of Unavailable field
    84. '   4F signals callers name is unavailable
    85.     Cname = "UnAvailable"
    86.    
    87. End Select
    88. Wend
    89.  
    90. SoundFile = GetSoundFile(Number, Cname)
    91.  
    92. If Number = "UnAvailable" And HangAnon Then 'Hangup on unwanted calls
    93.   SendModemCommand "ATA"
    94.   a = Timer + 0.5
    95.   While a > Timer: DoEvents: Wend
    96.   SendModemCommand "+++"
    97.   While a > Timer: DoEvents: Wend
    98.   SendModemCommand "ATH"
    99.  
    100. ElseIf SoundFile = "" Then 'Or announce an unknown caller
    101.  PlaySounds RingFileName
    102.  Call AnnounceCaller(Cname, Number)
    103.  
    104. Else 'Or announce known calls
    105.   PlaySounds RingFileName
    106.   Cname = Data1.Recordset("LastName") & " " & Data1.Recordset("FirstName")
    107.   PlaySounds SoundFile
    108. End If
    109.  
    110. 'Write call to log file
    111. Open MainPath & "phone.log" For Append As #1
    112. O = Space$(75)
    113. Mid$(O, 1, Len(Cname)) = Cname
    114. Mid$(O, 18, Len(Number) + 3) = Format$(Number, "(@@@)@@@-@@@@")
    115. Mid$(O, 35, Len(Tuday)) = Tuday
    116. Mid$(O, 50, Len(Thisdate)) = Thisdate
    117. Mid$(O, 65, Len(NowsTime)) = NowsTime
    118. Print #1, O
    119. Close #1
    120.  
    121. 'Add call to recent caller's list
    122. RecentCalls.AddItem O
    123.  
    124. 'Change task bar icon to indicate a called has been received
    125. Set TBIcon1.Picture = Pic(1).Picture
    126.  
    127. 'Save call in buffer for future use
    128. Lastcall = Lastcall + 1
    129. PreviousCall(Lastcall) = O
    130.  
    131. End Function
    132.  
    133. Function Stripped(x As String) As String
    134. Dim y As Integer, Z As String
    135.     Z = x
    136.     y = InStr(Z, vbCr)
    137.     While y > 0
    138.         Mid(Z, y, 1) = " "
    139.         y = InStr(Z, vbCr)
    140.     Wend
    141.     Stripped = Z
    142. End Function
    Hope this helps some.

    -Bill

  11. #11

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: Caller ID program

    Nice! i am trying to figure out how it works, have you got an example of this working at all?

    ILMV

  12. #12
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Caller ID program

    Unfortunately I no longer have a modem in any of my computers so I can't run it anymore.
    I would suggest stripping out all the extra stuff and try to debug.print everything to the immediate window. I remember when I developed it I had two phone lines so I ended up calling myself all day. No I didn't go blind

  13. #13

    Thread Starter
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: Caller ID program

    guess i ill have to wake up and learn how to use this bad boy.

    I hope however you will be able to give me help and advice if i need it

    ILMV

  14. #14
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Caller ID program

    Yes I will

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