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

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

+6
source share
1 answer

For a voicemail, read the voicemail numbers and their operation. Yes, you can get the number clicked by the user.

+1
source

Source: https://habr.com/ru/post/987847/


All Articles