(Warning : This method only work if you have a french mobile plan.)
To find the RIO code (Operator Identity Statement) of your mobile phone in France, there is a universal number to dial, whatever your mobile phone operator.
You must indeed dial: 3179
This call is free and possible even if your credit is exhausted. A voice mail will tell you your RIO code (a code composed with numbers and letters) and your contractual mobile plan commitment deadline (if you are subject to it). These two pieces of information will be sent back to you by text message (SMS), so don't panic if you haven't managed to write everything down when your voicemail tells you to.
The RIO code is necessary to change operator (for example, if you want to switch from Orange to Free Mobile or vice versa, from SFR to Bouygues, ...), because it is this number that will be used to start the procedure of your telephone number portability. You will be asked for the RIO code when you register with your new operator.
Your new operator will take care of the termination procedures at your previous operator, so you have to choose the exact day you want to make the portability of your number to the new operator (in the two-month limit).