Hi there,
The requirements look quite clear and straightforward to implement. I haven't specifically used Dinstar before but another similar gsm gateway. So I'm not sure if Dinstar keeps track of how many SMS is sent for each sim. If it doesn't we need a database, or a plain json file if there's not too many sims, to keep track of that.
I suppose those random error messages will be selected from file(s). Also, I presume the group of numbers to sent that error message via SMS will also be selected randomly, or is there any rule about it?
Anyway, I'd prefer python for scripting but if you choose php that's totally fine as well, just let me know which php version you want me to target exactly. I need access to your system for the development. I expect this to be ready in 4 days at most, thanks.