Rasberry-pi-gsm-call-from-mobile

Hello,
I want to initiate a call from normal mobile to “Rasberry Pi” with GSM. Below activities should happen. (a).Call from mobile should reach “Rasberry PI” GSM.
(b) GSM should be able to interpret caller (voice stream to text).
© GSM should be able to send response back to caller as voice stream.
I have seen sample “C” code to receive voice calls ->they read from serial port character bytes. How is this possible? From mobile how is voice information transmitted and how is GSM able to get information as character bytes? Internally is there any voice to text conversion taking place? OR do we need to setup any VoIP server (I am not clear on this)? or SIM provider will take care of this?
Kindly help.
Thanks

You seem to be confusing lots of different technologies here, and, whilst you can run on Asterisk on Raspberry Pi, it is not clear where you are using Asterisk in your question.

RPi is not natively going to support GSM, as the fundamental concept is that it is basically a smart phone without the phone and with a more desktop oriented set of user interface peripherals.

From an Asterisk point of view, the use of GSM is irrelevant for the rest of the requirements.

Without a gsm gateway or a usb gsm voice enabled modem ras cannot receive mobiles calls.
Now for the voice to text stuff you will need some engine like sphynx to do that but good luck making it work.

Use Chan_dongle to receive calls with Huawei USB 3G, ibm watson text to speech and ibm watson speech to text.