How to get audio from GSM modem - Not to a speaker but as a RTP stream RRS feed

  • Question

  • I have a GSM modem with a serial port I can make a call using AT Command. My problem is that I want to read the audio stream from GSM Modem. Any help or support is highly appreciated.

    Tuesday, May 21, 2019 11:49 AM


All replies

  • What audio stream?  Are you saying you want to make voice calls with your GSM modem?  That can be done, although it's a bit tedious.  Here some examples.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Tuesday, May 21, 2019 6:24 PM
  • Thanks for the reply, Yes we can make audio calls from GSM AT Command. 

    I am working on a IoT Project with raspberry pi and SIMCOM GSM Module. What i am trying to achieve is you can insert your SIM in the GSM Modem and if you receive SMS or a Phone call if will automatically forward the call to an APP (Connected to a server and listen to a PORT) and from APP you can answer the call.

    i am using ATDnnnnnnn; (To dial number)

    I have done by best to explain the concept.

    I am sharing the Code below.

    private const string SERIAL_PORT_NAME = "COM3";

    private static SerialPort _modemConnection;


     _modemConnection = new SerialPort(SERIAL_PORT_NAME)
                    // 19200 baud, most modems will accept everything
                    // from 9600 up to 115200
                    BaudRate = 19200,
                    // 99% of the time the port connection will be
                    //8 Data bits
                    DataBits = 8,
                    // NO partiy
                    Parity = Parity.None,
                    // and 1 stop bit. Check your modem manual if
                    // this doesn't work
                    StopBits = StopBits.One

     _modemConnection.DataReceived += new SerialDataReceivedEventHandler(data_received);

      private void data_received(object sender, SerialDataReceivedEventArgs e)
                sp = (SerialPort)sender;
                //string indata = sp.ReadExisting();
                int x = sp.BytesToRead;
                buffer = new byte[x];
                sp.Read(buffer, 0, x);

    Thanks in Advance.

    Tuesday, May 21, 2019 7:43 PM
  • Hi aallvvii,

    Thank you for posting here.
    Since this forum is discussing and asking questions about the about the C# programming language, IDE, libraries, samples, and tools, so I will move this thread to Where is the Forum For...? forum to redirect the thread to the right forum to give you a more professional answer.

    Thank you for your understanding.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 22, 2019 2:52 AM
  • Might try asking for help over here.





    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Thursday, May 23, 2019 12:39 PM
  • I would ask here:


    Richard Mueller - MVP Enterprise Mobility (Identity and Access)

    Thursday, May 23, 2019 12:45 PM