how to extract the sender number in gsm message

Hii,

This is my first question on the forum, so I apologize in advance for any mistakes that I make.

I am using SIM 900A module and an Arduino UNO board. I need to extract the sender number and need to send an SMS to that number. When I send an SMS to gsm module then the format shown in my serial monitor is,

+CMT: “+916281XXXXXX” ,"",“19/04/02,13:49:32+22”
hii am the message from sender number

Could someone please help me with the code for extracting the sender number and storing it?

Will the number always be the same length and always in that position ?
Is it in a variable of some kind or did you print each character as it was received ?

UKHeliBob:
Will the number always be the same length and always in that position ?
Is it in a variable of some kind or did you print each character as it was received ?

This is the response from a SIM900 module so I can probably say it's gonna be in that position all the time.

Also the answer to the question is, getting the response from the SIM900
(+CMT: "+916281XXXXXX" ,"","19/04/02,13:49:32+22"
hii am the message from sender number)
and putting it into a string, then getting a substring from the first appearence of " to the second appearence of " again. If you are only expecting calls from the same country code, you can just search for the first ", add how many digits you are expecting, and create your substring that way. After saving the extracted number to a new string you can use it, but keep in mind you are also extracting the +91 part, which means the string you got has a + in it.

UKHeliBob:
Will the number always be the same length and always in that position ?
Is it in a variable of some kind or did you print each character as it was received ?

Telephone numbers are not a fixed length, however they do follow certain rules for their length.

In the UK all mobile numbers are 11 digits.
Landline numbers are usually 11 digits, with a small number of 10 digit numbers
Non geographic numbers are usually 11 digits with a small number of 10 digit numbers

International numbers are longer and the length depends on the country of origin.

You need to find out what the case is for your country.