Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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).

like image 510
Hot Cool Stud Avatar asked May 25 '15 06:05

Hot Cool Stud


People also ask

How to use ATD and ATA commands in a mobile phone?

5) ATD – This command is used to dial or call a number. 6) ATA – This command is used to answer a call. An incoming call is indicated by a message ‘RING’ which is repeated for every ring of the call. When the call ends ‘NO CARRIER’ is displayed on the screen. As ATA followed by enter key is pressed, incoming call is answered.

How to use at command in modem?

The characters entered in the AT command must be in the same case, either upper or lower. The command is analyzed by the modem after receiving the ENTER key character. AT commands response always start with <CR><LF>, and after this the response may be different according the execution statement

How to send SMS using GSM using AT commands?

Similarly ‘AT’ command is sent to Modem, as an attention command to communicate, and a very basic response is ‘OK’ from the modem. By using these commands gsm module can be used to send sms using gsm and many others tasks. You can easily interface gsm with microcontroller by using AT commands.

What is the use of write command in GSM modem?

Write command : This type of command consists of complete command to be executed. It actually sets the parameter values of the command. Execution command : This command is used very rarely. It reads the non-variable parameters of the modem that are only affected by internal processes executed in the GSM Modem.


1 Answers

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

like image 55
Bilal Qamar Avatar answered Sep 20 '22 15:09

Bilal Qamar