Well. Not exactly. But close. The "phrase" in the function you are mentioning are apparently not taking long messages like this. If it did, it wouldn't be a problem really.
The text we are receiving are this:
Bra surfat! Du har förbrukat 50 GB idag. Svara TOPUP på detta SMS för att fortsätta surfa med ytterligare 5 GB i taget. Självklart utan extra kostnad eftersom du har Obegränsad. Undrar du varför du får det här SMS:et? Läs mer på tele2.se Hälsningar Tele2
In short, it means that we have used 50Gb and that we have to reply with the word TOPUP. So I'm really looking for a way to search incoming text messages for the phrase "TOPUP", and if that exist, reply to the number that sendt the message with the text "TOPUP" only.
I have written a script that checks the messages for the string "TOPUP" every minute via CRON (using CURL and GREP), but having an "auto reply" with a built in grep function would be more ... accurate I guess, and wouldn't have to depend on external scripts and whatever errors that could lead to.
Thanks for answering :)