Use Ql_RIL_SendATCmd with CallBack

i need write a function,in my function use Ql_RIL_SendATCmd() with CallBack,when i use callback my gsm not work correctly,not recive sms or verrry late recive.
But when i dont use callback work good and correctly.

whta problem??

Can you post the code where you call this function