How to manage/Process AT command response, SMS OTP Text messages and GPRS UDP paackets in Quectel GSM in UART of stm32

I have the common RxBuffer which will store the all incoming data from GSM module like SMS, command responses and GPRS UDP packets , So I need a function to segregate those data in their respective packet stucture, any function or help needed

the different incoming data,The URC format of module output is different, and you can distinguish and isolate it by different URC formats