liudr:
Your code is too long to understand and you are not offering any explanation how it runs. How am I supposed to help you?At least, initialize your array!!!
char sms_text[100]=""; // Besked indhold
SMS is 140 octets, not 100, make sure your array is long enough...