It has been covered in some topics, namely: Programmatically obtain the phone number of the Android phone .
However, bear in mind that this doesn't always work. With a couple of portuguese SIM cards at least, I wasn't able to retrieve the phone number using these methods.
Quoting from @Johan's answer in that topic:
There is no guaranteed solution to this problem because the phone
number is not physically stored on all SIM-cards, or broadcasted from
the network to the phone. This is especially true in some countries
which requires physical address verification, with number assignment
only happening afterwards. Phone number assignment happens on the
network - and can be changed without changing the SIM card or device
(e.g. this is how porting is supported).
I know it is pain, but most likely the best solution is just to ask
the user to enter his/her phone number once and store it.