Link to home
Start Free TrialLog in
Avatar of azsoft
azsoft

asked on

How to receive incoming calls using mscomm control

Hi,
I'm using MSCOMM control for my dialer program.

the following is my vb settings:-
   MSComm1.CommPort = 3
   MSComm1.Settings = "9600,N,8,1"
   MSComm1.InputLen = 0
   MSComm1.RTSEnable = True    'must
   MSComm1.PortOpen = True
   
this one is a call
   MSComm1.Output = "ATDT" + Trim(Text1.Text) + Chr$(13)
and this is on my timer
   If MSComm1.InBufferCount Then
        MsgBox (MSComm1.Input)
   End If
at this stage, i can call any phone number and also can send & receive msg to & from other party.

but when other party call my program, i don't know how to pickup or receive the call. for a start can somebody show how to pop up a message when there is a incoming calls.

ASKER CERTIFIED SOLUTION
Avatar of vinnyd79
vinnyd79

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

The MSCOMM Control raises events when ever anything happens on the COM port.
The Event is _OnCom

You have to detect a RING on the modem (comEvRing) and when it is received, you need to issues an ANSWER modem instruction (ATA).

If you set the RTThreshHold to 1 - an event will be raised everytime a character arrives on the port.
You can also use this to detect the 'RING' data arriving on the port and then handling the Ring.

I've had to do this on NT as NT has a problem raising the comEvRing event.

Once the modem answers the call you can change the RTThreshHold to a value that better suits you or even to 0 to prevent the raising of events.

HTH,
Alon
Avatar of azsoft
azsoft

ASKER

Where can i get the ATA.
Avatar of DanRollins
Hi azsoft,
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 vinnyd79's comment(s) as an answer.

azsoft, 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
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange