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();
}
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).
– Bacco