How to get incoming phone number from modem


Thread Starter


<p>I use mscomm to listen to all incoming phone calls, could you tell me how to get the incoming number?

Could you show me two problems in OnComm event
private void com_OnComm(object sender, System.EventArgs e)
// all incomming phone will add to a list (multiline TextBox)
catch(Exception ex){
<p>1. Get the phone number from incoming phone<br>
2. If the phone my modem received 5 times ring, it auto hangup (or auto reply by playing a sound to the phoner who called to me if possible).