Dear sir
I have a large experience in using of SIM900. I have made a custom library for Atmega, that uses all GSM functions (SMS, GPRS, FTP etc.) and may take a look at your code to help you fix it.
There is some unclear moments in SMS communication and I can help you in that.
My main working environment is Atmel processors, but for that project that is not very important.
I will go offline now, but will be back approximately at 14..15:00 GMT, so write me if you agree to try it together.