C# Bina with Usb Fax Modem

Asked

Viewed 315 times

2

I would like to know a way to get the phone number of a fax modem usb, using C#.

Example: I have a computer with a fax modem usb connected to a telephone line, when someone calls me my system picks up the number that is offending and puts in textbox.

I’m trying with SerialPort as follows:

public void GetNumber() {

    serialPort.PortName = cbPorta.Text;
    serialPort.BaudRate = Convert.ToInt32(cbTxTransmissao.Text);
    serialPort.Handshake = Handshake.None;
    serialPort.Parity = Parity.None;
    serialPort.Open();            
    var Comando= Encoding.ASCII.GetBytes("AT&Zn?");
    serialPort.WriteLine(Comando);
    System.Threading.Thread.Sleep(200);
   lbStatus.Text = serialPort.ReadLine();
   serialPort.Close();
}
  • 3

    Almost always faxmodems work only with FSK for caller identification, and in Brazil DTMF is used. If faxmodem doesn’t support DTMF, there’s nothing to do (a DTMF to FSK adapter is usually more).

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.