Hot Cool Stud
Hot Cool Stud

Reputation: 1205

How to get user response using ATD commands GSM modem in c#

I am trying to make IVR system GSM modem. I am done with calling on number using 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);

Can query to call status using

string ss= SP.ReadExisting();

State of the call. Can be one of the following values:

0 - Active 1 - Held 2 - Dialling 3 - Alerting 4 - Incoming 5 - Waiting

Now my question is, How can i play voice message once call is answered, And can I get the number pressed by user (1,2,3).

Upvotes: 6

Views: 931

Answers (1)

Bilal Qamar
Bilal Qamar

Reputation: 342

For voice message read about voice mail numbers and their working. Yes you can get the number pressed by the user.

Upvotes: 1

Related Questions