We need to see all the code because we can't guess what you've typed (e.g. I saw you delete a trim_msg() function call in the code snippet you show us).
Without enough information I cannot solve the problem. I would guess you do not have an annotated schematic either. Without the needed information Good Luck!
One possibility is that the GSM is replying, but the conditions of your read are not correct so the program doesn't receive it. If there isn't one already put a led (and resistor) on the gsm->esp line.