If in the running train, you are facing any problem like, AC not working / cooling, fan not working, bed or train is not clean, toilet dirty, no tap water available, someone else are sitting on your birth without having reservation ticket etc, you can immediately SMS the complaint at number- +919717630982 (This is the official number given by Indian railway, source). There is fare chances that your complaint will be addressed on next station.
For Indian railway, If you want to register your complaint by calling (talking), or want to give feedback/Suggestion by calling, you should call the number “138”.
Help line number for security related matter for Indian Railway is “182”.
For food and catering related complain or suggestion, (mostly related to IRCTC), The Toll Free telephone No. is 1800-111-139. If you have any problem with the food served in Indian railway, you should register your complain at given number.
If you met with any incident and want to register complain (Lodge Complain) or want to give suggestion in web based platform, you should lodge it at this link. You will get the tracking number of your complaint/Suggestion. After some time you will get official replay from Indian Railway for your complaint/Suggestion, for this you need to track your complain by registration number.
You must save the above number on your mobile, and encourage other people to use these numbers to get better service from Indian Railway and for secure journey in Indian railway.
The above number may change in future, to get updated and official number you should regularly check this link.