Assuming that you save the message, when you retrieve it with AT+CMGR then the originating number will be returned as part of the data. See the AT documentation for your particular modem for further details.
Assuming that you save the message, when you retrieve it with AT+CMGR then the originating number will be returned as part of the data. See the AT documentation for your particular modem for further details.