I am trying to make a GSM IVR modem. I ended up with the number using the code below
SerialPort SP = new SerialPort("COM3"); SP.BaudRate = 9600; SP.Parity = Parity.None; SP.DataBits = 8; SP.StopBits = StopBits.One; SP.RtsEnable = true; SP.DtrEnable = true; SP.Encoding = System.Text.Encoding.Unicode; SP.ReceivedBytesThreshold = 1; SP.NewLine = Environment.NewLine; SP.Open(); SP.WriteLine("ATDT0999182542;"+ Environment.NewLine);
You can request a call status using
string ss= SP.ReadExisting();
State call. It can be one of the following values:
0 - active 1 - held 2 - dialed 3 - warning 4 - incoming 5 - pending
Now my question is: how can I play a voice message after answering a call, and can I get the number pressed by the user (1,2,3).
source share