Just got a working solution after searching for weeks.
I have an unlocked 4s I use with pepephone in Spain and my number was showing "unknown" with impossibility to change it.
I got the sim card from someone who's got an official iPhone carrier, Movistar, put it in my iPhone, went to the Phone settings and could see the Movistar sim card number with possibility to change it. I clicked on it to change and while in edit mode took of the friend's sim card and put back mine, waited for it to get the network while still being in edit mode, then input my own number and saved.
Now even after rebooting the phone my own number shows and is editable. Problem solved.