Reputation: 31
I have a SIERRA Wireless FXT009 EDGE AirLink programmable modem. I use AT Commads to dial a phone number and it's all working nicely. My question is how can I detect if a user on the phone presses a button and how can I receive which button was pressed? Is it even possible to do this?
I'm using C# and communicating with the modem through serial port.
Setup
serialPort = new SerialPort();
serialPort.PortName = [Port];
serialPort.BaudRate = 9600;
serialPort.DataBits = 8;
serialPort.StopBits = StopBits.One;
serialPort.Parity = Parity.None;
serialPort.ReadTimeout = 300;
serialPort.WriteTimeout = 300;
serialPort.Encoding = Encoding.GetEncoding("iso-8859-1");
Opening connection
serialPort.Open();
serialPort.DtrEnable = true;
serialPort.RtsEnable = true;
Dialing
serialPort.Write("ATD[phoneNumber];\r");
Timer (500 ms)
string result = connection.serialPort.ReadExisting();
if (!string.IsNullOrEmpty(result))
{
logTextBox.AppendText(result + "\n");
}
Upvotes: 2
Views: 1060
Reputation: 31
I found the solution for my problem in the AT Commands Interface Guide for Firmware 7.52 document. There is an AT Command (+WDDM) that switches DTMF Detection Mode on/off. I turned it on and now I'm receiving the keys pressed on the phone while calling. Tested it on two phones with 0-9, *, # keys.
Upvotes: 1