Solved

MSCOMM1 question

Posted on 2004-09-27
8
336 Views
Last Modified: 2008-02-01
Not to familiar with the MSCOMM1 features and here is my problem.
I created an app in VB6 that acts as a speed dialer to dial phone numbers using my default modem in XP.

I also want this app to be able to give me caller ID (number only) when calls come in.
I have played a little with it and I assume that MSCOMM1 cannot do both at the same time.

Can someone give me some advise on how to setup the event for receiving caller ID when a call comes in and dialing a number when I need a call to go out.

Pls provide a working example.

Thx
0
Comment
Question by:robbperk
  • 3
  • 2
8 Comments
 
LVL 1

Expert Comment

by:ranjfoad
ID: 12166579
you have to use AT&T standard to comunicate with the com port inorder to get the infos you need(make calls,....)
i am not sure if there is a component in windows to do those stuff or not?!!
check out these links
http://www.commsdesign.com/design_corner/showArticle.jhtml?articleID=16505028
http://www.dynamode.co.il/main-ftp/Modem%20PCMCIA/R1456VQC-T/Manual.pdf
http://www.56k.com/inits/rockwell.pdf
http://www.creatix.de/support/download/gruppe1/Handbuch_DSP_GB.pdf
0
 
LVL 3

Expert Comment

by:Stimphy
ID: 12166641
I found this sample code some time back...

Public Call_Name As String
Public Call_Number As String
Private Sub Form_Load()
    With MSComm1
        .Settings = "115200, N, 8, 1"
        .CommPort = 2 'change to your modem's port
        If .PortOpen = False Then .PortOpen = True
        .RThreshold = 0
        MSComm1.InputLen = 0
       .Output = "AT#CID=1" & Chr(13) 'your modem will have to support this function or it wont work
    End With
End Sub

Private Sub Form_Unload(Cancel As Integer)
    MSComm1.PortOpen = False
End Sub

Private Sub MSComm1_OnComm()
Dim Buffer As String
    Buffer = Replace(MSComm1.Input, Chr(13), "")
    Buffer = Replace(Buffer, Chr(10), "")
    GetCallerInfo (Buffer)
End Sub

Private Sub GetCallerInfo(Caller_Id_string As String)
        If InStr(Caller_Id_string, "NAME") > 0 Then
           Call_Name = Mid(Caller_Id_string, (InStr(Caller_Id_string, "NAME = ") + 7), ((InStr(Caller_Id_string, "NMBR = ") - 7) - InStr(Caller_Id_string, "NAME = ")))
        End If
        If InStr(Caller_Id_string, "NMBR") > 0 Then
            Call_Number = Mid(Caller_Id_string, (InStr(Caller_Id_string, "NMBR = ") + 7))
        End If
        If Len(Call_Name) > 1 Or Len(Call_Number) > 1 Then
            MsgBox Call_Name & vbCrLf & Call_Number
        End If
End Sub

Regaurds,
Dave
0
 

Author Comment

by:robbperk
ID: 12174743
Thank you so much for the quick response, Dave.
Unfortunately, your submission did not work.  I entered all the code into my app and changed the line to comm port 4.  Upon making the test call, it did not react in any way (no caller info, no error messages, etc.)

Thoughts?

Robb
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 3

Expert Comment

by:Stimphy
ID: 12176644
Robb,

Can you give me the exact model of your modem?

Ragaurds,
Dave
0
 

Author Comment

by:robbperk
ID: 12176689
I am using the Intel(R) 537EP v9x DF PCI modem on COM 4
0
 
LVL 3

Accepted Solution

by:
Stimphy earned 50 total points
ID: 12176838
Robb,
I would really like to be of more service, but I no longer have a modem on my PC.

You may want to referr to the reference given by ranifoad http://www.56k.com/inits/rockwell.pdf

Look at page 54.  This contains all the commands for talking with the modem and caller id stuff.
Take the head start that I provided and toy with the different commands.

Regaurds,
Dave
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

762 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now